Classic Computer Magazine Archive PROGRAM LISTING: 84-01/ROADASM.ASM


50     CDTMV2=$021A;THE COUNTDOWN FOR TIMER #2
60     CDTMA2=0228;VECTOR FOR TIME #2
70     INDEX=$0630;1584
80       PTR=$0631;1585
90    DLBYTE=$0666;DUMMY
0100  *=$0600     ;START PAGE 6
0110  PLA         ;POP THE NUMBER OF ARGS. OFF THE STACK
0120  LDA #$0B    ;LO BYTE OF TIMER ROUTINE
0130  STA CDTMA2  ;PUT IN LO BYTE OF VECTOR
0140  LDA #$06    ;HI BYTE OF TIMER ROUTINE
0150  STA CDTMA2+1;PUT IN HI BYTE OF VECTOR
0160  CLD         ;DO THIS OR BASIC WILL FOUL UP
0165              ;YOUR ARITHMETIC
0170  LDA INDEX   ;KEEPS TRACK OF WHICH SCREEN YOUR ON
0180  CLC
0190  ADC #4      ;POINT TO NEXT SCREEN (EACH SCREEN IS
0200              ;4 PAGES LONG)
0210  CMP #12     ;TIME TO DISPLAY FIRST SCREEN AGAIN?
0220  BNE RESET   ;NO, GO DISPLAY 2ND OR 3RD SCREEN
0230  LDA #0      ;YES, ZERO OUT INDEX
0240 RESET STA INDEX ;STORE IT
0250  LDA PTR     ;PTR CONTAINS HI BYTE OF FIRST SCREEN ADDRESS
0260  CLC
0270  ADC INDEX   ;ACC NOW CONTAINS HI BYTE OF ADDRESS
0275              ;OF NEXT SCREEN
0280  STA DLBYTE  ;DLBYTE WAS SET TO$0666 IN THE EQUATES
0290              ;BUT THE BASIC PROGRAM REPLACES THE TWO
0300              ;NUMBERS HERE WITH THE LO AND HI BYTES
0310              ;OF THE DISPLAY LIST HI LMS BYTE ADDRESS
0320              ;SO WE ARE STORING THE HI BYTE  OF THE NEXT
0330              ;SCREEN INTO THE LMS HI BYTE,
0335              ;THUS DISPLAYING IT!
0340  LDA #$02    ;RELOAD THE COUNTDOWN TIMER
0350  STA CDTMV2
0360  RTS         ;ALL DONE

Back to previous page