Tag Archives: assembler
The source code it’s very simple. The message it’s show using int 80 and eax with function 4. We need the message and length of this message. See next the source code and comments:
hello: db 'Hello world!',10 ; 'Hello world!' and end string
helloLength: equ $-hello ; Length of the 'Hello world'
mov eax,4 ; The system call for write (sys_write)
mov ebx,1 ; File descriptor 1 - standard output
mov ecx,hello ; Put the offset of hello in ecx
mov edx,helloLength ; helloLength is a constant length of hello message
; This mov edx,[helloLength] to get it's actual size
int 80h ; Call the kernel
mov eax,1 ; The system call for exit (sys_exit)
mov ebx,0 ; Exit with return code of 0 (no error)
The FASM is a self-assembling open-source 80×86 assembler for DOS, Windows and Linux. It supports all 8086-80486/Pentium instructions with MMX, SSE, SSE2 and with more features. FASM contains many programming options and features. The source code can be written in different ways because of control directives, macros and management of resources. FASM, by default uses […]
In this tutorial I will show you one simple way to write source code for debug command. Working with assembler is provides the opportunity of knowing more the operation of your PC. Open a file with notepad , named YN.txt and fill with the source code below.
db 0d,0a,"APASA tasta Y sau N!",0d,0a,"$"
db 0d,0a,"Ai apasat Y",0d,0a,"$"
db 0d,0a,"Ai apasat N",0d,0a,"$"
After that , save the file and […]
So I started dabbling with assembly language programming a couple of days ago. This was the next logical step in the “going lower down” move I have been doing ever since I started writing programs in Visual Basic some years ago (there, I admitted it). Since then I went through C#, Java, C++, C and […]
This is the simplest example of how to use assembly language to create a DLL file functional. It is written using flat assembler (FASM). Example is simple and I created for testing with python. You can call the function created with other programming languages??. After I created the DLL file can execute the following python […]