]> git.sur5r.net Git - cc65/commitdiff
Added macro for ssc slot selection.
authorol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 13 Dec 2009 11:23:20 +0000 (11:23 +0000)
committerol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 13 Dec 2009 11:23:20 +0000 (11:23 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4528 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/apple2/apple2-ssc.s

index 9da257f845144037e7aa9609108ec60f9260b0d7..cb9ff2ec14eda6fe1be270ae619f6f7a36e599a0 100644 (file)
@@ -356,18 +356,18 @@ STATUS:
 ; Must return an SER_ERR_xx code in a/x.
 
 IOCTL:
-       ; Check code to be 0
-       tax
+       ; Check data msb and code to be 0
+       ora     ptr1+1
        bne     :+
 
-       ; Check data to be [1..7]
-       lda     (ptr1,x)
+       ; Check data lsb to be [1..7]
+       ldx     ptr1
        beq     :+
-       cmp     #7+1
+       cpx     #7+1
        bcs     :+
 
-       sta     Slot
-       txa                     ; SER_ERR_OK
+       stx     Slot
+       tax                     ; SER_ERR_OK
        rts
 
 :      lda     #<SER_ERR_INV_IOCTL