• Uncategorized

About assembly : Add-2-numbers-and-print-the-result-using-Assembly-x86

Question Detail

I’m a novice Assembly x86 Learner, and i want to add two numbers (5+5) and print the result on the screen.

here is my code:

global _start

section .text
_start:
mov eax, 5
mov ebx, 5
add eax, ebx
push eax
mov eax, 4 ; call the write syscall
mov ebx, 1 ; STDOUT
pop ecx ; Result
mov edx, 0x1
int 0x80

; Exit
mov eax, 0x1
xor ebx, ebx
int 0x80

Correct me please

Question Answer

You may also like...

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.