-
Notifications
You must be signed in to change notification settings - Fork 6
/
MAIN.ASM
573 lines (523 loc) · 14.5 KB
/
MAIN.ASM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
.FILE 'MAIN.ASM'
.TITLE 'INITIALIZATION AND INTERRUPTS'
.WIDTH 132
.OPTION B,D,L,T
.MNOLIST
; GET THE SYSTEM STUFF
.INCLUDE "MPROC.EQU" ;MPROC EQUATES
.INCLUDE "DISP.EQU" ;DISPLAY PROCESSOR EQUATES
.INCLUDE "\VIDEO\SYS\GSP.INC" ;GSP ASSEMBLER EQUATES
.INCLUDE "\VIDEO\SYS\SYS.INC" ;ZUNIT SYSTEM EQUATES
.INCLUDE "\VIDEO\SYS\MACROS.HDR" ;MACROS, YEAH!
.INCLUDE "ROBO.EQU"
*UTILITY SUBROUTINE EQUATES
.GLOBAL MYOINIT,SETPPROC,WDOGDIS,WDISTAB,INTIO
*PAL EQUATES
.GLOBL DELPAL,GETFPAL,INITBPAL,FINDPAL,INITPAL,PALTRANS,AUTOEON
*RAM EQUATES
.GLOBL INTSYNC0,INTSYNC1,NOAUTOE,SYSCOPY
.GLOBAL JOYSW
.GLOBAL IRQSKYE,WDOGRAM
.GLOBAL GAMSTATE,GAMERASE
; .GLOBAL WRAMEND,WRAMSTRT,NRAMEND,NRAMSTRT,GRAMEND,GRAMSTRT
; EXTERNAL
.REF INIT_PROG,COLRTEMP,DRAW_SCORE,SWSTACK,SWTEMP1,SWTEMP2
.REF SWSTMN,SCORE_FLAG,C_FRAC,C_FLAGS,COINCNTR
;
.DEF INIT_ALL,CLSCRACH
;
;UNINITIALIZED RAM DEFINITIONS
;
.BSS EOSCRN,8,1
.BSS IRQLED,16
.BSS WDOGRAM,32 ;INITIALIZED LONG FOR WATCH DOG DETECT
.TEXT
INIT_ALL:
CALLA INIT_SYS ;GENERAL SYSTEM INITIALIZATION
CALLA PINIT ;INIT PROCESS LIST
CALLA MYOINIT ;INITIALIZE THE OBJECT LIST
CALLA AUTOEON
EINT ;ENABLE INTERRUPTS AND WE'RE OFF
MOVK 1,A0
MOVE A0,@DISPLAYON
RETS ;RETURN TO FIRST GAME FILE
**************************************************************************
* *
* SYSTEM ROUTINES AND PROCESSES *
* *
**************************************************************************
SWSCAN:
;
; SCAN PLAYER CONTROLS ONLY
;
; MMTM SP,A0,A1,A2,A3
MOVE @SWITCH,A0,L
; MOVE @OLDBUT1,A1,L
; MOVE @OLDBUT2,A2,L
; AND A2,A1
; NOT A1
; OR A0,A1
; MOVE @OLDBUT1,@OLDBUT2,L
; MOVE A0,@OLDBUT1,L
MOVE A0,@JOYSW,L
;
; SCAN FOR PROCESS ACTIVATION ONLY
;
MOVE @SWITCH,A0,L
MOVE @SWTEMP1,A1,L ;PREVIOUS STATE T=N-1
MOVE @SWTEMP2,A2,L ;PREVIOUS PREVIOUS T=N-2
MOVE A1,@SWTEMP2,L ;NEW PREVIOUS PREVIOUS
MOVE A0,@SWTEMP1,L ;NEW PREVIOUS
AND A1,A2
ANDN A0,A2 ;LOOK FOR 110
JREQ SWSCX ;NO SWITCHES
MOVE @SWSTACK,A3,L ;SWITCH ACTIVATION STACK
SWSCLP: ;FIND BIT SET
CMPI SWSTMN,A3 ;SWITCH STACK OVERFLOW?
JREQ SWSCX1 ;YEP, QUIT
LMO A2,A0 ;1'S COMP LEFTMOST BIT
RL A0,A2 ;GET RID OF BIT
SLL 1,A2
MOVK 31,A1 ;CALC TRUE BIT #
SUB A0,A1
MOVE A1,-*A3 ;PUSH SWITCH NUMBER ON STACK (0-15)
RL A1,A2 ;RESTORE SWITCH WORD WITHOUT BIT
JRNE SWSCLP
SWSCX1:
MOVE A3,@SWSTACK,L ;RESTORE SWITCH STACK
SWSCX:
; MMFM SP,A0,A1,A2,A3
RETS
INIT_SYS:
CALLA PINIT ;
MOVI INAMODE,A0
MOVE A0,@GAMSTATE,W
MOVI WDOGNUM,A0
MOVE A0,@WDOGRAM,L ;MARK SYSTEM AS INITIALIZED
; RESET THE SOUND BOARD
CALLA SNDRES ;SOUND BOARD INIT (MAKES SOUND!)
CALLR INITIO ;INITIALIZE THE I/O REGS
; SET UP TI PIXEL PROCESSING REGS
CALLA SETPPROC ;ONLY NEEDED FOR GSP ROUTINES?
; INIT COLOR RAM
CLR A0
MOVE A0,@DMACTRL ;OFF DMA
MOVE A0,@CMAPSEL ;CLEAR COLOR MAP SELECT
; INITIALIZE RANDOM SEED
MOVI 81261A8CH,A0
MOVE A0,@RAND,L
; ENABLE DISPLAY, EXT1 INTERRUPT
MOVI DIE+X2E,A0
MOVE A0,@INTENB ;ENABLE DISPLAY INTERRUPTS
; INITIALIZE SYSTEM CONTROL REGISTER
MOVI SYSCINIT,A0
MOVE A0,@SYSCTRL,W
MOVE A0,@SYSCOPY,W ;KEEP A COPY IN RAM
RETS
*NARC RAM INITIALIZATION
;NRAMINIT
; MMTM SP,A0,A1,A2
; MOVI NRAMSTRT,A1
; MOVI NRAMEND,A2
; JRUC RAMINIT
*GAME RAM INITIALIZATION
;GRAMINIT
; MMTM SP,A0,A1,A2
; MOVI GRAMSTRT,A1
; MOVI GRAMEND,A2
; JRUC RAMINIT
*WAVE RAM INITIALIZATION
;WRAMINIT
; MMTM SP,A0,A1,A2
; MOVI WRAMSTRT,A1
; MOVI WRAMEND,A2
;RAMINIT
; CLR A0
;RAMLOOP
; MOVE A0,*A1+,W ;16 BITS AT A TIME, NO EXTRANEOUS CLEARS
; CMP A2,A1 ;DONE?
; JRLO RAMLOOP ;NO!
; MMFM SP,A0,A1,A2
; RETS
**************************************************************************
* *
* WDOGDIS - WATCH DOG DISABLE *
* NOTE: CALL WHILE INTERRUPTS ARE TURNED OFF. *
* *
**************************************************************************
WDOGDIS
MMTM SP,A0,A1,A2,A3
MOVI WDISTAB,A1
MOVK 1,A3
MOVE @SYSCOPY,A2,W
MOVE *A1+,A0,W
WDOGSL
OR A2,A0
MOVE A0,@SYSCTRL,W
XOR A3,A0
MOVE A0,@SYSCTRL,W
MOVE *A1+,A0,W
JRNN WDOGSL
MOVE A2,@SYSCTRL,W
MMFM SP,A0,A1,A2,A3
RETS
*
*WATCH DOG DISABLE TABLE
WDISTAB
.WORD 0
.WORD 0
.WORD 0
.WORD 0
.WORD 2
.WORD 0
.WORD 2
.WORD 0
.WORD 0FFFFH
**************************************************************************
* *
* CLSCRACH - CLEAR SCRATCH PAD
* NOTE: DESTROYS A0,A1,A2,A3 *
* *
**************************************************************************
CLSCRACH
PULL A3
CLR A0
MOVI SCRATCH,A1,L
MOVI >8000,A2,L ;CLEAR TWO AT A TIME
SCTLP MOVE A0,*A1+,L
DSJS A2,SCTLP
JUMP A3
**************************************************************************
* *
* DIRQ - DISPLAY IRQ, USES THE VALUE STORE @DPYINT TO DETERMINE *
* WHICH INTERRUPT THIS IS, HALF OR FULL SCREEN. @DPYINT IS *
* COMPARED AGAINST THE CONSTANT HSINT. *
* *
**************************************************************************
DIRQ
MMTM SP,B0,B1,B2,B3,B4,B5
MMTM SP,A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14
SETF 16,1,0 ;WORD SIGN EXTEND
MOVE @INTPEND,A1,W ;CLEAR STUPID INTERRUPT PENDING
ANDNI DIE,A1
MOVE A1,@INTPEND,W
MOVE @INTENB,A1,W ;DISABLE DISPLAY INTERRUPT
ANDNI DIE,A1
MOVE A1,@INTENB,W
EINT ;ENABLE OTHER INTERRUPTS
MOVE @DPYINT,A2 ;CHECK WHAT SCREEN HALF
CMPI HSINT,A2
JRNE DIRQ1 ;BR = END OF SCREEN INTERRUPT
**************************************************************************
* *
* DIRQ0 - HALF SCREEN INTERRUPT. TOP HALF OBJECTS ARE UPDATED, *
* OBJECT VELOCITIES ARE ADDED, SWITCHES FOR PLAYER MOVEMENT ARE *
* SCANNED, AND PLAYERS ARE UPDATED. *
* *
**************************************************************************
DIRQ0
MOVI EOSINT,A1 ;SET FOR EOSCRN INTERRUPT
MOVE A1,@DPYINT
MOVE @TIMER,A1 ;HIT PROCESS TIMER
INC A1
MOVE A1,@TIMER
MOVE @INTSYNC0,A0,W
INC A0
MOVE A0,@INTSYNC0,W ;SYNC AT HALF SCREEN
CALLA DISPQT
CALLR SWSCAN ;SCAN SWITCHES FOR PLAYER CONTROLS
MOVE @SCORE_FLAG,A0,W
JRZ NOSCORE
CALLA DRAW_SCORE
NOSCORE:
CALLA DISPLAY ;GOT TO MAKE THE DONUTS
JRUC DIRQX
**************************************************************************
* *
* DIRQ1 - END OF SCREEN INTERRUPT ROUTINE. BOTTOM HALF OF SCREEN UPDATED *
* COLOR RAM IS CYCLED, AND SWITCHES ARE SCANNED. *
* *
**************************************************************************
DIRQ1
MOVE @SYSCOPY,A0,W ;ALWAYS TURN OFF HERE JUST FOR YUKS
ORI AUTOERAS,A0 ;DISABLE AUTO ERASE
MOVE @GAMERASE,A1,W
JREQ DIRQ1A ;AUTO-ERASE IS NOT ENABLED!
MOVE @NOAUTOE,A1,W
JRNE DIRQ1A
ANDNI AUTOERAS,A0 ;AUTO ERASE IS ENABLED LOW
DIRQ1A
MOVE A0,@SYSCOPY,W ;STORE EVERYWHERE I DID GO
MOVE A0,@SYSCTRL,W
; MOVI ERASECOL,A0
; MOVE A0,@ERASELOC,W ;MOVE IN THE CORRECT COLOR
MOVE @IRQSKYE,@ERASELOC,W ;MOVE IN THE CORRECT COLOR
MOVI HSINT,A0
MOVE A0,@DPYINT ;RESET FOR HALF SCREEN INTERRUPT
MOVE @DPYCTL,A0,W ;SHIFT REGISTER READ TO RESTART DMA
ORI SRT,A0
MOVE A0,@DPYCTL,W ;ENABLE SHIFT REG TRANSFER TO STOP DMA HALT
*** CLR A1
MOVI 400*1000H,A1
PIXT *A1,A2
ANDNI SRT,A0
MOVE A0,@DPYCTL,W
CALLA DISPH ;CALL END OF SCREEN DISPLAY ROUTINE
*
*UPDATE CYCLING COLOR RAM
MOVI COLRTEMP,A0 ;GET NEW COLORS
MOVI CYCOLORS,A1 ;GET ADDRESS OF CYCLE COLORS
; MOVE *A0+,*A1+,W ;GET THE ODD MAN
MOVK 1,A6 ;COLOR COUNT/2 (FINAL TWO COLORS IN PAL 0)
;WILL CYCLE
COLORUP
MOVE *A0+,*A1+,L
DSJS A6,COLORUP
CALLA PALTRANS ;XFER NEW PALETTES IF NECESSARY
DINT
MOVE @INTENB,A0,W ;ENABLE DISPLAY INTERRUPT
ORI DIE,A0
MOVE A0,@INTENB,W
MOVE @INTSYNC1,A0,W
INC A0
MOVE A0,@INTSYNC1,W ;SYNC UP AT END OF SCREEN
CALLR SWSCAN ;SCAN SWITCHES TO TRIGGER PROCS.
MOVE @IRQLED,A0,W
INC A0
SLL 29,A0
SRL 29,A0
MOVE A0,@IRQLED,W
JRNE DIRQX
*
*DO EVERYTHING FROM HERE TO DIRQX EVERY 8 TICKS
*
.IF DEBUG
.ELSE
MOVE @TIMER,A0
CMPI 200,A0
JAHS INIT_PROG ;REST ON LOCKUP
.ENDIF
MOVE @C_FRAC,A0,W ;COUNT DOWN COIN FRACTION TIMER
JRZ C_TIM0 ;NOTHING THERE
SLL 24,A0
SRL 24,A0 ;THIS IS 30 SECONDS.....IF LARGER BRING DOWN!
DEC A0
MOVE A0,@C_FRAC,W
*COIN TIMERS
C_TIM0
MOVE @C_FLAGS,A0,L
JRZ C_CNTR
MOVI C_FLAGS+24,A2
MOVK 4,A4
CTIMLP
MOVE A0,A1
SRL 24,A1
JRZ C_TIM1
DEC A1
MOVB A0,*A2
C_TIM1
SUBK 8,A2
SLL 8,A0
DSJS A4,CTIMLP
*COIN COUNTERS
C_CNTR
MOVE @COINCNTR,A0,L ;COUNTERS, TIMERS ACTIVE????
JREQ L_DOG ;NO
MOVK 2,A4 ;DO BOTH COUNTERS
MOVI COINCNTR,A5
CCNTR0L
MOVB *A5,A1 ;MORE COUNTS FOR COUNTER ?
JREQ C_CNTR0 ;NO
MOVB *A5(16),A2 ;PREVIOUS PULSE TIME OUT?
JRNE C_CNTR0 ;NO
MOVK 2,A2
MOVB A2,*A5(16) ;START NEW PULSE
DEC A1 ;DECREMENT COUNTS
MOVB A1,*A5
C_CNTR0
ADDK 8,A5
DSJS A4,CCNTR0L
CLR A2 ;COUNTER ON MASK
MOVI >100,A3
MOVK 2,A4
C_CNTR1L
MOVB *A5,A0 ;COUNTER TIMER ACTIVE?
JREQ C_CNTR1 ;NO
DEC A0 ;YES, DEC IT AND STORE
MOVB A0,*A5
JREQ C_CNTR1 ;DONE
ADD A3,A2 ;TURN COUNTER SOLENOID ON
C_CNTR1
SLL 1,A3
ADDK 8,A5
DSJS A4,C_CNTR1L
.IF YUNIT
CLR A1
MOVE A1,@SECCHIP,W
MOVE A2,@SECCHIP,W ;REFRESH COUNTERS IN HARDWARE
.ENDIF
L_DOG
MOVI WDOGBONE,A1 ;THROW ROVER A BONE
MOVK 1,A3
MOVE @SYSCOPY,A2,W
MOVE *A1+,A0,W
ROVERL
OR A2,A0
MOVE A0,@SYSCTRL,W
XOR A3,A0
MOVE A0,@SYSCTRL,W
MOVE *A1+,A0,W
JRNN ROVERL
MOVE A2,@SYSCTRL,W
DIRQX:
MMFM SP,A0,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,A11,A12,A13,A14
MMFM SP,B0,B1,B2,B3,B4,B5
RETI
*
*WATCHDOG FEED TABLE
WDOGBONE
.WORD 0
.WORD 2
.WORD 0
.WORD 2
.WORD 2
.WORD 0FFFFH
**************************************************************************
* *
* INITIO - INITIALIZE THE GSP I/O REGISTERS *
* *
**************************************************************************
INITIO
MMTM SP,B0,B2,B6,B10
MOVI INTIO,B6
EXGPC B6
MMFM SP,B0,B2,B6,B10
RETS
*INITIALIZE I/O
*USE REGISTER CALL FOR TEST MODE NON-RAM USE
INTIO
MOVI HESYNC,B2,L
MOVI INITDATA,B0,L
MOVI (IDATAEND-INITDATA)/16,B10
INITIOS:
MOVE *B0+,*B2+
DSJS B10,INITIOS
EXGPC B6
*
**************************************************************************
* *
* BADTRAP - COME HERE WHEN A TRAP IS HIT THAT IS NOT DEFINED AND LOG IT. *
* *
**************************************************************************
BADTRAP1 nop
BADTRAP2 nop
BADTRAP3 nop
BADTRAP4 nop
BADTRAP5 nop
BADTRAP6 nop
BADTRAP7 nop
BADTRAP8 nop
BADTRAP9 nop
BADTRAP10 nop
BADTRAP11 nop
BADTRAP12 nop
BADTRAP13 nop
BADTRAP14 nop
BADTRAP15 nop
BADTRAP16 nop
BADTRAP17 nop
BADTRAP18 nop
BADTRAP19 nop
BADTRAP20 nop
BADTRAP21 nop
BADTRAP22 nop
BADTRAP23 nop
BADTRAP24 nop
BADTRAP25 nop
BADTRAP26 nop
BADTRAP27 nop
BADTRAP28
JRUC BADTRAP
BADTRAP29
.IF DEBUG
LOCKUP ;THIS WILL BAG WRITES INTO ROM!
EINT
.ENDIF
BADTRAP
.IF DEBUG
LOCKUP
EINT
.ELSE
CALLERR 9,0
.ENDIF
RETI
* VIDEO CONTROL REGISTERS INITIAL VALUES
INITDATA:
.WORD 015H ;>C0000000 -- HESYNC
.WORD 02DH ;>C0000010 -- HEBLNK
.WORD 0FAH ;>C0000020 -- HSBLNK ;F3
.WORD 0FCH ;>C0000030 -- HTOTAL
.WORD 03H ;>C0000040 -- VESYNC
.WORD 014H ;>C0000050 -- VEBLNK;1B
.WORD 0114H ;>C0000060 -- VSBLNK;11B
.WORD 0120H ;>C0000070 -- VTOTAL
.WORD 0F010H ;>C0000080 -- DPYCTL
.WORD 0FFFCH ;>C0000090 -- DPYSTRT
.WORD HSINT ;>C00000A0 -- DPYINT * INITIALLY HALF SCREEN
; .WORD INI_CTRL ;>C00000B0 -- CONTROL
.WORD >20 ;>C00000B0 -- CONTROL
.WORD 00H ;>C00000C0 -- HSTDATA
.WORD 00H ;>C00000D0 -- HSTADRL
.WORD 00H ;>C00000E0 -- HSTADRH
.WORD 00H ;>C00000F0 -- HSTCTLL
.WORD 00H ;>C0000100 -- HSTCTLH
.WORD 00H ;>C0000110 -- INTENBL
.WORD 00H ;>C0000120 -- INTPEND
.WORD 00H ;>C0000130 -- CONVSP
.WORD 00H ;>C0000140 -- CONVDP
.WORD PXSIZE ;>C0000150 -- PSIZE
.WORD 00H ;>C0000160 -- PMASK
.WORD 00H ;>C0000170 -- RESERVED
.WORD 00H ;>C0000180 -- RESERVED
.WORD 00H ;>C0000190 -- RESERVED
.WORD 00H ;>C00001A0 -- RESERVED
.WORD 00H ;>C00001B0 -- DPYTAP
IDATAEND:
*
*INITIALIZE ALL 32 TRAP VECTORS
*
.SECT "VECTORS"
.LONG BADTRAP1 ;TRAP 31
.LONG BADTRAP2 ;TRAP 30 ILLOP --- ILLEGAL OPCODE
.LONG BADTRAP3 ;TRAP 29
.LONG BADTRAP4 ;TRAP 28
.LONG BADTRAP5 ;TRAP 27
.LONG BADTRAP6 ;TRAP 26
.LONG BADTRAP7 ;TRAP 25
.LONG BADTRAP8 ;TRAP 24
.LONG BADTRAP9 ;TRAP 23
.LONG BADTRAP10 ;TRAP 22
.LONG BADTRAP11 ;TRAP 21
.LONG BADTRAP12 ;TRAP 20
.LONG BADTRAP13 ;TRAP 19
.LONG BADTRAP14 ;TRAP 18
.LONG BADTRAP15 ;TRAP 17
.LONG BADTRAP16 ;TRAP 16
.LONG BADTRAP17 ;TRAP 15
.LONG BADTRAP18 ;TRAP 14
.LONG BADTRAP19 ;TRAP 13
.LONG BADTRAP20 ;TRAP 12
.LONG BADTRAP21 ;TRAP 11 WV --- WINDOW VIOLATION
.LONG DIRQ ;TRAP 10 DI --- DISPLAY INTERRUPT
.LONG BADTRAP22 ;TRAP 9 HI --- HOST INTERRUPT
.LONG BADTRAP23 ;TRAP 8 NMI -- NONMASKABLE INTERRUPT
.LONG BADTRAP24 ;TRAP 7
.LONG BADTRAP25 ;TRAP 6
.LONG BADTRAP26 ;TRAP 5
.LONG BADTRAP27 ;TRAP 4
.LONG BADTRAP28 ;TRAP 3
.LONG BADTRAP29 ;TRAP 2 INT2 --- EXTERNAL INTERRUPT 2
.LONG DMAINT ;TRAP 1 INT1 --- EXTERNAL INTERRUPT 1
.LONG INIT_PROG ;TRAP 0 RESET
.END