]> git.sur5r.net Git - cc65/blobdiff - libsrc/pce/kplot.s
Merge pull request #740 from laubzega/master
[cc65] / libsrc / pce / kplot.s
index eb4e79e04bda36cfdac24440537706b436ffd28d..ae31710f3b3782af4a70fe00daeb8a236bea632e 100644 (file)
@@ -1,37 +1,30 @@
 
-                .export PLOT
+        .export         PLOT
 
-                .include        "pce.inc"
+        .include        "pce.inc"
+        .include        "extzp.inc"
 
-PLOT:
-                bcs @getpos
+PLOT:   bcs     @getpos
 
-                tya
-                clc
-                adc     _plotlo,x
-                sta     SCREEN_PTR
+        tya
+        ;clc                    ; already cleared
+        adc     plotlo,x
+        sta     SCREEN_PTR
 
-                lda     _plothi,x
-                adc     #0
-                sta     SCREEN_PTR+1
+        cla
+        adc     plothi,x
+        sta     SCREEN_PTR+1
 @getpos:
-                ldx CURS_Y
-                ldy CURS_X
-                rts
+        ldx     CURS_Y
+        ldy     CURS_X
+        rts
 
-_plotlo:
-                .repeat screenrows,line
-                    .byte <($0000+(line*$80))
-                .endrepeat
+.rodata
 
-_plothi:
-                .repeat screenrows,line
-                    .byte >($0000+(line*$80))
-                .endrepeat
-
-;-------------------------------------------------------------------------------
-; force the init constructor to be imported
-
-                .import initconio
-conio_init = initconio
+plotlo: .repeat screenrows,line
+        .byte   <($0000+(line*$80))
+        .endrepeat
 
+plothi: .repeat screenrows,line
+        .byte   >($0000+(line*$80))
+        .endrepeat