Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- section .data
- msga db "1"
- lenmsga equ $-msga
- msgb db "2"
- lenmsgb equ $-msgb
- msgc db "3"
- lenmsgc equ $-msgc
- msgd db "4"
- lenmsgd equ $-msgd
- segment .bss
- a resb 1
- b resb 1
- c resb 1
- d resb 1
- section .text
- global _start
- _start:
- mov eax, 3
- mov ebx, 0
- mov ecx, a
- mov edx, 1
- int 0x80
- mov eax, 3
- mov ebx, 0
- mov ecx, b
- mov edx, 1
- int 0x80
- mov eax, 3
- mov ebx, 0
- mov ecx, c
- mov edx, 1
- int 0x80
- mov eax, 3
- mov ebx, 0
- mov ecx, d
- mov edx, 1
- int 0x80
- mov al, [a]
- mov ah, [b]
- mov bl, [c]
- mov bh, [d]
- cmp al, ah
- jne A
- cmp ah, bl
- jne B
- mov eax, 4
- mov ebx, 1
- mov ecx, msgd
- mov edx, lenmsgd
- int 0x80
- mov eax, 1
- mov ebx, 0
- int 0x80
- A:
- cmp ah, bl
- jne L
- mov eax, 4
- mov ebx, 1
- mov ecx, msga
- mov edx, lenmsga
- int 0x80
- mov eax, 1
- mov ebx, 0
- int 0x80
- L:
- mov eax, 4
- mov ebx, 1
- mov ecx, msgb
- mov edx, lenmsgb
- int 0x80
- mov eax, 1
- mov ebx, 0
- int 0x80
- B:
- mov eax, 4
- mov ebx, 1
- mov ecx, msgc
- mov edx, lenmsgc
- int 0x80
- mov eax, 1
- mov ebx, 0
- int 0x80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement