News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

where i need to start?

Started by mustafa, May 21, 2007, 07:18:45 AM

Previous topic - Next topic

mustafa

Hello everyone, I m new about assembly language programming and I dont know where do i start ( infact starting point),which assembler tools i can use? thanks.. ::)

Draakie

Hi mustafa - welcome !

Well, to help and advise you properly - we'll need to know
if you have ANY experience in coding Assembler - or any
other language for that matter.

Draakie
Does this code make me look bloated ? (wink)

Vineel Kumar Reddy Kovvuri

Hi mustafa


I am also new to assembly .But i think my reply wold help u to get started asm ......

step 1:  Download MASM32 9.0 from http://www.masm32.com/masmdl.htm  and install it.
step 2:  Download OllyDbg from http://ollydbg.de/odbg110.zip
step 3:  Download Win32 API Help ftp://80.239.144.135/pub/delphi/techpubs/delphi2/win32.zip for furthur reference.
step 4:  Once look at the help files 1)asmintro.hlp 2)hlhelp.hlp 3)masmlib.hlp 4)opcodes.hlp in Masm32 package
step 5:  First concentrate on Console Apps .  Now a sample program might look like this     

;----------------------------------------------------------------------------------------------------------------
;Test.asm
include c:\masm32\include\masm32rt.inc

.code
start:
exit
end start
;----------------------------------------------------------------------------------------------------------------

before assembling it.

create a batch file setenv.bat(say) which contain the following statements.and execute it once
----------------------------------------------------------------------------------------------
@echo off
set path=C:\masm32\bin;%PATH%
set LIBPATH=c:\masm32\lib;%LIBPATH%
set INCLUDE=c:\masm32\include;%INCLUDE%
----------------------------------------------------------------------------------------------
step 6: 
c:\masm32\MyWorking>setenv.bat                        <----------this sets the path include libpath variables(run it once)
c:\masm32\MyWorking>ml /c /Cp /coff Test.asm      <----------this creates obj files 
c:\masm32\MyWorking>link /subsystem:console Test.obj <------ produces final exe files
c:\masm32\MyWorking>Test.exe                            <----------- for ouput

step 7:  I am sure u get stuck at how to use preliminary I/O operations equivalent to printf ,scanf e.t.c
            for this see the following example.

;----------------------------------------------------------------------------------------------------------------
;Test.asm
include c:\masm32\include\masm32rt.inc

.data
x dd 10
.code
start:


print "this value of x = ",10
print str$(x)                            <-------------prints the interger present in x , str$ => itoa function in C

exit
end start
;----------------------------------------------------------------------------------------------------------------
step 8 : If u know how to call C functions(WIN32 API) from asm you can take advantage of entire windows API functions

for example :
            The following code can reads a maximum of 100 chars from the command prompt and print it back to the command prompt

;----------------------------------------------------------------------------------------------------------------
include c:\masm32\include\masm32rt.inc

.data
n1 db 100 dup(0)
.code
start:
;Take the input from the user
push 100                           ; A maximum of 100 characters
lea esi , n1                         ;Loading the address of n1
push esi                             ;push on to the stack
call StdIn                           ;calling the function
;End of taking input ,U can also use INVOKE .....But like this         

;output to the user
lea esi ,n1                           ;Loading the address of n1   
push esi                              ;push on to the stack
call StdOut                          ;calling the function 
;end of printing
exit
end start

;----------------------------------------------------------------------------------------------------------------

step 9 : Get this book to understand the control structures http://www.scs.stanford.edu/05au-cs240c/lab/pcasm-book.pdf

step 10 : Keep helping others ......Happy coding in Assembly




Farabi

Hello mustafa, also download RadAsm to make thing easier. You can found the link at Radasm subforum in this forum.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

mustafa

Great thanks;
-Draakie
-vineel
and
-Farabi
Thanks you for interesting, Infact I m not new about coding but i didnt write code with assembly before, I want to learn it becouse I like it and I want to use it as inline assembly in the other program codes. I think it will be long and hard way  :8). I just find this site and I will use it endable ;). Thanks a lot again, See you soon friends.

Vortex

Hi mustafa,

Welcome to the forum.

Don't forget to check Iczelion's Win32 Assembly Tutorials :

http://win32assembly.online.fr/tutorials.html

mustafa

Thanks you Vortex, can you tell me the good way to be proffesional about this staff, please just show me points and share your experience i m young and i have more coffee :). Thank you!

Vortex

Hi mustafa,

Iczelion's tutorial set is aimed for users who have a basic knowledge concerning the assembly language. The tutorials are explaining how to code Win32 applications using asm. The content of this material is mainly focussed in GUI programming. Try to study the first tutorials and get familiar with the masm32 package. You are always welcome to post here your questions.

mustafa