65 lines
744 B
OpenEdge ABL
65 lines
744 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
|
|
|
|
memcpy .macro dest, src, count
|
|
.save_registers
|
|
.long_a
|
|
.long_i
|
|
|
|
ldx #<>src
|
|
ldy #<>dest
|
|
lda #count - 1
|
|
|
|
.if dest > src
|
|
mvp #`src, #`dest
|
|
.else
|
|
mvn #`src, #`dest
|
|
.endif
|
|
.restore_registers
|
|
.short_a
|
|
.long_i
|
|
.endmacro |