Subversion Repositories NedoOS

Rev

Rev 922 | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
630 alone 1
        DEVICE ZXSPECTRUM128
2
        include "../_sdk/sys_h.asm"
3
        include "8080.asm"
4
 
5
;
6
;
7
; Main CC.ASM Source Driver
8
; (for use with LASM.COM)
9
;
10
        ;page 76
11
        ;title 'cc.asm v1.6  CP/M 3/10/86'
12
 
13
true:   equ 0ffffh
14
false:  equ not true
15
 
16
SLRMAC: equ true;false
17
LASM:   equ not SLRMAC
18
CPM:    equ true        ;if true, for cp/m
683 alone 19
TERM equ 1
630 alone 20
 
21
ZSYSTEM equ true
22
 
23
        if not ZSYSTEM
24
version: equ '6'        ;the 'x' in 'v1.x'
25
updatn: equ 0           ;the `y' in `v1.xy'      (number)
26
UPDATY: equ 0           ;the `z' in `v1.xyz', or zero if none (character)
27
        endif
28
 
29
        if ZSYSTEM
30
version: equ '2'        ;the 'x' in 'vZx.yz'
31
updatn: equ 0           ;the `y' in `vZx.yz'     (number)
32
UPDATY: equ 0           ;the `z' in `vZx.yz', or zero if none (character)
33
        endif
34
 
35
 
36
DEMO:   equ 0           ;true for special demo message (must be customized)
37
IMPURE: equ 1           ;true to generate impure code for parity stripping
38
                        ;                                               option
39
ALPHA:  equ 0           ;true if "alpha-C" version
40
motu:   equ 0           ;true if for Mark of the Unicorn
41
trs80:  equ 0           ;true if  special TRASH-80 version
42
PREREL: equ 0           ;true if `pre-release' is to be printed on startup
43
debug:  equ PREREL
44
marc:   equ  false      ;true if MARC-resident version
45
 
46
bigstring: equ false    ;true to allow LOTS of preprocessor string space
47
 
48
        if bigstring
49
strsiz: equ 3500        ;3500 for BIG programs
50
        endif
51
 
52
        if not bigstring
53
strsiz: equ 2800        ;2800 for normal programs
54
        endif
55
 
56
        IF NOT CPM
57
;       Assembling NON-CPM  version             !=
58
        ENDIF
59
 
60
        IF LASM
61
        ;sym
62
        ENDIF
63
 
64
ram:    equ 0000h       ;start of ram in system
65
 
66
          if motu
67
dfstsz: equ 11*1024     ;default symbol table size
68
          endif
69
 
70
          if not motu
71
dfstsz: equ 10*1024
72
          endif
73
 
74
tbuff:  equ ram+80h     ;used under both CP/M and MARC
632 alone 75
tpa:    equ PROGSTART;ram+100h  ;TPA under both CP/M and MARC
630 alone 76
 
632 alone 77
ztack=0
78
stkchk=ztack-322
79
 
630 alone 80
        IF CPM
81
bdos:   equ ram+5
632 alone 82
NEDOOSMEMTOP=stkchk;bdosp:      equ ram+6
630 alone 83
fcb:    equ ram+5ch
84
fcbnr:  equ fcb+32
85
fcbex:  equ fcb+12
86
secsiz: equ 128
87
        ENDIF
88
 
89
 
90
negone  equ 0ffh        ;negative one, 8 bit 2's complement
91
 
92
        IF CPM
632 alone 93
;coninp:                equ 1
94
;conout:                equ 2
630 alone 95
readbuf:        equ 10
632 alone 96
;intcon:                equ 11
97
;select:                equ 14
630 alone 98
openfil:        equ 15
99
closefil:       equ 16
100
delete:         equ 19
101
rsequen:        equ 20
102
wsequen:        equ 21
103
makfil:         equ 22
632 alone 104
;gdisk:         equ 25
630 alone 105
sdma:           equ 26
632 alone 106
;sguser:                equ 32
630 alone 107
        ENDIF
108
 
109
;
110
; Include file nesting control:
111
;
112
 
113
fnlen:  equ 12  ;length of filename in fcb format ( filename plus disk)
114
nestmax: equ 5  ;max of 5 levels of include file nesting allowed
115
 
116
;
117
; Equates:
118
;
119
 
120
nlcd:   equ 0f7h
121
concd:  equ 0f8h
122
varcd:  equ 0f9h
123
lblcd:  equ 0fah
124
labrc:  equ 0fch
125
strcd:  equ 0fdh
126
sttcd:  equ 8bh
127
period: equ 0c5h
128
arrow:  equ 0b4h
129
swtbc:  equ 0feh
130
divcd:  equ 0b7h
131
mulcd:  equ 0b6h
132
modcd:  equ 0b8h
133
plus:   equ 0c4h
134
ancd:   equ 0bbh
135
letcd:  equ 0beh
136
newlin: equ 10
137
ht:     equ 9
138
bs:     equ 8
139
ff:     equ 0ch
140
chrcd:  equ 80h
141
regcd:  equ 9eh
142
shrtcd: equ 9fh
143
gotcd:  equ 8dh
144
rencd:  equ 8eh
145
brkcd:  equ 90h
146
cntcd:  equ 91h
147
ifcd:   equ 92h
148
elscd:  equ 93h
149
forcd:  equ 94h
150
docd:   equ 95h
151
whlcd:  equ 96h
152
swtcd:  equ 97h
153
cascd:  equ 98h
154
defcd:  equ 99h
155
uncd:   equ 8ch
156
lbrcd:  equ 9bh
157
rbrcd:  equ 9ch
158
sizcd:  equ 8fh
159
mincd:  equ 0b5h
160
dcoln:  equ 0c1h
161
open:   equ 0c2h
162
close:  equ 0c3h
163
semi:   equ 0c6h
164
comma:  equ 0c7h
165
openb:  equ 0c8h
166
closb:  equ 0c9h
167
colon:  equ 0cah
168
circum: equ 0cbh
169
 
170
modbeg: equ 0f5h
171
modend: equ 0f6h
172
 
173
 
174
cr:     equ 0dh
175
lf:     equ 0ah
176
 
177
 
178
        ;IF LASM
179
        ;link   CCA
180
        ;ENDIF
181
 
182
        org PROGSTART;tpa               ;start of CP/M TPA
183
begin
184
        ;IF SLRMAC
930 alone 185
        include "cca.asm"
186
        include "ccb.asm"
683 alone 187
        include "../_sdk/stdio.asm"
930 alone 188
        include "cccomp.asm" ;’­γβΰ¨ ₯αβμ org, ­ η¨­ ₯βαο § ― ΰλ’ ₯¬ ο η αβμ
189
        include "ccd.asm"
630 alone 190
        ;ENDIF
191
 
683 alone 192
;
193
; Data storage used by "readf":
194
;
195
 
196
datarea: equ $
197
 
198
secbuf: ds 256          ;sector buffer for reading in file
199
fsp:    ds 2
200
sptr:   ds 2
201
incf:   ds 1            ; true if in an include file
202
pndsav: ds 2
203
fnbuf:  ds 50           ;file name buffer for reading in files
204
textp:  ds 2
205
lastc:  ds 1
206
lastc2: ds 1
207
quotf:  ds 1            ;true if in a quoted string
208
newusr: ds 1            ;new disk for #includes (CP/M)
209
newdsk: ds 1            ;new user area for #includes (CP/M)
210
atcnt:  ds 2            ;last active line count for comment diagnostics
211
inclstk: equ $          ;"include" stack
212
 
213
;
214
; Data used by "lblpr":
215
;
216
 
217
        org datarea     ;overlap readf's data area with lblpr's data area
218
 
219
lblp:   ds 2
220
lblt:   equ $
221
 
222
        ;IF LASM
223
        ;end
224
        ;ENDIF
225
 
630 alone 226
end
227
        savebin "cc.com",begin,end-begin
228
 
229
        LABELSLIST "../../us/user.l"