flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
fasmnewbie 16 Mar 2018, 09:46
[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 16 Mar 2018, 11:07
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 16 Mar 2018, 19:53
Also no need to use the offset keyword. It is just a useless junk invented by TASM/MASM (?) developers.
|
|||
![]() |
|
moveax41h 17 Mar 2018, 22:31
Thank you, this was very helpful advice!
_________________ -moveax41h |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.