Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Compare data in AL and AH
; Check if data in AL is equal in AH section .data msg db 'Equal!', 0xa len equ $ - msg msg2 db 'Value: ' len2 equ $ - msg2 numPrint db '0' section .bss num db 1 section .text global _start _start: ; compare numbers mov al, 5 mov ah, 5 cmp al, ah jnz exit writeNum: mov [num], al mov bl, [numPrint] add [num], bl message: ; show message 1 call print mov ecx, msg mov edx, len int 80h ; show message 2 call print mov ecx, msg2 mov edx, len2 int 80h ; show number call print mov ecx, num mov edx, 1 int 80h exit: call quit print: mov eax, 4 mov ebx, 1 ret quit: mov eax, 1 mov ebx, 0 int 80h ret
run
|
edit
|
history
|
help
0
dsafdafdsfasdfsd
ddffdfddfdfdf
fdsfsfsdafs
dsafdfdsfds
Test
hkvhkvhk
intmain2
count poistive and Nehative no.
Group Project (Group 4)
lec4bb.asm