64 lines
766 B
OpenEdge ABL
64 lines
766 B
OpenEdge ABL
native_mode .macro
|
|
clc
|
|
xce
|
|
.endmacro
|
|
|
|
long_a .macro
|
|
rep #$20
|
|
.al
|
|
.endmacro
|
|
|
|
short_a .macro
|
|
sep #$20
|
|
.as
|
|
.endmacro
|
|
|
|
long_i .macro
|
|
rep #$10
|
|
.xl
|
|
.endmacro
|
|
|
|
short_i .macro
|
|
sep #$10
|
|
.xs
|
|
.endmacro
|
|
|
|
save_registers .macro
|
|
php
|
|
.long_a
|
|
.long_i
|
|
pha
|
|
phx
|
|
phy
|
|
.short_a
|
|
.long_i
|
|
.endmacro
|
|
|
|
restore_registers .macro
|
|
.long_a
|
|
.long_i
|
|
ply
|
|
plx
|
|
pla
|
|
plp
|
|
.short_a
|
|
.long_i
|
|
.endmacro
|
|
|
|
; Copies up to 64KB (aligned to bank boundaries)
|
|
memcpy .macro dest, src, count
|
|
.save_registers
|
|
.long_a
|
|
|
|
ldx #<>\src
|
|
ldy #<>\dest
|
|
lda #\count - 1
|
|
|
|
.if \dest > \src
|
|
mvp #`\src, #`\dest
|
|
.else
|
|
mvn #`\src, #`\dest
|
|
.endif
|
|
|
|
.restore_registers
|
|
.endmacro |