dragon-nx32: graphics: fix little endian bug in read/write
authorBrett Gordon <beretta42@gmail.com>
Fri, 23 Oct 2015 06:17:03 +0000 (02:17 -0400)
committerBrett Gordon <beretta42@gmail.com>
Fri, 23 Oct 2015 06:17:17 +0000 (02:17 -0400)
Kernel/platform-dragon-nx32/video.s

index da68bdd..060b0a4 100644 (file)
@@ -344,7 +344,7 @@ _video_write:
        tfr x,y                 ; So we can use y to get at the w/h
        leax 4,x                ; Move on to data space
 vwnext:
-       lda 2,y
+       lda 3,y
        pshs u
 vwline:
        ldb ,x+
@@ -353,7 +353,7 @@ vwline:
        bne vwline
        puls u
        leau 32,u
-       dec ,y
+       dec 1,y
        bne vwnext
        puls u,pc
 ;
@@ -377,7 +377,7 @@ _video_read:
        tfr x,y                 ; So we can use y to get at the w/h
        leax 4,x                ; Move on to data space
 vrnext:
-       lda 2,y                 ; a counts our copy along the scan line
+       lda 3,y                 ; a counts our copy along the scan line
        pshs u
 vrline:
        ldb ,u+                 ; b does our data
@@ -386,7 +386,7 @@ vrline:
        bne vrline
        puls u                  ; step down a line
        leau 32,u
-       dec ,y                  ; use the buffer directly for line count
+       dec 1,y                 ; use the buffer directly for line count
        bne vrnext
        puls u,pc               ; and done