News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Hi I am new

Started by btcomp, December 02, 2014, 11:34:42 AM

Previous topic - Next topic

btcomp

Hi  :biggrin: I am new to this forum. I have used other SMF forums and even run one. So I should be okay on typing here. I am a programmer and web developer. I have used .Net, Php... AND I have used assembly, but it's been years. So I have installed MASM32 and have used, even made a few EXEs. But I run into problems a bit. So I am following a bunch of great and short videos and getting up to speed. So I use EMU8086, but it's a 16bit & I can't run 32bit. Plus I think it will charge me. I tried to get WinAsm, but my virus detector doesn't like it?

Anyway, I just wanted to let you know I'm not a BOT, :dazzled: & I am enjoying assembly again, but it's going to take some getting used to, and I hope I can get some material I can look at to make it even easier.

As a footnote, I have several old copies of MASM, but from the 80s & 90s. I also have some other debugger I bought at U of Mich-Flint campus, but that was back in 1995. All programs I have are either on 3 1/2 inch, and I have a USB 3 1/2 I can install from, or my first are on 5 1/4 inch. And I do have one old computer with a 5 1/4 drive, but I really don't want to go there!


jj2007

Hi btcomp,

With your programming experience, you will quickly realise that DOS and 16-bit are mega-out. While 64-bit assembly is possible, the learning curve is very steep, and the benefit is limited. In practice, the great majority here is coding in 32-bit assembly.

Read the 4-pager Masm32: What you absolutely must know to get started (you have made step 1 already) - it is made for people who come from other languages.

Welcome to the forum :icon14:

btcomp

Thanks, I have printed out the pages. They look informative. I guess I should install MasmBasic and JWasm? Have a great night, or day if Oz? I know the drill, Stalin is Russian... :icon_cool:

dedndave

hey btcomp - welcome to the forum

i was raised in Owosso if you know where that is - GO BLUE !
haven't been there for a few years, but was in Muskegon a few weeks ago

a couple years ago, Hutch updated the forum
you can access (and search) the old forum, which has many 32-bit examples

http://www.masmforum.com/board/index.php

jj2007

Quote from: btcomp on December 02, 2014, 01:16:57 PMI guess I should install MasmBasic and JWasm?

MasmBasic is optional, although it has some advantages - this assembles neatly by hitting Ctrl F6 in RichMasm:

include \masm32\MasmBasic\MasmBasic.inc      ; download
  Init
  uInkey "Masm32 является богатая библиотека"
  Exit
end start


The deb macro is also very useful for debugging - I use it every day.

JWasm and OllyDbg are not optional - you will need them. Olly looks complicated at first sight, but:
- insert an int 3 where you have a problem in your code (e.g. before the uInkey above), then build it
- launch the exe in Olly (RichMasm will do that automatically if the int is in lowercase, followed by one space and 3)
- hit F9 to reach the int 3 quickly
- continue with F7 (single step) or F8 (step over loops, do not step into calls)

Finally, Dave is absolutely right that old and new forum search are essential tools.

hutch--

Don't be afraid to use a later version of ML.EXE (version 10 or later) for 32 bit code, you get it from VC10 or later. I have no beef with JWASM but its author has disappeared and it is not properly supported. You need to know MASM well to use it and you need  both Microsoft libraries and MASM compatible include files for it.

Gunther

Hi btcomp,

welcome to the forum.

Gunther
You have to know the facts before you can distort them.

btcomp

Thanks all, my head is swimming  :dazzled: a bit, but thanks. I will take it in. I am going to look at MasmBasic. dehave been through Owosso, attended a seminar at Baker in 1993 (about) when I taught some computer classes for one year, QBasic was one.  Hutch I will check out ML.exe too. I think I downloaded JWasm but didn't use it, yet?

I am learning mostly 16 bit instructions, but being shown the 32 bit registers. EAX...

btcomp

I have installed MasmBasic & then downloaded Win32hlp
QuoteStep 8: Install Win32.hlp and move it to \masm32\RichMasm\help\WIN32.hlp (this makes sure that F1 works in RichMasm)

But my directory is C:\masm32\MasmBasic . So I don't know where to install Win32.hlp?  :redface:

jj2007

Quote from: btcomp on December 03, 2014, 02:45:29 AM
So I don't know where to install Win32.hlp?  :redface:

Create a folder \Masm32\RichMasm\Help\ and copy the file there.

\Masm32\RichMasm\Help\WIN32.HLP will work (if not, PM me, please).

btcomp

Thanks for the help. I was getting too many problems with MasmBasic so I removed the directory and reinstalled a clean Masm. I am going to leave it at that for now. I thought of DosBox, but I want to work with the Windows environment. I am using Emu8086 but it's a 16 bit only. But it is good for relearning some of the old commands.

I will follow on the forum, and hope to get to 32bit programming in assembly. :biggrin:

hutch--

The trick would be to install the MASM32 SDK and then get the reference material you need. The old WIN32.HLP is worth the effort for core win32, MSDN for later stuff but its worth the time to get the Intel manuals from Intel and learn how they work. You will do yourself a favour by leaving 16 bit DOS behind as its segmented architecture is more of a hinderance than a help. Win32 is cleaner, simpler, has far more instructions that have less restrictions and a heap faster. In Win32 you can routinely allocate megabytes to over a gigabyte of memory and be able to work on it as linear addressing, no segment / offset required or allowed.

jj2007

Quote from: btcomp on December 03, 2014, 05:33:46 AM
Thanks for the help. I was getting too many problems with MasmBasic so I removed the directory and reinstalled a clean Masm.

Even with MasmBasic, you do have a clean Masm32 - it just adds a folder, no changes to registry etc.

Attached a minimalistic Windows GUI application - no MasmBasic required, less than 100 lines and fully functional, with a menu and an edit control. Use it as a template together with the Iczelion tutorials.

btcomp

Thanks Hutch & JJ.

First I see that to use the Win32.hlp I will need the Win32 install.

On, the Iczelion tutorials, they look good. I looked at the first one.

I did copy just the .asm file from the zip file and it created the .obj & then the .exe in Masm32. It ran successfully, thank you and it has the File menu selection with Dir & Sav items.

I will wait to install MasmBasic for now, but I have the installs downloaded.

Looking at the first tutorial, I wonder if was doing any 32 bit, but I am not sure. I think I was writing some code on 386 machine, but I don't think I have written anything since the early 1990s or after 1995 at the latest.

I have been going over some tutorials on YouTube https://www.youtube.com/playlist?list=PLPedo-T7QiNsIji329HyTzbKBuCAHwNFC and they have been really good and most of the 55 videos are very short, just demonstrates the basic commands. So I have watched just over half of them. And Rasin has shown the 32 bit registers of EAX, EBX... it's just that you can't use them in the emu8086 which has been a great tool for me to regain the knowledge of flag registers as well as nested stuff. It won't take me long to finish these and move on.  :t


dedndave

some things in the Iczelion tutorials are a bit out of date
part of that is because the masm32 package has advanced in many ways since the tutorial was written
one example that comes to mind is that many of the prototypes are done for you, if you just...
        include     \masm32\include\masm32rt.inc
that is a plain text file - open it with Notepad to see what it does for you