forked from historicalsource/defender
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PHR6.SRC
executable file
·635 lines (634 loc) · 11.5 KB
/
PHR6.SRC
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
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
TTL D E F E N D E R 1.0
NMLIST
NOGEN
*
* RAM DECLARATIONS AND CONSTANTS
*
* HARDWARE CONSTANTS
*
CKBYT EQU $FF CHECKSUM
HSTK EQU $BFFF
MAPC EQU $D000 MAP CONTROL
RAM EQU $A000
CRAM EQU $C000 COLOR RAM ADDR
WDOG EQU $C3FC
WDATA EQU $38 NORMAL SCREEN;($39=FLIPPED)
DIABLK EQU 3
CMOS EQU $C400
SOUND EQU $CC02
VERTCT EQU $C800 6-BIT VERTICAL BEAM ADDR
YMAX EQU 240
YMIN EQU 42 MIN Y COORD
*
*BLOCK 7
*TERRAIN,PLAYER EXPLOSION,WAVE TABLE
BGINIT EQU $C000
BGOUT EQU $C003
ALINITQ EQU $C006 ALTITUDE INIT
BGERAS EQU $C009 HYPER ROUTINE
PXVCT EQU $C00E PLAYER EXPLOSION
WVTAB EQU $C011 WAVE DATA TABLE
WVTEND EQU $C013
*
*BLOCK 2
*TEXT AND CHARACTERS
N0V EQU $C000 NUMERALS
WTBV EQU $C002 WRITE BLOCK
WNBV EQU $C00E
*MESSAGES
PLYR1 EQU $C0EF PLAYER 1
PLYR2 EQU $C0F1 PLAYER 2
BONSX EQU $C0F3 BONUS X
GO EQU $C075 GAME OVER
ATWV EQU $C0F9 ATTACK WAVE
COMPV EQU $C0FB COMPLETED
*
*DIAGNOSTIC BLOCK VECTORS
*BLK 3
VORAOK EQU $C000 ROM RAM OK
VOOKRB EQU $C003 ROM OK, RAM BAD
VOMBAD EQU $C006 ROM BAD
VPWRUP EQU $C009 PWRUP
VAUD EQU $C00C AUDIT
VAUD1 EQU $C00F ADD 1 TO AUDIT
LCOINV EQU $C012 LEFT COIN
RCOINV EQU $C015 RIGHT COIN
CCOINV EQU $C018 CENTER COIN
RHSTDV EQU $C01B RESET HSTD
VCMOSM EQU $C01E
VUDITG EQU $C021
VUTOCY EQU $C024 AUTO CYCLE
VCROM0 EQU $C027 FAILURE MODES
VRAM10 EQU $C02A
VRAM20 EQU $C02D
VOUND0 EQU $C030
RHSTD$ EQU $C033 RESET TODAYS GREATS
*
*ATTRACT MODE VECTORS
*BLK 1
ATTRV EQU $C000 START ATTRACT
SCNRV EQU $C003 SCANNER SUBROUTINE
*
*MAIN PROGRAM VECTORS
*
NULOBV EQU $FF9D
RMAPV EQU $FF9F ROM MAP
RCAV EQU $FFA1 READ CMOS IN A
RCBV EQU $FFA4 READ CMOS IN B
RCDV EQU $FFA7 READ CMOS IN D
WCAV EQU $FFAA WRITE IN A
WCBV EQU $FFAD WRITE IN B
WCDV EQU $FFB0 WRITE IN D
CWRITV EQU $FFB3 CWRITE
COFFV EQU $FFB6 COFF
BLKCLV EQU $FFB9
SCRCLV EQU $FFBC SCREEN CLEAR
ROMOV EQU $FFBF
ROM9V EQU $FFC2
RAM2V EQU $FFC5
VAMEOV EQU $FFC8 TEST EXIT
BGIV EQU $FFCB BACKGROUND INIT
LJSRV EQU $FFCE LONG JSR W/ BLOCK SWAP+SAVE
SLEPPV EQU $FFD1 SLEEP WITH BLOCK SAVE
STBXBV EQU $FFD4 STORE B AT X BLOCK ZERO
LDBXBV EQU $FFD7 LOAD B AT X BLOCK ZERO
SNDLDV EQU $FFDA SOUND ROUTINE
APSNDV EQU $FFDD APPEAR SOUND
*
*EXPLOSION, APPEAR VECTORS
*
APVCT EQU $FC60 APPEAR
XSVCT EQU $FC63 EXPLOSION
XUVCT EQU $FC66 EXPLOSION UPDATE
ALTBL EQU $B300
*
* EXPLOSION,APPEAR EQUATES
*
RSIZE EQU 0 SIZE (MSB IS APPEAR FLAG)
OBDESC EQU 2 OBJECT DESCRIPTER ADDRESS
ERASES EQU 4 ERASE TABLE START
CENTER EQU 6 CENTER OF EXPANSION
TOPLFT EQU 8 NORMAL SIZE TOP LEFT ADDRESS
OBJPTR EQU 10 OBJECT LIST POINTER (APPEAR ONLY)
RAMSIZ EQU $40 LENGTH OF RAM ALLOCATION
RAMEND EQU $A000 RAM ALLOCATION END + 1
EXPLSV EQU $DC00 EXPLOSION START VECTOR
APERSV EQU $DC02 APPEAR START VECTOR
EXPNUV EQU $DC04 EXPANDED UPDATE VECTOR
*
*PIA DEFINITIONS
*
PIA0 EQU $CC00
*B0 AUTO UP
*B1 ADVANCE
*B2 RCOIN
*B3 HSRESET
*B4 LCOIN
*B5 CCOIN
*B6 LED1
*B7 LED2
*CA2 SLAM
*CA1 IRQ
PIA1 EQU $CC02
*B0-B5 SOUND
*B6-B7 LEDS
*CB2 IRQ
PIA2 EQU $CC04
*B0 FIRE
*B1 THRUST
*B2 SMART BOMB
*B3 HYPERSPACE
*B4 START 2
*B5 START 1
*B6 REV
*B7 DOWN
*
PIA3 EQU $CC06
*B0 UP
*B7 INPUT 1=COCKTAIL
*CB2 OUTPUT SWITCH MUX CONTROL 1=PLAYER1,0=PLAYER2
*SCORE DISPLAY CONSTANTS
P1SBD EQU $291B
P2SBD EQU $8B1B
P1DISP EQU $0F1C TOP LEFT PLAYER 1
P2DISP EQU $711C TOP LEFT PLAYER 2
DIGLTH EQU 4*256 DIGIT LENGTH
P1LAS EQU $0F14
P2LAS EQU $7114
SCANH EQU YMIN-34 SCANNER HEIGHT
SCANER EQU $3000+SCANH SCANNER
*
* CMOS RAM ALLOCATION
*
ORG CMOS
DIPFLG RMB 1 DIPSW SET FLAG
SLOT1 RMB 4 LEFT COIN TOTAL
SLOT2 RMB 4 CENTER COIN TOTAL
SLOT3 RMB 4 RIGHT COIN TOTAL
TOTPDC RMB 4 TOTAL PAID CREDITS
TOTRPL RMB 4 TOTAL REPLAYS
BLLTIM RMB 4 BALL TIME IN MINS
BLLCNT RMB 4 TOTAL "BALLS" PLAYED
CMSDEF EQU *
CRHSTD RMB 12 FOR ALL TIME HSTD
RMB 12 ALL TIME #2
RMB 12
RMB 12
RMB 12
RMB 12
RMB 12
RMB 12
CREDST EQU * CREDITS BACKUP
DIPSW RMB 2 DIPSW FUNCTIONS WHEN DIPFLG SET
ORG CMOS+$7F PUT IT ACCROSS BOUNDARY
CMOSCK RMB 2 FOR BOUNDARY BYTE
REPLAY RMB 4 REPLAY LEVEL
NSHIP RMB 2 # OF SHIPS/GAME
COINSL RMB 2 FOR COINAGE SELECT MODE
SLOT1M RMB 2 LEFT COIN MULT
SLOT2M RMB 2 CENTER COIN MULT
SLOT3M RMB 2 RIGHT COIN MULT
CUNITC RMB 2 COIN UNITS PER CREDIT
CUNITB RMB 2 COIN UNITS FOR BONUS
MINUNT RMB 2 MINIMUM REQD
FREEPL RMB 2 FREE PLAY MODE
GA1 RMB 2 GAME ADJUSTS - 1 DIFFICULTY
RMB 2 2 DIFFICULTY CEILING
RMB 2 3 BGSND
RMB 2 4 RESTORE WAVE #
RMB 2 5
RMB 2 6
RMB 2 7
RMB 2 8
RMB 2 9
RMB 2 10
*
*EXPLOSION RAM ALLOCATION
*
ORG $9C00
RAMALS RMB RAMEND-RAMALS
*
*BASE PAGE RAM AREA
*
ORG RAM
BGSAV RMB 32 RESERVED FOR TERRAIN
BGL RMB 2 TERRAIN LEFT POINTER
BGLX RMB 2 OLD TERRAIN LEFT
GTIME RMB 1 GAME TIMER
PDFLG RMB 1 SPACE HOLDER PLAYER DIED
PCRAM RMB 16 PSEUDO COLOR RAM
MAPCR RMB 1
CREDIT RMB 1
CUNITS RMB 1
BUNITS RMB 1
TEMP1A RMB 1
TEMP1B RMB 1
TEMP1C RMB 1
TEMP2A RMB 2
TEMP2B RMB 2
TEMP2C RMB 2
TEMP2D RMB 2
TEMP2E RMB 2
ASBUFF RMB 1 ADVANCE SWITCH WITH AUTO BUFFER
ASLAST RMB 1 ADVANCE SWITCH WITH AUTO LAST POSITION
ASCNTR RMB 1 ADVANCE SWITCH WITH AUTO COUNTER
CURSR2 RMB 2 USER CURSER
CHARSP RMB 1 HORIZONTAL SPACE BETWEEN CHARACTERS(TEXT ROUTINE)
LINESP RMB 1 VERTICAL SPACING BETWEEN LINE CENTERS(TEXT ROUTINE)
TOPL RMB 2 TOP LEFT ADDRESS(TEXT ROUTINE)
CURSER RMB 2 CURSER ADDRESS(TEXT ROUTINE)
MESPT RMB 2 MESSAGE POINTER(TEXT ROUTINE)
WORDPT RMB 2 WORD POINTER(TEXT ROUTINE)
MESEND RMB 2 MESSAGE END(TEXT ROUTINE)
SPACEF RMB 1 SPACE FLAG(TEST ROUTINE)
NUMBER RMB 2 NUMBER(NUMBER ROUTINE)
ROMPTR RMB 2 ROM TABLE POINTER(COMPREHENSIVE ROM TEST)
TIMER RMB 1 FIRQ TIMER
OVCNT RMB 1
ACTIVE RMB 2 POINTER TO LIST OF CURRENTLY ACTIVE (SLEEPING) PROCS.
FREE RMB 2 POINTER TO LIST OF UNALLOCATED PROCESS SLEEP SPACE.
CRPROC RMB 2 POINTER TO SLEEP AREA OF CURRENTLY EXECUTING PROCESS.
OPTR RMB 2 OBJECT LIST POINTER
OFREE RMB 2 FREE LIST POINTER
SPFREE RMB 2 SUPER PROCESS FREE LIST
IPTR RMB 2 INACITVE OBJECT LIST PTR
SPTR RMB 2 SHELL LIST POINTER
ITEMP RMB 2 INTERUPT TEMP
ITEMP2 RMB 2
XTEMP RMB 2 SAVE AREA FOR QUICK TEMPORARY
XTEMP2 RMB 2
TEMP48 RMB 2 OUTPUT ROUTINE TEMP
PIA01 RMB 1
PIA02 RMB 1
PIA21 RMB 1 N-1 PIA2
PIA22 RMB 1 N-2 PIA2
PIA31 RMB 1 N-1 PIA3
SLMCNT RMB 1 SLAM,COIN DEBOUNCERS
LCCNT RMB 1
RCCNT RMB 1
CCCNT RMB 1
SWPROC RMB 8 SWITCH SCAN TEMP
SCRFLG RMB 1 PLAYER SCORE FLAG
CURPLR RMB 1 CURRENT
PLRCNT RMB 1 NUMBER OF PLAYERS
PLRX RMB 2 CURRENT PLAYER INDEX STORE
IRQHK RMB 3 IRQ RAM VECTOR
IFLG RMB 1 IRQ FLAG
PCX RMB 2
BGDELT RMB 2
SETEND RMB 2 SCANNER ERASE TABLE END
BMBCNT RMB 1 BOMBS ACTIVE
SBFLG RMB 1 SMART BOMB FLAG
TPTR RMB 2 TARGET LIST INDEX
SHTEMP RMB 2 SHELL ROUTINE
THX RMB 2 THRUST TABLE INDEX
XXX1 RMB 1 SCREEN OUTPUT PARAMS
XXX2 RMB 1
XXX3 RMB 1
FISX RMB 2 LAS FISSLE TABLE INDEX
BAX RMB 2 BOMB IMAGE PTR
FBX RMB 2 FIREBALL INDEX
TFLG RMB 1 TIE DIRECTION
REPLA RMB 2 REPLAY LEVEL
THFLG RMB 1 THRUST SOUND FLAG
STRCNT RMB 1 STARS ACTIVE COUNT
REVFLG RMB 1 REV SWITCH DEBOUNCE
*SOUND RAM
SNDX RMB 2 TABLE INDEX
SNDPRI RMB 1 PRIORITY
SNDTMR RMB 1
SNDREP RMB 1
*LASER DATA STRUCTURE
LFLG RMB 1
LCOLRX RMB 1
PWRFLG RMB 1 POWER ON FLAG
WCURS RMB 2 WILLI CURSER CHECK
*
*STATUS FLAG
*B7=GAME OVER
*B6=PLAYER CONTROLS INACTIVE
*B5=STARS,OBJECTS,SHELLS
*B4=PLAYER IMAGE COLLISION INACTIVE
*B3=PLAYER DEAD
*B2=APPEARS,EXPLOSIONS DISABLE
*B1=TERRAIN INACTIVE
*B0=PLAYER START DELAY-NO HYPER
STATUS RMB 1
*
*PLAYER DIRECTION+THRUST
NPLAD RMB 2 NEW PLAYER DIRECTION
PLADIR RMB 2
*PLAYER COORDINATES
*UPPER LEFT
PLAXC RMB 1
PLAYC RMB 1
*NEW
NPLAXC RMB 1
NPLAYC RMB 1
*16 BIT
PLAX16 RMB 2
PLAY16 RMB 2
*PLAYER VELOCITY
PLAXV RMB 3
PLAYV RMB 2
*ABSOLUTE X
PLABX RMB 2
*
*COLLISION ROUTINE PARAMETERS
*
XCNT RMB 1 SCAN COUNTS
YCNT RMB 1
OX1 RMB 1 OFFSETS
OY1 RMB 1
PX1 RMB 1
PY1 RMB 1
OBHT RMB 1 HT TEMPS
PLHT RMB 1
ULX RMB 1 UPPER LEFT COORD
ULY RMB 1 "
LRX RMB 1
LRY RMB 1
CTEMP RMB 2 INDEX TEMP
CTEMP2 RMB 2
PCFLG RMB 1 PLAYER COLLISION
*RANDOM VARIABLES
SEED RMB 1
HSEED RMB 1
LSEED RMB 1
*
*EXPLOSION DIRECT PAGE VARIABLES
*
LSEXPL RMB 2 LAST EXPLOSION RAM
XOFF RMB 1
YOFF RMB 1
FLAVOR RMB 1
SIZE RMB 1
DSIZE RMB 1
XSTART RMB 2
YSTART RMB 2
ODDEVN RMB 2
VSTART RMB 2
WIDTHC RMB 1
LENGTC RMB 1
DATPTR RMB 2
YSKIP RMB 1
BLKADD RMB 2
CENTMP RMB 2
*ASTRONAUT COUNT
ASTCNT RMB 1
*
*ENEMIES LIST
*WARNING DO NOT CHANGE ORDER OF COUNTS
ELIST EQU *
*RESERVE COUNTS
LNDRES RMB 1 # OF LANDERS
TIERES RMB 1 "
PRBRES RMB 1
SCZRES RMB 1
SWMRES RMB 1
ELIST1 EQU *
WAVTIM RMB 1 TIME FOR NEXT WAVE
WAVSIZ RMB 1 SIZE OF WAVE
LNDXV RMB 1 LANDER HORIZ VEL
LNDYV RMB 2
LDSTIM RMB 1 LANDER SHOOT TIME
TIEXV RMB 1
SZRY RMB 1 SHITZO RANDOM Y JUMP
SZYV RMB 2 Y VEL
SZXV RMB 1
SZSTIM RMB 1 SHOT TIMER
SWXV RMB 1 SWARM X V
SWSTIM RMB 1 SWARM SHOT TIMER
SWAC RMB 1 SWARM ACCEL MASK
UFOTIM RMB 1 UFO TIMER
UFSTIM RMB 1 " SHOTS
UFOSK RMB 1 UFO SEEK PROBABILITY
ELEND EQU *
*ACTIVE COUNTS, NON RESTORE
ECNTS EQU *
LNDCNT RMB 1
TIECNT RMB 1
PRBCNT RMB 1
SCZCNT RMB 1
SWCNT RMB 1
WAVTMR RMB 1
UFOTMR RMB 1
UFOCNT RMB 1
ECEND EQU *
*
*TARGET LIST
*
TLIST EQU *
RMB 40
TLEND EQU *
*
*LASER FISSLE TABLE
*
FISTAB RMB 32
FISEND EQU *
*
*THRUST TABLE
*
HSRFLG EQU * HIGH SCORE RESET FLAG(ATTRACT MODE)
THTAB RMB 64
THTEND EQU *
*FIREBALL TABLE
FBTAB RMB 32
FBTEND EQU *
*
*PLAYER DATA TABLE
*
PLDATA EQU *
.P1SCR RMB 4 SCORE MSB 1ST
.P1RP RMB 3 NEXT REPLAY LEVEL
.P1LAS RMB 1 #OF LASERS
.P1WAV RMB 1 WAVE # IN HEX
.P1SBC RMB 1 SMART BOMBS
.P1TRG RMB 1 ASTRONAUTS
.P1ENM RMB 50 ENEMY STATE
.P1END EQU *
.P2SCR RMB 4
.P2RP RMB 3
.P2LAS RMB 1
.P2WAV RMB 1
.P2SBC RMB 1
.P2TRG RMB 1
.P2ENM RMB 50
PLDEND EQU * END OF PLAYER DATA
PLDLEN EQU .P1END-PLDATA
PSCOR EQU .P1SCR-PLDATA
PRPLA EQU .P1RP-PLDATA
PLAS EQU .P1LAS-PLDATA
PWAV EQU .P1WAV-PLDATA
PSBC EQU .P1SBC-PLDATA
PTARG EQU .P1TRG-PLDATA
PENEMY EQU .P1ENM-PLDATA
*
*MASTER OBJECT LIST
*
OLIST EQU *
OSIZE EQU $17
*
*INDEX OFFSETS
*
OLINK EQU 0 LINK TO NEXT
OPICT EQU 2 PICTURE DESCRIPTOR ADDR
OBJX EQU 4 UPPER LEFT SCREEN X
OBJY EQU 5 UPPER LEFT SCREEN Y
OBJID EQU 6 ASSOCIATED PROCESS ID (IF ANY)
OCVECT EQU 8 COLLISION ROUTINE ADDR
OX16 EQU $A 16 BIT X WORLD COORD
OY16 EQU $C 16 BIT Y WORLD COORD
OXV EQU $E X VELOCITY
OYV EQU $10 Y VELOCITY
OBJCOL EQU $12 SCANNER BLIP
OTYP EQU $14 OBJECT TYPE
ODATA EQU $15 MISC. DATA
*RESERVE AREA
RMB (95)*OSIZE
OLEND EQU *
*
*USER DEFINED OBJECT TYPES
*0=NORMAL,HYPERABLE
*1=LANDER PICKING UP NON-HYP
*2(BIT 1)= APPEAR NON-HYP
*$10=EARTHLING NON-HYP,NON SMART BOMB
*$11=SIGN POST NON-HYP,NON SB
*
*USER DEFINED PROCESS TYPES
*
STYPE EQU 0 SYSTEM PROCESS
ATYPE EQU 1
CTYPE EQU 2
*
*SLEEPING PROCESS TABLE
*
PTAB EQU *
*
*OFFSET CONSTANTS
*
PLINK EQU 0
PADDR EQU 2
PTIME EQU 4
PTYPE EQU 5
PCOD EQU 6
PDATA EQU 7
PD EQU 7
PD1 EQU 8
PD2 EQU 9
PD3 EQU 10
PD4 EQU 11
PD5 EQU 12
PD6 EQU 13
PD7 EQU 14
PSIZE EQU 15
RMB 15*(75)
TABEND EQU *
*
*SUPER PROCESSES
*
SPSIZE EQU PSIZE+8
SPTAB RMB SPSIZE*5
SPTEND EQU *
*
*STAR DATA STRUCTURE
*
SMAP EQU *
.SX RMB 1
.SY RMB 1 X,Y COORDS
.SCOL RMB 1
RMB 1 WASTER
SNUM EQU 16
SLGTH EQU 4
RMB (SNUM-1)*SLGTH RESERVE SPACE
SMEND EQU *
*OFFSET CONSTANTS
SX EQU 0
SY EQU .SY-.SX
SCOL EQU .SCOL-.SX
*
*MONOCHROME TABLE
*
MONOTB RMB 128
*
*SCANNER ERASE TABLES
*
SETAB RMB 200 OBJECTS
STETAB RMB 128 TERRAIN
*
*OBJECT PICTURE STRUCTURE
*
OBJW EQU 0
OBJH EQU 1
OBJP0 EQU 2
OBJP1 EQU OBJP0+2
OBJWRT EQU OBJP0+4
OBJDEL EQU OBJP0+6
OBJL EQU OBJDEL+2
*
*HI SCORE TABLE
*STORED MSB-LSB XYZ
ORG $B260
THSTAB RMB 12*8 TODAYS
*
*M A C R O S
*
SHL MACRO \0,\1,\2
JSR GETSHL
FDB \0,\1,\2
ENDM
KILP MACRO \0,\1
JSR KILPOS
FDB $\0
FDB \1
ENDM
KILO MACRO \0,\1
JSR KILOS
FDB $\0
FDB \1
ENDM
*INIT OBJECT
OBI MACRO \0,\1,\2
JSR OBINIT
FDB \0,\1,\2
ENDM
CLRD MACRO
CLRA
CLRB
ENDM
DIE MACRO
JMP SUCIDE DIE!
ENDM
*
NAP MACRO \0,\1
LDA #\0 TIME
LDX #\1 WAKEUP ADDR
JMP SLEEP
ENDM
*
*MAKE A NEW PROCESS
*
NEWP MACRO \0,\1
LDX #\0 ADDR
LDA #\1 TYPE
JSR MKPROC
ENDM
*
*OBJECT OFF MACRO
*
OBJOFF MACRO \0
IFEQ NARG-1
LDY #\0
ENDC
JSR COFF
ENDM
*
*OBJECT ON MACRO
*
OBJON MACRO \0
IFEQ NARG-1
LDY #\0
ENDC
JSR CWRIT
ENDM
PAGE