home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpmug
/
cpmug007.ark
/
PILOT.LST
< prev
next >
Wrap
File List
|
1984-04-29
|
138KB
|
2,954 lines
ASM80 :F1:PILOT.SA DEBUG XREF PAGELENGTH(55)
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 1
LOC OBJ SEQ SOURCE STATEMENT
1 ; THIS WORK WAS PREPARED UNDER CONTRACT TO THE LISTER HILL NATIONAL CENTER
2 ; FOR BIOMEDICAL COMMUNICATIONS, NATIONAL LIBRARY OF MEDICINE, BETHESDA,
3 ; MARYLAND BY JOHN A. STARKWEATHER OF THE UNIVERSITY OF CALIFORNIA AT
4 ; SAN FRANCISCO.
5 ;
6 ;
7 ;
8 ; P I L O T 8080 V E R S I O N 1.2
9 ;
10 ; 9/15/77
11 ;
12 ;
13 ;
6000 14 ORIGN EQU 06000H ;ORIGIN OF PROGRAM.
62E0 15 PSTRT EQU ORIGN+2E0H ;START OF PILOT INTERPRETER.
7000 16 PBUFB EQU ORIGN+1000H ;BEGINNING OF PROGRAM BUFFER.
7FFF 17 PBUFE EQU ORIGN+1FFFH ;END OF PROGRAM BUFFER.
0048 18 LINE EQU 72 ;MAX INPUT AT STARTUP.
FE77 19 VIDEO EQU 0FE77H ;EXTERNAL VIDEO DISPLAY ADDR.
0008 20 MNTR EQU 0008H ;EXTERNAL MONITOR ADDRESS
6100 21 STKPR EQU ORIGN+100H ;START OF STACK
22 ;
00F6 23 PORT EQU 0F6H ;MDS CONSOLE INPUT PORT
00F7 24 STPORT EQU 0F7H ;MDS CONSOLE STATUS PORT
0002 25 RDA EQU 02H ;READ DATA AVAILABLE MASK.
0001 26 TBE EQU 01H ;TRANSMIT BUFFER EMPTY MASK.
27 ;
0038 28 INTSRT EQU 38H ;MDS INTERRUPT 7 FOR RESTARTING PILOT.
29 ;
0038 30 ORG INTSRT ;RESTART PROGRAM BY USE OF INTERRUPT 7.
31 ASEG
0038 C3E062 32 JMP START ;ENTRY SETS NORMAL I/O
33 ;
34 ;LXI H,CTV ;ENTRY TO USE VIDEO OUTPUT
35 ;SHLD CO+1 ; AT STARTUP
36 ;SHLD LO+1
37 ;SHLD PO+1
38 ;JMP RSTRT
39 ;CTV: PUSH B
40 ;MOV B,C
41 ;CALL VIDEO
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 2
LOC OBJ SEQ SOURCE STATEMENT
42 ;POP B
43 ;RET
44 ;
45 ; JUMP TABLE FOR I/O ROUTINES
46 ; ONLY TTY ROUTINES ARE PROVIDED INTERNALLY
47 ;
6100 48 ORG STKPR
6100 C3216E 49 CI: JMP CHI ;CHAR INPUT TO A REG.
6103 C3F76D 50 CO: JMP CHO ;CHAR OUTPUT FROM C REG.
6106 C3216E 51 RI: JMP CHI ;READER INPUT TO A REG.
6109 C3F76D 52 LO: JMP CHO ;LIST OUTPUT FROM C REG.
610C C3F76D 53 PO: JMP CHO ;PUNCH OUTPUT FROM C REG.
610F C30800 54 EXIT: JMP MNTR ;RETURN TO MONITOR
6112 C30800 55 EDIT: JMP MNTR ;CALL TO EDITOR
6115 C32C6C 56 ASCAN: JMP BASIC ;ALTERN INTERPRETER
57 ;
58 ; DATA AREAS
6118 0000 59 TOPP: DW 0 ;TOP OF PROGRAM STORAGE
611A 0000 60 HLSAV: DW 0 ;TEMPORARY POINTER (HL)
611C 0000 61 HLLSAV: DW 0 ;TEMPORARY POINTER (HL)
611E 0000 62 HL2SAV: DW 0 ;TEMPORARY POINTER (HL)
6120 0000 63 DESAV: DW 0 ;TEMPORARY POINTER (DE)
6122 0000 64 LLSAV: DW 0 ;LAST LINE POINTER
6124 0000 65 RETSAV: DW 0 ;ZERO LEVEL OF STACK
6126 0000 66 DW 0 ;LEVEL 1
6128 0000 67 DW 0 ;LEVEL 2
612A 0000 68 DW 0 ;LEVEL 3
612C 0000 69 DW 0 ;LEVEL 4
612E 0000 70 DW 0 ;LEVEL 5
6130 0000 71 DW 0 ;LEVEL 6
6132 0000 72 DW 0 ;LEVEL 7 (TOP)
6134 0000 73 APTR: DW 0 ;A STMT POINTER
6136 0000 74 EPTR: DW 0 ;ENTRY POINTER
6138 0000 75 CPTR: DW 0 ;CHAR POINTER
613A 0000 76 IPTR: DW 0 ;INPUT BUFFER POINTER
613C 0000 77 MPTR: DW 0 ;M-STMT POINTER
613E 0000 78 MEMTP: DW 0 ;LAST MEMORY LOCATION
6140 0000 79 OUTADR: DW 0 ;CO,LOPO OUTPUT VECTOR
6142 0000 80 SCANB: DW 0 ;SCAN BEGINNING ADDR
0001 81 CHMAX: DS 1 ;MAXCHARSACCEPTED
0001 82 LEVEL: DS 1 ;CURRENT RTURN LEVEL
0001 83 LNSKP: DS 1 ;LINE NUMBER SKIP
0001 84 MBRCH: DS 1 ;M-BREAK CHAR
0001 85 SCNT: DS 1 ;STRING COUNT
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 3
LOC OBJ SEQ SOURCE STATEMENT
0001 86 TEMP: DS 1 ;TEMPORARY BINARY VALUE
0001 87 VARSAV: DS 1 ;VARIABLE SAVED
0001 88 YNSW: DS 1 ;YN-SWITCH, 000: NO MATCH
0051 89 TSAVE: DS 81 ;T-TEXT AREA
0051 90 EBUFF: DS 81 ;ENTRY BUFFER AREA
0051 91 MSAVE: DS 81 ;M LIST AREA
000C 92 LABSAV: DS 12 ;LABEL SAVE AREA
000B 93 LASTOP: DS 11 ;LAST OP CODE
0035 94 NVAR: DS 53 ;NUMERIC VARIABLE STORAGE
0051 95 WORD: DS 81 ;WORD AREA
96 ;
97 ; START AND TERMINATION OF MAIN PROGRAM
98 ; ORG HERE CAN SET BEGINNING OF ROM AREA
99 ;
62E0 100 ORG PSTRT
62E0 310061 101 START: LXI SP,STKPR ;INITIALIZE STACK POINTER
62E3 21FE7F 102 LXI H,PBUFE-1 ;INITIALIZE APTR
62E6 223461 103 SHLD APTR
62E9 21F762 104 LXI H,IOJMP ;SET NORMAL I/O VECTORS
62EC 110061 105 LXI D,CI
62EF 0E18 106 MVI C,24
62F1 CDA76C 107 CALL BLKTFR
62F4 C30F63 108 JMP RSTRT
62F7 C3216E 109 IOJMP: JMP CHI ;COPY OF STD JMP TABLE
62FA C3F76D 110 JMP CHO
62FD C3216E 111 JMP CHI
6300 C3F76D 112 JMP CHO
6303 C3F76D 113 JMP CHO
6306 C30800 114 JMP MNTR
6309 C30800 115 JMP MNTR
630C C32C6C 116 JMP BASIC
117 ;
630F 310061 118 RSTRT: LXI SP,STKPR ;INIT STACK ON RESTART
6312 CD3263 119 CALL INIT ;INITIALIZE THE REST
6315 CD5C63 120 CALL SCAN ;SCAN THE BUFFER
6318 C30F63 121 JMP RSTRT ;START OVER
122 ;
631B 30323036 123 DB '020677',0DH
631F 3737
6321 0D
124 ;
6322 50494C4F 125 DB 'PILOT-8080, 1.1',0DH
6326 542D3830
632A 38302C20
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 4
LOC OBJ SEQ SOURCE STATEMENT
632E 312E31
6331 0D
126 ;
127 ;
128 ;
129 ; INITIALIZE DATA FOR NEW PROGRAM
130 ;
6332 21C56E 131 INIT: LXI H,IBUFF ;RESET INPUT POINTER
6335 223A61 132 SHLD IPTR ; TO FRONT OF BUFFER
6338 224261 133 SHLD SCANB ;SET SCAN BEGINNING
633B 21FF7F 134 LXI H,PBUFE ;SET LAST MEMORY LOC
633E 223E61 135 SHLD MEMTP
6341 CD416C 136 CALL NEWN ;SET A-POINTER
6344 CD506C 137 CALL INITV ;INITIALIZE VARIABLES
6347 3601 138 MVI M,1 ; SET STOP
6349 3E48 139 MVI A,LINE ;RESET INMAX TO LINE
634B 324461 140 STA CHMAX
634E AF 141 XRA A ;ZERO RETURN LEVEL
634F 324561 142 STA LEVEL
6352 324661 143 STA LNSKP ;ZERO LN NO. SKIP
6355 210361 144 LXI H,CO ;RESET CONSOLE OUTPUT
6358 224061 145 SHLD OUTADR
635B C9 146 RET
147 ;
148 ; SCAN OF INPUT BUFFER
149 ; ENTER: HL=BUFFER ADDR
150 ; RETURNS: HL=LAST ADDR, B=LAST CHAR (01)
151 ;
635C 2A3A61 152 SCAN: LHLD IPTR ;GET POINTER
635F 7E 153 MOV A,M ;GET FIRST CHAR
6360 FE01 154 CPI 1 ;IF END MARKER
6362 C8 155 RZ ; THEN RETURN
6363 FE0D 156 CPI 0DH ;IF NOT END OF LINE
6365 C26C63 157 JNZ CKEND ; THEN CK FOR SOURCE END
6368 23 158 INX H ; ELSE BUMP POINTER
6369 C35F63 159 JMP SCAN+3 ; AND CONTINUE
636C CDF067 160 CKEND: CALL CNTLN ;HL=EOL, A=BR CHAR
636F FE01 161 CPI 1 ;IF END MARKER
6371 C8 162 RZ ; THEN RETURN
6372 23 163 INX H ;HL=START OF NEXT LINE
6373 223A61 164 SHLD IPTR ;SAVE THAT ADDR
6376 2B 165 DCX H ;HL=BREAK CHAR
6377 CD0168 166 CALL BACKUP ;RESET HL TO CURRENT LINE
637A CD5664 167 CALL SKLN ;SKIP ANY LN NOS., ETC.
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 5
LOC OBJ SEQ SOURCE STATEMENT
637D CD7F67 168 CALL GETCH ; GET FIRST TEXT CHAR
6380 FE3A 169 CPI ':' ;IF COLON
6382 CC9663 170 CZ CONTIN ; THEN CONTINUE SAME OP
6385 CA5C63 171 JZ SCAN ; IF CALLED THEN NEXT SCAN
6388 FE2A 172 CPI '*' ;IF ASTERISK
638A CC8F67 173 CZ GETWD ; THEN SKIP LABEL
638D CA5F63 174 JZ SCAN+3 ;IF CALLED THEN RESCAN
6390 CDAA63 175 CALL OPS ;PROCESS OPERATIONS
6393 C35C63 176 JMP SCAN
177 ;
6396 23 178 CONTIN: INX H ;COLON ADDR + 1
6397 221A61 179 SHLD HLSAV ;SAVE IT
639A 214B62 180 LXI H,LASTOP ; ADDR LAST OP CODE
639D 222261 181 SHLD LLSAV ;SAVE OP CODE ADDR
63A0 063A 182 MVI B,':'
63A2 CD8A68 183 CALL INDX ;ADDR COLON POS
63A5 CDC263 184 CALL OLDOP ;USE PART OF OPS
63A8 AF 185 XRA A ; SET RETURN FLAG
63A9 C9 186 RET
187 ;
188 ; OP CODES-- INTERPRET OPERATION
189 ; ENTER: HL = FIRST NON-BLANK CHAR IN LINE
190 ; RETURNS: RETURN (ZERO) FLAG SET
191 ;
63AA 222261 192 OPS: SHLD LLSAV ;SAVE OP CODE ADDR
63AD CDE167 193 CALL SAVOP ;SAVE OP CODE
63B0 2A2261 194 LHLD LLSAV ;ADDR OP CODE
63B3 063A 195 MVI B,':' ; LOOK FOR COLON
63B5 CD8A68 196 CALL INDX ;IF NOT FOUND
63B8 79 197 MOV A,C
63B9 B7 198 ORA A
63BA CAD863 199 JZ ALTSC ; THEN TRY ALTERN SCAN
63BD 23 200 INX H ;COLON ADDR + 1
63BE 221A61 201 SHLD HLSAV ;SAVE IT
63C1 2B 202 DCX H ;ADDR POS OF COLON
63C2 2B 203 OLDOP: DCX H ;ADDR POS BEFORE COLON
63C3 CD6064 204 CALL YNCHK ;IF YN-SW OFF(Y) OR ON(N)
63C6 B7 205 ORA A ; (A=000)
63C7 C8 206 RZ ; THEN RETURN
63C8 CD8364 207 CALL VARCHK ;IF VARIABLE PRESENT < 1
63CB C8 208 RZ ; THEN RETURN
63CC 2A2261 209 LHLD LLSAV ;ADDR OP CODE
63CF CDC467 210 CALL GETCTL ;GET THE CONTROL WORD
63D2 CDC264 211 CALL CTLMCH ;CALL SPECIFIC CONTROL
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 6
LOC OBJ SEQ SOURCE STATEMENT
63D5 FE01 212 CPI 1 ;IF CONTROL FOUND
63D7 C0 213 RNZ ; THEN RETURN
63D8 2A2261 214 ALTSC: LHLD LLSAV ;ADDR FIRST CHAR
63DB CD1561 215 CALL ASCAN ;TRY ALTERN SCAN
63DE C8 216 RZ ;IF OK, THEN RETURN
63DF 2A2261 217 LHLD LLSAV ;ELSE ADDR FIRST CHAR
63E2 221A61 218 SHLD HLSAV ;SET POINTER
63E5 CDCC68 219 CALL TOP ;DISPLAY TEXT
63E8 C9 220 RET
221 ;
222 ; TEXT CHECK FOR PRESENCE OF LINE FEEDS,
223 ; LINE COUNTS, OR LINE NUMBERS.
224 ; SETS LNSKP TO NO. OF CHARS TO SKIP BEFORE TEXT
225 ;
63E9 210070 226 TXTCK: LXI H,PBUFF ;ADDR PROGRAM TEXT
63EC CDF067 227 CALL CNTLN ;ADDR CR
63EF 23 228 INX H
63F0 7E 229 MOV A,M ;GET NEXT CHAR
63F1 FE0A 230 CPI 0AH ;IF NOT LF
63F3 C20864 231 JNZ CKLC ; THEN CK FOR LINE COUNT
63F6 CDF067 232 CALL CNTLN ;ELSE CK ANOTHER LINE
63F9 23 233 INX H
63FA 7E 234 MOV A,M
63FB FE0A 235 CPI 0AH ;IF NOT LF
63FD C20864 236 JNZ CKLC ; THEN CK FOR LINE COUNT
6400 3A4661 237 LDA LNSKP ;ELSE ADD 1 TO LNSKP
6403 C601 238 ADI 1
6405 324661 239 STA LNSKP
6408 210070 240 CKLC: LXI H,PBUFF ;CK FOR LINE COUNT
640B CDF067 241 CALL CNTLN ;ADDR CR
640E 23 242 INX H ; NEXT CHAR
640F CD5664 243 CALL SKLN ;SKIP ANY LF
6412 5E 244 MOV E,M ;GET POSSIBLE LINE COUNT
6413 1600 245 MVI D,0
6415 1B 246 DCX D ;DECR IT
6416 19 247 DAD D ;ADDR LINE END
6417 7E 248 MOV A,M ;GET CHAR
6418 FE0D 249 CPI 0DH ;IF NOT CR
641A C23264 250 JNZ CKLN ; THEN CK FOR LINE NO.
641D 23 251 INX H ;ELSE CK ANOTHER LINE
641E CD5664 252 CALL SKLN
6421 5E 253 MOV E,M
6422 1B 254 DCX D
6423 19 255 DAD D
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 7
LOC OBJ SEQ SOURCE STATEMENT
6424 7E 256 MOV A,M
6425 FE0D 257 CPI 0DH ;IF NOT CR
6427 C23264 258 JNZ CKLN ; THEN CK FOR LINE NOS.
642A 3A4661 259 LDA LNSKP ;ELSE ADD 1 TO LNSKP
642D C601 260 ADI 1
642F 324661 261 STA LNSKP
6432 210170 262 CKLN: LXI H,PBUFF+1 ;NOW LOOK FOR LN NOS.
6435 CDF067 263 CALL CNTLN ;ADDR CR
6438 23 264 INX H ; NEXT CHAR
6439 CD5664 265 CALL SKLN ;SKIP LF OR LN CNT
643C 7E 266 MOV A,M ;GET CHAR AFTER LN CT
643D CD4A64 267 CALL NUM ;IF NOT ASCII NUMBER
6440 C0 268 RNZ ; THEN QUIT
6441 3A4661 269 LDA LNSKP ;ELSE ADD 4 TO LNSKP
6444 C604 270 ADI 4
6446 324661 271 STA LNSKP
6449 C9 272 RET
273 ;
644A FE30 274 NUM: CPI '0' ;CHECK FOR ASCII NUMBER
644C F8 275 RM ;TOO LOW
644D FE3A 276 CPI '9'+1
644F FA5464 277 JM YNUM
6452 B4 278 ORA H ;TOO HIGH
6453 C9 279 RET
6454 AF 280 YNUM: XRA A ;OK
6455 C9 281 RET
282 ;
283 ; SKIP LINE NUMBER AND LINE COUNT
284 ; BASED ON VALUE OF LNSKP
285 ;
6456 3A4661 286 SKLN: LDA LNSKP ;GET SKIP COUNT
6459 B7 287 ORA A ;IF ZERO
645A C8 288 RZ ; THEN RETURN
645B 23 289 INX H ;SKIP A CHARACTER
645C 3D 290 DCR A ;DECR COUNT
645D C35964 291 JMP SKLN+3 ;MORE
292 ;
293 ; CHECK FOR Y OR N CONDITIONS
294 ; Y AND N FOLLOWING OP CODE
295 ; ACT AS A SWITCH ALONG WITH YN-SWITCH
296 ; ENTER: HL = ADDR OF COLON
297 ; RETURNS: A = 000 IF NO ACTION REQUIRED
298 ; ELSE A = CHAR BEFORE COLON
299 ; HL = ADDR OF LAST CHAR BEFORE COLON
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 8
LOC OBJ SEQ SOURCE STATEMENT
300 ;
301
6460 CD8767 302 YNCHK: CALL GETLCH ;GET LAST CHARACTER
6463 FE59 303 CPI 'Y' ;IF Y
6465 CA6F64 304 JZ YCHK
6468 FE4E 305 CPI 'N' ;IF N
646A CA7864 306 JZ NCHK
646D B7 307 ORA A ; ELSE SET SWITCH ON
646E C9 308 RET ; AND RETURN WITH CHAR
646F 3A4B61 309 YCHK: LDA YNSW ;IF YN-SWITCH
6472 B7 310 ORA A ; SHOWS MATCH
6473 CA8164 311 JZ DONT ; THEN QUIT
6476 B4 312 ORA H ; ELSE SET SWITCH ON
6477 C9 313 RET ; AND RETURN
6478 3A4B61 314 NCHK: LDA YNSW
647B B7 315 ORA A ; SHOWS NO MATCH
647C C28164 316 JNZ DONT ; THEN QUIT
647F B4 317 ORA H ; ELSE SET SWITCH ON
6480 C9 318 RET ; AND RETURN
6481 AF 319 DONT: XRA A ; SET SWITCH OFF
6482 C9 320 RET ; AND RETURN
321 ;
322 ; CHECK FOR NUMERIC VARIABLE CONDITIONS
323 ; VARIABLE IN PARENTHESES AFTER OP CODE
324 ; CAUSES EXECUTION IF VALUE +1 OR MORE
325 ; ENTER: A = LAST CHAR BEFORE COLON
326 ; RETURNS: ZERO FLAG OFF IF NO ACTION REQUIRED
327 ;
6483 FE29 328 VARCHK: CPI ')' ;IF VARIABLE PRESENT
6485 CA8A64 329 JZ VCHK ; THEN CHECK IT
6488 B4 330 ORA H ; ELSE SET SWITCH ON
6489 C9 331 RET ; AND RETURN
648A 2B 332 VCHK: DCX H ;DECR POINTER
648B 2B 333 DCX H ; TWICE
648C 7E 334 MOV A,M ; GET CHAR
648D FE28 335 CPI '(' ;IF PAREN NOT PRESENT
648F C2A764 336 JNZ BADFRM ; THEN COMPLAIN
6492 23 337 INX H ;BUMP POINTER
6493 46 338 MOV B,M ; SAVE CHAR IN B
6494 CDB464 339 CALL VARMCH ;LOOK IT UP
6497 FE01 340 CPI 1 ;IF END MARKER
6499 CAA764 341 JZ BADFRM ; THEN COMPLAIN
649C 23 342 INX H ; ELSE POINT AT VALUE
649D 7E 343 MOV A,M ; GET VALUE
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 9
LOC OBJ SEQ SOURCE STATEMENT
649E FE01 344 CPI 01
64A0 FAA564 345 JM VOFF ; THEN QUIT
64A3 B4 346 ORA H ; ELSE SET SWITCH ON
64A4 C9 347 RET ; AND RETURN
64A5 AF 348 VOFF: XRA A ; SET SWITCH OFF
64A6 C9 349 RET ; AND RETURN
350 ;
64A7 2A2261 351 BADFRM: LHLD LLSAV ;SHOW THE LINE
352
64AA CDCF68 353 CALL TOP+3
64AD 215B6E 354 LXI H,EXPMSG
64B0 CD316E 355 CALL ERROR
64B3 C9 356 RET
357 ;
358 ; VARIABLE MATCH - LOOKUP OF VARIABLE NAME/VALUE LIST
359 ; ENTER: VARIABLE NAME CHAR IN B REGISTER
360 ; RETURNS: HL = ADDR OF MATCHED NAME
361 ; IF VAR NOT IN LIST THEN A = 01
362 ;
64B4 215662 363 VARMCH: LXI H,NVAR
64B7 7E 364 MOV A,M
64B8 FE01 365 CPI 1 ;IF LIST END
64BA C8 366 RZ ; THEN RETURN
64BB B8 367 CMP B ;IF MATCH
64BC C8 368 RZ ; THEN RETURN
64BD 23 369 INX H ; ELSE LOOK AGAIN
64BE 23 370 INX H
64BF C3B764 371 JMP VARMCH+3
372 ;
373 ; CONTROL MATCH- CALLS SPECIFIC CONTROL OPERATIONS
374 ; ENTER: 'WORD':CONTROL WORD
375 ; RETURNS: IF WORD NOT IN LIST, THEN 01 RETURNED
376 ; HL: START OF NEXT WORD
377 ;
64C2 11ED64 378 CTLMCH: LXI D,CTLST ; DE=CONTROL LIST ADDR
64C5 CDD864 379 CALL LSTMCH ;LOOK FOR WORD
64C8 FE01 380 CPI 1 ;IF NOT FOUND
64CA C8 381 RZ ; THEN RETURN
64CB EB 382 XCHG
64CC 23 383 INX H
64CD 11D664 384 LXI D,RTRN ;PUT RETURN ON STACK
64D0 D5 385 PUSH D
64D1 5E 386 MOV E,M
64D2 23 387 INX H
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 10
LOC OBJ SEQ SOURCE STATEMENT
64D3 56 388 MOV D,M
64D4 D5 389 PUSH D ;CALL ADDR ON STACK
64D5 C9 390 RET
64D6 AF 391 RTRN: XRA A
64D7 C9 392 RET
393 ;
394 ; LIST MATCH - LOOKUP OF WORD/ADDRESS LIST
395 ; ENTER: 'WORD' = WORD TO BE FOUND
396 ; DE = ADDR OF BEGINNING OF LIST
397 ; RETURNS: DE = ADDR OF POINTER (L BYTE)
398 ; IF WORD NOT IN LIST THEN A = 01
399 ;
64D8 218B62 400 LSTMCH: LXI H,WORD ; HL=INPUT WORD
64DB CD4E67 401 CALL CMPR ;COMPARE WORD WITH LIST
64DE B7 402 ORA A ; IF MATCH
403
64DF C0 404 RNZ ; THEN RETURN
64E0 23 405 INX H ;ELSE HL = DE
64E1 EB 406 XCHG
64E2 23 407 INX H ;AND INCR HL TO
64E3 23 408 INX H ;NEXT LIST ADDR
64E4 23 409 INX H
64E5 7E 410 MOV A,M ; GET NEXT LIST CHAR
64E6 FE01 411 CPI 1 ;IF END MARKER
64E8 C8 412 RZ ; THEN RETURN
64E9 EB 413 XCHG ;ELSE RESET DE TO NEXT ITEM
64EA C3D864 414 JMP LSTMCH ; AND TRY IT
415 ;
416 ; CONTROL LIST - OP CODES AND KEYWORDS
417 ;
64ED 54 418 CTLST: DB 'T',0DH
64EE 0D
419
64EF CC68 420 DW TOP
64F1 41 421 DB 'A',0DH
64F2 0D
64F3 AB69 422 DW AOP
64F5 4D 423 DB 'M',0DH
64F6 0D
64F7 796A 424 DW MOP
64F9 4D43 425 DB 'MC',0DH
64FB 0D
64FC 716A 426 DW MC
64FE 4A 427 DB 'J',0DH
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 11
LOC OBJ SEQ SOURCE STATEMENT
64FF 0D
6500 1E66 428 DW JOP
6502 52 429 DB 'R',0DH
6503 0D
6504 2E6C 430 DW ROP
6506 43 431 DB 'C',0DH
6507 0D
6508 5C6B 432 DW COP
650A 55 433 DB 'U',0DH
650B 0D
650C 5B66 434 DW UOP
650E 45 435 DB 'E',0DH
650F 0D
6510 2F6C 436 DW EOP
6512 59 437 DB 'Y',0DH
6513 0D
6514 CC68 438 DW TOP
6516 4E 439 DB 'N',0DH
6517 0D
6518 CC68 440 DW TOP
651A 4C4F4144 441 DB 'LOAD',0DH
651E 0D
442 ;LOAD NEW PROGRAM
651F 3A6C 443 DW LOAD
6521 494E4D41 444 DB 'INMAX',0DH
6525 58
6526 0D
445 ;LIMITS CHARS ACCEPTED
6527 DC65 446 DW INMAX
6529 4E455724 447 DB 'NEW$',0DH
652D 0D
448 ;ERASE $TEXT
652E 416C 449 DW NEWN
6530 4450 450 DB 'DP',0DH
6532 0D
451 ;DISPLAY PROGRAM
6533 CD6D 452 DW DPRG
6535 5052494E 453 DB 'PRINT',0DH
6539 54
653A 0D
454 ;PRINT PROGRAM
653B D76D 455 DW LPRG
653D 53415645 456 DB 'SAVE',0DH
6541 0D
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 12
LOC OBJ SEQ SOURCE STATEMENT
457 ;SAVE PROGRAM
6542 E76D 458 DW SPRG
6544 494550 459 DB 'IEP',0DH
6547 0D
460 ;INTERPRET EXIST PROG
6548 CF65 461 DW IEP
654A 425945 462 DB 'BYE',0DH
654D 0D
654E 0F61 463 DW EXIT
6550 45444954 464 DB 'EDIT',0DH
6554 0D
6555 1261 465 DW EDIT
466 ;COMMON DATAPOINT PILOT CODES NOT IN OPERATION
6557 4341 467 DB 'CA',0DH
6559 0D
655A 7165 468 DW CURSR
655C 4345 469 DB 'CE',0DH
655E 0D
655F A165 470 DW CLRE
6561 434C 471 DB 'CL',0DH
6563 0D
6564 AC65 472 DW CLRL
6566 4348 473 DB 'CH',0DH
6568 0D
6569 B765 474 DW CLRH
656B 524C 475 DB 'RL',0DH
656D 0D
656E C465 476 DW ROLL
477 ; DB 'WA',0DH
478 ; DW WAIT
6570 01 479 DB 1
480 ;
6571 0E1B 481 CURSR: MVI C,1BH
6573 CD0361 482 CALL CO
6576 0E26 483 MVI C,'&'
6578 CD0361 484 CALL CO
657B 0E61 485 MVI C,61H
657D CD0361 486 CALL CO
6580 2A1A61 487 LHLD HLSAV
6583 7E 488 CURS1: MOV A,M
6584 FE2C 489 CPI ','
6586 CA9665 490 JZ CURS3
6589 FE0D 491 CPI 0DH
658B CA9B65 492 JZ CURS4
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 13
LOC OBJ SEQ SOURCE STATEMENT
658E 4F 493 MOV C,A
658F CD0361 494 CURS2: CALL CO
6592 23 495 INX H
6593 C38365 496 JMP CURS1
6596 0E72 497 CURS3: MVI C,'r'
6598 C38F65 498 JMP CURS2
659B 0E43 499 CURS4: MVI C,'C'
659D CD0361 500 CALL CO
65A0 C9 501 RET
65A1 0E1B 502 CLRE: MVI C,1BH
65A3 CD0361 503 CALL CO
65A6 0E4A 504 MVI C,'J'
65A8 CD0361 505 CALL CO
65AB C9 506 RET
65AC 0E1B 507 CLRL: MVI C,1BH
65AE CD0361 508 CALL CO
65B1 0E4B 509 MVI C,'K'
65B3 CD0361 510 CALL CO
65B6 C9 511 RET
65B7 0E1B 512 CLRH: MVI C,1BH
65B9 CD0361 513 CALL CO
65BC 0E48 514 MVI C,'H'
65BE CD0361 515 CALL CO
65C1 C3A165 516 JMP CLRE
65C4 0E1B 517 ROLL: MVI C,1BH
65C6 CD0361 518 CALL CO
65C9 0E53 519 MVI C,'S'
65CB CD0361 520 CALL CO
65CE C9 521 RET
522 ;WAIT: RET
523 ;
524 ; INTERPRET EXISTING PROGRAM
525 ; STARTS SCAN OF PROGRAM BUFFER
526 ;
65CF 210070 527 IEP: LXI H,PBUFF
65D2 223A61 528 SHLD IPTR ;SET POINTER
65D5 224261 529 SHLD SCANB ; AND SCAN BEGINNING
65D8 CDE963 530 CALL TXTCK ;CK FOR CHARS TO SKIP
65DB C9 531 RET
532 ;
65DC CDED65 533 INMAX: CALL NMCTL ;E = NUMBER CONTROL
65DF 7B 534 MOV A,E
65E0 FE49 535 CPI 73 ;LIMIT TO 72
65E2 FAE865 536 JM INMX2
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 14
LOC OBJ SEQ SOURCE STATEMENT
65E5 3E48 537 MVI A,72
65E7 5F 538 MOV E,A
65E8 214461 539 INMX2: LXI H,CHMAX ; SET INPUT CHAR MAX
65EB 73 540 MOV M,E
65EC C9 541 RET
542 ;
543 ; CHAR TO BINARY CONVERSION FOR CONTROL ARGUMENTS
544 ; NUMBER CONTROL - FINDS 1 OR 2 DIGIT NUMBER OR NAME
545 ; OF VARIABLE IN NEXT WORD. NEGATIVE VALUES SET TO ZERO.
546 ; ENTER: HLSAV = EXPRESSION ADDRESS
547 ; RETURNS: E = BINARY VERSION OF THE NUMBER
548 ; A = 0DH IF ALREADY AT END OF LINE
549 ; HLSAV = BR CHAR ADDR
550 ;
65ED 2A1A61 551 NMCTL: LHLD HLSAV ;EXPRESSION ADDR
65F0 CD7F67 552 CALL GETCH ;GET CHAR
65F3 FE0D 553 CPI 0DH ; IF CR
65F5 C8 554 RZ ; THEN RETURN
65F6 CD8F67 555 CALL GETWD ;GET NEXT WORD
65F9 2B 556 DCX H ;BACK UP TO BR CHAR
65FA 221A61 557 SHLD HLSAV ;SAVE POINTER
65FD 218B62 558 LXI H,WORD ; IN 'WORD'
6600 CDB368 559 CALL LETTER ;IF NOT LETTER
6603 C21566 560 JNZ CVNUM ; THEN CONVERT A NUMBER
6606 46 561 MOV B,M ; ELSE SAVE CHAR IN B
6607 CDB464 562 CALL VARMCH ;LOOK IT UP
660A FE01 563 CPI 1 ;IF END MARKER
660C CCA764 564 CZ BADFRM ; THEN COMPLAIN
660F C8 565 RZ ; AND RETURN
6610 23 566 INX H ;ELSE POINT AT VALUE
6611 5E 567 MOV E,M ; PUT VALUE IN E
6612 C31866 568 JMP CVNUM+3 ; AND QUIT
6615 CD8466 569 CVNUM: CALL GETNM ;CONVERT NUMBER
6618 7B 570 MOV A,E ; GET VALUE
6619 B7 571 ORA A
661A F0 572 RP ;RETURN IF POSITIVE
661B 1E00 573 MVI E,0 ; ELSE SET TO ZERO
661D C9 574 RET
575 ;
576 ; JUMP TO LABEL NAME
577 ; ENTER: HLSAV = EXPRESSION FIELD
578 ; RETURNS: HL RESET OR MESSAGE
579 ;
661E 2A1A61 580 JOP: LHLD HLSAV ;ADDR EXPRESSION
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 15
LOC OBJ SEQ SOURCE STATEMENT
6621 CD7F67 581 CALL GETCH ;GET FIRST CHAR
6624 FE2A 582 CPI '*' ;IF *
6626 CA3A66 583 JZ JOP2 ; THEN MOVE WORD
6629 3E2A 584 MVI A,'*'
662B 328B62 585 STA WORD ;ELSE ADD *
662E 118C62 586 LXI D,WORD+1 ; THEN MOVE WORD
6631 2A1A61 587 LHLD HLSAV
6634 CDA767 588 CALL WDTFR
6637 C33D66 589 JMP JOP2+3 ;AND CONTINUE
663A CD8F67 590 JOP2: CALL GETWD ;GET NEXT WORD
663D 2A4261 591 LHLD SCANB ; START OF SCAN AREA
6640 CDF066 592 CALL LOOKL ;LOOK FOR IT
6643 FE01 593 CPI 1 ;IF LABEL NOT FOUND
6645 CC4E66 594 CZ NTFND ; THEN COMPLAIN
6648 C8 595 RZ ; AND RETURN
6649 23 596 INX H
664A 223A61 597 SHLD IPTR ;NEW SCAN POSITION
664D C9 598 RET ;RESTART SCAN
599 ;
600 ;
664E 218B62 601 NTFND: LXI H,WORD ; SHOW THE LABEL
6651 CD9C6D 602 CALL DSPLY
6654 21366E 603 LXI H,BLMSG
6657 CD316E 604 CALL ERROR
665A C9 605 RET
606 ;
665B CD666C 607 UOP: CALL SAVRET ;SAVE RETURN POINTER
665E C31E66 608 JMP JOP
609 ;
610 ; SET A BLOCK OF LENGTH C TO CHAR B
611 ;
6661 70 612 BLKSET: MOV M,B ; STORE ONE CHAR
6662 23 613 INX H ;BUMP ADDR
6663 79 614 MOV A,C ; DECR COUNT
6664 D601 615 SUI 1
6666 4F 616 MOV C,A ; IF COUNT NOT ZERO
6667 C26166 617 JNZ BLKSET ; THEN STORE ANOTHER
666A C9 618 RET
619 ;
620 ; BLANK THE INPUT BUFFER
621 ;
666B 2A3461 622 BLKBF: LHLD APTR ;DE=TOP OF BUFFER
666E EB 623 XCHG
666F 210070 624 LXI H,PBUFF ;HL=BOTTOM OF BUFFER
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 16
LOC OBJ SEQ SOURCE STATEMENT
6672 0620 625 MVI B,' '
6674 70 626 BLKB2: MOV M,B
6675 23 627 INX H
6676 CD7D66 628 CALL ADRCMP
6679 C27466 629 JNZ BLKB2
667C C9 630 RET
631 ;
632 ; ADDRESS COMPARISON - COMPARES HL + DE
633 ; RETURNS: ZERO AND SIGN FLAGS SET AS THOUGH
634 ; A CONTAINED HL AND DE WAS COMPARED
635 ; CALLED BY BLKBF
636 ;
667D 7C 637 ADRCMP: MOV A,H ; GET H
667E BA 638 CMP D ;COMPARE D
667F F8 639 RM ;IF D > H THEN RETURN
6680 C0 640 RNZ ;IF D NOT = H THEN RETURN
6681 7D 641 MOV A,L ; GET L
6682 BB 642 CMP E ;COMPARE E
6683 C9 643 RET ; AND RETURN
644 ;
645 ; CHARACTER TO BINARY CONVERSION
646 ; GET A DECIMAL NUMBER-- UP TO 99
647 ; ENTER: HL= CHAR ADDR OF ONE OR TWO DIGIT NUMBER
648 ; RETURNS: BINARY NUMBER IN E
649 ; IF INPUT NOT NUMERIC, THEN E = 0
650 ;
6684 1E00 651 GETNM: MVI E,0 ; INIT. OUTPUT VALUE
6686 23 652 INX H ;LOOK AT NEXT CHAR
6687 CD0C68 653 CALL BRCHAR ;IF BREAK CHAR
668A CAB466 654 JZ SDIG ; THEN SINGLE DIGIT
668D FE2B 655 CPI '+'
668F CAB466 656 JZ SDIG
6692 FE2D 657 CPI '-'
6694 CAB466 658 JZ SDIG
6697 2B 659 DCX H ;ELSE BACK UP
6698 7E 660 MOV A,M ; GET FIRST CHAR
6699 FE30 661 CPI '0' ;LIMIT RANGE
669B F8 662 RM ; TO NUMERALS
669C FE3A 663 CPI '9'+1
669E F0 664 RP
669F D630 665 SUI '0' ;REMOVE ASCII BIAS
66A1 87 666 ADD A ;MULT. BY 10
66A2 5F 667 MOV E,A ; E=A*2
66A3 87 668 ADD A ; A*4
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 17
LOC OBJ SEQ SOURCE STATEMENT
66A4 87 669 ADD A ; A*8
66A5 83 670 ADD E ; A+E=A*10
66A6 5F 671 MOV E,A ; SAVE IT
66A7 23 672 INX H ;HL=HL+1
66A8 7E 673 UNITS: MOV A,M ; GET SECOND CHAR
66A9 FE30 674 CPI '0' ;LIMIT RANGE
66AB F8 675 RM ; TO NUMERALS
66AC FE3A 676 CPI '9'+1
66AE F0 677 RP
66AF D630 678 SUI '0' ;REMOVE ASCII BIAS
66B1 83 679 ADD E ;ADD NEW DIGIT
66B2 5F 680 MOV E,A ; TO E
66B3 C9 681 RET
66B4 2B 682 SDIG: DCX H ;BACK UP POINTER
66B5 C3A866 683 JMP UNITS ;CONVERT UNITS POSITION
684 ;
685 ; BINARY TO CHARACTER CONVERSION
686 ; PUT BINARY NUMBER IN DECIMAL CHARS -99 TO +99
687 ; ENTER: BINARY NUMBER IN E
688 ; HL = CHARACTER AREA
689 ; RETURNS: HL = ADDR OF 0DH AFTER RIGHT DIGIT
690 ;
66B8 0E00 691 PUTNM: MVI C,0 ; INITIALIZE C
66BA 7B 692 MOV A,E ; GET BINARY NUMBER
66BB B7 693 ORA A ; IF NEGATIVE
66BC FCE166 694 CM NEG ; THEN SHOW MINUS SIGN
66BF FE0A 695 CPI 10 ;IF < 10
66C1 FACE66 696 JM FRMCH ; THEN FORM CHAR
66C4 D60A 697 SUI 10 ; ELSE SUBTR 10
66C6 5F 698 MOV E,A ; SAVE IN E
66C7 79 699 MOV A,C ; INCR TENS COUNT
66C8 C601 700 ADI 1
66CA 4F 701 MOV C,A
66CB C3BA66 702 JMP PUTNM+2 ; AND LOOP
66CE 79 703 FRMCH: MOV A,C ; GET TENS COUNT
66CF C630 704 ADI '0' ;ADD ASCII BIAS
66D1 FE30 705 CPI '0' ;IF CHAR IS 0
66D3 CAD866 706 JZ FRMU ; THEN FORM UNITS
66D6 77 707 MOV M,A ; STORE THE CHAR
66D7 23 708 INX H ;BUMP CHAR ADDR
66D8 7B 709 FRMU: MOV A,E ; GET THE UNITS
66D9 C630 710 ADI '0' ;ADD ASCII BIAS
66DB 77 711 MOV M,A ; STORE THE CHAR
66DC 23 712 INX H ;BUMP POINTER
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 18
LOC OBJ SEQ SOURCE STATEMENT
66DD 3E0D 713 MVI A,0DH ; STORE EOL
66DF 77 714 MOV M,A
66E0 C9 715 RET
716 ;
66E1 3E2D 717 NEG: MVI A,'-' ; STORE MINUS SIGN
66E3 77 718 MOV M,A
66E4 23 719 INX H ;BUMP CHAR ADDRESS
66E5 AF 720 XRA A ; MAKE BINARY POSITIVE
66E6 93 721 SUB E
66E7 5F 722 MOV E,A ; SAVE IN E
66E8 C9 723 RET
724 ;
725 ; LOOK FOR *LABEL OR $NAME OF STRING VARIABLE
726 ; (LOOKL OR LOOKS)
727 ; ENTER: 'WORD'=LABEL TO BE FOUND, HL=SCAN ADDR
728 ; RETURNS: HL = ADDR OF BLANK AFTER LABEL
729 ; IF LABEL NOT FOUND THEN A = 01
730 ;
66E9 AF 731 LOOKS: XRA A ;SET TEMP FOR NO SKIPS
66EA 324961 732 STA TEMP
66ED C3F766 733 JMP LOOK
66F0 B4 734 LOOKL: ORA H ;SET TEMP ON FOR SKIPS
66F1 324961 735 STA TEMP
66F4 CD5664 736 CALL SKLN ;SKIP ANY LINE NOS.
66F7 CD7F67 737 LOOK: CALL GETCH ;NEXT CHAR
66FA FE01 738 CPI 1 ;IF DATA END
66FC C8 739 RZ ; THEN RETURN
66FD FE2A 740 CPI '*' ;IF *
66FF CA1567 741 JZ CHK ; THEN CHECK THE LABEL
6702 FE24 742 CPI '$' ;IF $
6704 CA1567 743 JZ CHK ; THEN CHECK STRING NAME
6707 CDF067 744 CALL CNTLN ;ELSE GO TO NEXT LINE
670A 23 745 INX H
670B 3A4961 746 LDA TEMP ;IF TEMP=0
670E B7 747 ORA A
670F CAF766 748 JZ LOOK ; THEN NO SKIPS
6712 C3F466 749 JMP LOOK-3 ;ELSE SKIP LN NOS.
6715 221A61 750 CHK: SHLD HLSAV ;SAVE POINTER
6718 CD9967 751 CALL CNTWD ;C = WORD LENGTH
671B 79 752 MOV A,C
671C FE0D 753 CPI 13 ;LIMIT TO 12 CHARS
671E FA2367 754 JM MVLAB
6721 0E0C 755 MVI C,12
6723 2A1A61 756 MVLAB: LHLD HLSAV ;RETRIEVE POINTER
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 19
LOC OBJ SEQ SOURCE STATEMENT
6726 113F62 757 LXI D,LABSAV ; DESTIN ADDR
6729 CDA76C 758 CALL BLKTFR ;MOV A,BSAV=LABEL
672C EB 759 XCHG ;HL:DESTIN BR CHAR+1
672D 2B 760 DCX H ; DESTIN BR CHAR
672E 3E0D 761 MVI A,0DH ; REPLACE WITH 0DH
6730 77 762 MOV M,A
6731 213F62 763 LXI H,LABSAV
6734 118B62 764 LXI D,WORD ; WORD ADDR
6737 CD4E67 765 CALL CMPR ;COMPARE THEM
673A B7 766 ORA A ; LOOK AT A REGISTER
673B C24767 767 JNZ LFND ;IF MATCH THEN LABEL FOUND
673E 2A1A61 768 LHLD HLSAV ;ELSE RETRIEVE POINTER
6741 CD9967 769 CALL CNTWD ;SKIP LABEL
6744 C3F766 770 JMP LOOK ; AND CONTINUE
6747 2A1A61 771 LFND: LHLD HLSAV ;RETRIEVE POINTER
674A CD9967 772 CALL CNTWD ;SKIP LABEL
674D C9 773 RET ; AND RETURN
774 ;
775 ; COMPARE STRINGS X AND Y
776 ; ENTER: HL= X ITEM ADDR, DE= Y ITEM ADDR
777 ; BOTH ITEMS TERMINATE IN 0DH
778 ; RETURNS: A=0 FOR NO MATCH,
779 ; HL AND DE AT 0DH ADDRESS
780 ;
674E 7E 781 CMPR: MOV A,M ; GET X CHAR
674F FE0D 782 CPI 0DH ; IF END OF LINE
6751 CA6667 783 JZ XEND ; THEN END OF X ITEM
6754 4F 784 MOV C,A ; SAVE X CHAR IN C
6755 23 785 INX H ;ADDR Y ITEM
6756 EB 786 XCHG
6757 7E 787 MOV A,M ; GET Y CHAR
6758 FE0D 788 CPI 0DH ; IF END OF LINE
675A CA7667 789 JZ YENDB ; THEN END OF Y ITEM
675D B9 790 CMP C ;IF A(Y) NOT= C(X)
675E C27367 791 JNZ NOMCH ;THEN NO MATCH
6761 23 792 INX H ;ADDR NEXT X ITEM
6762 EB 793 XCHG
6763 C34E67 794 JMP CMPR ;START OVER
6766 EB 795 XEND: XCHG ;ADDR Y ITEM
6767 7E 796 MOV A,M ; GET Y CHAR
6768 FE0D 797 CPI 0DH ; IF END OF LINE
676A CA7C67 798 JZ MCH ; THEN MATCH FOUND
676D CD9967 799 CALL CNTWD ;ADDR Y BR CHAR
6770 EB 800 XCHG ;SET DE
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 20
LOC OBJ SEQ SOURCE STATEMENT
6771 AF 801 XRA A ; NOMATCH
6772 C9 802 RET
6773 CD9967 803 NOMCH: CALL CNTWD ;ADDR Y BR CHAR
6776 EB 804 YENDB: XCHG ; SET DE
6777 CD9967 805 CALL CNTWD ;ADDR X BR CHAR
677A AF 806 XRA A ; NO MATCH
677B C9 807 RET
677C EB 808 MCH: XCHG ;SET DE & HL
677D B4 809 ORA H ; MATCH
677E C9 810 RET
811 ;
812 ; GET CHARACTER-- SKIPS LEADING BLANKS
813 ; ENTER: HL=SOURCE ADDR
814 ; RETURNS: HL=NEXT NON-BLANK ADDR, A=CHAR
815 ;
677F 7E 816 GETCH: MOV A,M ; GET CHARACTER
6780 FE20 817 CPI 20H ;IF NOT BLANK
6782 C0 818 RNZ ; THEN RETURN
6783 23 819 INX H ; ELSE GET NEXT CHAR
6784 C37F67 820 JMP GETCH
821 ;
822 ; GET LAST CHAR - SCANS BACKWARD, SKIPS BLANKS AND CR'S
823 ; ENTER: HL = STRING ADDR
824 ; RETURNS: HL = LAST NON-BLANK CHAR, A = CHAR
825 ;
6787 7E 826 GETLCH: MOV A,M ; GET CHARACTER
6788 FE20 827 CPI 20H ;IF NOT BLANK
678A C0 828 RNZ ; THEN RETURN
678B 2B 829 DCX H ;ELSE GET NEXT CHAR
678C C38767 830 JMP GETLCH
831 ;
832 ; GET WORD -- UP TO FIRST BREAK CHARACTER
833 ; IGNORES LEADING BLANKS
834 ; ENTER: HL=SOURCE ADDR
835 ; RETURNS: 'WORD'=SOURCE STRING + 0DH
836 ; HL= BR CHAR+1 ADDR, B= BR CHAR
837 ; DE= 'WORD' ADDR AFTER 0DH
838 ; C = NO OF CHARS MOVED INCL BR CHAR
839 ;
678F CD7F67 840 GETWD: CALL GETCH ;IGNORE LEADING BLANKS
6792 118B62 841 LXI D,WORD ; DESTIN ADDR
6795 CDA767 842 CALL WDTFR ;MOVE IT
6798 C9 843 RET
844 ;
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 21
LOC OBJ SEQ SOURCE STATEMENT
845 ; COUNT WORD
846 ; ENTER: HL=SOURCE ADDR
847 ; RETURNS: HL=BR CHAR ADDR
848 ; A,B=BR CHAR, C=COUNT INCL BR CHAR
849 ;
6799 0E01 850 CNTWD: MVI C,1 ; COUNT=1
679B CD0C68 851 CALL BRCHAR ;IF CHAR=BREAK
679E C8 852 RZ ; C=CHAR COUNT
679F 79 853 MOV A,C ; GET COUNT
67A0 C601 854 ADI 1 ;C=C+1
67A2 4F 855 MOV C,A ; STORE IT
67A3 23 856 INX H ;HL=NEXT
67A4 C39B67 857 JMP CNTWD+2 ;NEXT CHAR
858 ;
859 ; WORD TRANSFER
860 ; MOVES STRING FROM HL TO DE + 0DH ADDED
861 ; ENTER: HL= SOURCE ADDR, DE= DESTIN ADDR
862 ; RETURNS: HL= SOURCE ADDR AFTER BR CHAR
863 ; DE= DESTIN ADDR AFTER 0DH
864 ; B= BR CHAR
865 ; C= NO OF CHARS MOVED INCL BR CHAR
866 ;
67A7 0E01 867 WDTFR: MVI C,1 ; INIT COUNT
67A9 CD0C68 868 CALL BRCHAR ;IF BREAK CHAR
67AC CABB67 869 JZ MVBR ; THEN END OF SOURCE
67AF 23 870 INX H ;HL= DESTIN ADDR
67B0 EB 871 XCHG
67B1 70 872 MOV M,B ; MOVE CHARACTER
67B2 79 873 MOV A,C ; INCR COUNT
67B3 C601 874 ADI 1
67B5 4F 875 MOV C,A
67B6 23 876 INX H ;HL= NEXT SOURCE ADDR
67B7 EB 877 XCHG
67B8 C3A967 878 JMP WDTFR+2
67BB 23 879 MVBR: INX H ;HL= DESTIN BR CHAR ADDR
67BC EB 880 XCHG
67BD 3E0D 881 MVI A,0DH ; REPLACE WITH 0DH
67BF 77 882 MOV M,A
67C0 23 883 INX H ;HL= SOURCE BR CHAR ADDR+1
67C1 EB 884 XCHG
67C2 AF 885 XRA A ; SET RETURN FLAG
67C3 C9 886 RET
887 ;
888 ; GET CONTROL WORD IN 'WORD'
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 22
LOC OBJ SEQ SOURCE STATEMENT
889 ; REPLACES FINAL Y OR N WITH 0DH
890 ; ENTER: HL = SOURCE ADDR
891 ;
67C4 118B62 892 GETCTL: LXI D,WORD ; DESTIN ADDR
67C7 CDA767 893 CALL WDTFR ;MOVE WORD
67CA 79 894 MOV A,C ; GET COUNT
67CB FE03 895 CPI 3 ;IF < 3 CHARS MOVED
67CD F8 896 RM ; THEN RETURN
67CE 62 897 MOV H,D ; ADDR WORD
67CF 6B 898 MOV L,E
67D0 2B 899 DCX H ;AVOID COLON
67D1 2B 900 DCX H
67D2 CD8767 901 CALL GETLCH ;GET LAST CHAR
67D5 FE59 902 CPI 'Y' ;IF Y
67D7 CADD67 903 JZ YNOUT ; THEN REMOVE IT
67DA FE4E 904 CPI 'N' ;IF NOT N
67DC C0 905 RNZ ; THEN RETURN
67DD 3E0D 906 YNOUT: MVI A,0DH ; REPLACE Y OR N
67DF 77 907 MOV M,A ; WITH 0DH
67E0 C9 908 RET
909 ;
910 ; SAVE OP CODE THROUGH COLON IN LASTOP
911 ;
67E1 063A 912 SAVOP: MVI B,':'
67E3 CD8A68 913 CALL INDX ;COUNT CHARS TO COLON
67E6 2A2261 914 LHLD LLSAV ;ADDR OP CODE
67E9 114B62 915 LXI D,LASTOP
67EC CDA76C 916 CALL BLKTFR ;MOVE CHAR STRING
67EF C9 917 RET
918 ;
919 ; COUNT LINE
920 ; ENTER: HL=SOURCE ADDR
921 ; RETURNS: C=CHAR COUNT INCL 0DH OR 01
922 ; HL=BREAK POS., A=BR CHAR
923 ;
67F0 0E01 924 CNTLN: MVI C,1 ; COUNT=1
67F2 7E 925 MOV A,M ; GET CHARACTER
67F3 FE0D 926 CPI 0DH ; IF 0DH
67F5 C8 927 RZ ; C=CHAR COUNT
67F6 FE01 928 CPI 1 ;IF 01
67F8 C8 929 RZ ; C=CHAR COUNT
67F9 79 930 MOV A,C ; GET COUNT
67FA C601 931 ADI 1 ;C=C+1
67FC 4F 932 MOV C,A ; STORE IT
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 23
LOC OBJ SEQ SOURCE STATEMENT
67FD 23 933 INX H ;HL=NEXT
67FE C3F267 934 JMP CNTLN+2 ;NEXT CHAR
935 ;
936 ; BACKUP-- DECREMENTS HL BY VALUE OF C-1
937 ; ENTER: HL START VALUE, C=COUNT
938 ; RETURNS: NEW HL VALUE
939 ;
6801 79 940 BACKUP: MOV A,C ; GET COUNT
6802 FE01 941 CPI 1 ;IF COUNT=1
6804 C8 942 RZ ; THEN RETURN
6805 D601 943 SUI 1 ;C=C-1
6807 4F 944 MOV C,A ; STORE C
6808 2B 945 DCX H ;HL=HL-1
6809 C30168 946 JMP BACKUP
947 ;
948 ; BREAK CHARACTER SEARCH
949 ; ENTER: HL=CHAR ADDR
950 ; RETURNS: A, B = CHARACTER
951 ; IF BR CHAR THEN Z FLAG TRUE
952 ;
680C 7E 953 BRCHAR: MOV A,M ; GET CHAR
680D 47 954 MOV B,A ; AND SAVE IT
680E FE20 955 CPI ' ' ;CHECK FOR VARIOUS
6810 C8 956 RZ ;BREAK CHARACTERS
6811 FE0D 957 CPI 0DH ; END OF LINE
6813 C8 958 RZ
6814 FE2C 959 CPI ','
6816 C8 960 RZ
6817 FE3B 961 CPI ';'
6819 C8 962 RZ
681A FE3A 963 CPI ':'
681C C8 964 RZ
681D FE2E 965 CPI '.'
681F C8 966 RZ
6820 FE3F 967 CPI '?'
6822 C8 968 RZ
6823 FE21 969 CPI 21H ;EXCLAMATION
6825 C8 970 RZ
6826 FE22 971 CPI '"' ;DOUBLE QUOTE
6828 C8 972 RZ
6829 FE28 973 CPI '(' ;L PARENS
682B C8 974 RZ
682C FE29 975 CPI ')' ;R PARENS
682E C8 976 RZ
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 24
LOC OBJ SEQ SOURCE STATEMENT
682F FE27 977 CPI 27H ;APOSTROPHE
6831 C8 978 RZ
6832 FE01 979 CPI 1 ;END OF LIST
6834 C9 980 RET ;BR CHAR NOT FOUND
981 ;
982 ; INDEX - FIND CHAR POSITION OF MATCHED STRING
983 ; ENTER: HLSAV = STRING ADDR, HLLSAVE = SUBSTR ADDR
984 ; RETURNS: C = CHAR POS OF MATCH, IF NOMATCH, C=0
985 ; HLSAV = STRING ADDR OF FIRST MATCHED CHAR
986 ; EPTR = ADDR OF NEXT CHAR AFTER MATCH
987 ;
6835 AF 988 INDEX: XRA A
6836 324861 989 STA SCNT ;INIT STRING COUNT
6839 2A1A61 990 INDE2: LHLD HLSAV ;ADDR STRING
683C EB 991 XCHG ;DE = STRING ADDR
683D 2A1C61 992 LHLD HLLSAV ;ADDR SUBSTRING
6840 46 993 MOV B,M ;FIRST SUBSTR CHAR IN B
6841 23 994 INX H ;ADDR STRING
6842 EB 995 XCHG
6843 CD8A68 996 CALL INDX ;LOOK FOR FIRST CHAR
6846 79 997 MOV A,C
6847 B7 998 ORA A ; IF NOT FOUND
6848 C8 999 RZ ; THEN RETURN
6849 221A61 1000 SHLD HLSAV ; ELSE SAVE POINTER
684C 3A4861 1001 LDA SCNT ;GET OLD STRING COUNT
684F 81 1002 ADD C ;ADD NEW COUNT
6850 324861 1003 STA SCNT ; IN SCNT
6853 2A1C61 1004 LHLD HLLSAV ;ADDR SUBSTR
6856 CDF067 1005 CALL CNTLN ;COUNT SUBSTR CHARS
6859 79 1006 MOV A,C ; REDUCE COUNT TO
685A D601 1007 SUI 1 ; ALPHA CHARS
685C 4F 1008 MOV C,A
685D 118B62 1009 LXI D,WORD ; MOVE SAME NUMBER OF
6860 2A1A61 1010 LHLD HLSAV ; CHARS FROM STRING
6863 CDA76C 1011 CALL BLKTFR ; TO 'WORD'
6866 223661 1012 SHLD EPTR ;SAVE NEXT CHAR ADDR
6869 EB 1013 XCHG ;ADDR END OF 'WORD'
686A 3E0D 1014 MVI A,0DH ; TERMINATE WITH 0DH
686C 77 1015 MOV M,A
686D 2A1C61 1016 LHLD HLLSAV ;ADDR SUBSTR
6870 EB 1017 XCHG ;DE = SUBSTR ADDR
6871 218B62 1018 LXI H,WORD ; ADDR PORTION OF STRING
6874 CD4E67 1019 CALL CMPR ;COMPARE THEM
6877 B7 1020 ORA A ; IF FOUND
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 25
LOC OBJ SEQ SOURCE STATEMENT
6878 C28568 1021 JNZ SETCNT ; THEN SET POSITION COUNT
687B 2A1A61 1022 LHLD HLSAV ; ELSE GET STRING POINTER
687E 23 1023 INX H ; BUMP IT
687F 221A61 1024 SHLD HLSAV ; SAVE IT
6882 C33968 1025 JMP INDE2 ; AND TRY AGAIN
6885 214861 1026 SETCNT: LXI H,SCNT ; PUT STRING COUNT IN C
6888 4E 1027 MOV C,M
6889 C9 1028 RET ; AND RETURN
1029 ;
1030 ; INDX - FIND CHARACTER POSITION OF SINGLE LETTER
1031 ; ENTER: HL = STRING ADDR, B= CHAR
1032 ; RETURNS: C = CHAR POS OF MATCH, IF NOMATCH, C=0
1033 ; HL = ADDR OF MATCHED CHAR OR EOL
1034 ;
688A 0E01 1035 INDX: MVI C,1 ; INIT C REGISTER
688C 7E 1036 MOV A,M ; GET CHAR
688D B8 1037 CMP B ;IF B-CHAR FOUND
688E C8 1038 RZ ; THEN RETURN
688F FE0D 1039 CPI 0DH ; IF END OF LINE
6891 CA9C68 1040 JZ ZC ; THEN ZERO COUNT
6894 79 1041 MOV A,C ; ELSE
6895 C601 1042 ADI 1 ; BUMP COUNT
6897 4F 1043 MOV C,A
6898 23 1044 INX H ; BUMP ADDR
6899 C38C68 1045 JMP INDX+2 ; GO TO NEXT
689C AF 1046 ZC: XRA A ; RETURN WITH
689D 4F 1047 MOV C,A ; C = 0
689E C9 1048 RET
1049 ;
1050 ; SINDX - SPECIAL INDEX FOR POSITION OF $ OR #
1051 ; ENTER: HL = STRING ADDRESS
1052 ; RETURNS: BA = $, #, OR 0DH; C = CHAR POS
1053 ; HL = ADDR OF MATCHED CHAR
1054 ;
689F 0E01 1055 SINDX: MVI C,1 ; INIT C REGISTER
68A1 7E 1056 MOV A,M ; GET CHAR
68A2 FE24 1057 CPI '$' ;IF $
68A4 C8 1058 RZ ; THEN RETURN
68A5 FE23 1059 CPI 043O ;IF #
68A7 C8 1060 RZ ; THEN RETURN
68A8 FE0D 1061 CPI 0DH ; IF EOL
68AA C8 1062 RZ ; THEN RETURN
68AB 79 1063 MOV A,C ; ELSE
68AC C601 1064 ADI 1 ;BUMP COUNT
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 26
LOC OBJ SEQ SOURCE STATEMENT
68AE 4F 1065 MOV C,A
68AF 23 1066 INX H ;BUMP ADDR
68B0 C3A168 1067 JMP SINDX+2 ;GO TO NEXT
1068 ;
1069 ; LETTER TESTS WHETHER CHARACTER IS UPCASE A-Z
1070 ; ENTER: HL = ADDR OF CHAR
1071 ; RETURNS: ZERO FLAG TRUE IF IT IS
1072 ; B = CHARACTER
1073 ;
68B3 7E 1074 LETTER: MOV A,M ; GET CHAR
68B4 46 1075 MOV B,M ; SAVE IN B
68B5 FE41 1076 CPI 41H ;CHECK RANGE
68B7 FAC168 1077 JM NOTL ;TOO LOW?
68BA FE5A 1078 CPI 5AH
68BC F2C168 1079 JP NOTL ;TOO HIGH?
68BF AF 1080 XRA A ; ELSE RESET ZERO FLAG
68C0 C9 1081 RET ; AND RETURN IF LETTER
68C1 B4 1082 NOTL: ORA H ; RETURN IF NOT LETTER
68C2 C9 1083 RET
1084 ;
1085 ; SETUP GETS CHAR COUNT AND SETS ADDR FOR TEXT MOVES
1086 ;
68C3 CDF067 1087 SETUP: CALL CNTLN ;C=CHAR COUNT
68C6 41 1088 MOV B,C ; SAVE COUNT
68C7 CD0168 1089 CALL BACKUP ;RESET HL
68CA 48 1090 MOV C,B ; RESET COUNT
68CB C9 1091 RET
1092 ;
1093 ; T OPERATION--DISPLAY 'T' STATEMENT
1094 ; ENTER: HLSAV= FIRST CHAR OF T EXPRESSION FIELD
1095 ;
68CC 2A1A61 1096 TOP: LHLD HLSAV ;RETRIEVE POINTER
68CF 223861 1097 SHLD CPTR ;SAVE CHAR POINTER
68D2 222261 1098 SHLD LLSAV ;SAVE FIRST CHAR ADDR
68D5 214C61 1099 LXI H,TSAVE ; DESTIN START ADDR
68D8 222061 1100 SHLD DESAV ;SAVE DESTIN ADDR
68DB EB 1101 XCHG ;AND KEEP IN DE
68DC 2A3861 1102 TMORE: LHLD CPTR ;GET CHAR POINTER
68DF CD9F68 1103 CALL SINDX ;LOOK FOR $ OR #
68E2 FE24 1104 CPI '$' ;IF $ FOUND
68E4 CAEF68 1105 JZ GETXT ; THEN GET LABELED TEXT
68E7 FE23 1106 CPI 043O ;IF # FOUND
68E9 CA0069 1107 JZ GETNUM ; THEN GET NUMBER
68EC C30669 1108 JMP TMOVE ;ELSE MOVE REST OF TEXT
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 27
LOC OBJ SEQ SOURCE STATEMENT
68EF CD6469 1109 GETXT: CALL INSERT ;INSERT TEXT
68F2 FE01 1110 CPI 1 ;IF FOUND (A NOT 01)
68F4 C2DC68 1111 JNZ TMORE ; THEN CONTINUE
68F7 114C61 1112 LXI D,TSAVE ; ELSE DISPLAY THE LINE
68FA 2A2261 1113 LHLD LLSAV
68FD C30D69 1114 JMP TALL
6900 CD1F69 1115 GETNUM: CALL INSNUM ;INSERT NUMBER
6903 C3F268 1116 JMP GETXT+3 ; AND SEE IF FOUND
6906 2A2061 1117 TMOVE: LHLD DESAV ;DESTIN ADDR
6909 EB 1118 XCHG
690A 2A3861 1119 LHLD CPTR ;ADDRESS INPUT
690D CDC368 1120 TALL: CALL SETUP ;C = CHAR COUNT
6910 CDA76C 1121 CALL BLKTFR ;MOVE T-TEXT
6913 3E0D 1122 MVI A,0DH ; TERMINATE
6915 EB 1123 XCHG
6916 77 1124 MOV M,A
6917 214C61 1125 LXI H,TSAVE ; ADDRESS TEXT
691A CD9C6D 1126 CALL DSPLY ;DISPLAY T STATEMENT
691D AF 1127 XRA A ; SET RETURN FLAG
691E C9 1128 RET
1129 ;
1130 ; INSERT NUMERIC VALUE INTO T-STATEMENT
1131 ; ENTER: C = POSITION OF '#'
1132 ; RETURNS: TSAVE CONTAINS ASSEMBLED T-TEXT
1133 ; IF LABEL NOT FOUND, THEN A = 01
1134 ;
691F 79 1135 INSNUM: MOV A,C ; GET POSITION OF #
6920 D601 1136 SUI 1 ;REDUCE COUNT BY 1
6922 CA3069 1137 JZ VBL ;IF 0 THEN GET VARIABLE
6925 4F 1138 MOV C,A
6926 2A2061 1139 LHLD DESAV ;DESTIN ADDR
6929 EB 1140 XCHG
692A 2A3861 1141 LHLD CPTR ;GET CHAR POINTER
692D CDA76C 1142 CALL BLKTFR ;MOVE FRONT OF TEXT
6930 44 1143 VBL: MOV B,H
6931 4D 1144 MOV C,L
6932 EB 1145 XCHG
6933 222061 1146 SHLD DESAV ;SAVE DESTIN POINTER
6936 60 1147 MOV H,B ; GET CHAR POINTER
6937 69 1148 MOV L,C
6938 23 1149 INX H ;BUMP TO VAR NAME
6939 4E 1150 MOV C,M ; SAVE NAME IN C
693A 23 1151 INX H ;BUMP ADDR
693B 223861 1152 SHLD CPTR ;SAVE CHAR POINTER
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 28
LOC OBJ SEQ SOURCE STATEMENT
693E 41 1153 MOV B,C ; PUT VAR NAME IN B
693F CDB464 1154 CALL VARMCH ;LOOK UP VAR NAME
6942 FE01 1155 CPI 1 ;IF NOT FOUND (A = 01)
6944 C8 1156 RZ ; THEN RETURN
6945 23 1157 INX H ;ELSE POINT AT VALUE
6946 5E 1158 MOV E,M ; GET VALUE IN E
6947 218B62 1159 LXI H,WORD ; PUT DIGITS IN WORD
694A CDB866 1160 CALL PUTNM
694D 2A2061 1161 LHLD DESAV ;DESTIN ADDR
6950 EB 1162 XCHG
6951 218B62 1163 LXI H,WORD ; DIGIT CHAR ADDR
6954 CDC368 1164 CALL SETUP ;C = CHAR COUNT+1
6957 79 1165 MOV A,C
6958 D601 1166 SUI 1
695A 4F 1167 MOV C,A ; C = CHAR COUNT
695B CDA76C 1168 CALL BLKTFR ;MOVE DIGITS
695E EB 1169 XCHG
695F 222061 1170 SHLD DESAV ;SAVE DESTIN ADDR
6962 AF 1171 XRA A ; SET RETURN FLAG
6963 C9 1172 RET
1173 ;
1174 ; INSERT LABELED TEXT INTO T-STATEMENT
1175 ; ENTER: C = POSITION OF '$'
1176 ; RETURNS: TSAVE CONTAINS ASSEMBLED T-TEXT
1177 ; IF LABEL NOT FOUND, THEN A = 01
1178 ;
6964 79 1179 INSERT: MOV A,C ; GET POSITION COUNT
6965 D601 1180 SUI 1 ;REDUCE COUNT BY 1
6967 CA7569 1181 JZ LBL ;IF 0 THEN POINT TO LABEL
696A 4F 1182 MOV C,A
696B 2A2061 1183 LHLD DESAV ;DESTIN ADDR
696E EB 1184 XCHG
696F 2A3861 1185 LHLD CPTR ;GET CHAR POINTER
6972 CDA76C 1186 CALL BLKTFR ;MOVE FRONT OF TEXT
6975 44 1187 LBL: MOV B,H ; SAVE CHAR POINTER IN BC
6976 4D 1188 MOV C,L
6977 EB 1189 XCHG
6978 222061 1190 SHLD DESAV ;SAVE DESTIN POINTER
697B 60 1191 MOV H,B ; GET CHAR POINTER
697C 69 1192 MOV L,C
697D CD8F67 1193 CALL GETWD ;GET LABEL
6980 2B 1194 DCX H ;ADDR BR CHAR
6981 223861 1195 SHLD CPTR ;SAVE CHAR POINTER
6984 2A3461 1196 LHLD APTR ;HL = START OF LIST
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 29
LOC OBJ SEQ SOURCE STATEMENT
6987 23 1197 INX H
6988 CDE966 1198 CALL LOOKS ;LOOK FOR STRING NAME
698B FE01 1199 CPI 1 ;IF NOT FOUND (A = 01)
698D C8 1200 RZ ; THEN RETURN
698E CD9269 1201 CALL GETA ; ELSE GET A-TEXT
6991 C9 1202 RET
1203 ;
1204 ; GET A-TEXT POINTED TO BY MATCHED LABEL
1205 ; ENTER: HL = BLANK AFTER MATCHED LABEL
1206 ; DESAV = DESTIN ADDRESS
1207 ; RETURNS: A-TEXT MOVED TO DESTINATION
1208 ; DESAV = NEXT DESTIN ADDRESS
1209 ;
6992 23 1210 GETA: INX H ;ADDR FIRST A-CHAR
6993 44 1211 MOV B,H ; BC = A-TEXT ADDR
6994 4D 1212 MOV C,L
6995 2A2061 1213 LHLD DESAV ;DESTIN ADDR
6998 EB 1214 XCHG
6999 60 1215 MOV H,B ; HL = A-TEXT ADDR
699A 69 1216 MOV L,C
699B CDC368 1217 CALL SETUP ;C = CHAR COUNT
699E 79 1218 MOV A,C ; REDUCE COUNT TO
699F D601 1219 SUI 1 ; EXCLUDE MOVE OF 0DH
69A1 4F 1220 MOV C,A
69A2 CDA76C 1221 CALL BLKTFR ;MOVE A-TEXT
69A5 EB 1222 XCHG
69A6 222061 1223 SHLD DESAV ;SAVE DESTIN POINTER
69A9 AF 1224 XRA A ; SET RETURN FLAG
69AA C9 1225 RET
1226 ;
1227 ; A OPERATION-- ACCEPT INPUT
1228 ; ENTER: HLSAV = ADDR AFTER COLON
1229 ; RETURNS: INPUT IN EBUFF
1230 ; 'CTL Z' ALLOWS SINGLE STATEMENT EXECUTION OR QUIT
1231 ;
69AB 2A1A61 1232 AOP: LHLD HLSAV ;ADDR EXPRESSION
69AE CD7F67 1233 CALL GETCH ;GET FIRST CHAR
69B1 FE24 1234 CPI '$' ;IF NOT $
69B3 C2C369 1235 JNZ NIN ; THEN LOOK FOR #
69B6 113F62 1236 LXI D,LABSAV ; ELSE ADDR DESTIN
69B9 CDA767 1237 CALL WDTFR ; SAVE THE LABEL
69BC CDDB69 1238 CALL ENTRY ;GET THE ENTRY
69BF CD066A 1239 CALL ASTORE ; STORE IT
69C2 C9 1240 RET ; THEN EXIT
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 30
LOC OBJ SEQ SOURCE STATEMENT
69C3 FE23 1241 NIN: CPI 043O ;IF NOT #
69C5 C2D769 1242 JNZ CENT ; THEN CALL ENTRY
69C8 23 1243 INX H ;ELSE ADDR VARIABLE
69C9 7E 1244 MOV A,M ; GET THE NAME
69CA 324A61 1245 STA VARSAV ;AND SAVE IT
69CD CDDB69 1246 CALL ENTRY ;GET THE ENTRY
69D0 CDF269 1247 CALL CKNUM ;REQUIRE NUMERIC
69D3 CD586A 1248 CALL NSTORE ; STORE THE NUMBER
69D6 C9 1249 RET ;THEN EXIT
69D7 CDDB69 1250 CENT: CALL ENTRY
69DA C9 1251 RET
1252 ;
69DB CDB86C 1253 ENTRY: CALL KEYIN ;GET ONE LINE IN EBUFF
69DE 219D61 1254 LXI H,EBUFF ;IF ENTRY NOT CTL Z
69E1 7E 1255 MOV A,M
69E2 FE1A 1256 CPI 1AH
69E4 C0 1257 RNZ ;THEN RETURN
69E5 23 1258 INX H ;ELSE BUMP POINTER
69E6 7E 1259 MOV A,M ;GET CHAR
69E7 FE0D 1260 CPI 0DH ;IF CR
69E9 CA0F63 1261 JZ RSTRT ; THEN RESTART
69EC CDAA63 1262 CALL OPS ;ELSE DO IMMED OP
69EF C3DB69 1263 JMP ENTRY ; AND ACCEPT MORE INPUT
1264 ;
69F2 FE30 1265 CKNUM: CPI '0' ;CHECK FOR NUMBER
69F4 FAFA69 1266 JM NERR ;TOO LOW
69F7 FE3A 1267 CPI '9'+1
69F9 F8 1268 RM ;MUST BE NUMBER
69FA 219D6E 1269 NERR: LXI H,NMSG ;OUT OF RANGE
69FD CD316E 1270 CALL ERROR ;SEND MESSAGE
6A00 CDDB69 1271 CALL ENTRY ;TRY AGAIN
6A03 C3F269 1272 JMP CKNUM
1273 ;
1274 ; A ITEM STORE - STORAGE OF LABELED TEXT FROM ENTRY
1275 ; FROM TOP OF INPUT BUFFER AREA AND SETS POINTER
1276 ;
6A06 219D61 1277 ASTORE: LXI H,EBUFF ; SOURCE ADDR
6A09 CDF067 1278 CALL CNTLN ;C = CHAR COUNT
6A0C 41 1279 MOV B,C ; DUPL COUNT IN B
6A0D 2A3461 1280 LHLD APTR ;LAST A-ADDR
6A10 CD396A 1281 CALL DECA ;BACK UP DESTIN ADDRESS
6A13 79 1282 MOV A,C ; IF CHAR COUNT = 0
6A14 B7 1283 ORA A
6A15 C8 1284 RZ ; THEN RETURN
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 31
LOC OBJ SEQ SOURCE STATEMENT
6A16 219D61 1285 LXI H,EBUFF ; SOURCE ADDR
6A19 CDA76C 1286 CALL BLKTFR ;MOVE TEXT
6A1C 213F62 1287 LXI H,LABSAV ; ADDR LABEL
6A1F CDF067 1288 CALL CNTLN ;C = CHAR COUNT
6A22 41 1289 MOV B,C ; DUPL COUNT IN B
6A23 2A3461 1290 LHLD APTR ;GET A-POINTER
6A26 CD396A 1291 CALL DECA ;BACK UP ADDR
6A29 79 1292 MOV A,C ; IF CHAR COUNT = 0
6A2A B7 1293 ORA A
6A2B C8 1294 RZ ; THEN RETURN
6A2C 213F62 1295 LXI H,LABSAV ; SOURCE ADDR
6A2F CDA76C 1296 CALL BLKTFR ;MOVE THE LABEL
6A32 6B 1297 MOV L,E ; ADDR A-TEXT
6A33 62 1298 MOV H,D
6A34 2B 1299 DCX H ;BACK UP ONE CHAR
6A35 3E20 1300 MVI A,' ' ;AND SET
6A37 77 1301 MOV M,A ; BLANK THERE
6A38 C9 1302 RET
1303 ;
1304 ; DECREMENT ADDRESS FOR TEXT STORAGE
1305 ; ENTER: HL = LAST (LOWEST) ADDRESS USED (01)
1306 ; B & C = CHAR COUNT IN WORD TO BE MOVED
1307 ; RETURNS:DE = DESTIN ADDR, C = CHAR COUNT
1308 ; APTR POINTS AT STOP(01) BELOW LIST
1309 ;
6A39 5D 1310 DECA: MOV E,L ;DESTIN ADDR IN DE
6A3A 54 1311 MOV D,H
6A3B 2B 1312 DCX H ;DECR POINTER
6A3C 7E 1313 MOV A,M ; GET CHARACTER
6A3D FE01 1314 CPI 1 ;IF 01 (END OF SPACE)
6A3F CA4F6A 1315 JZ STOVF ; THEN STORAGE OVERFLOW
6A42 78 1316 MOV A,B ; DECR COUNT
6A43 D601 1317 SUI 1
6A45 47 1318 MOV B,A
6A46 C2396A 1319 JNZ DECA ;BACK UP AGAIN?
6A49 223461 1320 SHLD APTR ;SAVE A-POINTER
6A4C 3601 1321 MVI M,1 ;SET STOP
6A4E C9 1322 RET
1323 ;
6A4F 21526E 1324 STOVF: LXI H,NRMSG ; COMPLAIN OF OVERFLOW
6A52 CD316E 1325 CALL ERROR
6A55 0E00 1326 MVI C,0 ; SET CHAR COUNT = 0
6A57 C9 1327 RET
1328 ;
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 32
LOC OBJ SEQ SOURCE STATEMENT
1329 ; NUMBER STORAGE - STORAGE OF NUMERIC VALUE FROM ENTRY
1330 ; AS VALUE OF VARIABLE NAME IN A-STATEMENT
1331 ;
6A58 219D61 1332 NSTORE: LXI H,EBUFF ; SOURCE ADDR
6A5B CD7F67 1333 CALL GETCH ;ADDR 1ST CHAR
6A5E CD8466 1334 CALL GETNM ;GET THE NUMBER
6A61 214A61 1335 LXI H,VARSAV ; GET THE NAME IN B
6A64 46 1336 MOV B,M
6A65 CDB464 1337 CALL VARMCH ;LOOK IT UP
6A68 FE01 1338 CPI 1 ;IF END MARKER
6A6A CCA764 1339 CZ BADFRM ;THEN COMPLAIN
6A6D C8 1340 RZ ; AND RETURN
6A6E 23 1341 INX H ; ELSE BUMP TO NEXT
6A6F 73 1342 MOV M,E
6A70 C9 1343 RET
1344 ;
1345 ; M OPERATION - MOVING WINDOW STRING MATCH
1346 ; COMPARE ITEMS IN LIST WITH LAST INPUT
1347 ; M-ITEMS HAVE MULTIPLE BLANKS REDUCED TO ONE
1348 ; INPUT HAS BLANK ADDED AT EACH END AND
1349 ; MULTIPLE BLANKS REDUCED TO ONE.
1350 ; ENTER: HLSAV = ADDR AFTER LAST COLON, INPUT IN EBUFF
1351 ; RETURNS: YNSW = 0 IF MATCH NOT FOUND WITH LAST ENTRY
1352 ;
6A71 214761 1353 MC: LXI H,MBRCH ;SET BR CHAR
6A74 365E 1354 MVI M,'^' ; TO CARET (SHIFT N)
6A76 C37E6A 1355 JMP MOP1
6A79 214761 1356 MOP: LXI H,MBRCH ;SET BR CHAR TO COMMA
6A7C 362C 1357 MVI M,','
6A7E 2A1A61 1358 MOP1: LHLD HLSAV ;ADDR EXPRESSION FIELD
6A81 223C61 1359 SHLD MPTR ;INIT M-POINTER
6A84 CDD36A 1360 NEXTM: CALL MMOV ;MSAVE = M-ITEM
6A87 2A3C61 1361 LHLD MPTR ;ADDR M-ITEM
6A8A 221A61 1362 SHLD HLSAV
6A8D CD2A6B 1363 CALL SQUEZ ;REDUCE MULTIPLE BLANKS
6A90 219D61 1364 LXI H,EBUFF
6A93 221A61 1365 SHLD HLSAV ;HLSAV = STRING ADDR
6A96 CDFC6A 1366 CALL PAD ;ADD BLANKS AT EACH END
6A99 CD2A6B 1367 CALL SQUEZ ;REDUCE MULTIPLE BLANKS
6A9C 219D61 1368 LXI H,EBUFF ; PUT EBUFF ADDR
6A9F 221A61 1369 SHLD HLSAV ; IN HLSAV
6AA2 21EE61 1370 LXI H,MSAVE ; PUT MSAVE ADDR
6AA5 221C61 1371 SHLD HLLSAV ; IN HLLSAV
6AA8 CD3568 1372 CALL INDEX ;LOOK FOR M-ITEM
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 33
LOC OBJ SEQ SOURCE STATEMENT
6AAB 79 1373 MOV A,C
6AAC B7 1374 ORA A ; IF ITEM FOUND
6AAD C4C96A 1375 CNZ SWY ; THEN SET SWITCH YES
6AB0 C0 1376 RNZ ; AND RETURN
6AB1 2A3C61 1377 LHLD MPTR ;RETRIEVE M-POINTER
6AB4 2B 1378 DCX H ;ADDR BR CHAR
6AB5 7E 1379 MOV A,M ; IF END OF LINE
6AB6 FE0D 1380 CPI 0DH
6AB8 CAC56A 1381 JZ MDONE ; THEN QUIT
6ABB 23 1382 INX H ;ADDR NEXT CHAR
6ABC 7E 1383 MOV A,M ; IF END OF LINE
6ABD FE0D 1384 CPI 0DH
6ABF CAC56A 1385 JZ MDONE ; THEN QUIT
6AC2 C3846A 1386 JMP NEXTM ;ELSE MORE M-ITEMS
6AC5 CDCE6A 1387 MDONE: CALL SWN ;SET SWITCH NO
6AC8 C9 1388 RET
1389 ;
6AC9 B4 1390 SWY: ORA H ; SET YN SWITCH YES
6ACA 324B61 1391 STA YNSW
6ACD C9 1392 RET
1393 ;
6ACE AF 1394 SWN: XRA A ; SET YN SWITCH NO
6ACF 324B61 1395 STA YNSW
6AD2 C9 1396 RET
1397 ;
1398 ; M-MOVE: MOVE M-ITEM TO MSAVE
1399 ; ITEMS ARE SEPARATED BY COMMA OR TERMINATED BY 0DH
1400 ; ENTER: MPTR = M-ITEM ADDRESS
1401 ; RETURNS: HL & MPTR = NEXT M-ITEM ADDR
1402 ; B = BR CHAR
1403 ;
6AD3 2A3C61 1404 MMOV: LHLD MPTR ;GET M-POINTER
6AD6 11EE61 1405 LXI D,MSAVE ; DESTIN ADDR
6AD9 CDF26A 1406 MMOV2: CALL MBR ;IF BR CHAR OR EOL
6ADC CAE76A 1407 JZ SMOV ; THEN STOP THE MOVE
6ADF 23 1408 INX H
6AE0 EB 1409 XCHG ;HL = DESTIN ADDR
6AE1 70 1410 MOV M,B ; MOVE CHAR
6AE2 23 1411 INX H
6AE3 EB 1412 XCHG ;HL = NEXT SOURCE ADDR
6AE4 C3D96A 1413 JMP MMOV2 ;CHECK THE NEXT CHAR
6AE7 23 1414 SMOV: INX H
6AE8 EB 1415 XCHG ;HL = DESTIN BR CHAR ADDR
6AE9 3E0D 1416 MVI A,0DH ; PUT AN 0DH THERE
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 34
LOC OBJ SEQ SOURCE STATEMENT
6AEB 77 1417 MOV M,A
6AEC 23 1418 INX H
6AED EB 1419 XCHG ;HL = NEXT M-ITEM ADDR
6AEE 223C61 1420 SHLD MPTR ;SAVE M-POINTER
6AF1 C9 1421 RET
1422 ;
1423 ; M-BREAK CHAR BETWEEN ITEMS
1424 ; ENTER: HL = CHAR ADDR
1425 ; RETURNS: A,B = CHAR. IF BR CHAR THEN Z FLAG TRUE
1426 ;
6AF2 7E 1427 MBR: MOV A,M ; GET CHAR
6AF3 47 1428 MOV B,A ; SAVE IT
6AF4 FE0D 1429 CPI 0DH ; IF EOL
6AF6 C8 1430 RZ ; THEN RETURN
6AF7 3A4761 1431 LDA MBRCH ;GET CURRENT BR CHAR
6AFA B8 1432 CMP B
6AFB C9 1433 RET
1434 ;
1435 ; PAD ADDS A BLANK TO EACH END OF A STRING
1436 ; ENTER: HLSAV = STRING ADDRESS
1437 ;
6AFC 218B62 1438 PAD: LXI H,WORD
6AFF 3E20 1439 MVI A,' ' ; SET BLANK AT FRONT OF
6B01 77 1440 MOV M,A
6B02 23 1441 INX H ;DE = DESTIN ADDR
6B03 EB 1442 XCHG
6B04 2A1A61 1443 LHLD HLSAV ;GET SOURCE ADDR
6B07 CDF067 1444 CALL CNTLN ;C = CHAR COUNT
6B0A 2A1A61 1445 LHLD HLSAV ;GET SOURCE ADDR
6B0D CDA76C 1446 CALL BLKTFR ;MOVE TEXT
6B10 EB 1447 XCHG ;ADDR NEW TEXT END
6B11 2B 1448 DCX H ;SET BLANK AT
6B12 3E20 1449 MVI A,' ' ; END OF
6B14 77 1450 MOV M,A ; TEMP STRING
6B15 23 1451 INX H ;SET EOL
6B16 3E0D 1452 MVI A,0DH
6B18 77 1453 MOV M,A
6B19 2A1A61 1454 LHLD HLSAV ;MOVE NEW STRING
6B1C EB 1455 XCHG ; TO ORIGINAL
6B1D 218B62 1456 LXI H,WORD ; LOCATION
6B20 CDF067 1457 CALL CNTLN
6B23 218B62 1458 LXI H,WORD
6B26 CDA76C 1459 CALL BLKTFR
6B29 C9 1460 RET
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 35
LOC OBJ SEQ SOURCE STATEMENT
1461 ;
1462 ; SQUEZ REDUCES MULTIPLE BLANKS TO A SINGLE BLANK
1463 ; ENTER: HLSAV = STRING ADDRESS
1464 ;
6B2A 2A1A61 1465 SQUEZ: LHLD HLSAV ;ADDR STRING
6B2D 221C61 1466 SHLD HLLSAV ;SAVE POINTER
6B30 7E 1467 MOV A,M ; GET CHAR
6B31 FE0D 1468 CKEOL: CPI 0DH ; IF EOL
6B33 C8 1469 RZ ; THEN RETURN
6B34 FE20 1470 CPI ' ' ;IF BLANK
6B36 CA3D6B 1471 JZ CKNC ; THEN CHECK NEXT CHAR
6B39 23 1472 INX H ;ELSE BUMP ADDR
6B3A C32D6B 1473 JMP SQUEZ+3 ; AND CONTINUE
6B3D 23 1474 CKNC: INX H ;IF NEXT CHAR IS
6B3E 7E 1475 CKNC1: MOV A,M ; NOT BLANK
6B3F FE20 1476 CPI ' ' ; THEN CHECK IF EOL
6B41 C2316B 1477 JNZ CKEOL
6B44 221C61 1478 SHLD HLLSAV ;ELSE SAVE ADDRESS
6B47 CD506B 1479 CALL SHIFT ; REMOVE A BLANK
6B4A 2A1C61 1480 LHLD HLLSAV ; RETRIEVE ADDRESS
6B4D C33E6B 1481 JMP CKNC1 ; AND CONTINUE
1482 ;
1483 ; SHIFT STRING CHARS LEFT WITH LOSS OF FIRST CHAR
1484 ; ENTER: HL = ADDR OF STRING
1485 ; RETURNS: HL = ADDR OF 0DH
1486 ;
6B50 23 1487 SHIFT: INX H ;ADDR NEXT CHAR
6B51 46 1488 MOV B,M ; GET IT IN B
6B52 2B 1489 DCX H ;MOVE IT
6B53 70 1490 MOV M,B
6B54 7E 1491 MOV A,M
6B55 FE0D 1492 CPI 0DH ; IF IT WAS EOL
6B57 C8 1493 RZ ; THEN RETURN
6B58 23 1494 INX H ; ELSE MOVE ANOTHER
6B59 C3506B 1495 JMP SHIFT
1496 ;
1497 ; C OPERATION: COMPUTE WITH TEXT OF STATEMENT
1498 ; LIMITED TO: X = NN (NN = INTEGER -99 TO +99)
1499 ; OR X = X + NN OR X = X - NN
1500 ; OR X = X + X OR X = X - X
1501 ; WHERE X = SINGLE LETTER VARIABLE NAME A-Z
1502 ; FIRST LETTER ONLY OF LONGER NAME GETS USED
1503 ; ENTER: HLSAV = ADDR OF EXPRESSION FIELD
1504 ;
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 36
LOC OBJ SEQ SOURCE STATEMENT
6B5C 2A1A61 1505 COP: LHLD HLSAV ;ADDR EXPRESSION FIELD
6B5F 063D 1506 MVI B,'=' ; LOOK FOR EQUAL SIGN
6B61 CD8A68 1507 CALL INDX
6B64 79 1508 MOV A,C
6B65 B7 1509 ORA A ; IF NOT PRESENT
6B66 CACA6B 1510 JZ EXMSG ; THEN COMPLAIN
6B69 23 1511 INX H ;BUMP POINTER
6B6A CD7F67 1512 CALL GETCH ;GET THE CHAR
6B6D FE2D 1513 CPI '-' ;IF NOT MINUS SIGN
6B6F C27F6B 1514 JNZ CGVAL ; THEN GET THE VALUE
6B72 221C61 1515 SHLD HLLSAV ;SAVE THE POINTER
6B75 AF 1516 XRA A
6B76 324961 1517 STA TEMP ;SET TEMP = 0
6B79 2A1C61 1518 LHLD HLLSAV ;RETRIEVE POINTER
6B7C C3B36B 1519 JMP SUBV ; AND SUBTRACT
6B7F CDF26B 1520 CGVAL: CALL GVALUE ;GET THE VALUE
6B82 214961 1521 LXI H,TEMP ; SAVE IT
6B85 73 1522 MOV M,E
6B86 2A3861 1523 LHLD CPTR ;RETRIEVE CHAR POINTER
6B89 23 1524 INX H ;BUMP POINTER
6B8A CD7F67 1525 CALL GETCH ;GET CHAR
6B8D FE0D 1526 CPI 0DH ; IF END OF LINE
6B8F CAC66B 1527 JZ AVAL ; THEN ASSIGN VALUE
6B92 FE2D 1528 CPI '-' ;IF MINUS
6B94 CAB36B 1529 JZ SUBV ; THEN SUBTRACT VALUE
6B97 FE2B 1530 CPI '+' ;IF PLUS
6B99 CAA26B 1531 JZ ADDV ; THEN ADD VALUE
6B9C CDF26B 1532 CALL GVALUE ;ELSE GET VALUE
6B9F C3C66B 1533 JMP AVAL ;ASSIGN VALUE
6BA2 23 1534 ADDV: INX H ;BUMP POINTER
6BA3 CDF26B 1535 CALL GVALUE ;GET THE VALUE
6BA6 3A4961 1536 LDA TEMP ;GET OLD VALUE
6BA9 83 1537 ADD E ;ADD VALUES
6BAA FE64 1538 CPI 100 ;IF > 99
6BAC F2D46B 1539 JP OVMSG ; THEN COMPLAIN
6BAF 5F 1540 MOV E,A ; ELSE FORM NEW VALUE
6BB0 C3C66B 1541 JMP AVAL ;ASSIGN VALUE
6BB3 23 1542 SUBV: INX H ;BUMP POINTER
6BB4 CDF26B 1543 CALL GVALUE ;GET THE VALUE
6BB7 3A4961 1544 LDA TEMP ;GET OLD VALUE
6BBA 93 1545 SUB E ;SUBTRACT VALUES
6BBB FE9D 1546 CPI 9DH ;IF >= -99
6BBD F2C56B 1547 JP AVAL-1 ; THEN CONTINUE
6BC0 FE64 1548 CPI 100 ;IF > 99
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 37
LOC OBJ SEQ SOURCE STATEMENT
6BC2 F2E36B 1549 JP UNMSG ; THEN COMPLAIN
6BC5 5F 1550 MOV E,A
6BC6 CD136C 1551 AVAL: CALL ASSIGN
6BC9 C9 1552 RET
1553 ;
6BCA CDCC68 1554 EXMSG: CALL TOP ;SHOW THE BAD EXPR
6BCD 215B6E 1555 LXI H,EXPMSG
6BD0 CD316E 1556 CALL ERROR
6BD3 C9 1557 RET
1558 ;
6BD4 1E63 1559 OVMSG: MVI E,99 ; SET VALUE TO 99
6BD6 CD136C 1560 CALL ASSIGN
6BD9 CDCC68 1561 CALL TOP ;SHOW THE EXPR
6BDC 216F6E 1562 LXI H,OVFMSG
6BDF CD316E 1563 CALL ERROR
6BE2 C9 1564 RET
1565 ;
6BE3 1E9D 1566 UNMSG: MVI E,-99 ; SET VALUE TO -99
6BE5 CD136C 1567 CALL ASSIGN
6BE8 CDCC68 1568 CALL TOP
6BEB 217C6E 1569 LXI H,UNFMSG
6BEE CD316E 1570 CALL ERROR
6BF1 C9 1571 RET
1572 ;
1573 ; GVALUE - GETS VALUE OF CONSTANT OR VARIABLE
1574 ; ENTER: HL = ADDRESS OF CHAR NAMING THE VARIABLE
1575 ; CPTR = ADDRESS OF CHAR
1576 ; RETURNS: E = VALUE
1577 ; CPTR = ADDRESS OF THE CHARACTER
1578 ;
6BF2 CD7F67 1579 GVALUE: CALL GETCH ;GET CHAR
6BF5 5F 1580 MOV E,A ; SAVE IN E
6BF6 CDB368 1581 CALL LETTER ;IF LETTER
6BF9 CA036C 1582 JZ LTR ; THEN PROCEED
6BFC CD8466 1583 CALL GETNM ;ELSE EXPECT NUMBER
6BFF 223861 1584 SHLD CPTR ;SAVE CHAR POINTER
6C02 C9 1585 RET
6C03 223861 1586 LTR: SHLD CPTR ;SAVE CHAR POINTER
6C06 46 1587 CONV: MOV B,M ; SAVE CHAR IN B
6C07 CDB464 1588 CALL VARMCH ;LOOK IT UP
6C0A FE01 1589 CPI 1 ;IF END MARKER
6C0C CCA764 1590 CZ BADFRM ; THEN COMPLAIN
6C0F C8 1591 RZ ; AND RETURN
6C10 23 1592 INX H ;ELSE POINT AT VALUE
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 38
LOC OBJ SEQ SOURCE STATEMENT
6C11 5E 1593 MOV E,M ; SAVE VALUE IN E
6C12 C9 1594 RET
1595 ;
1596 ; ASSIGN SETS A NEW VALUE TO AN OLD OR NEW VARIABLE
1597 ; ENTER: HLSAV = ADDR OF EXPRESSION FIELD
1598 ; BINARY VALUE IN E
1599 ;
6C13 2A1A61 1600 ASSIGN: LHLD HLSAV ;ADDR EXPRESSION FIELD
6C16 CD7F67 1601 CALL GETCH ;GET FIRST CHAR
6C19 CDB368 1602 CALL LETTER ;IF NOT A LETTER
6C1C C2CA6B 1603 JNZ EXMSG ; THEN COMPLAIN
6C1F 46 1604 MOV B,M ; GET CHAR IN B
6C20 CDB464 1605 CALL VARMCH ;LOOK IT UP
6C23 FE01 1606 CPI 1 ;IF END MARKER
6C25 CCA764 1607 CZ BADFRM ; THEN COMPLAIN
6C28 C8 1608 RZ ; AND RETURN
6C29 23 1609 INX H ; ELSE BUMP TO VALUE ADDR
6C2A 73 1610 MOV M,E
6C2B C9 1611 RET ; AND RETURN
1612 ;
1613 ; BASIC INTERPRETATION -
1614 ; IF PROGRAM TEXT IS NOT LEGAL PILOT, THEN
1615 ; AN ALTERNATE INTERPRETER SUCH AS BASIC CAN BE
1616 ; SUPPLIED TO BE TRIED BEFORE PILOT COMPLAINS.
1617 ;
6C2C B4 1618 BASIC: ORA H ;DUMMY ILLEGAL RETURN
6C2D C9 1619 RET
1620 ;
1621 ; R OPERATION -
1622 ; ENTER: HLSAV = R-STATEMENT ADDRESS
1623 ;
6C2E C9 1624 ROP: RET
1625 ;
1626 ; E OPERATION - RETURNS FROM CALL OR ENDS PROGRAM
1627 ;
6C2F 3A4561 1628 EOP: LDA LEVEL ;IF RETURN LEVEL = 0
6C32 B7 1629 ORA A ; THEN QUIT
6C33 CA0F63 1630 JZ RSTRT
6C36 CD8B6C 1631 CALL RESRET ; ELSE SET RETURN FROM
6C39 C9 1632 RET ; PILOT CALL
1633 ;
6C3A 210070 1634 LOAD: LXI H,PBUFF
6C3D CD226D 1635 CALL INPUT
6C40 C9 1636 RET
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 39
LOC OBJ SEQ SOURCE STATEMENT
1637 ;
1638 ; NEW$ DELETES $NAMES BY RESETTING A-POINTER
1639 ;
6C41 2A3461 1640 NEWN: LHLD APTR ;REMOVE STOP CHAR
6C44 3620 1641 MVI M,20H
6C46 2A3E61 1642 LHLD MEMTP ;ADDR MEMTP
6C49 3601 1643 MVI M,1 ;PLACE STOP CHAR
6C4B 2B 1644 DCX H
6C4C 223461 1645 SHLD APTR ;STORE MEMTP-1 ADDRESS
6C4F C9 1646 RET
1647 ;
1648 ; INITIALIZE NUMERIC VARIABLES
1649 ; SETS A-Z TO ZERO VALUE
1650 ;
6C50 215662 1651 INITV: LXI H,NVAR ;ADDR FRONT OF VAR LIST
6C53 0641 1652 MVI B,'A' ;START WITH 'A'
6C55 78 1653 MOV A,B
6C56 FE5B 1654 NV: CPI 'Z'+1 ;IF ALPHABET COMPLETE
6C58 C8 1655 RZ ;THEN RETURN
6C59 77 1656 MOV M,A ; STORE THE LETTER
6C5A 23 1657 INX H ;BUMP ADDRESS
6C5B 3E00 1658 MVI A,0
6C5D 77 1659 MOV M,A ; STORE ZERO
6C5E 23 1660 INX H ;BUMP THE ADDRESS
6C5F 78 1661 MOV A,B ; GET LETTER
6C60 C601 1662 ADI 1 ;CHANGE TO NEXT LETTER
6C62 47 1663 MOV B,A ; SAVE IN B
6C63 C3566C 1664 JMP NV ;NEXT VARIABLE
1665 ;
1666 ; SAVE RETURN POINTER IN STACK
1667 ; ENTER: IPTR = START OF NEXT SOURCE LINE
1668 ; RETURNS: LEVEL BUMPED ONE HIGHER
1669 ; IPTR COPIED AT LEVEL POSITION
1670 ;
6C66 214561 1671 SAVRET: LXI H,LEVEL ;GET CURRENT LEVEL
6C69 7E 1672 MOV A,M
6C6A C601 1673 ADI 1 ;BUMP TO NEXT LEVEL
6C6C FE08 1674 CPI 8 ;IF < 8
6C6E FA786C 1675 JM SAV2 ; THEN CONTINUE
6C71 21896E 1676 LXI H,STMSG ;ELSE STACK OVERFLOW
6C74 CD316E 1677 CALL ERROR
6C77 C9 1678 RET
6C78 77 1679 SAV2: MOV M,A ; STORE IT
6C79 87 1680 ADD A ;DOUBLE IT
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 40
LOC OBJ SEQ SOURCE STATEMENT
6C7A 4F 1681 MOV C,A ; SAVE IN C
6C7B 2A3A61 1682 LHLD IPTR ;PUT IPTR IN DE
6C7E EB 1683 XCHG
6C7F 212461 1684 LXI H,RETSAV ; GET BASE ADDR
6C82 7D 1685 MOV A,L
6C83 81 1686 ADD C ;BASE + 2 X LEVEL
6C84 6F 1687 MOV L,A ; HL = STACK ADDR
6C85 72 1688 MOV M,D ; SAVE IPTR
6C86 C601 1689 ADI 1
6C88 6F 1690 MOV L,A ; HL = STACK ADDR+1
6C89 73 1691 MOV M,E
6C8A C9 1692 RET
1693 ;
1694 ; RESET RETURN POINTER FROM STACK
1695 ; RETURNS: IPTR SET TO LAST SAVED RETURN
1696 ; LEVEL REDUCED BY ONE
1697 ;
6C8B 3A4561 1698 RESRET: LDA LEVEL ;GET RETURN LEVEL
6C8E 87 1699 ADD A ;DOUBLE IT
6C8F 4F 1700 MOV C,A ; SAVE IN C
6C90 212461 1701 LXI H,RETSAV ; GET BASE ADDR
6C93 7D 1702 MOV A,L
6C94 81 1703 ADD C ;BASE + 2 X LEVEL
6C95 6F 1704 MOV L,A ; HL = STACK ADDR
6C96 56 1705 MOV D,M ; SAVE POINTER IN DE
6C97 C601 1706 ADI 1
6C99 6F 1707 MOV L,A ; HL = STACK ADDR+1
6C9A 5E 1708 MOV E,M
6C9B EB 1709 XCHG
6C9C 223A61 1710 SHLD IPTR ;RESET IPTR
6C9F 214561 1711 LXI H,LEVEL ;REDUCE LEVEL
6CA2 7E 1712 MOV A,M
6CA3 D601 1713 SUI 1
6CA5 77 1714 MOV M,A
6CA6 C9 1715 RET
1716 ;
1717 ; BLOCK TRANSFER FROM HL TO DE, C CHARACTERS
1718 ; RETURNS: HL AND DE AT LAST CHAR+1 ADDR
1719 ;
6CA7 79 1720 BLKTFR: MOV A,C ; GET COUNT
6CA8 B7 1721 ORA A ; IF COUNT = 0
6CA9 C8 1722 RZ ; THEN RETURN
6CAA 46 1723 MOV B,M ; GET A SOURCE CHARACTER
6CAB 23 1724 INX H ;GET NEXT DEST ADDR
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 41
LOC OBJ SEQ SOURCE STATEMENT
6CAC EB 1725 XCHG
6CAD 70 1726 MOV M,B ; PUT IT IN DEST LOCATION
6CAE 23 1727 INX H ;GET NEXT SOURCE ADDR
6CAF EB 1728 XCHG
6CB0 79 1729 MOV A,C ; DECREMENT COUNT
6CB1 D601 1730 SUI 1
6CB3 4F 1731 MOV C,A
6CB4 C2A76C 1732 JNZ BLKTFR ;IF NONZERO THEN NEXT
6CB7 C9 1733 RET
1734 ;
1735 ; KEYBOARD INPUT TO EBUFF
1736 ; ENTER: CHMAX= MAXIMUM CHARS ALLOWED IN LINE
1737 ; DEL (SHIFT O) OR RUBOUT CANCELS LAST CHAR
1738 ; CTL/U CANCELS CURRENT LINE
1739 ; USES B FOR CHAR COUNT, C FOR OUTPUT
1740 ;
6CB8 219D61 1741 KEYIN: LXI H,EBUFF ;POINT AT EBUFF
6CBB 223661 1742 SHLD EPTR ;SAVE POINTER
6CBE 214461 1743 LXI H,CHMAX ;GET MAX COUNT
6CC1 46 1744 MOV B,M
6CC2 2A3661 1745 KIN2: LHLD EPTR ;RETRIEVE POINTER
6CC5 CD0061 1746 CALL CI ;GET CHAR AND ECHO
6CC8 FE5F 1747 CPI 5FH ;IF DEL
6CCA CA036D 1748 JZ CANC ; THEN CANCEL LAST CHAR
6CCD FE7F 1749 CPI 7FH ;IF RUBOUT
6CCF CA036D 1750 JZ CANC ; THEN CANCEL LAST CHAR
6CD2 FE15 1751 CPI 15H ;IF CTL/U
6CD4 CAF86C 1752 JZ CANL ; THEN CANCEL LINE
6CD7 FE61 1753 CPI 61H ;FORCE UPPER CASE
6CD9 FADE6C 1754 JM NTR
6CDC EE20 1755 XRI 20H
6CDE 77 1756 NTR: MOV M,A ;STORE THE CHAR
6CDF 23 1757 INX H ;INCR POINTER
6CE0 223661 1758 SHLD EPTR ;SAVE IT
6CE3 FE0D 1759 CPI 0DH ;IF CR
6CE5 CAF46C 1760 JZ KOUT ; THEN STOP ENTRY
6CE8 05 1761 DCR B ;ELSE DECR CHAR COUNT
6CE9 78 1762 MOV A,B
6CEA B7 1763 ORA A ;IF COUNT NOT 0
6CEB C2C26C 1764 JNZ KIN2 ; THEN NEXT CHAR
6CEE 0E0D 1765 MVI C,0DH ;ELSE END WITH CR
6CF0 71 1766 MOV M,C
6CF1 CD0361 1767 CALL CO ; AND SEND IT
6CF4 CD1C6D 1768 KOUT: CALL LF ;SEND LINE FEED
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 42
LOC OBJ SEQ SOURCE STATEMENT
6CF7 C9 1769 RET ; AND RETURN
6CF8 0E3C 1770 CANL: MVI C,3CH ;SEND <
6CFA CD0361 1771 CALL CO
6CFD CD176D 1772 CALL CRLF ;SEND CRLF
6D00 C3B86C 1773 JMP KEYIN ; START OVER
6D03 78 1774 CANC: MOV A,B ;INCR CHAR COUNT
6D04 214461 1775 LXI H,CHMAX ; UNLESS AT BEGINNING
6D07 4E 1776 MOV C,M
6D08 B9 1777 CMP C
6D09 CAC26C 1778 JZ KIN2
6D0C 04 1779 INR B
6D0D 2A3661 1780 LHLD EPTR
6D10 2B 1781 DCX H ;DECR POINTER
6D11 223661 1782 SHLD EPTR
6D14 C3C56C 1783 JMP KIN2+3
1784 ;
6D17 0E0D 1785 CRLF: MVI C,0DH
6D19 CD0361 1786 CALL CO
6D1C 0E0A 1787 LF: MVI C,0AH
6D1E CD0361 1788 CALL CO
6D21 C9 1789 RET
1790 ;
1791 ; INPUT PROGRAM TO BUFFER AREA
1792 ; DEL (SHIFT O) CANCELS LAST CHAR, CTL/U CANCELS LINE
1793 ; TERMINATES WITH CTL/Z (1AH)
1794 ;
6D22 CD6B66 1795 INPUT: CALL BLKBF ;BLANK THE BUFFER
6D25 210070 1796 LXI H,PBUFF ;SET POINTER
6D28 7E 1797 INPT1: MOV A,M ;GET EXISTING CHAR
6D29 222261 1798 SHLD LLSAV ;SAVE FIRST CHAR ADDR
6D2C FE01 1799 CPI 1 ;IF END MARK
6D2E CA826D 1800 JZ CHOP ; THEN CHOP ENTRY
6D31 CD0661 1801 CALL RI ;GET CHAR
6D34 FE20 1802 CPI ' ' ;IF NOT BLANK
6D36 C2456D 1803 JNZ INPT3+3 ; THEN CONTINUE
6D39 C3286D 1804 JMP INPT1 ;ELSE SKIP LEADING BLANK
6D3C 7E 1805 INPT2: MOV A,M ;GET EXISTING CHAR
6D3D FE01 1806 CPI 1 ;IF END MARK
6D3F CA826D 1807 JZ CHOP ; THEN CHOP ENTRY
6D42 CD0661 1808 INPT3: CALL RI ;GET CHARACTER
6D45 FE00 1809 CPI 0 ;IGNORE NULLS
6D47 CA426D 1810 JZ INPT3
6D4A FE7F 1811 CPI 7FH ;IGNORE RUBOUTS
6D4C CA426D 1812 JZ INPT3
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 43
LOC OBJ SEQ SOURCE STATEMENT
6D4F FE1A 1813 CPI 1AH ;IF TERM CHAR CTL/Z
6D51 CA8E6D 1814 JZ INEND ; THEN END OF INPUT
6D54 FE15 1815 CPI 15H ;IF CTL/U
6D56 CA746D 1816 JZ KLN ; THEN KILL THE LINE
6D59 FE5F 1817 CPI 5FH ;IF DEL
6D5B CA706D 1818 JZ CLC ; THEN CANCEL LAST CHAR
6D5E 77 1819 MOV M,A ;ELSE STORE THE CHAR
6D5F 23 1820 INX H ;AND INCR THE POINTER
6D60 FE0D 1821 CPI 0DH ;IF NOT CR
6D62 C23C6D 1822 JNZ INPT2 ; THEN GET NEXT CHAR
6D65 CD1C6D 1823 CALL LF ;ELSE SEND LF
6D68 C3286D 1824 JMP INPT1 ;AND GET NEXT NEW LINE
6D6B 77 1825 INPT4: MOV M,A ;STORE CHAR
6D6C 23 1826 INX H ;INCR POINTER
6D6D C33C6D 1827 JMP INPT2
6D70 2B 1828 CLC: DCX H ;CANCEL LAST CHAR
6D71 C3426D 1829 JMP INPT3
6D74 0E3C 1830 KLN: MVI C,3CH ;SEND <
6D76 CD0361 1831 CALL CO
6D79 CD176D 1832 CALL CRLF ;SEND CRLF
6D7C 2A2261 1833 LHLD LLSAV ;ADDR FRONT OF LINE
6D7F C3426D 1834 JMP INPT3
6D82 2A2261 1835 CHOP: LHLD LLSAV ;ADDR FRONT OF LINE
6D85 CD9C6D 1836 CALL DSPLY
6D88 21486E 1837 LXI H,IOVMSG
6D8B CD316E 1838 CALL ERROR
6D8E 3601 1839 INEND: MVI M,1 ;STORE END MARK
6D90 221861 1840 SHLD TOPP ;STORE ADDRESS
6D93 CD176D 1841 CALL CRLF ;SEND CRLF
6D96 214561 1842 LXI H,LEVEL ;ZERO RETURN LEVEL
6D99 3600 1843 MVI M,0
6D9B C9 1844 RET
1845 ;
1846 ; DISPLAY A CHARACTER STRING TO CR OR 01
1847 ; ENTER: HL = STARTING ADDRESS
1848 ; OUTADR CONTAINS ADDRESS OF CO, LO, OR PO
1849 ;
6D9C 7E 1850 DSPLY: MOV A,M ;GET A CHARACTER
6D9D 23 1851 INX H ;BUMP POINTER
6D9E 54 1852 MOV D,H ;SAVE IT
6D9F 5D 1853 MOV E,L
6DA0 FE01 1854 CPI 1 ;IF 01
6DA2 C8 1855 RZ ; THEN RETURN
6DA3 4F 1856 MOV C,A ;PUT CHAR IN C
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 44
LOC OBJ SEQ SOURCE STATEMENT
6DA4 2A4061 1857 LHLD OUTADR ;MAKE AN INDIRECT CALL
6DA7 CDC06D 1858 CALL OVCTR ; TO SEND THE CHAR
6DAA FE0D 1859 CPI 0DH ;IF CR
6DAC CAB36D 1860 JZ ENDOL ; THEN EOL
6DAF EB 1861 XCHG ;ELSE RETRIEVE POINTER
6DB0 C39C6D 1862 JMP DSPLY ;AND DISPLAY MORE
6DB3 0E0A 1863 ENDOL: MVI C,0AH ;SEND LINE FEED
6DB5 2A4061 1864 LHLD OUTADR ;MAKE AN INDIRECT CALL
6DB8 CDC06D 1865 CALL OVCTR ; TO SEND IT
6DBB EB 1866 XCHG ;RETRIEVE POINTER
6DBC CD5664 1867 CALL SKLN ;SKIP ANY LINE NOS.
6DBF C9 1868 RET
6DC0 E9 1869 OVCTR: PCHL
1870 ;
1871 ; OUTPUT PROGRAM IN MEMORY TO 01 END MARK
1872 ;
6DC1 210070 1873 PRGOUT: LXI H,PBUFF ;PGM START ADDR
6DC4 CD9C6D 1874 CALL DSPLY ;DISPLAY ONE LINE
6DC7 FE01 1875 CPI 1 ;IF NOT END MARK
6DC9 C2C46D 1876 JNZ PRGOUT+3 ; THEN MORE
6DCC C9 1877 RET
1878 ;
6DCD 210361 1879 DPRG: LXI H,CO ;DISPLAY PROGRAM IN MEMORY
6DD0 224061 1880 SHLD OUTADR
6DD3 CDC16D 1881 CALL PRGOUT
6DD6 C9 1882 RET
1883 ;
6DD7 210961 1884 LPRG: LXI H,LO ;LIST PROGRAM IN MEMORY
6DDA 224061 1885 SHLD OUTADR
6DDD CDC16D 1886 CALL PRGOUT
6DE0 210361 1887 LXI H,CO ;RESET TO CONSOLE
6DE3 224061 1888 SHLD OUTADR
6DE6 C9 1889 RET
1890 ;
6DE7 210C61 1891 SPRG: LXI H,PO ;SAVE PROGRAM
6DEA 224061 1892 SHLD OUTADR
6DED CDC16D 1893 CALL PRGOUT
6DF0 210361 1894 LXI H,CO ;RESET TO CONSOLE
6DF3 224061 1895 SHLD OUTADR
6DF6 C9 1896 RET
1897 ;
1898 ; I/O ROUTINES
1899 ; USE STPORT (MDS-0F7H) FOR STATUS, PORT (MDS-0F6H) FOR DATA
1900 ; STATUS BIT 1 (2H) FOR READ DATA AVAIL (RDA)
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 45
LOC OBJ SEQ SOURCE STATEMENT
1901 ; BIT 0 (1H) FOR TRANSMIT BUFFER EMPTY (TBE)
1902 ;
1903 ; OUTPUT CHAR FROM C
1904 ; LOOKS FOR CTL/Z INPUT FOR PANIC EXIT
1905 ;
6DF7 DBF7 1906 CHO: IN STPORT ;GET STATUS
6DF9 E602 1907 ANI RDA ;IF NO INPUT
6DFB CA066E 1908 JZ CHO1 ;THEN CONTINUE
6DFE CD0061 1909 CALL CI ;ELSE SEE WHAT IT IS
6E01 FE1A 1910 CPI 1AH ;IF CNTRL/Z
6E03 CA116E 1911 JZ INTR ;THEN INTERRUPT
6E06 DBF7 1912 CHO1: IN STPORT ;NOW FOR STANDARD OUTPUT
6E08 E601 1913 ANI TBE
6E0A CA066E 1914 JZ CHO1
6E0D 79 1915 MOV A,C
6E0E D3F6 1916 OUT PORT
6E10 C9 1917 RET
1918 ;
6E11 E5 1919 INTR: PUSH H ;SAVE REGISTERS
6E12 D5 1920 PUSH D
6E13 C5 1921 PUSH B
6E14 21B86E 1922 LXI H,INTMSG ;INTERRUPT MESSAGE
6E17 CD316E 1923 CALL ERROR
6E1A CDDB69 1924 CALL ENTRY ;ALLOW RESTART
6E1D C1 1925 POP B ;ELSE CONTINUE
6E1E D1 1926 POP D
6E1F E1 1927 POP H
6E20 C9 1928 RET
1929 ;
1930 ; INPUT CHAR TO A AND ECHO
1931 ;
6E21 DBF7 1932 CHI: IN STPORT ;NORMAL INPUT
6E23 E602 1933 ANI RDA
6E25 CA216E 1934 JZ CHI
6E28 DBF6 1935 IN PORT
6E2A E67F 1936 ANI 7FH
6E2C 4F 1937 MOV C,A
6E2D CD0361 1938 CALL CO
6E30 C9 1939 RET
1940 ;
1941 ; ERROR - DISPLAYS ERROR MESSAGE
1942 ; ENTER: HL = ADDRESS OF MESSAGE
1943 ; RETURNS: ZERO FLAG SET
1944 ;
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 46
LOC OBJ SEQ SOURCE STATEMENT
6E31 CD9C6D 1945 ERROR: CALL DSPLY
6E34 AF 1946 XRA A
6E35 C9 1947 RET
1948 ;
1949 ; ERROR MESSAGES
1950 ;
6E36 2D204C41 1951 BLMSG: DB '- LABEL NOT FOUND',0DH
6E3A 42454C20
6E3E 4E4F5420
6E42 464F554E
6E46 44
6E47 0D
1952 ;
6E48 2F4F5645 1953 IOVMSG: DB '/OVERFLOW',0DH
6E4C 52464C4F
6E50 57
6E51 0D
1954 ;
6E52 2A4E4F20 1955 NRMSG: DB '*NO ROOM',0DH
6E56 524F4F4D
6E5A 0D
1956 ;
6E5B 2A494C4C 1957 EXPMSG: DB '*ILLEGAL EXPRESSION',0DH
6E5F 4547414C
6E63 20455850
6E67 52455353
6E6B 494F4E
6E6E 0D
1958 ;
6E6F 2A56414C 1959 OVFMSG: DB '*VALUE > 99',0DH
6E73 5545203E
6E77 20203939
6E7B 0D
1960 ;
6E7C 2A56414C 1961 UNFMSG: DB '*VALUE < -99',0DH
6E80 5545203C
6E84 202D3939
6E88 0D
1962 ;
6E89 2A555345 1963 STMSG: DB '*USE DEPTH EXCEEDED',0DH
6E8D 20444550
6E91 54482045
6E95 58434545
6E99 444544
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 47
LOC OBJ SEQ SOURCE STATEMENT
6E9C 0D
1964 ;
6E9D 2A4E554D 1965 NMSG: DB '*NUMERIC RESPONSE REQUIRED',0DH
6EA1 45524943
6EA5 20524553
6EA9 504F4E53
6EAD 45205245
6EB1 51554952
6EB5 4544
6EB7 0D
1966 ;
6EB8 2A494E54 1967 INTMSG: DB '*INTERRUPTED',0DH
6EBC 45525255
6EC0 50544544
6EC4 0D
1968 ;
6EC5 543A 1969 IBUFF: DB 'T:',0DH
6EC7 0D
6EC8 543A5049 1970 DB 'T:PILOT-8080, 1.1',0DH
6ECC 4C4F542D
6ED0 38303830
6ED4 2C20312E
6ED8 31
6ED9 0D
1971 ;
6EDA 3A4C4F41 1972 DB ':LOAD A NEW PROGRAM?',0DH
6EDE 44204120
6EE2 4E455720
6EE6 50524F47
6EEA 52414D3F
6EEE 0D
1973 ;
6EEF 413A 1974 DB 'A:',0DH
6EF1 0D
1975 ;
6EF2 4D3A2059 1976 DB 'M: Y',0DH
6EF6 0D
1977 ;
6EF7 4A4E3A2A 1978 DB 'JN:*%',0DH
6EFB 25
6EFC 0D
1979 ;
6EFD 543A454E 1980 DB 'T:ENTER PILOT PROGRAM',0DH
6F01 54455220
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 48
LOC OBJ SEQ SOURCE STATEMENT
6F05 50494C4F
6F09 54205052
6F0D 4F475241
6F11 4D
6F12 0D
1981 ;
6F13 3A544552 1982 DB ':TERMINATE INPUT WITH CTL/Z',0DH
6F17 4D494E41
6F1B 54452049
6F1F 4E505554
6F23 20574954
6F27 48204354
6F2B 4C2F5A
6F2E 0D
1983 ;
6F2F 4C4F4144 1984 DB 'LOAD:',0DH
6F33 3A
6F34 0D
1985 ;
6F35 2A252049 1986 DB '*% IEP:',0DH
6F39 45503A
6F3C 0D
1987 ;
1988 ; ORG HERE CAN SET START OF RAM PROGRAM BUFFER SPACE
1989 ;
7000 1990 ORG PBUFB
7000 01 1991 PBUFF: DB 1
1992 ;
1993 ; SOURCE PROGRAM AND $STRING STORAGE HERE TO MEMTP
62E0 1994 END START
PUBLIC SYMBOLS
EXTERNAL SYMBOLS
USER SYMBOLS
ADDV A 6BA2 ADRCMP A 667D ALTSC A 63D8 AOP A 69AB APTR A 6134 ASCAN A 6115 ASSIGN A 6C13
ASTORE A 6A06 AVAL A 6BC6 BACKUP A 6801 BADFRM A 64A7 BASIC A 6C2C BLKB2 A 6674 BLKBF A 666B
BLKSET A 6661 BLKTFR A 6CA7 BLMSG A 6E36 BRCHAR A 680C CANC A 6D03 CANL A 6CF8 CENT A 69D7
CGVAL A 6B7F CHI A 6E21 CHK A 6715 CHMAX A 6144 CHO A 6DF7 CHO1 A 6E06 CHOP A 6D82
CI A 6100 CKEND A 636C CKEOL A 6B31 CKLC A 6408 CKLN A 6432 CKNC A 6B3D CKNC1 A 6B3E
CKNUM A 69F2 CLC A 6D70 CLRE A 65A1 CLRH A 65B7 CLRL A 65AC CMPR A 674E CNTLN A 67F0
ISIS-II 8080/8085 MACRO ASSEMBLER, V2.0 MODULE PAGE 49
CNTWD A 6799 CO A 6103 CONTIN A 6396 CONV A 6C06 COP A 6B5C CPTR A 6138 CRLF A 6D17
CTLMCH A 64C2 CTLST A 64ED CURS1 A 6583 CURS2 A 658F CURS3 A 6596 CURS4 A 659B CURSR A 6571
CVNUM A 6615 DECA A 6A39 DESAV A 6120 DONT A 6481 DPRG A 6DCD DSPLY A 6D9C EBUFF A 619D
EDIT A 6112 ENDOL A 6DB3 ENTRY A 69DB EOP A 6C2F EPTR A 6136 ERROR A 6E31 EXIT A 610F
EXMSG A 6BCA EXPMSG A 6E5B FRMCH A 66CE FRMU A 66D8 GETA A 6992 GETCH A 677F GETCTL A 67C4
GETLCH A 6787 GETNM A 6684 GETNUM A 6900 GETWD A 678F GETXT A 68EF GVALUE A 6BF2 HL2SAV A 611E
HLLSAV A 611C HLSAV A 611A IBUFF A 6EC5 IEP A 65CF INDE2 A 6839 INDEX A 6835 INDX A 688A
INEND A 6D8E INIT A 6332 INITV A 6C50 INMAX A 65DC INMX2 A 65E8 INPT1 A 6D28 INPT2 A 6D3C
INPT3 A 6D42 INPT4 A 6D6B INPUT A 6D22 INSERT A 6964 INSNUM A 691F INTMSG A 6EB8 INTR A 6E11
INTSRT A 0038 IOJMP A 62F7 IOVMSG A 6E48 IPTR A 613A JOP A 661E JOP2 A 663A KEYIN A 6CB8
KIN2 A 6CC2 KLN A 6D74 KOUT A 6CF4 LABSAV A 623F LASTOP A 624B LBL A 6975 LETTER A 68B3
LEVEL A 6145 LF A 6D1C LFND A 6747 LINE A 0048 LLSAV A 6122 LNSKP A 6146 LO A 6109
LOAD A 6C3A LOOK A 66F7 LOOKL A 66F0 LOOKS A 66E9 LPRG A 6DD7 LSTMCH A 64D8 LTR A 6C03
MBR A 6AF2 MBRCH A 6147 MC A 6A71 MCH A 677C MDONE A 6AC5 MEMTP A 613E MMOV A 6AD3
MMOV2 A 6AD9 MNTR A 0008 MOP A 6A79 MOP1 A 6A7E MPTR A 613C MSAVE A 61EE MVBR A 67BB
MVLAB A 6723 NCHK A 6478 NEG A 66E1 NERR A 69FA NEWN A 6C41 NEXTM A 6A84 NIN A 69C3
NMCTL A 65ED NMSG A 6E9D NOMCH A 6773 NOTL A 68C1 NRMSG A 6E52 NSTORE A 6A58 NTFND A 664E
NTR A 6CDE NUM A 644A NV A 6C56 NVAR A 6256 OLDOP A 63C2 OPS A 63AA ORIGN A 6000
OUTADR A 6140 OVCTR A 6DC0 OVFMSG A 6E6F OVMSG A 6BD4 PAD A 6AFC PBUFB A 7000 PBUFE A 7FFF
PBUFF A 7000 PO A 610C PORT A 00F6 PRGOUT A 6DC1 PSTRT A 62E0 PUTNM A 66B8 RDA A 0002
RESRET A 6C8B RETSAV A 6124 RI A 6106 ROLL A 65C4 ROP A 6C2E RSTRT A 630F RTRN A 64D6
SAV2 A 6C78 SAVOP A 67E1 SAVRET A 6C66 SCAN A 635C SCANB A 6142 SCNT A 6148 SDIG A 66B4
SETCNT A 6885 SETUP A 68C3 SHIFT A 6B50 SINDX A 689F SKLN A 6456 SMOV A 6AE7 SPRG A 6DE7
SQUEZ A 6B2A START A 62E0 STKPR A 6100 STMSG A 6E89 STOVF A 6A4F STPORT A 00F7 SUBV A 6BB3
SWN A 6ACE SWY A 6AC9 TALL A 690D TBE A 0001 TEMP A 6149 TMORE A 68DC TMOVE A 6906
TOP A 68CC TOPP A 6118 TSAVE A 614C TXTCK A 63E9 UNFMSG A 6E7C UNITS A 66A8 UNMSG A 6BE3
UOP A 665B VARCHK A 6483 VARMCH A 64B4 VARSAV A 614A VBL A 6930 VCHK A 648A VIDEO A FE77
VOFF A 64A5 WDTFR A 67A7 WORD A 628B XEND A 6766 YCHK A 646F YENDB A 6776 YNCHK A 6460
YNOUT A 67DD YNSW A 614B YNUM A 6454 ZC A 689C
ASSEMBLY COMPLETE, NO ERRORS
ISIS-II ASSEMBLER SYMBOL CROSS REFERENCE, V2.0 PAGE 1
ADDV 1531 1534#
ADRCMP 628 637#
ALTSC 199 214#
AOP 422 1232#
APTR 73# 103 622 1196 1280 1290 1320 1640 1645
ASCAN 56# 215
ASSIGN 1551 1560 1567 1600#
ASTORE 1239 1277#
AVAL 1527 1533 1541 1547 1551#
BACKUP 166 940# 946 1089
BADFRM 336 341 351# 564 1339 1590 1607
BASIC 56 116 1618#
BLKB2 626# 629
BLKBF 622# 1795
BLKSET 612# 617
BLKTFR 107 758 916 1011 1121 1142 1168 1186 1221 1286 1296 1446 1459 1720# 1732
BLMSG 603 1951#
BRCHAR 653 851 868 953#
CANC 1748 1750 1774#
CANL 1752 1770#
CENT 1242 1250#
CGVAL 1514 1520#
CHI 49 51 109 111 1932# 1934
CHK 741 743 750#
CHMAX 81# 140 539 1743 1775
CHO 50 52 53 110 112 113 1906#
CHO1 1908 1912# 1914
CHOP 1800 1807 1835#
CI 49# 105 1746 1909
CKEND 157 160#
CKEOL 1468# 1477
CKLC 231 236 240#
CKLN 250 258 262#
CKNC 1471 1474#
CKNC1 1475# 1481
CKNUM 1247 1265# 1272
CLC 1818 1828#
CLRE 470 502# 516
CLRH 474 512#
CLRL 472 507#
CMPR 401 765 781# 794 1019
CNTLN 160 227 232 241 263 744 924# 934 1005 1087 1278 1288 1444 1457
CNTWD 751 769 772 799 803 805 850# 857
CO 50# 144 482 484 486 494 500 503 505 508 510 513 515 518 520 1767
1771 1786 1788 1831 1879 1887 1894 1938
CONTIN 170 178#
ISIS-II ASSEMBLER SYMBOL CROSS REFERENCE, V2.0 PAGE 2
CONV 1587#
COP 432 1505#
CPTR 75# 1097 1102 1119 1141 1152 1185 1195 1523 1584 1586
CRLF 1772 1785# 1832 1841
CTLMCH 211 378#
CTLST 378 418#
CURS1 488# 496
CURS2 494# 498
CURS3 490 497#
CURS4 492 499#
CURSR 468 481#
CVNUM 560 568 569#
DECA 1281 1291 1310# 1319
DESAV 63# 1100 1117 1139 1146 1161 1170 1183 1190 1213 1223
DONT 311 316 319#
DPRG 452 1879#
DSPLY 602 1126 1836 1850# 1862 1874 1945
EBUFF 90# 1254 1277 1285 1332 1364 1368 1741
EDIT 55# 465
ENDOL 1860 1863#
ENTRY 1238 1246 1250 1253# 1263 1271 1924
EOP 436 1628#
EPTR 74# 1012 1742 1745 1758 1780 1782
ERROR 355 604 1270 1325 1556 1563 1570 1677 1838 1923 1945#
EXIT 54# 463
EXMSG 1510 1554# 1603
EXPMSG 354 1555 1957#
FRMCH 696 703#
FRMU 706 709#
GETA 1201 1210#
GETCH 168 552 581 737 816# 820 840 1233 1333 1512 1525 1579 1601
GETCTL 210 892#
GETLCH 302 826# 830 901
GETNM 569 651# 1334 1583
GETNUM 1107 1115#
GETWD 173 555 590 840# 1193
GETXT 1105 1109# 1116
GVALUE 1520 1532 1535 1543 1579#
HL2SAV 62#
HLLSAV 61# 992 1004 1016 1371 1466 1478 1480 1515 1518
HLSAV 60# 179 201 218 487 551 557 580 587 750 756 768 771 990 1000 1010
1022 1024 1096 1232 1358 1362 1365 1369 1443 1445 1454 1465 1505 1600
IBUFF 131 1969#
IEP 461 527#
INDE2 990# 1025
INDEX 988# 1372
ISIS-II ASSEMBLER SYMBOL CROSS REFERENCE, V2.0 PAGE 3
INDX 183 196 913 996 1035# 1045 1507
INEND 1814 1839#
INIT 119 131#
INITV 137 1651#
INMAX 446 533#
INMX2 536 539#
INPT1 1797# 1804 1824
INPT2 1805# 1822 1827
INPT3 1803 1808# 1810 1812 1829 1834
INPT4 1825#
INPUT 1635 1795#
INSERT 1109 1179#
INSNUM 1115 1135#
INTMSG 1922 1967#
INTR 1911 1919#
INTSRT 28# 30
IOJMP 104 109#
IOVMSG 1837 1953#
IPTR 76# 132 152 164 528 597 1682 1710
JOP 428 580# 608
JOP2 583 589 590#
KEYIN 1253 1741# 1773
KIN2 1745# 1764 1778 1783
KLN 1816 1830#
KOUT 1760 1768#
LABSAV 92# 757 763 1236 1287 1295
LASTOP 93# 180 915
LBL 1181 1187#
LETTER 559 1074# 1581 1602
LEVEL 82# 142 1628 1671 1698 1711 1842
LF 1768 1787# 1823
LFND 767 771#
LINE 18# 139
LLSAV 64# 181 192 194 209 214 217 351 914 1098 1113 1798 1833 1835
LNSKP 83# 143 237 239 259 261 269 271 286
LO 52# 1884
LOAD 443 1634#
LOOK 733 737# 748 749 770
LOOKL 592 734#
LOOKS 731# 1198
LPRG 455 1884#
LSTMCH 379 400# 414
LTR 1582 1586#
MBR 1406 1427#
MBRCH 84# 1353 1356 1431
MC 426 1353#
ISIS-II ASSEMBLER SYMBOL CROSS REFERENCE, V2.0 PAGE 4
MCH 798 808#
MDONE 1381 1385 1387#
MEMTP 78# 135 1642
MMOV 1360 1404#
MMOV2 1406# 1413
MNTR 20# 54 55 114 115
MOP 424 1356#
MOP1 1355 1358#
MPTR 77# 1359 1361 1377 1404 1420
MSAVE 91# 1370 1405
MVBR 869 879#
MVLAB 754 756#
NCHK 306 314#
NEG 694 717#
NERR 1266 1269#
NEWN 136 449 1640#
NEXTM 1360# 1386
NIN 1235 1241#
NMCTL 533 551#
NMSG 1269 1965#
NOMCH 791 803#
NOTL 1077 1079 1082#
NRMSG 1324 1955#
NSTORE 1248 1332#
NTFND 594 601#
NTR 1754 1756#
NUM 267 274#
NV 1654# 1664
NVAR 94# 363 1651
OLDOP 184 203#
OPS 175 192# 1262
ORIGN 14# 15 16 17 21
OUTADR 79# 145 1857 1864 1880 1885 1888 1892 1895
OVCTR 1858 1865 1869#
OVFMSG 1562 1959#
OVMSG 1539 1559#
PAD 1366 1438#
PBUFB 16# 1990
PBUFE 17# 102 134
PBUFF 226 240 262 527 624 1634 1796 1873 1991#
PO 53# 1891
PORT 23# 1916 1935
PRGOUT 1873# 1876 1881 1886 1893
PSTRT 15# 100
PUTNM 691# 702 1160
RDA 25# 1907 1933
ISIS-II ASSEMBLER SYMBOL CROSS REFERENCE, V2.0 PAGE 5
RESRET 1631 1698#
RETSAV 65# 1684 1701
RI 51# 1801 1808
ROLL 476 517#
ROP 430 1624#
RSTRT 108 118# 121 1261 1630
RTRN 384 391#
SAV2 1675 1679#
SAVOP 193 912#
SAVRET 607 1671#
SCAN 120 152# 159 171 174 176
SCANB 80# 133 529 591
SCNT 85# 989 1001 1003 1026
SDIG 654 656 658 682#
SETCNT 1021 1026#
SETUP 1087# 1120 1164 1217
SHIFT 1479 1487# 1495
SINDX 1055# 1067 1103
SKLN 167 243 252 265 286# 291 736 1867
SMOV 1407 1414#
SPRG 458 1891#
SQUEZ 1363 1367 1465# 1473
START 32 101# 1994
STKPR 21# 48 101 118
STMSG 1676 1963#
STOVF 1315 1324#
STPORT 24# 1906 1912 1932
SUBV 1519 1529 1542#
SWN 1387 1394#
SWY 1375 1390#
TALL 1114 1120#
TBE 26# 1913
TEMP 86# 732 735 746 1517 1521 1536 1544
TMORE 1102# 1111
TMOVE 1108 1117#
TOP 219 353 420 438 440 1096# 1554 1561 1568
TOPP 59# 1840
TSAVE 89# 1099 1112 1125
TXTCK 226# 530
UNFMSG 1569 1961#
UNITS 673# 683
UNMSG 1549 1566#
UOP 434 607#
VARCHK 207 328#
VARMCH 339 363# 371 562 1154 1337 1588 1605
VARSAV 87# 1245 1335
ISIS-II ASSEMBLER SYMBOL CROSS REFERENCE, V2.0 PAGE 6
VBL 1137 1143#
VCHK 329 332#
VIDEO 19#
VOFF 345 348#
WDTFR 588 842 867# 878 893 1237
WORD 95# 400 558 585 586 601 764 841 892 1009 1018 1159 1163 1438 1456 1458
XEND 783 795#
YCHK 304 309#
YENDB 789 804#
YNCHK 204 302#
YNOUT 903 906#
YNSW 88# 309 314 1391 1395
YNUM 277 280#
ZC 1040 1046#
CROSS REFERENCE COMPLETE