1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-01 13:41:34 +00:00
cc65/libsrc/atari7800/clrscr.s

40 lines
783 B
ArmAsm
Raw Normal View History

2022-04-02 06:39:55 +00:00
.include "atari7800.inc"
.export _clrscr
2022-04-16 18:13:51 +00:00
.import _screen
.import pusha0,pushax
.include "extzp.inc"
.code
.proc _clrscr
2022-04-18 08:59:54 +00:00
lda #<_screen
ldx #>_screen
2022-04-16 18:13:51 +00:00
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
2022-04-02 06:39:55 +00:00
;-------------------------------------------------------------------------------
; force the init constructor to be imported
.import initconio
conio_init = initconio