processor 6502 include "vcs.h" include "macro.h" ARENA_HEIGHT = 160 SEG.U vars ORG $80 OverscanValue: ds 1 Frame: ds 1 Score: ds 2 Temp ds 1 Rand16 ds 1 Rand ds 1 Rand8 ds 1 PlyFldColor ds 1 PlayerX ds 5 PlayerY ds 5 Player0Ptr: ds 2 ; used for drawing player0 Player1Ptr: ds 2 ; used for drawing player1 Missile0Ptr: ds 2 ; used for drawing player0 Player0Draw: ds 1 ; used for drawing player0 Player1Draw: ds 1 ; used for drawing player1 Missile0Draw: ds 1 ; used for drawing player0 Color0Ptr: ds 2 ; used for coloring player0 DGS33 Color0: ds 1 ; used for coloring player0 DGS33 GameRunning ds 1 DigitOnes: ds 2 ; stored in $82-83, DigitOnes = Score, DigitOnes+1 = Score+1 DigitTens: ds 2 ; stored in $84-85, DigitTens = Score, DigitTens+1 = Score+1 ScoreCounter: ds 1 ScreenDraw: ds 1 NoseHairLength: ds 1 NoseHairGrowTimer: ds 1 NoseHairGrowTimerLimit: ds 1 ResetVar: ds 1 P___0Anim: ds 1 ButtonHeldTimer: ds 1 P1Anim: ds 1 SEG code ORG $F800 ; FC00 for a one k game Random: lda Rand lsr ifconst Rand16 rol Rand16 endif bcc noeor eor #$B4 noeor sta Rand ifconst Rand8 eor Rand16 endif rts ; scissors - player 0 ; nostril - missile 0 ; nosehair demon - player 1 Reset ; Clear RAM and all TIA registers CLEAN_START lda #$66 sta Rand16 sta Rand jsr Reset_Some_Stuff lda #10 sta OverscanValue Reset_3 lda INPT4 ; read the player's fire button value bpl FirePressed lda #0 sta GameRunning jsr TheGame jmp Reset_3 Reset_Some_Stuff: lda #60 sta PlayerX sta PlayerY lda #76 sta COLUP1 lda #24 sta NoseHairLength lda #120 sta PlayerX+1 sta PlayerY+1 lda #9 sta OverscanValue jsr TheGame lda #1 sta P___0Anim sta P1Anim lda #2 sta NoseHairGrowTimerLimit rts FirePressed jsr TheGame lda INPT4 ; read the player's fire button value bpl FirePressed lda #1 sta GameRunning lda #9 sta OverscanValue jsr TheGame jsr Reset_Some_Stuff lda #0 sta Score sta Score+1 sta ResetVar sta ButtonHeldTimer jmp GameLoop Crap ldx ResetVar cpx #0 beq Reset_Switch_Pushed_in2 cpx #2 beq FFFF_this_ssss jmp Reset_Switch_Pushed_in Reset_Switch_Pushed_in2: lda SWCHB ; read the console switches lsr ; shift game reset to carry bcs TheGame ; skip game reset Reset_Switch_Pushed_in: lda #1 sta ResetVar lda SWCHB ; read the console switches lsr ; shift game reset to carry bcc TheGame ; skip game reset jmp FirePressed FFFF_this_ssss lda #10 sta OverscanValue jmp Reset_3 TheGame: jsr VerticalSync jsr VerticalBlank jsr Kernel jsr Overscan rts GameLoop: jsr Crap lda INPT4 ; read the player's fire button value bpl CutNosehair lda #0 sta ButtonHeldTimer lda #1 sta P___0Anim jmp Quit_channel_1 CutNosehair lda ButtonHeldTimer cmp #6 beq Quit_channel_1 inc ButtonHeldTimer lda CXP0FB ; check to see if scissors/hair collision and #$80 beq GrowNosehairTimer ; if not then goto that label lda #24 sta NoseHairLength lda #2 sta P___0Anim lda #8 sta AUDF1 sta AUDV1 sta AUDC1 jmp GrowNosehairTimer Quit_channel_1: lda #0 sta AUDV1 GrowNosehairTimer inc P1Anim inc NoseHairGrowTimer lda NoseHairGrowTimer cmp NoseHairGrowTimerLimit bcc Dont_Grow_Nosehair Grow_Nosehair: lda #0 sta NoseHairGrowTimer lda NoseHairLength cmp #184 beq Dont_Grow_Nosehair inc NoseHairLength Dont_Grow_Nosehair: jmp GameLoop VerticalSync: lda #$82 ; DGS - LoaD Accumulator with $82 so D7=1 and D1=1 ldx #48 ; LoaD X with 49 sta WSYNC ; Wait for SYNC (halts CPU until end of scanline) sta VSYNC ; Accumulator D1=1, turns on Vertical Sync signal sta VBLANK ; DGS - turn off video, dump paddles to ground stx TIM64T ; set timer to go off in 41 scanlines (49 * 64) / 76 ;sta CTRLPF ; D1=1, playfield now in SCORE mode lda Frame and #$3f bne VSskip VSskip: inc Frame ; increment Frame count sta WSYNC ; Wait for Sync - halts CPU until end of 1st scanline of VSYNC sta WSYNC ; wait until end of 2nd scanline of VSYNC lda #0 ; LoaD Accumulator with 0 so D1=0 sta PF0 ; blank the playfield sta PF1 ; blank the playfield sta PF2 ; blank the playfield sta GRP0 ; blanks player0 if VDELP0 was off sta GRP1 ; blanks player0 if VDELP0 was on, player1 if VDELP1 was off sta GRP0 ; blanks player1 if VDELP1 was on sta VDELP0 ; turn off Vertical Delay sta VDELP1 ; turn off Vertical Delay sta CXCLR ; clear collision detection latches sta WSYNC ; wait until end of 3rd scanline of VSYNC sta VSYNC ; Accumulator D1=0, turns off Vertical Sync signal Sleep12: ; jsr here to sleep for 12 cycles rts ; ReTurn from Subroutine VerticalBlank: jsr Random jsr Joystick jsr PositionPlayers rts PositionPlayers: ldx #5 ; position players 0 and 1 POloop: lda PlayerX,x ; get the Player's X position jsr PosPlayer ; set coarse X position and fine-tune amount dex ; DEcrement X bpl POloop ; Branch PLus so we position all Players sta WSYNC ; wait for end of scanline sta HMOVE ; Tell TIA to use fine-tune values to set final X positions ; Player0Draw = ARENA_HEIGHT + HUMAN_HEIGHT - Y_position lda #(ARENA_HEIGHT + Scissors_HEIGHT) sec sbc PlayerY sta Player0Draw lda P___0Anim cmp #2 beq Scissors_cut_graphic ; Set Player0Ptr to proper value for drawing player0 lda #<(ScissorsGFX + Scissors_HEIGHT - 1) sec sbc PlayerY sta Player0Ptr lda #>(ScissorsGFX + Scissors_HEIGHT - 1) sbc #0 sta Player0Ptr+1 jmp Draw_Demon Scissors_cut_graphic ; Set Player0Ptr to proper value for drawing player0 lda #<(ScissorsCutGFX + ScissorsCut_HEIGHT - 1) sec sbc PlayerY sta Player0Ptr lda #>(ScissorsCutGFX + ScissorsCut_HEIGHT - 1) sbc #0 sta Player0Ptr+1 Draw_Demon lda GameRunning cmp #0 beq Draw_Demon_frame_3 lda P1Anim cmp #$10 bcc Draw_Demon_frame_1 cmp #$20 bcc Draw_Demon_frame_2 Draw_Demon_frame_4: lda #0 sta P1Anim Draw_Demon_frame_1 ; Player1Draw = ARENA_HEIGHT + BOX_HEIGHT - Y_position lda #(ARENA_HEIGHT + Demon1_HEIGHT) sec sbc PlayerY+1 sta Player1Draw ; Set Player1Ptr to proper value for drawing player1 lda #<(Demon1GFX + Demon1_HEIGHT - 1) sec sbc PlayerY+1 sta Player1Ptr lda #>(Demon1GFX + Demon1_HEIGHT - 1) sbc #0 sta Player1Ptr+1 jmp PrepScoreForDisplay Draw_Demon_frame_2 ; Player1Draw = ARENA_HEIGHT + BOX_HEIGHT - Y_position lda #(ARENA_HEIGHT + Demon2_HEIGHT) sec sbc PlayerY+1 sta Player1Draw ; Set Player1Ptr to proper value for drawing player1 lda #<(Demon2GFX + Demon2_HEIGHT - 1) sec sbc PlayerY+1 sta Player1Ptr lda #>(Demon2GFX + Demon2_HEIGHT - 1) sbc #0 sta Player1Ptr+1 jmp PrepScoreForDisplay Draw_Demon_frame_3 ; Player1Draw = ARENA_HEIGHT + BOX_HEIGHT - Y_position lda #(ARENA_HEIGHT + Demon3_HEIGHT) sec sbc PlayerY+1 sta Player1Draw ; Set Player1Ptr to proper value for drawing player1 lda #<(Demon3GFX + Demon3_HEIGHT - 1) sec sbc PlayerY+1 sta Player1Ptr lda #>(Demon3GFX + Demon3_HEIGHT - 1) sbc #0 sta Player1Ptr+1 PrepScoreForDisplay: ; initialize the loop counter for the score ldx #5 stx ScoreCounter ldx #1 ; use X as the loop counter for PSFDloop PSFDloop: lda Score,x ; LoaD A with Score+1(first pass) or Score(second pass) and #$0F ; remove the tens digit sta Temp ; Store A into Temp asl ; Accumulator Shift Left (# * 2) asl ; Accumulator Shift Left (# * 4) adc Temp ; ADd with Carry value in Temp (# * 5) sta DigitOnes,x ; STore A in DigitOnes+1(first pass) or DigitOnes(second pass) lda Score,x ; LoaD A with Score+1(first pass) or Score(second pass) and #$F0 ; remove the ones digit lsr ; Logical Shift Right (# / 2) lsr ; Logical Shift Right (# / 4) sta Temp ; Store A into Temp lsr ; Logical Shift Right (# / 8) lsr ; Logical Shift Right (# / 16) adc Temp ; ADd with Carry value in Temp ((# / 16) * 5) sta DigitTens,x ; STore A in DigitTens+1(first pass) or DigitTens(second pass) dex ; DEcrement X by 1 bpl PSFDloop ; Branch PLus (positive) to PSFDloop rts ; ReTurn from Subroutine Kernel: lda #$CE sta COLUPF sta WSYNC ; Wait for SYNC (halts CPU until end of scanline) ;--------------------------------------- lda INTIM ; 4 4 - check the timer bne Kernel ; 2 6 - (3 7) Branch if its Not Equal to 0 ; turn on the display sta VBLANK ; 3 9 - Accumulator D1=0, turns off Vertical Blank signal (image output on) lda #$15 ; 2 11 sta CTRLPF ; 3 14 - turn on playfield mirroring ; these 4 lines are duplicated after the inc DigitOnes/Tens ldy DigitTens ; 3 54 - get the tens digit offset for the Score lda DigitFlippedGfx,y ; 5 59 - use it to load the digit graphics and #$0F ; 2 61 - remove the graphics for the ones digit sta Temp ; 3 64 - and save it ScoreLoop2: ; 51 from bne ScoreLoop2 ; calculate PF2 for left side of screen ldy DigitOnes ; 3 54 - get the ones digit offset for the Score lda DigitFlippedGfx,y ; 4 58 - use it to load the digit graphics and #$F0 ; 2 60 - remove the graphics for the tens digit ora Temp ; 3 63 - merge with the tens digit graphics tax ; 2 65 - save in X for later sta WSYNC ; 3 68 - wait for end of scanline ;--------------------------------------- stx PF2 ; 3 3 - update PF2 for left side of screen ldy DigitOnes+1 ; 3 6 - get the left digit offset for the Score+1 lda DigitGfx,y ; 4 10 - use it to load the digit graphics and #$0F ; 2 12 - remove the graphics for the ones digit sta Temp ; 3 15 - and save it ldy DigitTens+1 ; 3 18 - get the ones digit offset for the Score+1 lda DigitGfx,y ; 4 22 - use it to load the digit graphics and #$F0 ; 2 24 - remove the graphics for the tens digit ora Temp ; 3 27 - merge with the tens digit graphics jsr Sleep12 ;12 39 SLEEP 6 ; 6 45 sta PF2 ; 3 48 - @48 - update PF2 for right side of screen sta WSYNC ; 3 53 - wait for end of scanline ;--------------------------------------- stx PF2 ; 3 3 - update PF2 for left side of screen tax ; 2 5 - save in X for right side inc DigitOnes ; 5 10 - advance for the next line of graphic data inc DigitOnes+1 ; 5 15 - advance for the next line of graphic data inc DigitTens ; 5 20 - advance for the next line of graphic data inc DigitTens+1 ; 5 25 - advance for the next line of graphic data ldy DigitTens ; 3 28 - get the tens digit offset for the Score lda DigitFlippedGfx,y ; 4 32 - use it to load the digit graphics and #$0F ; 2 34 - remove the graphics for the ones digit sta Temp ; 3 37 - and save it dec ScoreCounter ; 5 42 - decrement score loop counter SLEEP 3 ; 3 45 stx PF2 ; 3 48 bne ScoreLoop2 ; 2 50 - (3 51) if ScoreCounter != 0 then branch to ScoreLoop sta WSYNC ; 3 45 - wait for end of scanline lda #0 ; 2 2 sta PF2 lda #$2C sta COLUPF sta WSYNC lda #$11 ; 2 11 sta CTRLPF ; 3 14 - turn on playfield mirroring ldy #ARENA_HEIGHT ; init loop counter lda #0 sta ScreenDraw sta COLUP0 lda #$66 sta COLUBK Nose_part_0: sta WSYNC lda #255 sta PF0 lda #%10000000 sta PF1 sleep 16 lda #0 sta PF0 sta PF1 inc ScreenDraw lda ScreenDraw cmp #6 bcc Nose_part_0 Nose_part_1: sta WSYNC lda #255 sta PF0 lda #%11000000 sta PF1 sleep 16 lda #0 sta PF0 sta PF1 inc ScreenDraw lda ScreenDraw cmp #9 bcc Nose_part_1 Nose_part_2: sta WSYNC lda #255 sta PF0 lda #%11110000 sta PF1 sleep 16 lda #0 sta PF0 sta PF1 inc ScreenDraw lda ScreenDraw cmp #12 bcc Nose_part_2 Nose_part_3: sta WSYNC lda #255 sta PF0 lda #%11111100 sta PF1 sleep 16 lda #0 sta PF0 sta PF1 inc ScreenDraw lda ScreenDraw cmp #19 bcc Nose_part_3 lda #$30 sta NUSIZ0 lda #20 sta PlayerX+2 Nose_part_4: sta WSYNC lda #2 sta ENAM0 lda #255 sta PF0 lda #%11111000 sta PF1 sleep 16 lda #0 sta PF0 sta PF1 inc ScreenDraw lda ScreenDraw cmp #21 bcc Nose_part_4 Nose_part_5: sta WSYNC lda #255 sta PF0 lda #%11111111 sta PF0 lda #%11110000 sta PF1 sleep 16 lda #0 sta PF0 sta PF1 inc ScreenDraw lda ScreenDraw cmp #24 bcc Nose_part_5 sta WSYNC lda #%01000000 sta PF1 lda #6 sta COLUP0 lda #$F2 sta COLUPF lda #0 sta ENAM0 sleep 16 lda #0 sta PF1 lda NoseHairLength cmp #184 beq Argh2 NoseHair: lda ScreenDraw cmp NoseHairLength beq stop_screen inc ScreenDraw sta WSYNC lda #%01000000 sta PF1 lda #Scissors_HEIGHT-1 ; 2 13 - height of the human graphics, dcp Player0Draw ; 5 18 - Decrement Player0Draw and compare with height bcs DoDrawGrp00 ; 2 20 - (3 21) if Carry is Set then player0 is on current scanline lda #0 ; 2 22 - otherwise use 0 to turn off player0 .byte $2C ; 4 26 - $2C = BIT with absolute addressing, trick that ; causes the lda (Player0Ptr),y to be skipped DoDrawGrp00: ; 21 - from bcs DoDrawGRP0 lda (Player0Ptr),y ; 5 26 - load the shape for player0 tax ; 2 28 - save in X for update during Horizontal Blanking lda #Demon1_HEIGHT-1 ; 2 30 - height of the box graphics, subtract 1 due to starting with 0 dcp Player1Draw ; 5 35 - Decrement Player1Draw and compare with height bcs DoDrawGrp10 ; 2 37 - (3 38) if Carry is Set, then player1 is on current scanline lda #0 ; 2 39 - otherwise use 0 to turn off player1 .byte $2C ; 4 43 - $2C = BIT with absolute addressing, trick that ; causes the lda (Player1Ptr),y to be skipped DoDrawGrp10: ; 38 - from bcs DoDrawGrp1 lda (Player1Ptr),y ; 5 43 - load the shape for player1 ; sta WSYNC ; 3 46/0 - halts CPU until start of next scanline stx GRP0 ; 3 3 - draw the human sta GRP1 ; 3 6 - draw the box dey ; 2 8 - update loop counter lda #0 sta PF1 jmp NoseHair stop_screen: inc ScreenDraw sta WSYNC ; 3 46/0 - halts CPU until start of next scanline lda #Scissors_HEIGHT-1 ; 2 13 - height of the human graphics, dcp Player0Draw ; 5 18 - Decrement Player0Draw and compare with height bcs DoDrawGrp0 ; 2 20 - (3 21) if Carry is Set then player0 is on current scanline lda #0 ; 2 22 - otherwise use 0 to turn off player0 .byte $2C ; 4 26 - $2C = BIT with absolute addressing, trick that ; causes the lda (Player0Ptr),y to be skipped DoDrawGrp0: ; 21 - from bcs DoDrawGRP0 lda (Player0Ptr),y ; 5 26 - load the shape for player0 tax ; 2 28 - save in X for update during Horizontal Blanking lda #Demon1_HEIGHT-1 ; 2 30 - height of the box graphics, subtract 1 due to starting with 0 dcp Player1Draw ; 5 35 - Decrement Player1Draw and compare with height bcs DoDrawGrp1 ; 2 37 - (3 38) if Carry is Set, then player1 is on current scanline lda #0 ; 2 39 - otherwise use 0 to turn off player1 .byte $2C ; 4 43 - $2C = BIT with absolute addressing, trick that ; causes the lda (Player1Ptr),y to be skipped DoDrawGrp1: ; 38 - from bcs DoDrawGrp1 lda (Player1Ptr),y ; 5 43 - load the shape for player1 stx GRP0 ; 3 3 - draw the human sta GRP1 ; 3 6 - draw the box dey ; 2 8 - update loop counter bne stop_screen Argh sta WSYNC lda #$C6 sta COLUBK inc ScreenDraw lda ScreenDraw cmp #198 bne Argh rts Argh2: sta WSYNC lda #2 sta ResetVar lda #$C6 sta COLUBK inc ScreenDraw lda ScreenDraw cmp #198 bne Argh2 rts Overscan sta WSYNC ; Wait for SYNC (start of next scanline) lda #2 ; LoaD Accumulator with 2 sta VBLANK ; STore Accumulator to VBLANK, D1=1 turns image output off lda OverscanValue ; previously OverscanValue sta TIM64T ; set timer for end of Overscan OSwait: sta WSYNC bit TIMINT bpl OSwait ; wait for the timer to denote end of Overscan rts PosPlayer: sec sta WSYNC DivideLoop sbc #15 ; 2 2 - each time thru this loop takes 5 cycles, which is bcs DivideLoop ; 2 4 - the same amount of time it takes to draw 15 pixels eor #7 ; 2 6 - The EOR & ASL statements convert the remainder asl ; 2 8 - of position/15 to the value needed to fine tune asl ; 2 10 - the X position asl ; 2 12 asl ; 2 14 sta.wx HMP0,X ; 5 19 - store fine tuning of X sta RESP0,X ; 4 23 - set coarse X position of Player rts ; 6 29 - ReTurn from Subroutine Joystick: lda GameRunning cmp #0 beq DoneWithJoystick lda SWCHA ; fetch state of both joysticks asl ; shift A bits left, R is now in carry bit bcs CheckLeft ; branch if joystick is not held right ldy PlayerX ; get position of player iny ; and move it right cpy #140 ; test for edge of screen bne SaveX ; save value as is if we're not at edge ldy #139 ; else wrap to left edge of screen SaveX: sty PlayerX ; save player's new X position ldy #8 ; turn off reflect of player, which sty REFP0 ; makes player image face right CheckLeft: asl ; shift A bits left, L is now in the carry bit bcs CheckDown ; branch if joystick not held left ldy PlayerX ; get the Player's X position dey ; and move it left cpy #0 ; test for edge of screen bne SaveX2 ; save X if we're not at the edge ldy #1 ; else wrap to right edge SaveX2: sty PlayerX ; save player's new X position ldy #0 ; turn on reflect of player, which sty REFP0 ; makes player image face left CheckDown: asl ; shift A bits left, D is now in the carry bit bcs CheckUp ; branch if joystick not held down ldy PlayerY ; get the Player's Y position dey ; move it down cpy #8 ; test for bottom of screen bne SaveY ; save Y if we're not at the bottom jmp CheckUp SaveY: sty PlayerY ; save Y CheckUp: asl ; shift A bits left, U is now in the carry bit bcs DoneWithJoystick ; branch if joystick not held up ldy PlayerY ; get the Player's Y position iny ; move it up cpy #161 ; test for top of screen bne SaveY2 ; save Y if we're not at the top jmp DoneWithJoystick SaveY2: sty PlayerY ; save Y DoneWithJoystick: rts DigitGfx: .byte %00100010 .byte %01010101 .byte %01010101 .byte %01010101 .byte %00100010 .byte %00100010 .byte %01100110 .byte %00100010 .byte %00100010 .byte %01110111 .byte %01100110 .byte %00010001 .byte %01100110 .byte %01000100 .byte %01110111 .byte %01100110 .byte %00010001 .byte %01100110 .byte %00010001 .byte %01100110 .byte %01010101 .byte %01010101 .byte %01110111 .byte %00010001 .byte %00010001 .byte %01110111 .byte %01000100 .byte %01100110 .byte %00010001 .byte %01100110 .byte %00110011 .byte %01000100 .byte %01100110 .byte %01010101 .byte %00100010 .byte %01110111 .byte %00010001 .byte %00100010 .byte %00100010 .byte %00100010 .byte %00100010 .byte %01010101 .byte %00100010 .byte %01010101 .byte %00100010 .byte %00100010 .byte %01010101 .byte %00110011 .byte %00010001 .byte %01100110 DigitFlippedGfx: .byte %01000100 .byte %10101010 .byte %10101010 .byte %10101010 .byte %01000100 .byte %01000100 .byte %01100110 .byte %01000100 .byte %01000100 .byte %11101110 .byte %01100110 .byte %10001000 .byte %11101110 .byte %00100010 .byte %11101110 .byte %01100110 .byte %10001000 .byte %01100110 .byte %10001000 .byte %01100110 .byte %10101010 .byte %10101010 .byte %11101110 .byte %10001000 .byte %10001000 .byte %11101110 .byte %00100010 .byte %01100110 .byte %10001000 .byte %01100110 .byte %11001100 .byte %00100010 .byte %01100110 .byte %10101010 .byte %01000110 .byte %11101110 .byte %10001000 .byte %01000100 .byte %01000100 .byte %01000100 .byte %01000100 .byte %10101010 .byte %01000100 .byte %10101010 .byte %01000100 .byte %01000100 .byte %10101010 .byte %11101110 .byte %10001000 .byte %01100110 ScissorsGFX .byte %10000010 .byte %01000101 .byte %00101010 .byte %00010000 .byte %00101010 .byte %01000101 .byte %10000010 Scissors_HEIGHT = * - ScissorsGFX ScissorsCutGFX .byte %00000010 .byte %00000101 .byte %11111010 .byte %11111010 .byte %00000101 .byte %00000010 .byte %00000000 ScissorsCut_HEIGHT = * - ScissorsCutGFX Demon1GFX .byte %00000100 .byte %00000100 .byte %00100100 .byte %10111101 .byte %10111101 .byte %01111110 .byte %00011000 .byte %00111100 .byte %01100110 .byte %01011010 .byte %01111110 .byte %11011011 .byte %11111111 .byte %10000001 Demon1_HEIGHT = * - Demon1GFX Demon2GFX .byte %00100000 .byte %00100000 .byte %00100100 .byte %10111101 .byte %10111101 .byte %01111110 .byte %00011000 .byte %00111100 .byte %01100110 .byte %01011010 .byte %01111110 .byte %11011011 .byte %11111111 .byte %10000001 Demon2_HEIGHT = * - Demon2GFX Demon3GFX .byte %00100100 .byte %00100100 .byte %00100100 .byte %10111101 .byte %10111101 .byte %01111110 .byte %00011000 .byte %00111100 .byte %01100110 .byte %01011010 .byte %01111110 .byte %11011011 .byte %11111111 .byte %10000001 Demon3_HEIGHT = * - Demon3GFX echo "------", [$FFFA - *]d, "bytes free before you run out of space." ORG $FFFA InterruptVectors .word Reset ; NMI .word Reset ; RESET .word Reset ; IRQ END