]> git.sur5r.net Git - cc65/blobdiff - libsrc/pce/revers.s
Style changes.
[cc65] / libsrc / pce / revers.s
index d1358a52be188937af71f2c858cf46c0d1d5e0d6..5c5cd7fbeb57c49da7a585e8cb32d509f91c6cc1 100644 (file)
@@ -1,5 +1,26 @@
 
-    .export _revers
-_revers:
-    lda #0
-    rts     
+        .export         _revers
+
+        .include        "pce.inc"
+        .include        "extzp.inc"
+
+.proc   _revers
+        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
+.endproc
+
+;-------------------------------------------------------------------------------
+; force the init constructor to be imported
+
+        .import         initconio
+conio_init      = initconio