fix for PLOT routine

This commit is contained in:
FeralChild64 committed 2020-01-11 10:18:28 +01:00
1 parent d71dcebf3a
commit d11d28925d
5 files changed
+24 -7

No files matched your search

@@ -0,0 +1,56 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Set pointers PNT and USER to current screen line
//
screen_calculate_PNT_USER:
ldx TBLX
// FALLTROUGH
screen_calculate_PNT_USER_from_X: // entry point for screen_clear_line
// Reset pointer to start of screen
lda HIBASE
sta PNT+1
lda #$00
sta PNT+0
// Add 40 to PNT for every line
cpx #$00
beq screen_calculate_USER
!:
lda #40
clc
adc PNT+0
sta PNT+0
bcc !+
inc PNT+1
!:
dex
bne !--
// FALLTROUGH
screen_calculate_USER:
// Calculate USER (pointer to the current line in color RAM)
lda PNT+0
sta USER+0
lda PNT+1
sec
sbc HIBASE
clc
adc #>$d800
sta USER+1
rts
#endif // ROM layout