flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
fasmnewbie
[eax] is already a "char" by the second line. No longer a valid address.
What you need is a proper index addressing setup before going through the bytes. But you could instead use "cmp al,32". Makes more sense. |
|||
![]() |
|
revolution
Use the value in al directly. Also fasm supports ASCII characters natively, no need to convert to raw magic numbers. Plus use unsigned checks for unsigned values (jb and ja)
Code: encode: mov al, [bInput+ecx] ; Put the char* to first element into al cmp al, ' ' je endme cmp al, 'a' jb not_lower_case cmp al, 'z' ja not_lower_case |
|||
![]() |
|
DimonSoft
Also no need to use the offset keyword. It is just a useless junk invented by TASM/MASM (?) developers.
|
|||
![]() |
|
moveax41h
Thank you, this was very helpful advice!
_________________ -moveax41h |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.