Hello,? i want to start with MASM, but im not sure how to begin...
I want to start with 32bit ASM but not yet with GUI programming. Ill show an example of ASM code wich is from a dll loader. Its not the full source just the top part.

? ? .486
? ? .model flat, stdcall
? ? option casemap :none

? ? include \masm32\include\windows.inc
? ? include \masm32\include\user32.inc
? ? include \masm32\include\kernel32.inc

? ? includelib \masm32\lib\user32.lib
? ? includelib \masm32\lib\kernel32.lib

? ? .code
start:
? ? call Loader
Loader proc

? ? LOCAL pid :DWORD
? ?
? ? jmp down
? ? ? ? WINDOW_NAME db "Game", 0
? ? ? ? DLL_LOC db "c:\\somedll.dll", 0
? ? ? ? MODULE db "Kernel32", 0
? ? ? ? FUNC db "LoadLibraryA", 0
? ? down:

? ? push offset WINDOW_NAME
? ? push 0
? ? lea ebx, pid
? ? call FindWindow
? ? push ebx
? ? push eax
? ? call GetWindowThreadProcessId
? ? push pid
? ? push 0
? ? push PROCESS_ALL_ACCESS
? ? call OpenProcess
? ? mov ebx, eax
? ? push offset DLL_LOC
? ? call lstrlen
? ? mov edi, eax
? ? push PAGE_READWRITE
? ? push MEM_COMMIT
? ? push eax
? ? push 0
? ?....etc
? ?...etc
? ?...etc


That can also be done in MASM right? So basicly i want to start with simple programs, but all i can find are win32 tutorials that talk about GUI programming etc. I just want to start learning about all the name like
eax
edi
esp
push
pop
mov
and all the others.
So if anyone have any good resources, tips or pointers for me then that would be really great.
Posted on 2005-06-23 14:31:41 by w00
Hello,

Tomas win32asm tutorials are good to start with.
You can find them here : http://www.madwizard.org/view.php?page=tutorials.contents&startIndex=130
And when you don't understand something, ask away.

Regards
Posted on 2005-06-23 15:49:52 by Jurgen
Thanks, that looks like a good start :)
Posted on 2005-06-23 16:08:59 by w00
Try this: http://www.win32asmcommunity.net/phpwiki/
Posted on 2005-06-23 20:56:26 by roticv
Thanks for the links, i've read the tutorials and i've got some better understanding of it now. Although there were some parts i didnt get like the SAL and SAR commands. I dont know what they're good for. But ill learn about those later and probably dont need them in the beginning.
But what i want to do now is to make some good practise programs so i can also see how some things work. Anyone knows any simple programs i could start with?
Thanks in advance.
Posted on 2005-06-25 08:30:25 by w00
Hello,

Perhaps you can try to make plain calculator.

Regards
Posted on 2005-06-25 11:46:15 by MCL
w00,

If you get the most curent version of MASM32 and the latest service pack with it, you can write this type of code which is very easy to test instructions in.


; ?????????????????????????????????????????????????????????????????????????
    include \masm32\include\masm32rt.inc
; ?????????????????????????????????????????????????????????????????????????

comment * -----------------------------------------------------
                        Build this  template with
                      "CONSOLE ASSEMBLE AND LINK"
        ----------------------------------------------------- *

    .data?
      value dd ?

    .data
      item dd 0

    .code

start:
 
; ?????????????????????????????????????????????????????????????????????????

    call main

    exit

; ?????????????????????????????????????????????????????????????????????????

main proc

    cls
    print "Hello World",13,10

    ret

main endp

; ?????????????????????????????????????????????????????????????????????????

end start


There is a new help file with the latest service pack that properly documents much of the newer capacity.
Posted on 2005-06-25 20:24:26 by hutch--