PC Assembly Language Help?

  • Thread starter Thread starter Jason G
  • Start date Start date
J

Jason G

Guest
_loop:
mov EAX, input_prompt
call print_string
call read_char
mov EBX, EAX
orEBX, 20h
cmpEBX, 'i'
je_first_case
cmpEBX, 'n'
je_second_case
cmpEBX, 'f'
je_third_case
cmpEBX, 'x'
je_end_main
jmp_default_case

This is my code. I am prompting the user to choose an option and then I display a string based on that option and then return to this loop. However, after I do this once,it returns to the loop and bypasses everything and goes straight to my _default_case which means that the user entered an invalid option. What gives? Is it the keyboard buffer? I had this problem before in C++ and could never figure out how to fix it.
 
Back
Top