flat assembler
Message board for the users of flat assembler.

Index > Windows > Beginner Tutorial ?

Author
Thread Post new topic Reply to topic
steef



Joined: 12 Mar 2008
Posts: 2
steef 12 Mar 2008, 08:50
Hi , I'm new at assembly and I want to learn it.But I can't find any tutorials for FASM .I know the base conceptions of programing (I know php , visual basic) , but assembly is very different and I don't know from where to start !

Can you help me ?
Post 12 Mar 2008, 08:50
View user's profile Send private message Reply with quote
AlexP



Joined: 14 Nov 2007
Posts: 561
Location: Out the window. Yes, that one.
AlexP 12 Mar 2008, 12:02
Try what I used, search google for "x86 assembly tutorial". Almost every one helped so much, but I think the only way to really learn is to just start programming. This should get u started:
Code:
format PE console
include '%fasminc%\win32ax.inc' ; or wherever your FASM/INCLUDE is
entry start ; specify where to start executing code

section '.code' code readable writeable
start: 
; code goes here

push 0
call [ExitProcess]

section '.data' data readable writeable
; any of your data goes here

section '.idata' import data readable writeable
library kernel,'Kernel32.dll'

import kernel,\
    ExitProcess,'ExitProcess'
    

That's a pretty standard template for windows programs, use "Printf" from MSVCRT.dll is simple console output (formatting, too). What I used to learn is a combination of the Intel Instruction Manuals, FASM documentation, small online tutorials.
Post 12 Mar 2008, 12:02
View user's profile Send private message Visit poster's website Reply with quote
steef



Joined: 12 Mar 2008
Posts: 2
steef 13 Mar 2008, 16:13
Ok ,thanks for this help , but i can't find any online tutorials for real beginners.I know already the registers , and few x86 instructions , but i don't know how to apply this in windows.Just for an example : I found an example program , which displays a message box

Code:
include 'win32ax.inc'

.data
     msgBoxCaption  db   'Iczelion Tutorial No.2',0
     msgBoxText     db   'Win32 Assembly with FASM is Great!',0

.code


     start:
          invoke    MessageBox,NULL,msgBoxText,msgBoxCaption,MB_OK + MB_ICONINFORMATION
          invoke    ExitProcess,0

.end start    


Ok , it works .I found that MessageBox is definated in win32ax.inc and it is an windows function , which takes 4 arguments and makes a message box.

But I don't know where to find windows funktions and what arguments did they want !?I tried in WIN32.HLP , but it didn't work.For example I found a function called 'CreateDialog' , tried to enter 'invoke CreateDialog.....' and FASM told me "Error: undefinated symbol 'CreateDialog'".I dont't know if the mistake is that in win32ax.inc isn't definated this funktion , or the syntax is different , or the dunction is incorrect !?
Post 13 Mar 2008, 16:13
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1389
Location: Piraeus, Greece
Picnic 13 Mar 2008, 18:01
Hi steef,
Check the fasm examples it's a good start, read about Win32 Headers
Download and read Fasm Icezelion tutorials
And you can also find a great number of examples about Windows programming on madmatt's site Download them all.

_________________
Hobby BASIC Interpreter
Post 13 Mar 2008, 18:01
View user's profile Send private message Visit poster's website Reply with quote
dap



Joined: 01 Dec 2007
Posts: 61
Location: Belgium
dap 13 Mar 2008, 19:42
See Paul Carter's tutorial. It uses NASM syntax but it's quite the same as FASM since it doesn't use advanced features.

_________________
(French only) http://dap.developpez.com
Post 13 Mar 2008, 19:42
View user's profile Send private message Visit poster's website Reply with quote
AlexP



Joined: 14 Nov 2007
Posts: 561
Location: Out the window. Yes, that one.
AlexP 13 Mar 2008, 21:08
And for reverence, use www.msdn.microsoft.com for any and all API needs, just search for it.
Post 13 Mar 2008, 21:08
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.