Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- section .data
- intro db 27,"[H",27,"[2J WELCOME TO THE QUIZ GAME",10,10,"Who is the greatest programmer of all time?",10,10," 1) Linus Torvolds",10," 2) Richard Stallman",10," 3) Terrance Davis",10,10,"Choose an answer (1,2,3): "
- introl equ $-intro
- ra db 27,"[H",27,"[2JYou have chosen the correct answer!",10,10
- ral equ $-ra
- section .bss
- choice resb 2
- section .text
- global _start
- _start:
- mov eax, 4
- mov ebx, 1
- mov ecx, intro
- mov edx, introl
- int 128
- mov eax, 3
- inc ebx
- mov ecx, choice
- mov edx, 2
- int 128
- cmp byte [choice], 51
- jne _start
- mov eax, 4
- mov ebx, 1
- mov ecx, ra
- mov edx, ral
- int 128
- mov eax, 1
- xor ebx, ebx
- int 128
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement