You are on page 1of 1

global main

extern printf

SECTION .data
prompt db "Enter your age: ",0xa,0x0
odd db "Your group is SIMTech",0xa,0x0
even db "Your group is Smartstart",0xa,0x0
age dd age

SECTION .text

main:
push prompt
call printf
pop ebx
mov eax, 3
mov ebx, 1
mov ecx, age
mov edx, 40
int 0x80
push age
mov eax, [age]
mov ebx, 1
and eax, ebx
jz EVEN
ODD:
mov eax, [age]
push eax
push odd
call printf
pop ebx
pop ebx
mov eax, 1
int 0x80
EVEN:
mov eax, [age]
push eax
push even
call printf
pop ebx
pop ebx
mov eax, 1
int 0x80
end:
mov eax, 1
int 0x80

You might also like