mirror of
https://github.com/cc65/cc65.git
synced 2024-08-14 14:29:07 +00:00
23 lines
500 B
ArmAsm
23 lines
500 B
ArmAsm
;
|
|
; Ullrich von Bassewitz, 25.11.2002
|
|
;
|
|
; CC65 runtime: Swap 1 byte of register variable space
|
|
;
|
|
|
|
.export regswap1
|
|
.importzp sp, regbank
|
|
|
|
.proc regswap1
|
|
|
|
lda regbank,x ; Get old value
|
|
pha ; Save it
|
|
lda (sp),y ; Get stack loc
|
|
sta regbank,x ; Store new value
|
|
pla
|
|
sta (sp),y ; Store old value
|
|
rts
|
|
|
|
.endproc
|
|
|
|
|