1
0
mirror of https://github.com/ksherlock/x65.git synced 2024-12-29 10:30:32 +00:00
x65/test/x65macro_test.s
2019-09-19 18:50:30 -07:00

54 lines
550 B
ArmAsm

include "../macros/x65macro.i"
sec
bcs Begin
CopyCode
inx
dey
nop
CodeEnd
CodeSegLen = CodeEnd-CopyCode
; $fc = CopyCode
; for ($fe=$2000; $fe<$4000; $fe += (CodeEnd-CopyCode)) {
; memcpy($fe, $fc, CodeEnd-CopyCode)
; }
Begin:
set.w CopyCode, $fc
for.wsp $2000, $4000, $fe, CodeSegLen
copy.ry128 $fc, $fe, CodeSegLen
forend
nop
nop
nop
; int $fc
; $fc >>= 1
asrm.n $fc,4
nop
nop
nop
ldx #$0c
aslm.nx $f0,4
nop
nop
nop
; int $fc
; $fc = -$fc
neg.n $fc,4
nop
nop
nop
; int $fc = abs($fc)
abs.n $fc, 4