The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: ap3rus on October 29, 2005, 06:22:29 PM

Title: What to start?
Post by: ap3rus on October 29, 2005, 06:22:29 PM
Hey everyone. First, I'm sorry for my lame english :)
So I'm a newbie in an assembler programming but I have expearance in programming on other pr/languages like c/c++, pascal and fortran. And when I decided to start studying assembler I met the problem. I dont know what to do the first when writing assebmler program. So, I'd like to receive some advices or smth this kind of more advanced asm programmers. Well, that's my problem)
again, sorry for my bad language..
Title: Re: What to start?
Post by: dsouza123 on October 29, 2005, 09:45:39 PM
Download and install MASM32.

It comes with a good number of tutorial and example programs with both the source code and a preassembled copy.

The quick editor ( qeditor.exe ) that comes with MASM32 can even create small programs
just by clicking on various menu entries in the Code and Templates menus.

The quick editor has menu entries to assemble assembly and resource source files and
also to assemble and link them into an Windows executable (GUI or Console mode).

For example, from the menu Templates click Test Dialog, it will fill in the code for a dialog box.
Save it and then select the Project menu then menu entry Assemble & Link which creates an executable program on disk.
Then reselect the Project menu then menu entry Run Program and it will execute the dialog box program just previously created.
Title: Re: What to start?
Post by: Retsim_X on October 29, 2005, 11:42:00 PM
hi

if you are wondering what your first project should be then hers some advice

most programmers first project would probobly have been a simple message box saying hello world. this cirtainly was myself.

heres the code for that simple program:

.386                                  ; the directive telling masm how complicated the instructions can be (later processors more powerful instructions
.model  flat, STDCALL     ; tells masm its a 32bit memory model
option    casemap: none   ; code is Case sensitive

;includes and libs tells the assembler where the adresses of the api's etc are.
include /masm32/include/windows.inc
include /masm32/include/kernel32.inc
include /masm32/include/user32.inc

includelib /masm32/lib/kernel32.lib
includelib /masm32/lib/user32.lib

;the data directives next
; this lets you add messages, variables etc
.data
;your message
msg   db   'hello world',0   ;must terminate all windows strings with 0 or null char unless otherwise told in api help files


;now its the actuale code
.code
start:    ;this is global and tells masm where execution starts

invoke MessageBox,NULL,addr msg,NULL,MB_OK   ;this is an api to bring up a message box with a costom message
invoke ExitProcess,0     ; close the app

end start         ; no more code after this point


well thats a simple program for you.
also have a look around for a windows api help file. i have one but it 24mb and cant recal where to get it.
someone i am sure will tell you were you can ge one
i think i may have goton it from iszelions website cant recall ...

Title: Re: What to start?
Post by: G`HOST on October 30, 2005, 03:13:30 AM
Download " Iczlians Win32 MASM  TUTORIALS" . google "icz-tuts.zip" these tuts are based on masm or
go here http://webster.cs.ucr.edu/AsmTools/MASM/  you will get info about masm.
 
Title: Re: What to start?
Post by: ap3rus on October 30, 2005, 07:48:48 AM
well, thanks :)
I have another question. Do anybody know RadASM ide? Is it good or not?
Title: Re: What to start?
Post by: G`HOST on October 30, 2005, 10:40:56 AM
Yup i use  RadASM and i find it too good.QEditor which comes with masm is good too but RadASM provides code completion and colored syntexes( colored syntex ? dont know if its the right phrase ).So give it a try :toothy
Title: Re: What to start?
Post by: pro3carp3 on October 31, 2005, 02:38:57 PM
RadASM is great.  For a lot of good information to get you started in assembly, check out Randall Hyde's website:


http://webster.cs.ucr.edu/
(http://webster.cs.ucr.edu/)