Skip to content

Commit

Permalink
Add a clunky unoptimised version of cleartoeol.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgiven committed Sep 16, 2024
1 parent 6b240f2 commit 88a9a06
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions src/arch/apple2e/apple2e.S
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ screen_jmptable_lo:
jmptablo fail ; screen_showcursor
jmptablo screen_scrollup
jmptablo screen_scrolldown
jmptablo fail ; screen_cleartoeol
jmptablo screen_cleartoeol
jmptablo fail ; screen_setstyle
screen_jmptable_hi:
jmptabhi screen_version
Expand All @@ -255,7 +255,7 @@ screen_jmptable_hi:
jmptabhi fail
jmptabhi screen_scrollup
jmptabhi screen_scrolldown
jmptabhi fail ; screen_cleartoeol
jmptabhi screen_cleartoeol
jmptabhi fail ; screen_setstyle
zendproc

Expand Down Expand Up @@ -454,6 +454,34 @@ zproc clear_line_at_ptr
rts
zendproc

zproc screen_cleartoeol
jsr hide_cursor

lda cursory
jsr calculate_screen_address

ldx cursorx
zrepeat
txa
lsr a
pha
rol a
and #1
eor #1
tay
sta SCREEN_PAGE2OFF, y

pla
tay
lda #32|0x80
sta (ptr), y

inx
cpx #80
zuntil_eq
rts
zendproc

zproc draw_cursor
pha
lda cursorf
Expand Down

0 comments on commit 88a9a06

Please sign in to comment.