Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __asm {
- mov eax, a_character // move address of a_character into eax register
- mov al, [eax] // copy a_character into last 8 bits of eax register
- cmp al, '$' // compare '$' with the a_character stored in last 8 bits of eax
- je endLoop // if a_character is '$, jumps to the loop end
- cmp al, 'a' // compare 'a' with a_character
- jl numberCheck // if a_character has value of less than 97, jump to end of numberCheck
- cmp al, 'z' // compare 'z' with a_character
- jle endLoop // if a_character is between value of 97 and 122, jump to end of loop
- numberCheck : // numberCheck label
- cmp al, '0' // compare '0' with a_character
- jl letterCheck // if a_character has a value less than 48, jump to end of letterCheck
- cmp al, '9' // compare '9' with a_character
- jle endLoop // if a_character has value between 48 and 57, jump to end of loop
- letterCheck : // letterCheck labels
- cmp al, 'A' // compare 'A' with a _character
- jl retry // if a_character has value less than 65, display loop message and enter loop again
- cmp al, 'Z' // compare 'Z' with a_character
- jle endLoop // if a_character is between the value of 65 and 90, jump to end of loop
- retry : //retry function
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement