Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.26 KB | None | 0 0
  1. __asm {
  2.         mov eax, a_character        // move address of a_character into eax register
  3.         mov al, [eax]               // copy a_character into last 8 bits of eax register
  4.         cmp al, '$'                 // compare '$' with the a_character stored in last 8 bits of eax
  5.         je endLoop                  // if a_character is '$, jumps to the loop end
  6.         cmp al, 'a'                 // compare 'a' with a_character
  7.         jl numberCheck              // if a_character has value of less than 97, jump to end of numberCheck
  8.         cmp al, 'z'                 // compare 'z' with a_character
  9.         jle endLoop                 // if a_character is between value of 97 and 122, jump to end of loop
  10.     numberCheck :                   // numberCheck label
  11.         cmp al, '0'                 // compare '0' with a_character
  12.             jl letterCheck          // if a_character has a value less than 48, jump to end of letterCheck
  13.             cmp al, '9'             // compare '9' with a_character
  14.             jle endLoop             // if a_character has value between 48 and 57, jump to end of loop
  15.     letterCheck :                   // letterCheck labels
  16.         cmp al, 'A'                 // compare 'A' with a _character
  17.             jl retry                // if a_character has value less than 65, display loop message and enter loop again
  18.             cmp al, 'Z'             // compare 'Z' with a_character
  19.             jle endLoop             // if a_character is between the value of 65 and 90, jump to end of loop
  20.  
  21.             retry :                 //retry function
  22.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement