x86 - A "while" in assembly -


i have compare number 0 , if lower or equal 0 have re-read number. i've designed method read number before while condition if number equal or lower 0 doesn't re read number should following method.

my code looks this

{ char number1[] = "enter number(>0):"; char format[] = "%d"; // format string scanf function    int number;     _asm         {             atat:     lea eax, number1// ask number                push eax     call printf     add esp, 4     lea eax, number// read in     push eax     lea eax, format     push eax     call scanf     add esp, 8             //     while:       mov eax, number     cmp eax, 0     jg end_while     jmp atat     end_while: 


Comments

Popular posts from this blog

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -

php - Autoloader issue not returning Class -