coco3: graphics: simpler video ptr calc routine
authorBrett Gordon <beretta42@gmail.com>
Sat, 24 Oct 2015 04:05:30 +0000 (00:05 -0400)
committerBrett Gordon <beretta42@gmail.com>
Sat, 24 Oct 2015 15:01:30 +0000 (11:01 -0400)
Kernel/platform-coco3/videoll.s

index 2306d4a..2bd7b3b 100644 (file)
@@ -87,15 +87,14 @@ endline:
 ;;;   returns: U = screen ptr
 ;;;   modifies: D
 vidptr:
-       ldu     #VIDEO_BASE
-       ldd     ,x++            ; Y into B
-       lda     #32
+       ldd     ,x++
+       lda     #32
        mul
-       leau    d,u
-       ldd     ,x++            ; X
-       leau    d,u
+       addd    ,x++
+       addd    #VIDEO_BASE
+       tfr     d,u
        rts
-       
+
 
 ;;; This does the job of READ & WRITE
 ;;;   takes: C = direction 0=write, 1=read