wje@sii.UUCP (Bill Ezell) (05/11/84)
b Several people have noted that the box routine posted in my first Vectrex article doesn't assemble with the assembler that I posted. The problem is that I changed the assembler between the time that I posted the first article and and the time that I posted the assembler! The change was in the way that direct addresses vs. extended addresses are represented in the input source. Addresses that don't reference the the direct page must have a leading '$' to indicate an extended address. The working version of box follows. Sorry about that. -Bill Ezell (decvax!sii!wje) #define dptoC8 0xF1AF #define dptoD0 0xF1AA #define drawl1b 0xF40E #define waitrecal 0xF192 #define xaxto7F 0xF2A9 #define mag 0xC900 .text; .org 0x0; .byte 'g',' ','G','C','E',' ','2','0','0','1',0x80; .word music; .word 0xf850; .word 0x30e8; .byte 'B','O','X', 0x80,0; start: clr $mag; /* start with smallest box */ ldd #0x3075; std $0xC83D; /* set t2 timer for 20 msec */ jsr $dptoD0; std 0x8; /* start t2 */ loop: jsr $waitrecal; /* wait for end of cycle */ jsr $xaxto7F; /* adjust beam intensity */ lda #0xCE; sta 0xC; /* get out of zero mode! */ inc $mag; /* grow box once each cycle */ ldb $mag; ldx #box; jsr $drawl1b; /* xreg points to dlist now */ bra loop; boxloc: .byte 0,0; box: .byte -1,0,50; .byte -1,50,0; .byte -1,0,-50; .byte -1,-50,0; .byte 1; /* the startup stuff points to this as our initial music */ music: .word 0xed8f; .word 0xfeb6; .byte 4,30, 2,10, 0,20, 2,20, 4,20, 4,20, 4,40; .byte 0, 0x80; /* end of music */