Skip to content

Instantly share code, notes, and snippets.

@digarok
Created July 22, 2016 02:39
Show Gist options
  • Save digarok/2b578b6209ec95e1f7984c94c23ff50e to your computer and use it in GitHub Desktop.
Save digarok/2b578b6209ec95e1f7984c94c23ff50e to your computer and use it in GitHub Desktop.
* KFSHIRT - 2016-01-14 9:56PM
* Dagen Brock <dagenbrock@gmail.com>
org $2000
jmp VANITY_ENTRY ; JUMP OVER TO PUT START AT 2016
PRE_INIT jsr CLRSCR
FRAME_INIT
lda #XINIT
sta XPOS
lda #YINIT
sta YPOS
lda COL
bne DO_FRAME
*XPOS db #XINIT
*YPOS db #YINIT
XPOS = $2060
YPOS = $2061
ds $2016-*
org $2016
VANITY_ENTRY
lda LORES
sta TXTCLR
bne PRE_INIT
KFLOGO db %01100000,%00000000,%00000000,%00011000,%00000100
db %00101001,%11110011,%10011111,%10100011,%01111110
db %00101010,%10101010,%00101010,%00100101,%01000100
db %00110010,%10101011,%10101011,%10110111,%01110100
db %00101010,%10101000,%10101000,%10100100,%00010100
db %00101011,%10101011,%10111011,%10100111,%01110100
ASC 00,00,"DB" ; the signature of a great artist
ds $2070-*
org $2070
DO_FRAME
jsr SETCOL
jsr DRAW_LOGO
dec COL
bne FRAME_INIT
lda #$f
sta COL
bne FRAME_INIT ;was bne minus sec
DRAW_LOGO ldy #0
:DRAWLOOP lda KFLOGO,y
sty $0 ;
ldx #8 ; Really the first two lines of draw 8bits
* PUT "DB" at 203e
*******
* jsr DRAW8BITS
* A has bits
DRAW8BITS
:DRAWBIT asl
bcc :NoDraw
pha
ldy XPOS
lda YPOS
jsr PLOT
pla
:NoDraw inc XPOS
dex
bne :DRAWBIT
ldy $0
*******
lda XPOS
cmp #40
bcc :notdoneline
lda #XINIT
sta XPOS
inc YPOS
:notdoneline
iny
cpy #30
bne :DRAWLOOP
rts
XINIT = 0
YINIT = 15
COL db $0f
THEANSWER db #$42
* Copied from my ROM definitions (applerom.s)
CLRSCR equ $F832 ; Clears the low-resolution screen
LORES equ $C056
TXTCLR equ $C050
SETCOL equ $F864 ; Sets the color for plotting in low-resolution block
PLOT equ $F800 ; Plots a single low-resolution block on the screen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment