1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-11 11:30:13 +00:00
cc65/libsrc/pce/revers.s

24 lines
529 B
ArmAsm
Raw Normal View History

2015-11-17 09:14:15 -05:00
;
; 1998-08-07, Ullrich von Bassewitz
; 2015-11-23, Greg King
2015-11-17 09:14:15 -05:00
;
; unsigned char __fastcall__ revers (unsigned char onoff);
2015-11-17 09:14:15 -05:00
;
2015-10-02 10:50:22 -04: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 15:58:57 +02:00
rts
.endproc