v65c816: fix disk driver bug
authorAlan Cox <alan@linux.intel.com>
Sun, 24 Sep 2017 23:59:41 +0000 (00:59 +0100)
committerAlan Cox <alan@linux.intel.com>
Sun, 24 Sep 2017 23:59:41 +0000 (00:59 +0100)
Did I ever mention how much I hate the 6402 lda $n,x syntax being for two
completely different things and magically determined unless you remember to
threaten the assembler with violence ?

Kernel/platform-v65c816/v65.s

index 06a2543..a353acc 100644 (file)
@@ -170,7 +170,7 @@ _hd_read_data:
        ldy #512
 hd_read:
        lda $34                 ; I/O data via DP
-       sta 0,x                 ; stores into data (user) bank
+       sta a:$0000,x           ; stores into data (user) bank
        inx
        dey
        bne hd_read
@@ -197,7 +197,7 @@ _hd_write_data:
        
        ldy #512
 hd_write:
-       lda 0,x                 ; load from data (user) bank
+       lda a:$0000,x           ; load from data (user) bank
        sta $34                 ; I/O data via DP
        inx
        dey
@@ -209,6 +209,5 @@ hd_write:
        rts
 
        .bss
-
 _hd_kmap:
        .res 1