Merge pull request #13 from a2-4am/master

refactor WGDesktop
This commit is contained in:
blondie7575 2018-03-01 20:06:58 -08:00 committed by GitHub
commit 6a8b8652d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 11 deletions

View File

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

Binary file not shown.