Skip to content

Instantly share code, notes, and snippets.

@jsonpittman
Created January 24, 2019 04:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsonpittman/ac7f4da4a6aafff55fd86c13bddac3ff to your computer and use it in GitHub Desktop.
Save jsonpittman/ac7f4da4a6aafff55fd86c13bddac3ff to your computer and use it in GitHub Desktop.
;*******************************************************************************
;* *
;* long branch never - Episode 03 Homework *
;* https://www.youtube.com/watch?v=6DldT2rH63c *
;* *
;* Jason Pittman *
;* *
;*******************************************************************************
org $4000
Start lda #$20 ; Load char ' ' into A register
ldx #$400 ; point X-register beginning of video space
Loop sta ,x+ ; put value A-register on screen, increment
cmpx #$600 ; are we at end of video screen?
bne Loop ; no? go back to do more
ldx #Line1
ldy #$424
bsr WriteDark ; use bsr to return from WriteDark?
ldx #Line2 ; write another line
ldy #$444
bsr WriteDark
ldx #Line3
ldy #$465
bsr WriteDark
ldx #Line4
ldy #$4a8
bsr WriteDark
bra Footer
WriteDark lda ,x+
cmpa #64
lbeq Done
blt Skip ; if char is > 64, subtract 64 to make black BG
suba #64 ; TODO: dont subtract if > end of char set so
; it doesn't foul up those block character things
Skip sta ,y+
bra WriteDark
lda #$FF ; Load char ' ' into A register
Footer
sta $501
sta $505
sta $508
sta $509
sta $50d
sta $50e
sta $511
sta $512
sta $515
sta $517
sta $518
sta $519
sta $51a
sta $51b
sta $51e
sta $521
sta $525
sta $527
sta $52a
sta $52c
sta $52f
sta $531
sta $533
sta $535
sta $537
sta $53b
sta $53e
sta $541
sta $545
sta $547
sta $54a
sta $54c
sta $54f
sta $551
sta $554
sta $555
sta $557
sta $55e
sta $561
sta $563
sta $565
sta $567
sta $568
sta $569
sta $56a
sta $56c
sta $56f
sta $571
sta $575
sta $577
sta $57a
sta $57b
sta $57c
sta $57e
sta $581
sta $583
sta $585
sta $587
sta $589
sta $58c
sta $58f
sta $591
sta $595
sta $597
sta $59b
sta $5a2
sta $5a4
sta $5a7
sta $5aa
sta $5ad
sta $5ae
sta $5b1
sta $5b5
sta $5b7
sta $5b8
sta $5b9
sta $5ba
sta $5bb
sta $5be
deca
lbra Footer ; had to change bra to lbra to prevent
; Byte overflow ¯\_(ツ)_/¯
Line1 fcc 'YOU WOULD THINK THAT YOU@'
Line2 fcc "WOULD JUST TYPE '72' AND@"
Line3 fcc 'YOU WOULD BE ALL SET.@'
Line4 fcc 'YOU WOULD BE...@'
Done
rts
End Start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment