Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- section .bss
- term: resb 0x40
- term_size: resb 1
- section .text
- global _start
- _start:
- loop1:
- ; read the string
- mov eax, 3
- mov ebx, 1
- mov ecx, term
- mov edx, 0x40
- int 0x80
- mov [term_size], eax
- ; find if string is empty
- mov ah, [term]
- cmp ah, 0x0a
- jz end
- ; write the string
- mov eax, 4
- mov ebx, 1
- mov ecx, term
- mov edx, term_size
- int 0x80
- jmp loop1
- end:
- ; end of program
- mov ebx, 0
- mov eax, 1
- int 0x80
Add Comment
Please, Sign In to add comment