; Draws the outline of Pikachu ; Based on code by Christopher Tumber ; Written and commented by man@sci.fi ; Public Domain for all Vectrex freaks ; First we rename all the BIOS routines ; we'll be needing waitrecal EQU $f192 movepen7ftod EQU $f2fc intensitytoA EQU $f2ab movedrawVL4 EQU $f3b7 ; You can give them your own names if you want to ; just make sure you understand them, and preferably ; that someone else reading your source code ; understands them as well. (EQU = equals) ; All programs start from address $0000 ; In this example, all numbers are actual numbers ; not hexadecimals like in the tutorials ; Assembly is quite capable of handling real numbers : and they are much more easy for a beginner to ; understand ORG $0000 ; Init block that needs to be in every program ; the GCE text has to be in place, it is checked ; by BIOS FCB $67,$20 FCC "GCE MANU" FCB $80 FDB music FDB $f850 FDB $30b8 FCC "GOTTA CATCH EM ALL" FCB $80,$0 ; Here's the main program ; that will draw some vectors drawline: ; Main program's label ; so it's easy to find ; and to jump to jsr waitrecal ; Resets the BIOS lda #0 ; Y - coordinate ldb #0 ; X - coordinate jsr movepen7ftod ; Moves pen to (Y,X) lda #127 ; Gets the Intensity jsr intensitytoA ; Sets the Intensity ldx #horizwall ; Gets the vector list lda #49 ; Number of vectors (49) ; = how many vectors ; will be drawn, the ; starting point isn't ; counted ldb #$80 ; gets the scale jsr movedrawVL4 ; BIOS-routine that ; draws the line bra drawline ; jumps back to start ; It jumps back, because on Vectrex, you have to be ; drawing all the time to keep the vectors visible ; bra = branch ; lda = load to register a ; ldb = load to register b horizwall fcb 0,50 ; Okay here's the fcb 30,40 ; coordinates for fcb 10,-10 ; Pikachu's outline fcb -20,-35 fcb 20,-5 fcb 10,20 fcb 20,-10 fcb 20,0 fcb 0,20 fcb 10,30 ; Tip of right ear fcb 10,-20 fcb 0,-40 fcb 10,-10 fcb 0,-60 fcb -30,-60 fcb -30,-20 fcb 30,50 fcb 0,10 fcb -10,-10 fcb -50,0 fcb 10,-20 fcb -10,-10 fcb -30,30 fcb -20,0 fcb -10,-10 fcb 10,-10 fcb -20,-20 fcb 20,-10 fcb -30,-30 ; Tip of tail fcb -20,20 fcb 20,10 fcb -10,10 fcb 20,20 fcb -10,10 fcb 30,10 fcb -20,10 fcb -10,10 fcb -10,-10 fcb 0,10 ; Between left toes fcb -10,10 fcb 20,10 fcb -10,20 fcb 0,10 fcb 10,20 fcb 0,10 fcb -10,10 fcb 10,0 fcb 0,10 fcb 10,-10 fcb 40,0 music: FDB $fee8 FDB $feb6 FCB $28,$08 FCB $0,$80 ; This basicly tells Vectrex to play nothing ; Don't ask me what it means, at least not yet ; Hopefully you learned something ; - Manu