refactor WGDesktop

This commit is contained in:
4am 2018-03-01 19:59:52 -05:00
parent ce5eaaed95
commit fa635751a6
2 changed files with 16 additions and 11 deletions

View File

@ -46,32 +46,37 @@ WGClearScreen_charLoop:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; WGDesktop ; WGDesktop
; Paints the desktop pattern (assumes 80 cols) ; Paints the desktop pattern (assumes 80 cols)
; Side effects: Clobbers BASL,BASH
; ;
WGDesktop: WGDesktop:
SAVE_AXY SAVE_AXY
SETSWITCH PAGE2OFF SETSWITCH PAGE2OFF
ldx #23 ldx #23
WGDesktop_lineLoop: WGDesktop_lineLoop:
lda TEXTLINES_L,x ; Compute video memory address of line lda TEXTLINES_L,x ; Compute video memory address of line
sta BASL sta WGDesktop_charLoop+1
sta WGDesktop_charLoop2+1
lda TEXTLINES_H,x lda TEXTLINES_H,x
sta BASH sta WGDesktop_charLoop+2
sta WGDesktop_charLoop2+2
ldy #39 ldy #39
WGDesktop_charLoop:
lda #'W' lda #'W'
sta (BASL),y WGDesktop_charLoop:
SETSWITCH PAGE2ON sta $FFFF,y ; Self-modifying code!
lda #'V'
sta (BASL),y
SETSWITCH PAGE2OFF
dey dey
bpl WGDesktop_charLoop bpl WGDesktop_charLoop
SETSWITCH PAGE2ON
ldy #39
lda #'V'
WGDesktop_charLoop2:
sta $FFFF,y ; Self-modifying code!
dey
bpl WGDesktop_charLoop2
SETSWITCH PAGE2OFF
dex dex
bpl WGDesktop_lineLoop bpl WGDesktop_lineLoop

Binary file not shown.