Split files

This commit is contained in:
Karri Kaksonen
2022-04-16 21:13:51 +03:00
parent cdc6e1c61f
commit 422d245cab
4 changed files with 85 additions and 92 deletions

View File

@@ -3,34 +3,34 @@
.export _clrscr
.import _screen
.import pusha0,pushax
.include "extzp.inc"
.import _screen
.import pusha0,pushax
.include "extzp.inc"
.code
.code
.proc _clrscr
.proc _clrscr
lda #<(_screen)
ldx #>(_screen)
sta ptr7800
stx ptr7800+1
ldx #screenrows
@L1: ldy #charsperline
lda #0
@L2: sta (ptr7800),y
dey
bne @L2
lda ptr7800
clc
adc #charsperline
bcc @L3
inc ptr7800+1
@L3: dex
bne @L1
rts
lda #<(_screen)
ldx #>(_screen)
sta ptr7800
stx ptr7800+1
ldx #screenrows
@L1: ldy #charsperline
lda #0
@L2: sta (ptr7800),y
dey
bne @L2
lda ptr7800
clc
adc #charsperline
bcc @L3
inc ptr7800+1
@L3: dex
bne @L1
rts
.endproc
.endproc
;-------------------------------------------------------------------------------
; force the init constructor to be imported