2014-11-29 13:18:48 +00:00
|
|
|
|
2015-09-19 13:37:39 +00:00
|
|
|
.include "pce.inc"
|
|
|
|
.include "extzp.inc"
|
2015-07-13 10:10:09 +00:00
|
|
|
|
2015-08-29 13:58:57 +00:00
|
|
|
.export _revers
|
2015-07-16 14:00:32 +00:00
|
|
|
|
|
|
|
.proc _revers
|
|
|
|
|
2015-08-29 13:58:57 +00:00
|
|
|
ldx #$00 ; Assume revers off
|
|
|
|
tay ; Test onoff
|
|
|
|
beq L1 ; Jump if off
|
|
|
|
ldx #$80 ; Load on value
|
|
|
|
ldy #$00 ; Assume old value is zero
|
|
|
|
L1: lda RVS ; Load old value
|
|
|
|
stx RVS ; Set new value
|
|
|
|
beq L2 ; Jump if old value zero
|
|
|
|
iny ; Make old value = 1
|
|
|
|
L2: ldx #$00 ; Load high byte of result
|
|
|
|
tya ; Load low byte, set CC
|
|
|
|
rts
|
2015-07-16 14:00:32 +00:00
|
|
|
|
|
|
|
.endproc
|
2015-07-13 10:10:09 +00:00
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
; force the init constructor to be imported
|
|
|
|
|
2015-08-29 13:58:57 +00:00
|
|
|
.import initconio
|
|
|
|
conio_init = initconio
|