flat assembler
Message board for the users of flat assembler.
Index
> Main > isupper |
Author |
|
JohnFound 09 Feb 2004, 23:13
It seems yes, but some optimization whould be good. And probably unsigned jcc is more apropriate in this situation: ja/jb instead of jg/jl
Regards. |
|||
09 Feb 2004, 23:13 |
|
ronware 09 Feb 2004, 23:18
It's ok only for ASCII (English). You will need a table if you want to properly uppercase/lowercase for other languages.
|
|||
09 Feb 2004, 23:18 |
|
jInuQ 10 Feb 2004, 00:05
JohnFond,
Thanks for the info I will change it to ja. Make more sense that way any how. ronware, Yeah, right now english is the only langue I need. At some point it might be interesting to do something in unicode. _________________ jInuQ "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." - Antoine de Saint Exupery |
|||
10 Feb 2004, 00:05 |
|
Bitdog 10 Feb 2004, 03:15
TEST AL,00100000b ;english
JZ isUPPER ;JMP if bit-5 is clear ---new edit below----- In the english CPU alphebet 0-255 the value of 'a' is exactly 00100000b greater than 'A' toggling bit-5 swaps case from 'A' to 'a' & back. A-Z & a-z There are afew other characters that use the same bit-5 so under some circumstances you could alter the value of a non A-Z alph but for the purposes of checking, or a quickie check, TEST AL,0010000b JNZ BITisSET ;seems to work ok. AND AL,11011111b ; to upper case OR AL,00100000b ; to lower case Last edited by Bitdog on 11 Feb 2004, 08:31; edited 1 time in total |
|||
10 Feb 2004, 03:15 |
|
jInuQ 11 Feb 2004, 01:46
Okay, you going to need to break down you logic. I grok what the AND does ,but don't see why your doing it? A little help? 8^)
_________________ jInuQ "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." - Antoine de Saint Exupery |
|||
11 Feb 2004, 01:46 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.