flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 05 Apr 2010, 04:46
You have to escape local also.
Code: irps cond, a b { macro movstr \{ \local move move: lodsb stosb test al,al jnz move \} } |
|||
![]() |
|
Tyler 05 Apr 2010, 05:15
Dude, you're freakin' kidding me!!!
![]() Code: irps cond, a b e z na nb ne nz { macro mov#cond dst*,src*,else_src \{ if cond eq mov dst,src else \local .cond_met \local .cond_unmet j#cond .cond_met if ~(else_src eq ) mov dst,else_src end if jmp .cond_unmet .cond_met: mov dst,src .cond_unmet: end if \} macro call#cond location ; Wasn't sure if I could use label \{ \local true \local false j#cond true jmp false true: call location false: \} } The actual jumps are really bad style, but it'll simplify my code 100 fold. |
|||
![]() |
|
revolution 05 Apr 2010, 06:34
I use this little cmov macro for when I need to support older CPUs
Code: irp cc,a,ae,b,be,c,e,g,ge,l,le,na,nae,nb,nbe,nc,ne,ng,nge,nl,nle,no,np,ns,nz,o,p,pe,po,s,z { local i macro cmov#cc [args] \{ \common \local .x j#cc .x load i from $-2 store (i xor 1) at $-2 mov args .x: \} } |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.