1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-25 17:29:50 +00:00
cc65/libsrc/pce/revers.s

24 lines
529 B
ArmAsm
Raw Normal View History

2015-11-17 14:14:15 +00:00
;
; 1998-08-07, Ullrich von Bassewitz
; 2015-11-23, Greg King
2015-11-17 14:14:15 +00:00
;
; unsigned char __fastcall__ revers (unsigned char onoff);
2015-11-17 14:14:15 +00:00
;
2015-10-02 14:50:22 +00:00
.export _revers
.importzp RVS
.proc _revers
cmp #$01 ; False or true?
cla
ror a ; Either $00 or $80
ldy RVS ; Load old value
sta RVS ; Set new value
tya
asl a
rol a ; Either $00 or $01
clx
2015-08-29 13:58:57 +00:00
rts
.endproc