flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2 |
Author |
|
edemko
baldr wrote: serfasm, right, you are, i did a mistake: Code: mov eax,'FasM' or eax,not 0x20202020 ; eax 'FASM', as every the 6th bit cleared |
|||
![]() |
|
baldr
serfasm,
Not so fast, buddy. ![]() 'FasM' | 0x20202020 == 'fasm', is that what you're trying to achieve? |
|||
![]() |
|
edemko
baldr wrote: serfasm, Case insensitivity, offered by feryno i liked much. Must admit he does it bit different. _msg db 'FasM',0 ;or smth somewhere else or dword[_msg],0x20202020 ;[_msg] = 'fasm' and dword[_msg],not 0x20202020 ;[_msg] = 'FASM' |
|||
![]() |
|
Plue
Code: mov eax, '9' ; mov character into eax and eax, 64 ; check if character is in A-Z or a-z ; zf = 1 if eax is letter ; zf = 0 if eax is not letter Now go and have fun with your super efficient ascii set. ![]() |
|||
![]() |
|
bitRAKE
(I'm not going to bother to digress into the difficulties of usage or adoption of an alternate scheme. Rather try to build upon the idea expressed in the thread.)
Having a single bit to differentiate between all the paired symbols could be beneficial as well. ( ) { } [ ] < > So, we have four pairs - clearly needing three bits: nnnnnXXX. But maybe other pairs should be considered? / \ ` ' ...or should it be... ' " _ | + - ...or should it be... + * . , : ; It should be possible to compile an encoding of maximal utility as well as converter routines - both assemble-time and run-time. Once all the groupings are collected then possible ideal encodings become apparent. Of course, by ideal we mean range testing with minimal instructions and a branch (like the BT [TABLE] approach, but without the cache miss). We would prefer non-destructive (TEST/LAHF) over destructive (AND/OR). We shouldn't forget about all the flags available (parity for example). ASCII ranges only require two instructions (SUB/CMP) to destructively test without a table. |
|||
![]() |
|
f0dder
Plue wrote:
_________________ ![]() |
|||
![]() |
|
baldr
f0dder,
[0x40; 0x7F]∪[0xC0; 0xFF], maybe? Any one-bit test should divide 256 input values into two sets of 128 each. |
|||
![]() |
|
Borsuc
Hey this isn't a math forum, use '|' instead of 'U'
![]() |
|||
![]() |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.