forked from FozzTexx/Coleco-Adam-Source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
coleco-listing.asm
4380 lines (3666 loc) · 229 KB
/
coleco-listing.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
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
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
^Z80^
NAME ^Rev 06.1 - TF^
; Project: EOS 6 Absolute Listing
;
; ***********************************************************
; **** ****
; **** EOS ABSOLUTE LISTING ****
; **** ****
; **** Electronic Development Group ****
; **** Coleco Industries Inc. ****
; **** 999 Quaker Lane South ****
; **** West Hardford, Connecticut ****
; **** 06110 ****
; **** ****
; ***********************************************************
;
; This absolute listing was generated to ease software
; development on ADAM. This listing provides the location
; of both released and unreleased entry points. Released
; entry points begin immediately in this file with the jump
; table and end before the first code segment listed.
; Released entry points include the jump table, common data
; areas(EOSCOMN), common data tables, and equates which
; describe the released data structures. Direct access
; to code segments is STRONGLY DISCOURAGED and may make
; your application incompatable with some ADAMs. there is
; more than one version of EOS on the market at this time
; and updates are planned.
;
; For further information on ADAM or EOS consult the
; ADAM Technical Reference Manual or send your questions
; in writing to:
;
; Coleco Software Suppot
;
; at the above address.
;
; COLECO MAKES NO REPRESENTATIONS OR WARRANTIES WHATSOEVER, INCLUDING
; WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR MERCHANTABILITY AND
; FITNESS FOR A PARTICULAR PURPOSE, IN CONNECTION WITH THE MATERIALS
; CONTAINED HEREIN, AND SUCH MATERIALS ARE DISCLOSED AS IS. COLECO
; SHALL HAVE NO LIABILITY FOR ANY LOSSES CAUSED TO RECIPIENTS OF THESE
; MATERIALS BY REASON OF ANY CHANGES OR MODIFICATIONS MADE BY COLECO IN
; THESE MATERIALS AFTER THEIR DISCLOSURE HEREIN. IN ADDITION, COLECO
; SHALL HAVE NO LIABILITY FOR ANY CONSEQUENTIAL, SPECIAL, INDIRECT OR
; INCIDENTAL DAMAGES OR LOSSES WHATSOEVER, INCLUDING LOSS OF PROFITS, IN
; CONNECTION WITH THE USE OF THE MATERIALS DISCLOSED HEREIN.
;
;*********************************************************************************
;
; Rev History
; Rev. Date Name Change
; 6.1 21jun0844 af Merge sources for absolute listing.
; No changes made to code.
; 6.0 08oct 1545 jlk Code released for production.
;
;[ code commented out by ¢;@***’was removed before EOS ]
;[ was grouped into one file, code commented out by simple ]
;[ ';' was removed in the process of grouping E0S in order ]
;[ to avoid assembier complaints or LOCAL/GLOBAL conflicts]
;[ @;********...’ generates code segments which were ]
;[ originally in separate files ]
;*********************************************************************************
;*********************************************************************************
;*********************************************************************************
;
NAME ^Rev 11 - RPD^
;
; Rev Date Made by Change
; 11 1Soct425p RPD changed E0S_4 to CV_A
; 10 13oct1000p RPD made only OS7 jump entries conditionally assembled
; 9 12oct2300 vsb Added __POSIT_FILE, __FILE_QUERY plus EOS1 thru EOS4
; 8 07oct1710 rfj __EFXOVER changed to _EFFECT _0VER
; Added _UPDATE_SPINNER
; 7 05oct1725 rtj Renamed WRSPR_NM_TBL to WR_SPR_ATTRIBUTE
; 6 03oct1207 rtj Increased TEMP_STACK to 12bytes,
; Removed SAVED_COUNT
; & 30sept825p RPD replaced CONSOUT data area with new CONSOUT2
; 4 29sept235p RPD replaced PLAYSONGS with SOUNDS
; 3 26sept1005a RPD added conditional assembly stuff for super games
; 2 25sept850a RPD merged all of EOS ram together into this file
; 1 20sept1005a RPD new memory mapping
; 0 mid-sept VB original map @ E8000H
;
TRUE EQU 0FFFFH
FALSE EQU 00000H
IN_EOS EQU TRUE
SUPERGAME EQU FALSE
;
; CURRENT EOS MEMORY MAPPING
;
;FCB_S EQU 0D390H ;FCB area
;THREE1K_BLKS EQU 00400H ;3 FCB 1K buffers
EOS_CODE EQU 0E000H ;address of EOS code segment
EOS_GLB_TBL EQU 0FBFFH ;address of EOS global tables
EOS_JMP_TBL EQU 0FC30H ;address of EOS jump table
EOS_GLB_RAM EQU 0FD60H ;address of EOS global data area
EOS_PCB_DCB EQU 0FEC0H ;address of EOS PCB/DCB areas
;
; These are key record sizes, used invarious EOS routines.
; See “INCLUDE FMGR_EQUS" AND “INCLUDE P_DCB_EQU" for details.
;
DIR_ENT_LENGTH DEFL 26
P_SIZE DEFL 4 ;THE NUMBER OF BYTES IN THE PCB
D_SIZE DEFL 21 ;THE NUMBER OF BYTES INTHE DCB
;
;
;
; jump table area
;
; *********************************************************
ORG EOS_JMP_TBL
; *********************************************************
_EOS_START EQU $
JP __EOS_START
_CONS_DISP EQU $
JP __CONS_DISP
_CONS_INIT EQU $
JP __CONS_INIT
_CONS_OUT EQU $
JP __CONS_OUT
_DLY_AFT_HRD_RES EQU $
JP __DLY_AFT_HRD_RES
_END_PR_BUFF EQU $
JP __END_PR_BUFF
_END_PR_CH EQU $
JP __END_PR_CH
_END_RD_1_BLOCK EQU $
JP __END_RD_1_BLOCK
_END_RD_CH_DEV EQU $
JP __END_RD_CH_DEV
_END_RD_KBD EQU $
JP __END_RD_KBD
_END_WR_1_BLOCK EQU $
JP __END_WR_1 BLOCK
_END_WR_CH_DEV EQU $
JP __END_WR_CH_DEV
_FIND_DCB EQU $
JP __FIND_DCB
_GET_DCB_ADDR EQU $
JP __GET_DCB_ADDR
_GET_PCB_ADDR EQU $
JP __GET_PCB_ADDR
_HARD_INIT EQU $
JP __HARD_INIT
_HARD_RESET_NET EQU $
JP __HARD_RESET_NET
_PR_BUFF EQU $
JP __PR_BUFF
_PR_CH EQU $
JP __PR_CH
_RD_1_BLOCK EQU $
JP __RD_1_BLOCK
_RD_KBD EQU $
JP __RD_KBD
_RD_KBD_RET_CODE EQU $
JP __RD_KBD_RET_CODE
_RD_PR_RET_CODE EQU $
JP __RD_PR_RET_CODE
_RD_RET_CODE EQU $
JP __RD_RET_CODE
_RD_TAPE_RET_CODE EQU $
JP __RD_TAPERET CODE
_RELOC_PCB EQU $
JP __RELOC_PCB
_REQUEST_STATUS EQU $
JP __REQUEST_STATUS
_REQ_KBO_STAT EQU $
JP __REQ_KBD_STAT
_REQ_PR_STAT EQU $
JP __REQ_PR_STAT
_REQ_TAPE_STAT EQU $
JP __REQ_TAPE STAT
_SCAN_ACTIVE EQU $
JP __SCAN_ACTIVE
_SOFT_INIT EQU $
JP __SOFT_INIT
_SOFT_RES_DEV EQU $
JP __SOFT_RES_DEV
_SOFT_RES_KBD EQU $
JP __SOFT_RES_KBD
_SOFT_RES_PR EQU $
JP __SOFT_RES_PR
_SOFT_RES_TAPE EQU $
JP __SOFT_RES_TAPE
_START_PR_BUFF EQU $
JP __START_PR_BUFF
_START_PR_CH EQU $
JP __START_PR_CH
_START_RD_1_BLOCK EQU $
JP __START_RD_1 BLOCK
_START_RD_CH_DEV EQU $
JP __START_RD_CH_DEV
_START_RD_KBD EQU $
JP __START_RD_KBD
_START_WR_1_BLOCK EQU $
JP __START_WR_1 BLOCK
_START_WR_CHDEV EQU $
JP __START_WR_CH DEV
_SYNC EQU $
JP __SYNC
_WR_1_BLOCK EQU $
JP __WR_1_BLOCK
_WR_CH_DEV EQU $
JP __WR_CH_DEV
;
;FILE MANAGER ENTRIES
;
_FMGR_INIT EQU $
JP __FMGR_INIT
_INIT_TAPE_DIR EQU $
JP __INIT_TAPE_DIR
_OPEN_FILE EQU $
JP __ OPEN FILE
_CLOSE_FILE EQU $
JP __CLOSE_FILE
_RESET_FILE EQU $
JP __RESET_FILE
_MAKE_FILE EQU $
JP __MAKE_FILE
_QUERY_FILE EQU $
JP __QUERY_FILE
_SET_FILE EQU $
JP __SET_FILE
_READ_FILE EQU $
JP __READ_FILE
_WRITE_FILE EQU $
JP __WRITE_FILE
_SET_DATE EQU $
JP __SET_DATE
_GET_DATE EQU $
JP __GET_DATE
_RENAME_FILE EQU $
JP __RENAME_FILE
_DELETE_FILE EQU $
JP __DELETE_FILE
_RD_DEV_DEP_STAT EQU $
JP __RD_DEV_DEP_STAT
_GOTO_WP EQU $
JP __GOTO_WP
_READ_EOS EQU $
JP __READ_EOS
_TRIM_FILE EQU $
JP __TRIM_FILE
_CHECK_FCB EQU $
JP __CHECK_FCB
_READ_BLOCK EQU $
JP __READ_BLOCK
_WRITE_BLOCK EQU $
JP __WRITE_BLOCK
_MODE_CHECK EQU $
JP __MODE_CHECK
_SCAN_FOR_FILE EQU $
JP __SCAN_FOR_FILE
_FILE_QUERY EQU $
JP __FILE_QUERY
_POSIT_FILE EQU $
JP __POSIT_FILE
_EOS_1 EQU $
JP __EOS_1
_EOS_2 EQU $
JP __EOS_2
_EOS_3 EQU $
JP __EOS_3
_CV_A EQU $
JP _CV_A
_PORT_COLLECTION EQU $
JP __PORT_COLLECTION
_SWITCH_MEM EQU $
JP __SWITCH_MEM
_PUT_ASCII EQU $
JP __PUT_ASCII
;
; micro OS7 entries
;
WRITE_VRAM EQU
JP __WRITE_VRAM
READ_VRAM EQU
JP __READ_VRAM
WRITE_REGISTER EQU
JP __WRITE_REGISTER
READ_REGISTER EQU
JP __READ_REGISTER
FILL_VRAM EQU
JP __FILL_VRAM
INIT_TABLE EQU
JP __INIT_TABLE
PUT_VRAM EQU
JP __PUT_VRAM
GET_VRAM EQU
JP __GET_VRAM
CALC_OFFSET EQU
JP __CALC_OFFSET
PX_TO_PTRN_POS EQU
JP __PX_TO_PTRN_POS
LOAD_ASCII FQU
JP __LOAD_ASCII
WR_SPR_ATTRIBUTE EQU
JP __WR_SPR_ATTRIBUTE
POLLER EQU
JP __POLLER
UPDATE_SPINNER EQU
JP __UPDATE_SPINNER
DECLSN EQU
JP __DECLSN
DECMSN EQU $
JP __DECMSN
MSNTOLSN EQU $
JP __MSNTOLSN
ADD816 EQU $
JP __ADD816
SOUND_INIT EQU $
JP __SOUND_INIT
TURN_OFF_SOUND EQU $
JP __TURN OFF_SOUND ;not globalized in os7?
PLAY_IT EQU $
JP __PLAY_IT
SOUNOS EQU $
JP __SOUNDS ;equals calls to play songs and sound_man
EFFECT_OVER EQU $
JP __EFFECT_OVER
; NOTE: See INTERRUPT VECTORS
ORG EOS_GLB_TBL
;GLB VECTOR_O8H
;VECTOR_OBH EQU $+0
;GLB INT_VCTR_TBL
;INT_VCTR_TBL EQU VECTOR_O8H
; ;GLB VECTOR_10H
;VECTOR_10H EQU $+3
;GLB VECTOR_18H
;VECTOR_18H EQU $+6
;GLB VECTOR20H
;VECTOR_20H EQU $+9
;GLB VECTOR_28H
;VECTOR_28H EQU $+12
;GLB VECTOR_30H
;VECTOR_30H EQU $+15
;GLB VECTOR38H
;VECTOR_36H EQU $+18
;GLB VECTOR_66H
;VECTOR_66H EQU $+21
;
; NOTE: See SWITCHTABLE
;
; ;GLB MEMCNF GOO
;MEM_CNFGOO EQU $+24
;; ;GLB SWITCHTABLE
;SWITCH_TABLE EQU MEMCNFGOO
;; ;GLB MEMCNFGOI
;MEM_CNFGO1 EQU $+25
;; ;GLB MEMCNFGO2
;MEM_CNFGO2 EQU $+26
;; ;GLB MEMCNFGO3
;MEM_CNFGO3 EQU $+27
;; ;GLB MEMCNFGO4
;MEM_CNFGO4 EQU $+28
;; ;GLB MEMCNFGOS
;MEM_CNFGOS EQU $+29
;; ;GLB MEM_CNFGO6
;MEM_CNFGO6 EQU $+30
;; ;GLB MEM_CNFGO7
;MEM_CNFGO7 EQU $+31
;; ;GLB MEMCNFGOS8
;MEM_CNFGOS EQU $+32
;; ;GLB MEMCNF GOS
;MEM_CNFGOS EQU $+33
;; ;GLB MEMCNFGOA
;MEM_CNFGOA EQU $+34
;; ;GLB MEMCNF GOB
;MEM_CNFGOS EQU $+35
;; ;GLB MEM_CNFGOC
;MEM_CNFGOC EQU $+36
;; ;GLB MEM_CNFGOD
;MEM_CNFGOD EQU $+37
;; ;GLB MEM_CNFGOE
;MEM_CNFGOE EQU $+38
;; ;GLB MEM_CNFGOF
;MEM_CNFGOF EQU $+39
;
; NOTE: See PORT TABLE
;
;; ;GLB MEM_SWITCH_PORT
;MEM_SWITCH_PORT EQU $+40
;; ;GLB PORT_TABLE
;PORT_TABLE EQU MEM_SWITCH_PORT
;; ;GLB NET_RESET_PORT
;NET_RESET_PORT EQU $+41
;; ;GLB VDP_CTRL_PORT
;VOP_ CTRL_PORT EQU $+42
;; ;GLB VDP_DATA_PORT
;VDP_DATA_PORT EQU $+43
;; ;GLB CONTROLLER_0_PORT
;CONTROLLER_0_PORT EQU $+44
;; ;GLB CONTROLLER_1_PORT
;CONTROLLER_1_PORT EQU $+45
;; ;GLB STROBE_SET_PORT
;STROBE_SET_PORT ;EQU $+46
;; ;GLB STROBE_RESET_PORT
;STROBE_RESET_PORT ;EQU $+47
;; ;GLB SOUNDPORT
;;SOUNDPORT EQU $+48
;RAM DEFINITIONS FOR EOS
;REV O (v/D 8-24-83)
; ************************************************
ORG EOS_GLB_RAM
; ************************************************
;GLB CLEAR_RAMSTART
CLEAR_RAM_START:
;
; EOS revision number initialized by EOS START
;
;GLB REV_NUM
REV_NUM
DEFS 1
IF ,NT,SUPERGAME
;
; 0S7 equivalent global data structures
;
;GLB VDP_MODE WORD
VOP_MODEWORD DEFS 2
;GLB VOP_STATUS BYTE
VOP_STATUSBYTE DEFS 1
;GLB VRAM_ADDR_ TABLE
VRAM_ADDR_TABLE
;GLB SPRITEATTRIBL
SPRITEATTRIBL DEFS 2
;GLB SPRITEGENTBL
SPRITEGENTBL DEFS 2
;GLB PATTRNNAME TBL
PATTRNNAMETBL DEFS 2
;GLB PATTRNGENTBL
PATTRNGENTBL DEFS 2
;GLB COLORTABLE
COLORTABLE DEFS 2
ELSE
DEFS 2*6+1
ENDIF
;GLB CUR_BANK
CURBANK DEFS 1
;
; EOS global data structures
;
;GLB DEFAULTBT DEV
;GLB CURRENTDEV
OEFAULTBT_DEV:
CURRENTDEV:
DEFS 1
;GLB CURRENTPCB
CURRENTPCB:
DEFS 2 ; HOLDS THE START ADDRESS OF THE PCB
IF ,NT,SUPERGAME
;GLB DEVICEI0
ENDIF
DEVICEID:
DEFS 1 ; SAVE DEVICE ID
;GLB FILE NAME_ADDR
FILENAME ADDR
DEFS 2
;GLB KEYBOARDBUFFER
KEYBOARDBUFFER:
DEFS 1 ; HOLDS THE KEY THAT IS READ FROM THE
; KEYBOARD
;GLB PRINTBUFFER
PRINTBUFFER:
DEFS 16 ; HOLDS THE STRING TO BE PRINTED
;GLB SECTORS_TO_INIT,SECTOR_NO
SECTORS_TO_INIT:
DEFS 1
SECTOR_NO:
DEFS 4
;GLB DCB_IMAGE
DCB_IMAGE:
DEFS 21
;GLB QUERY_BUFFER
QUERY_BUFFER
DEFS DIR_ENT_LENGTH
;GLB FCB_BUFFER
FCB_BUFFER
DEFS DIR_ENT_LENGTH
;GLB FILE COUNT, MOD_FILE COUNT
FILE_COUNT
DEFS 1
MOD_FILE COUNT
DEFS 1
;GLB RETRY COUNT, FILE NUMBR
RETRY_COUNT
DEFS 1
FILE_NUMBR
DEFS 1
;GLB FILENAME_CMPS
FILENAME_CMPS
DEFS 1
;GLB DIR_BLOCK_NO,FOUND_AVAIL_ENT
DIR_BLOCK_NO
DEFS 2
FOUND_AVAIL_ENT
DEFS 1
;GLB VOL_BLK_SZ,BLK_STRT PTR
BLK_STRT_PTR:
VOL_BLK_SZ:
DEFS 4
; FILE MANAGER RAM STORAGE
;GLB EOS_YEAR,EOS MONTH,EOSDAY
EOS_YEAR DEFS 1 ;FMGR’S DATE STORAGE
EOS_MONTH DEFS 1
EOS_DAY DEFS 1
;GLB FMGR_DIR_ENT
FMGR_DIR_ENT ;PLACEFOR FMGR TO PUT A DIR. ENTRY
;GLB FCB_HEAD_ADOR,FCB_DATA_ ADDR
FCB_HEAD_ADDR DEFS 2 ;POINTER TO START OF FCB HEADS
FCB_DATA_ADDR DEFS 2 ;POINTER TO START OF FCB BUFFERS
;GLB FNUM, BYTES REQ,BYTES TO GO,USER BUF
;GLB BUF_START,BUF_ENO.BLOCKS REQ
;GLB USER_NAME ,STARTBLOCK
FNUM DEFS 1 ;FILE NUMBER GIVEN TO READ/WRITE ROUTINES
BYTES_REQ DEFS 2 ;NUMBER OF BYTES REQUESTED BY CALLER
BYTES_TO_GO DEFS 2 ;NUMBER OF BYTES STILL TO GIVE TO CALLER
USER_BUF DEFS 2 ;ADDRESS OF CALLER’S BUFFER
BUF_START DEFS 2 ;ADDRESS OF MY OWN BUFFER
BUF_END DEFS 2 ;ADDRESS OF END + 1 OF MY BUFFER
BLOCKS_REQ DEFS 4 ;NUMBER OF BLOCKS REQUESTED (MAKEFILE)
USER_NAME DEFS 2 ;POINTER TO USER’S NAME STRING
START_BLOCK DEFS 4 ;START BLOCK # OF A FILE
;GLB_ NEW_HOLE START,NEW_HOLE SIZE
NEW_HOLE START
DEFS 4
NEW_HOLE_SIZE ;
DEFS 2
STACK_START:
DEFS 60
;GLB EOSSTACK
EOS_STACK:
; ;GLB SAVEDCOUNT
; controller data area
;GLB SPIN_SWOCT ; THESE TWO BYTES MUST GE IN THIS ORDER!!!
;GLB SPIN_SW1CT
;GLB PERSONAL ODEBOUNCETABLE
;GLB TEMP STACK ; Used Dy putascit when bank switching
; sound data areas
;GLB PTRTO LST OF SND_ADORS
;GLB PTRTO S GN_O
;GLB PTR_TO_S_ON1
;GLB PTR_TO_SON 2
;GLB PTRTO S ON 3
;GLB SAVECTRL
;SAVEDCOUNT DEFS 2
;
; controller data area
;
SPIN_SWO_CT DEFS 1 ; THESE TWO BYTES MUST BE IN THIS ORDER!!!
SPIN_SW1_CT DEFS 1
PERSONAL_DEBOUNCE_TABLE DEFS 8
DEFS 12 ;USED BY TEMP_STACK
TEMP_STACK EQU $ ;Used by put_ascii when bank switching
;
; sound data areas
;
PTR_TO_LST_OF_SND_ADDRS DEFS 2
PTR_TO_S_ON_O DEFS 2
PTR_TO_S_ON_1 DEFS 2
PTR_TO_S_ON_2 DEFS 2
PTR_TO_S_ON_3 DEFS 2
SAVE_CTRL DEFS 1
;
; data area for CONS OUT
;
;GLB OLDCHAR_
;GLB XMIN
;GLB XMAX
;GLB YMIN
;GLB Y_ MAX
;GLB LINEBUFFER_
;GLB NUM_LINES
;GLB NUM_COLUMNS
;GLB UPPER_LEFT
;GLB PTRN_NAME_TBL
;GLB CURSOR
OLDCHAR_ DEFS 1 ;Storage of char under cursor
X_MIN DEFS 1 ;Absolute X coord of window
X_MAX DEFS 1
YMIN DEFS 1
YMAX DEFS 1
LINEBUFFER_ DEFS 33
NUMLINES DEFS 1
NUM_COLUMNS DEFS 1
UPPER_LEFT DEFS 2
PTRN_NAME_TBL DEFS 2
CURSOR DEFS 2
;GLB CLEAR_RAM_SIZE
CLEAR_RAM_SIZE EQU [$-CLEAR_RAM_START]
;
; this is the PCB/DCB area
;
;***********************************************************************
ORG EOS_PCB_DCB
;***********************************************************************
;GLB PCB
PCB:
DEFS P_SIZE ; PCB
DCBS:
DEFS 15*D_SIZE ; 1 OCB PER NETWORK ADORESS
RESERVED_BYTE:
DEFS 1 ; SAVED IN CASE WE OO FAST DMA HERE
;
;***********************************************************************
;***********************************************************************
;***********************************************************************
NAME ^Rev OO - RPD^
;***********************************************************************
ORG EOS_GLB_TBL
;***********************************************************************
;
; NOTE: these are defined globa! in £0S_COMN
;
; ;GLB VECTOR_O8H
; ;GLB VECTOR 10H
; ;GLB VECTOR_18H
; ;GLB VECTOR_20H
; ;GLB VECTOR_28H
; ;GLB VECTOR_30H
; ;GLB VECTOR_38H
; ;GLB VECTOR_66H
;
VECTOR_O8H RET ;rst 8
NOP
NOP
VECTOR_10H RET ;rst 10
NOP
NOP
VECTOR_18H RET ;rst 18
NOP
NOP
VECTOR_20H RET ;rst 20
NOP
NOP
VECTOR_28H RET ;rst 28
NOP
NOP
VECTOR_30H RET ;rst30
NOP
NOP
VECTOR_38H RET ;rst38
NOP
NOP
VECTOR_66H RETN ;nmi vector
NOP
; NOTE: these are defined global in EQSCOMN
; ;GLB SWITCH_TABLE
; ;GLB MEM_CNFGOO
; ;GLB MEM_CNFGO1
; ;GLB MEM_CNFGO2
; ;GLB MEM_CNFGO3
; ;GLB MEM_CNFGO4
; ;GLB MEM_CNFGO5
; ;GLB MEM_CNFGO6
; ;GLB MEM_CNFGO7
; ;GLB MEM_CNFGO8
; ;GLB MEM_CNFGO9
; ;GLB MEM_CNFGOA
; ;GLB MEM_CNFGOB
; ;GLB MEM_CNFGOC
; ;GLB MEM_CNFGOD
; ;GLB MEM_CNFGOE
; ;GLB MEM_CNFGOF
LO_BOOT_ROM_N_ALPHA_MASK EQU 0000B
LO_INTRINSIC_RAM_TO_7FFFH_MASK EQU 0001B
LO_EXPANSION_0_TO_7FFFH_MASK EQU 0010B
LO_OS7_N_INTRINSIC_2000H_7FFFH_MASK EQU 0011B
HI_INTRINSIC_8000H_TO_0FFFFH_MASK EQU
HI_AUXILLIARY_SLOT_8000H_0FFFFH EQU 0100B
HI_EXPANSION_8000H_TO_0FFFFH_MASK EQU 1000B
HI_COLECOVISION_CARTRIOGE_SLOT EQU 1100B
SWITCH_TABLE:
MEM_CNFGOO
DEFB HI_INTRINSIC_8000H_TO_0FFFFH_MASK,OR,LO_BOOTROM_N_ALPHA_MASK
MEM_CNFGO1
DEFB HI_INTRINSIC_8000H_TO_0FFFFH_MASK,OR,LO_INTRINSIC_RAM_0_TO_7FFFH_MASK
MEM_CNFGO2
DEFB HI_INTRINSIC_8000H_TO_0FFFFH_MASK,OR,LO_EXPANSION_0_TO_7FFFH_MASK
MEM_CNFGO3
DEFB HI_INTRINSIC_8000H_TO_0FFFFH_MASK,OR,LO_OS7_N_INTRINSIC_2000H_7FFFH_MASK
MEM_CNFGO4
DEFB HI_AUXILLIARY_SLOT_8000H_0FFFFH,OR,LO_BOOT_ROM_N_ALPHA_MASK
MEM_CNFGO5
DEFB HI_AUXILLIARY_SLOT_8000H_0FFFFH,OR,LO_INTRINSIC_RAM_0_TO_7FFF_MASK
MEM_CNFGO6
DEFB HI_AUXILLIARY_SLOT_8000H_0FFFFH,OR,LO_EXPANSION_0_TO_7FFF_MASK
MEM_CNFGO7
DEFB HI_AUXILLIARY_SLOT_8000H_0FFFFH,OR,LO_OS7_N_INTRINSIC_2000H_7FFFH_MASK
MEM_CNFGO8
DEFB HI_EXPANSION_8000H_TO_0FFFFH_MASK,OR,LO_BOOT_ROM_N_ALPHA_MASK
MEM_CNFGO9
DEFB HI_EXPANSION_8000H_TO_0FFFFH_MASK,OR,LO_INTRINSIC_RAM_0_TO_7FFFH_MASK
MEM_CNFGOA
DEFB HI_EXPANSION_8000H_TO_0FFFFH_MASK,OR,LO_EXPANSION_0_TO_7FFFH_MASK
MEM_CNFGOB
DEFB HI_EXPANSION_8000H_TO_0FFFFH_MASK,OR,LO_OS7_N_INTRINSIC_2000H_7FFFH_MASK
MEM_CNFGOC
DEFB HI_COLECOVISION_CARTRIDE_SLOT,OR,LO_BOOT_ROM_N_ALPHA_MASK
MEM_CNFGOD
DEFB HI_COLECOVISION_CARTRIDE_SLOT,OR,LO_INTRINSIC_RAM_0_TO_7FFFH_MASK
MEM_CNFGOE
DEFB HI_COLECOVISION_CARTRIDE_SLOT,OR,LO_EXPANSION_0_TO_7FFFH_MASK
MEM_CNFGOF
DEFB HI_COLECOVISION_CARTRIDE_SLOT,OR,LO_OS7_INTRINSIC_2000H_7FFFH_MASK
;
; NOTE: these are defined global in E0S_COMN
;
; ;GLB PORT_TABLE ;port value memory locations
; ;GLB MEM_SWITCH_PORT
; ;GLB NET_RESET_PORT
; ;GLB VOP_CTRL_PORT
; ;GLB VOP_DATA_PORT
; ;GLB CONTROLLER_O_PORT
; ;GLB CONTROLLER_1_PORT
; ;GLB STROBE_SET_PORT
; ;GLB STROBE_RESET_PORT
; ;GLB SOUNODPORT
;
; ******************************************************
; *** VDP ports must remain next to each other ***
; *** and in CTRL -> DATA order ***
; ******************************************************
PORT_TABLE:
MEM_SWITCH_PORT
DEFB 07FH ;MEM_SWITCH_PORT defined here
NET_RESET_PORT
DEFB 03FH ;Adam_net reset port defined here
VOP_CTRL_PORT
DEFB 0BFH ;VDP ctrl port 01D43H
VDP_DATA_PORT
DEFB 0BEH ;VOP data port 01D47H
CONTROLLER_O_PO
DEFB 0FCH ;Controller O 0114BH
CONTROLLER_1_PO
DEFB 0FFH ;Controller 1 01151H
STROBE_SET_PORT
DEFB 080H ;Controller strobe set 01157H
STROBE_RESET_PO
DEFB 0C0H ;Controller strobe reset 01168H
SOUNODPORT
DEFB 0FFH ;Sound port 0018EH
;
; ******************************************************
; ******************************************************
; ******************************************************
;
; globals routines defined
;
;GLB __WRITEVRAM ;VDP support routines
;GLB __READ_VRAM
;GLB __WRITEREGISTER
;GLB __READ_REGISTER
;GLB __FILL_VRAM
;GLB __INIT_TABLE
;GLB __PUT_VRAM
;GLB __GET_VRAM
;GLB __CALC_OFFSET
;GLB __PX_TO_PTRN_POS
;GLB __LOAD_ASCTII
;GLB __PuT_ASCII
;GLB __WR_SPR_ATTRIBUTE
;GLB __DECODER
;GLB __POLLER ;controller support routines
;GLB __UPDATE_SPINNER
;GLB __DECLSN ;sound chip support routines
;GLB __DECMSN
;GLB __MSNTOLSN
;GLB __ADD816
;GLB ___SOUND_INIT
;GLB __TURN_OFF_SOUND
;GLB __PLAY_IT
;GLB ___SOUNODS
;GLB __EFFECT_OVER
;GLB __SWITCH_MEM ;memory bank switch support routine
;GLB __PORTCOLLECTION ;STORE THE PORT ADDRESSES FROM OS 7
;
; external data areas used
;
;EXT VDP_MODEWORD
;EXT VDP_STATUSBYTE
;EXT VRAM_ADDR [FABLE
;EXT SPRITEATTRIBLS
;eee ;EXT SPRITEGENTBL
;eee ;EXT PATTRNNAMETBL
;EXT PATTRNGENTBL
;eee ;EXT COLORTABLE
;EXT CUR_BANK
;controller data area
;EXT SPIN_SWO_CT ;THESE TWO BYTES MUST BE IN THIS ORDER!!!
;ee@e ;EXT SPIN_SW1_CT
;EXT PERSONAL_DEBOUNCE_TABLE
;EXT TEMP_STACK ;Used by put_ascii when bank switching
;sound data areas
;EXT PTR_TO_LST OF_SND_ADDRS
;EXT PTR_TO_S_ON_0
;EXT PTR_TO_S_ON_1
;EXT PTR_TO_S_ON_2
;EXT PTR_TO_S_ON_3
;EXT SAVE_CTRL
;
; Port address and bank select externals follow
;
;EXT PORTTABLE
;EXT MEM_SWITCH_ PORT
;eee ;EXT NET_RESET_PORT
;EXT VDP_CTRL_PORT
;eee ;EXT VDP_DATA_PORT
;EXT CONTROLLER_O_PORT
;eee ;EXT CONTROLLER_1_PORT
;EXT STROBE_SET_PORT
;eee ;EXT STROBE_RESET_PORT
;EXT SOUNDPORT
;eee ;EXT SWITCH_TABLE
;EXT MEM_CNFGOO
;ee@ ;EXT MEM_CNFGO1
;eee ;EXT MEM_CNFGO2
;EXT MEM_CNFGO3
;eee ;EXT MEM_CNFGO4
;eee ;EXT MEM_CNFGO5
;eee ;EXT MEM_CNFGO6
;eee ;EXT MEM_CNFGO7
;eee ;EXT MEM_CNFGO8
;eee ;EXT MEM_CNFGO9
;eee ;EXT MEM_CNFGOA
;ee¢@ ;EXT MEM_CNFGOB
;ee@ ;EXT MEM_CNFGOC
;ee@ ;EXT MEM_CNFGOD
;ece@ ;EXT MEM_CNFGOE
;ee¢ ;EXT MEM_CNFGOF
;
; externals used
;
;EXT WRITE_REGISTER
;eee ;EXT INIT_TABLE
;EXT SWITCH_MEM
;eee ;EXT PUT_VRAM
;EXT WRITE_VRAM
;EXT READ_VRAM
;
; local equates
;
LOC_IN_ALPHA EQU 0102H ;potnter to ascii gens in rev 28+ alpha
; Offsets into a volume descriptor (the first entry in the directory).
VOL_NAME EQU 0 ;LOGICALVOLUME NAME
VOL_DIRSIZE EQU 12 ;*ee7 BITS ONLY *** # BLOCKS IN DIRECTORY
VOL_ATTR EQU 12 ;**eTOP BIT ONLY ***SET FOR DELETE PROTECTION
VOL_DIR_CHECK EQU 13 ;CONTAINS 4 UNIQUE BYTES FOR DIRECTORY EXISTENCE VERIFICATION
VOL_SIZE EQU 17 ;VOLUMESIZE (IN BLOCKS) (4 BYTES)
VOL_YEAR EQU 23 ;CREATIODATE -- YEAR
VOL_MONTH EQU 24 ; MONTH
VOL_DAY EQU 25 ; & DAY
VOL_DES_LENGTH EQU 26
; Offsets into a directory entry.
DIR_NAME EQU 0 ;FILE NAME
DIR_ATTR EQU 12 ;FILE ATTRIBUTE BYTE
DIR_START_BLOCK EQU 13 ;STARTING BLOCK4
DIR_MAX_LENGTH EQU 17 ;TOTAL #4BLOCKS ALLOCATED
DIR_USED_LENGTH EQU 19 ;#OF BLOCKS USED (FULL + 1 PARTIAL)
DIR_LAST_COUNT EQU 21 ;NUMBER OF BYTES IN LAST PARTIAL BLOCK
DIR_YEAR EQU 23 ;CREATION DATE -- YEAR
DIR_MONTH EQU 24 ; MONTH