home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
simtel
/
sigm
/
vols000
/
vol043
/
tincmp.mac
< prev
next >
Wrap
Text File
|
1984-04-29
|
20KB
|
1,834 lines
EXTRN ?MSG
EXTRN ?BOOT,?INIT,?ENDING
COMMON /IOCTRL/
.ER: DB 0
.AC: DB 0
.IAV: DW 0,0,0,0,0,0
COMMON / /
.KLF EQU 10
.KCR EQU 13
.KEF EQU 26
.AA: DS 1
.BB: DS 1
.DD: DS 1
.EE: DS 1
.BF: DS 80
.BL: DS 1
.BP: DS 1
.C0: DS 1
.C1: DS 1
.C2: DS 1
.C3: DS 1
.C4: DS 1
.C8: DS 1
.C9: DS 1
.CC: DS 1
.CX: DS 1
.DG: DS 1
.DS: DS 10
.EF: DS 1
.F1: DS 128
.F2: DS 128
.HA: DS 1
.HF: DS 1
.LE: DS 1
.LF: DS 1
.LS: DS 9000
.MF: DS 1
.ML: DS 1
.MM: DS 1
.ND: DS 1
.NL: DS 1
.O1: DS 1
.O2: DS 1
.O3: DS 1
.OA: DS 1
.OB: DS 1
.OC: DS 1
.OD: DS 1
.OE: DS 1
.OG: DS 1
.OH: DS 1
.OL: DS 1
.OM: DS 1
.ON: DS 1
.OP: DS 1
.OR: DS 1
.OS: DS 1
.OT: DS 1
.PP: DS 1
.RB: DS 1
.RC: DS 1
.SF: DS 1
.SP: DS 1
.TR: DS 1
.UG: DS 1
.UN: DS 1
.UO: DS 1
.UT: DS 1
.ZR: DS 1
.I00: DS 2
.I01: DS 2
.I09: DS 2
.I10: DS 2
.I16: DS 2
.IAA: DS 2
.IBB: DS 2
.IBC: DS 2
.IDP: DS 2
.IED: DS 2
.III: DS 2
.IJJ: DS 2
.ILM: DS 2
.ILP: DS 2*1000
.IMP: DS 2
.INM: DS 2
.IPR: DS 2*10
.ISS: DS 2*40
.ITU: DS 2
.IUU: DS 2
.IXX: DS 2
.IYY: DS 2
DSEG
.ERASER.: DB 0
CSEG
?SETAC: MVI A,1
RM
RZ
XRA A
RET
?INTCK: MVI B,1
LDAX D
CMP M
JNZ $+8
INX H
INX D
LDAX D
XRA M
RZ
MOV A,B
RET
?START: LXI SP,?STACK
CALL ?INIT
MVI A,.KCR
STA .NL
MVI A,.KLF
STA .LF
CALL ..CR
CALL ?MSG
DB 'COPYRIGHT'
CALL ?MSG
DB ' (C) 1981'
CALL ?MSG
DB ' W.A.GALE'
CALL ..CR
CALL ?MSG
DB '8080 TINC'
CALL ?MSG
DB 'MP COMPIL'
CALL ?MSG
DB 'ER CP/M V'
CALL ?MSG
DB 'ERSION 1.'
CALL ?MSG
DB '05/TINCMP'
CALL ..CR
CALL ?MSG
DB 'COPYRIGHT'
CALL ?MSG
DB ' (C) 1981'
CALL ?MSG
DB ' A L BEND'
CALL ?MSG
DB 'ER, MD '
CALL ..CR
CALL ..IN
CALL ..RM
?LL000:
.X100:
LXI H,.CC
LXI D,.F1
CALL ?BREAD
EXTRN ?BREAD
LXI H,.ER
LDA .C0
CMP M
JZ $+5
XRA A
LXI B,013EH
STA .AA
LDA .AA
ORA A
JZ .W100
LDA .UG
ORA A
JZ .F101
.X102:
LXI H,.CC
LDA .NL
CMP M
JZ $+5
XRA A
LXI B,013EH
STA .BB
LXI H,.CC
LDA .LF
CMP M
JZ $+5
XRA A
LXI B,013EH
STA .DD
LXI H,.CC
LDA .OG
CMP M
JZ $+5
XRA A
LXI B,013EH
STA .AA
LXI H,.DD
LDA .BB
ORA M
STA .EE
LXI H,.CC
LDA .BL
CMP M
JZ $+5
XRA A
LXI B,013EH
STA .BB
LXI H,.AA
LDA .BB
ORA M
STA .AA
LXI H,.AA
LDA .EE
ORA M
STA .AA
LDA .AA
ORA A
JZ .W102
CALL ..GC
JMP .X102
.W102:
.F101:
LDA .C1
STA .BP
LHLD .C0
MVI H,0
LXI D,.BF
DAD D
LDA .CC
MOV M,A
.X103:
CALL ..GC
LXI H,.CC
LDA .NL
CMP M
JZ $+5
XRA A
LXI B,013EH
STA .AA
LDA .AA
ORA A
JZ .F104
CALL ..GC
LXI H,.CC
LDA .LF
CMP M
JZ $+5
XRA A
LXI B,013EH
STA .AA
LDA .AA
ORA A
JZ .F105
LDA .NL
STA .CC
.F105:
.F104:
LXI H,.NL
LDA .CC
CMP M
JNZ $+5
XRA A
LXI B,013EH
STA .AA
LXI H,.C8
LDA .BP
CMP M
JNZ $+5
XRA A
LXI B,013EH
STA .BB
LXI H,.BB
LDA .AA
ANA M
STA .AA
LDA .AA
ORA A
JZ .W103
LHLD .BP
MVI H,0
LXI D,.BF
DAD D
LDA .CC
MOV M,A
LXI H,.BP
INR M
JMP .X103
.W103:
.X106:
LXI H,.NL
LDA .CC
CMP M
JNZ $+5
XRA A
LXI B,013EH
STA .AA
LDA .AA
ORA A
JZ .W106
CALL ..GC
JMP .X106
.W106:
LHLD .BP
MVI H,0
LXI D,.BF
DAD D
LDA .RC
MOV M,A
LXI H,.BP
INR M
LHLD .BP
MVI H,0
LXI D,.BF
DAD D
LDA .NL
MOV M,A
LDA .BP
STA .LE
LXI H,.MM
LDA .BP
CMP M
CALL ?SETAC
STA .AA
LDA .AA
ORA A
JZ .F107
XRA A
STA .ML
JMP ?LL017
JMP .F108
.F107:
MVI A,1
STA .ML
.F108:
LHLD .I00
SHLD .IDP
LDA .C0
STA .PP
LHLD .I00
SHLD .IJJ
LHLD .C0
MVI H,0
SHLD .INM
.X109:
LHLD .IED
XCHG
LHLD .IDP
CALL ?CDEHL
EXTRN ?CDEHL
RAL
ANI 1
STA .AA
LDA .AA
ORA A
JZ .W109
LDA .C0
STA .BP
.X110:
LXI H,.LE
LDA .BP
CMP M
CALL ?SETAC
STA .AA
LDA .AA
ORA A
JZ .W110
LHLD .IJJ
LXI D,.LS
DAD D
MOV A,M
STA .AA
LXI H,.AA
LDA .RC
CMP M
JZ $+5
XRA A
LXI B,013EH
STA .AA
LHLD .BP
MVI H,0
LXI D,.BF
DAD D
MOV A,M
STA .O3
LXI H,.O3
LDA .RC
CMP M
JZ $+5
XRA A
LXI B,013EH
STA .O3
LXI H,.O3
LDA .AA
ANA M
STA .AA
LDA .AA
ORA A
JZ .F111
CALL ..DM
JMP ?LL000
JMP .F112
.F111:
LHLD .BP
MVI H,0
LXI D,.BF
DAD D
MOV A,M
STA .AA
LHLD .IJJ
LXI D,.LS
DAD D
MOV A,M
STA .BB
LXI H,.AA
LDA .BB
CMP M
JZ $+5
XRA A
LXI B,013EH
STA .AA
LDA .AA
ORA A
JZ .F113
JMP ?LL001
JMP .F114
.F113:
LXI H,.SF
LDA .BB
CMP M
JNZ $+5
XRA A
LXI B,013EH
STA .AA
LDA .AA
ORA A
JZ .F115
JMP ?LL010
JMP .F116
.F115:
LXI H,.PP
INR M
LHLD .BP
MVI H,0
LXI D,.BF
DAD D
MOV A,M
STA .AA
LHLD .AA
MVI H,0
SHLD .IAA
LHLD .PP
MVI H,0
DAD H
LXI D,.IPR
DAD D
LXI D,.IAA
LDAX D
MOV M,A
INX D
INX H
LDAX D
MOV M,A
.F116:
.F114:
.F112:
?LL001:
LXI H,.BP
INR M
LHLD .IJJ
INX H
SHLD .IJJ
JMP .X110
.W110:
?LL010:
LDA .C0
STA .PP
LHLD .INM
INX H
SHLD .INM
LHLD .INM
LXI D,.ILP
DAD H
DAD D
MOV E,M
INX H
MOV D,M
XCHG
SHLD .IDP
LHLD .IDP
SHLD .IJJ
JMP .X109
.W109:
?LL017:
LDA .C0
STA .BP
.X117:
LHLD .BP
MVI H,0
LXI D,.BF
DAD D
MOV A,M
STA .CC
LXI H,.C1
LDA .BP
ADD M
STA .O1
LHLD .O1
MVI H,0
LXI D,.BF
DAD D
MOV A,M
STA .AA
LXI H,.NL
LDA .AA
CMP M
JNZ $+5
XRA A
LXI B,013EH
STA .AA
LDA .AA
ORA A
JZ .W117
LDA .ML
ORA A
JZ .F118
LDA .CC
CALL ?WRNXT
EXTRN ?WRNXT
.F118:
LDA .CC
LXI D,.F2
CALL ?BWRIT
EXTRN ?BWRIT
LXI H,.BP
INR M
JMP .X117
.W117:
LDA .ML
ORA A
JZ .F119
CALL ..CR
.F119:
LDA .UN
ORA A
JZ .F120
LDA .NL
LXI D,.F2
CALL ?BWRIT
EXTRN ?BWRIT
LDA .LF
LXI D,.F2
CALL ?BWRIT
EXTRN ?BWRIT
.F120:
JMP .X100
.W100:
?LL088:
CALL ?MSG
DB 'TINCMP CO'
CALL ?MSG
DB 'MPILATION'
CALL ?MSG
DB ' FINISHED'
CALL ..CR
LXI H,.F1
CALL ?BCLOF
EXTRN ?BCLOF
LXI H,.F2
CALL ?BCLOF
EXTRN ?BCLOF
CALL ?ENDING
JMP ?BOOT
..GC:
LXI H,.CC
LXI D,.F1
CALL ?BREAD
EXTRN ?BREAD
LXI H,.C0
LDA .ER
CMP M
JNZ $+5
XRA A
LXI B,013EH
STA .AA
LDA .AA
ORA A
JZ .F121
JMP ?LL088
.F121:
LXI H,.CC
LDA .EF
CMP M
JZ $+5
XRA A
LXI B,013EH
STA .AA
LDA .AA
ORA A
JZ .F122
JMP ?LL088
.F122:
RET
..SD:
LHLD .I00
XCHG
LHLD .ITU
CALL ?CDEHL
EXTRN ?CDEHL
RAL
ANI 1
STA .AA
LDA .AA
ORA A
JZ .F123
MVI A,1
STA .BB
LHLD .ITU
CALL ?ICOMP
EXTRN ?ICOMP
SHLD .ITU
JMP .F124
.F123:
XRA A
STA .BB
.F124:
LXI D,.I00
LHLD .ITU
LDAX D
XRA L
JNZ $+12
INX D
LDAX D
XRA H
JNZ $+6
MVI A,1
LXI B,003EH
STA .AA
LDA .AA
ORA A
JZ .F125
LDA .C1
STA .ND
LHLD .C0
MVI H,0
LXI D,.DS
DAD D
LDA .ZR
MOV M,A
JMP .F126
.F125:
LDA .C0
STA .ND
.X127:
LHLD .ITU
XCHG
LHLD .I00
CALL ?CDEHL
EXTRN ?CDEHL
RAL
ANI 1
STA .AA
LDA .AA
ORA A
JZ .W127
LHLD .I10
XCHG
LHLD .ITU
CALL ?IDIV
EXTRN ?IDIV
SHLD .IYY
LHLD .IYY
XCHG
LHLD .I10
CALL ?IMUL
EXTRN ?IMUL
SHLD .IAA
LHLD .IAA
XCHG
LHLD .ITU
CALL ?ISUB
EXTRN ?ISUB
SHLD .IXX
LHLD .IYY
SHLD .ITU
LDA .IXX
STA .AA
LXI H,.ZR
LDA .AA
ADD M
STA .AA
LHLD .ND
MVI H,0
LXI D,.DS
DAD D
LDA .AA
MOV M,A
LXI H,.ND
INR M
JMP .X127
.W127:
.F126:
LHLD .ND
MVI H,0
LXI D,.DS
DAD D
LDA .OR
MOV M,A
LXI H,.BB
LDA .ND
ADD M
STA .ND
RET
..WN:
CALL ..SD
.X128:
LHLD .ND
MVI H,0
SHLD .IAA
LHLD .IAA
XCHG
LHLD .I00
CALL ?CDEHL
EXTRN ?CDEHL
RAL
ANI 1
STA .AA
LDA .AA
ORA A
JZ .W128
LXI H,.ND
DCR M
LHLD .ND
MVI H,0
LXI D,.DS
DAD D
MOV A,M
STA .AA
LDA .AA
LXI D,.F2
CALL ?BWRIT
EXTRN ?BWRIT
JMP .X128
.W128:
RET
..PN:
CALL ..SD
.X129:
LHLD .ND
MVI H,0
SHLD .IAA
LHLD .IAA
XCHG
LHLD .I00
CALL ?CDEHL
EXTRN ?CDEHL
RAL
ANI 1
STA .AA
LDA .AA
ORA A
JZ .W129
LXI H,.ND
DCR M
LHLD .ND
MVI H,0
LXI D,.DS
DAD D
MOV A,M
STA .AA
LDA .AA
CALL ?WRNXT
EXTRN ?WRNXT
JMP .X129
.W129:
LDA .BL
CALL ?WRNXT
EXTRN ?WRNXT
RET
..CD:
LXI H,.AA
LDA .ZR
CMP M
CALL ?SETAC
STA .BB
LXI H,.C9
LDA .AA
CMP M
CALL ?SETAC
STA .CC
LXI H,.CC
LDA .BB
ANA M
STA .BB
LDA .BB
ORA A
JZ .F130
LXI H,.ZR
LDA .AA
SUB M
STA .AA
RET
.F130:
LDA .C0
STA .AA
RET
..CH:
LXI H,.AA
LDA .ZR
CMP M
CALL ?SETAC
STA .BB
LXI H,.C9
LDA .AA
CMP M
CALL ?SETAC
STA .CC
LXI H,.CC
LDA .BB
ANA M
STA .BB
LDA .BB
ORA A
JZ .F131
LXI H,.ZR
LDA .AA
SUB M
STA .AA
RET
.F131:
LXI H,.AA
LDA .HA
CMP M
CALL ?SETAC
STA .BB
LXI H,.HF
LDA .AA
CMP M
CALL ?SETAC
STA .CC
LXI H,.CC
LDA .BB
ANA M
STA .BB
LDA .BB
ORA A
JZ .F132
LXI H,.HA
LDA .AA
SUB M
STA .AA
LXI H,.CX
LDA .AA
ADD M
STA .AA
RET
.F132:
LDA .C0
STA .AA
RET
..IN:
LXI H,8920
SHLD .ILM
LXI H,0
SHLD .I00
LXI H,1
SHLD .I01
LXI H,10
SHLD .I10
LXI H,9
SHLD .I09
XRA A
STA .C0
MVI A,1
STA .C1
MVI A,2
STA .C2
MVI A,3
STA .C3
MVI A,.KEF
STA .EF
MVI A,40
STA .C4
MVI A,80
STA .C8
LXI H,16
SHLD .I16
XRA A
STA .SP
MVI A,'9'
STA .C9
MVI A,'0'
STA .ZR
MVI A,' '
STA .BL
MVI A,'F'
STA .HF
MVI A,'A'
STA .HA
MVI A,10
STA .CX
LHLD .I01
SHLD .IBC
MVI A,'R'
STA .TR
LXI H,.F1
CALL ?BCLOF
EXTRN ?BCLOF
LXI D,?IFCB+((1-1)*36)
LXI H,.IBC
CALL ?ATACH
EXTRN ?ATACH,?IFCB
LXI D,.F1
LDA .TR
LHLD .IBC
CALL ?IOPEN
EXTRN ?IOPEN
MVI A,'W'
STA .TR
LHLD .IBC
INX H
SHLD .IBC
LXI H,.F2
CALL ?BCLOF
EXTRN ?BCLOF
LXI D,?IFCB+((2-1)*36)
LXI H,.IBC
CALL ?ATACH
EXTRN ?ATACH,?IFCB
LXI D,.F2
LDA .TR
LHLD .IBC
CALL ?IOPEN
EXTRN ?IOPEN
LXI H,.AA
LXI D,.F1
CALL ?BREAD
EXTRN ?BREAD
MVI A,'T'
STA .OT
XRA A
STA .UT
MVI A,'X'
STA .BB
LXI H,.BB
LDA .AA
CMP M
JNZ $+5
XRA A
LXI B,013EH
STA .UN
LXI H,.RB
LXI D,.F1
CALL ?BREAD
EXTRN ?BREAD
LXI H,.RC
LXI D,.F1
CALL ?BREAD
EXTRN ?BREAD
LXI H,.SF
LXI D,.F1
CALL ?BREAD
EXTRN ?BREAD
LXI H,.MF
LXI D,.F1
CALL ?BREAD
EXTRN ?BREAD
MVI A,'X'
STA .BB
LXI H,.MF
LDA .BB
CMP M
JZ $+5
XRA A
LXI B,013EH
STA .AA
LDA .AA
ORA A
JZ .F133
LDA .C0
STA .UO
JMP .F134
.F133:
LDA .C1
STA .UO
.F134:
MVI A,'P'
STA .OP
MVI A,'@'
STA .OE
MVI A,'V'
STA .OD
MVI A,'!'
STA .OB
MVI A,'S'
STA .OS
MVI A,'H'
STA .OH
MVI A,'N'
STA .ON
MVI A,'L'
STA .OL
MVI A,'C'
STA .OC
MVI A,'+'
STA .OA
MVI A,'-'
STA .OR
MVI A,'*'
STA .OM
LXI H,.OG
LXI D,.F1
CALL ?BREAD
EXTRN ?BREAD
MVI A,'X'
STA .AA
LXI H,.AA
LDA .OG
CMP M
JZ $+5
XRA A
LXI B,013EH
STA .BB
LDA .BB
ORA A
JZ .F135
XRA A
STA .UG
JMP .F136
.F135:
MVI A,1
STA .UG
.F136:
LXI H,.CC
LXI D,.F1
CALL ?BREAD
EXTRN ?BREAD
LXI H,.CC
LDA .NL
CMP M
JNZ $+5
XRA A
LXI B,013EH
STA .AA
LDA .AA
ORA A
JZ .F137
CALL ?MSG
DB 'FLAG LINE'
MVI A,1
CALL ?ISTOP
EXTRN ?ISTOP
.F137:
LXI H,100
SHLD .IUU
RET
..RM:
LHLD .I00
SHLD .III
LHLD .C0
MVI H,0
SHLD .INM
MVI A,127
STA .MM
.X138:
LXI H,.CC
LXI D,.F1
CALL ?BREAD
EXTRN ?BREAD
LXI H,.ER
LDA .C0
CMP M
JZ $+5
XRA A
LXI B,013EH
STA .AA
LDA .AA
ORA A
JZ .W138
LDA .CC
STA .ERASER.
JMP .XC140
ORG $-3
.UP139: LXI H,.ERASER.
LDA .OE
CMP M
JNZ .UP141
LXI H,.CC
LXI D,.F1
CALL ?BREAD
EXTRN ?BREAD
JMP ?LL077
JMP .XC140
ORG $-0
.UP141: LXI H,.ERASER.
LDA .RB
CMP M
JNZ .UP142
LHLD .INM
LXI D,.ILP
DAD H
DAD D
XCHG
LHLD .III
MOV A,L
STAX D
INX D
MOV A,H
STAX D
LHLD .INM
INX H
SHLD .INM
XRA A
STA .ML
JMP .XC140
ORG $-0
.UP142: LXI H,.ERASER.
LDA .NL
CMP M
JNZ .UP143
JMP .XC140
ORG $-0
.UP143: LXI H,.ERASER.
LDA .LF
CMP M
JNZ .UP144
JMP .XC140
ORG $-0
.UP144: LXI H,.ERASER.
LDA .RC
CMP M
JNZ .UP145
LHLD .III
LXI D,.LS
DAD D
LDA .RC
MOV M,A
LHLD .III
INX H
SHLD .III
LDA .ML
LXI H,.MM
CMP M
RAL
ANI 1
STA .AA
LDA .AA
ORA A
JZ .F146
LDA .ML
STA .MM
.F146:
.X147:
LXI H,.CC
LXI D,.F1
CALL ?BREAD
EXTRN ?BREAD
LXI H,.LF
LDA .CC
CMP M
JNZ $+5
XRA A
LXI B,013EH
STA .AA
LDA .AA
ORA A
JZ .W147
JMP .X147
.W147:
JMP .XC140
ORG $-0
.UP145: LXI H,.ERASER.
LDA .OG
CMP M
JNZ .UP148
LDA .UG
ORA A
JZ .F149
JMP .F150
.F149:
JMP ?LL077
.F150:
JMP .XC140
ORG $-0
.UP148:
?LL077:
LHLD .III
LXI D,.LS
DAD D
LDA .CC
MOV M,A
LHLD .III
INX H
SHLD .III
LHLD .III
XCHG
LHLD .ILM
CALL ?CDEHL
EXTRN ?CDEHL
RAL
ANI 1
STA .AA
LDA .AA
ORA A
JZ .F151
CALL ?MSG
DB 'MACMEMXST'
CALL ..CR
LXI H,.F1
CALL ?BCLOF
EXTRN ?BCLOF
MVI A,5
CALL ?ISTOP
EXTRN ?ISTOP
.F151:
LXI H,.ML
INR M
.XC140:
JMP .X138
.W138:
LXI H,.EF
LDA .CC
CMP M
JNZ $+5
XRA A
LXI B,013EH
STA .AA
LDA .AA
ORA A
JZ .F152
CALL ?MSG
DB 'DEFN READ'
MVI A,2
CALL ?ISTOP
EXTRN ?ISTOP
.F152:
LXI H,.F1
CALL ?BCLOF
EXTRN ?BCLOF
LXI H,3
SHLD .IBC
LXI D,?IFCB+((3-1)*36)
LXI H,.IBC
CALL ?ATACH
EXTRN ?ATACH,?IFCB
MVI A,'R'
STA .TR
LXI D,.F1
LDA .TR
LHLD .IBC
CALL ?IOPEN
EXTRN ?IOPEN
LHLD .III
SHLD .IED
CALL ?MSG
DB 'LOADED...'
LHLD .III
SHLD .ITU
CALL ..PN
CALL ?MSG
DB '.BYTES FO'
CALL ?MSG
DB 'R DEFINES'
CALL ..CR
LHLD .INM
LXI D,.ILP
DAD H
DAD D
XCHG
LHLD .III
MOV A,L
STAX D
INX D
MOV A,H
STAX D
LHLD .INM
SHLD .ITU
CALL ..PN
CALL ?MSG
DB '.MACROS..'
LHLD .MM
MVI H,0
SHLD .ITU
CALL ..PN
CALL ?MSG
DB ' MIN LEN.'
CALL ..CR
RET
..CR:
LDA .NL
CALL ?WRNXT
EXTRN ?WRNXT
LDA .LF
CALL ?WRNXT
EXTRN ?WRNXT
RET
..DM:
LHLD .I01
XCHG
LHLD .IJJ
DAD D
SHLD .IMP
LHLD .INM
INX H
SHLD .INM
LHLD .INM
LXI D,.ILP
DAD H
DAD D
MOV E,M
INX H
MOV D,M
XCHG
SHLD .IDP
.X153:
LHLD .IDP
XCHG
LHLD .IMP
CALL ?CDEHL
EXTRN ?CDEHL
RAL
ANI 1
STA .AA
LDA .AA
ORA A
JZ .W153
LHLD .IMP
LXI D,.LS
DAD D
MOV A,M
STA .AA
LDA .UO
ORA A
JZ .F154
LXI H,.AA
LDA .MF
CMP M
JZ $+5
XRA A
LXI B,013EH
STA .AA
JMP .F155
.F154:
LDA .C0
STA .AA
.F155:
LDA .AA
ORA A
JZ .F156
LHLD .IMP
INX H
SHLD .IMP
LHLD .IMP
LXI D,.LS
DAD D
MOV A,M
STA .O1
LHLD .IMP
INX H
SHLD .IMP
LHLD .IMP
LXI D,.LS
DAD D
MOV A,M
STA .AA
LDA .AA
STA .O2
CALL ..CD
LDA .AA
STA .DG
LHLD .IMP
INX H
SHLD .IMP
LHLD .IMP
LXI D,.LS
DAD D
MOV A,M
STA .O3
LDA .UT
ORA A
JZ .F157
LDA .O1
CALL ?WRNXT
EXTRN ?WRNXT
LDA .O2
CALL ?WRNXT
EXTRN ?WRNXT
LDA .O3
CALL ?WRNXT
EXTRN ?WRNXT
.F157:
LDA .O1
STA .ERASER.
JMP .XC159
ORG $-3
.UP158: LXI H,.ERASER.
LDA .OP
CMP M
JNZ .UP160
LHLD .DG
MVI H,0
LXI D,.IPR
DAD H
DAD D
LXI D,.ITU
MOV A,M
STAX D
INX D
INX H
MOV A,M
STAX D
JMP .XC159
ORG $-0
.UP160: LXI H,.ERASER.
LDA .OD
CMP M
JNZ .UP161
LHLD .DG
MVI H,0
LXI D,.IPR
DAD H
DAD D
LXI D,.IAA
MOV A,M
STAX D
INX D
INX H
MOV A,M
STAX D
LDA .IAA
STA .AA
CALL ..CD
LHLD .AA
MVI H,0
SHLD .ITU
JMP .XC159
ORG $-0
.UP161: LXI H,.ERASER.
LDA .OB
CMP M
JNZ .UP162
LHLD .SP
MVI H,0
LXI D,.ISS
DAD H
DAD D
LXI D,.ITU
MOV A,M
STAX D
INX D
INX H
MOV A,M
STAX D
LXI H,.C0
LDA .SP
CMP M
CALL ?SETAC
STA .AA
LDA .AA
ORA A
JZ .F163
CALL ?MSG
DB 'S STACKER'
CALL ..CR
LDA .C1
STA .SP
.F163:
LXI H,.SP
DCR M
JMP .XC159
ORG $-0
.UP162: LXI H,.ERASER.
LDA .OS
CMP M
JNZ .UP164
LHLD .SP
MVI H,0
LXI D,.ISS
DAD H
DAD D
LXI D,.ITU
MOV A,M
STAX D
INX D
INX H
MOV A,M
STAX D
JMP .XC159
ORG $-0
.UP164: LXI H,.ERASER.
LDA .OH
CMP M
JNZ .UP165
LDA .O2
STA .AA
CALL ..CH
LHLD .AA
MVI H,0
SHLD .IAA
LHLD .I16
XCHG
LHLD .IAA
CALL ?IMUL
EXTRN ?IMUL
SHLD .IAA
LDA .O3
STA .AA
CALL ..CH
LHLD .AA
MVI H,0
SHLD .IBB
LHLD .IBB
XCHG
LHLD .IAA
DAD D
SHLD .ITU
LDA .OC
STA .O3
JMP .XC159
ORG $-0
.UP165: LXI H,.ERASER.
LDA .OL
CMP M
JNZ .UP166
LHLD .O2
MVI H,0
SHLD .ITU
JMP .XC159
ORG $-0
.UP166: LXI H,.ERASER.
LDA .ON
CMP M
JNZ .UP167
LDA .O2
STA .AA
CALL ..CD
LHLD .AA
MVI H,0
SHLD .ITU
JMP .XC159
ORG $-0
.UP167: LXI H,.ERASER.
LDA .OT
CMP M
JNZ .UP168
MVI A,1
STA .UT
JMP .XC159
ORG $-0
.UP168:
LHLD .IUU
SHLD .ITU
LHLD .IUU
INX H
SHLD .IUU
.XC159:
LDA .UT
ORA A
JZ .F169
LHLD .ITU
SHLD .III
CALL ..PN
LHLD .SP
MVI H,0
LXI D,.ISS
DAD H
DAD D
LXI D,.ITU
MOV A,M
STAX D
INX D
INX H
MOV A,M
STAX D
CALL ..PN
LHLD .SP
MVI H,0
SHLD .ITU
CALL ..PN
LHLD .III
SHLD .ITU
CALL ..CR
.F169:
LDA .O3
STA .ERASER.
JMP .XC171
ORG $-3
.UP170: LXI H,.ERASER.
LDA .OC
CMP M
JNZ .UP172
LDA .ITU
STA .AA
LDA .AA
LXI D,.F2
CALL ?BWRIT
EXTRN ?BWRIT
JMP .XC171
ORG $-0
.UP172: LXI H,.ERASER.
LDA .OS
CMP M
JNZ .UP173
LXI H,.SP
INR M
LXI H,.SP
LDA .C4
CMP M
CALL ?SETAC
STA .AA
LDA .AA
ORA A
JZ .F174
CALL ?MSG
DB 'S OVERFLO'
CALL ..CR
LDA .C4
STA .SP
.F174:
LHLD .SP
MVI H,0
DAD H
LXI D,.ISS
DAD D
LXI D,.ITU
LDAX D
MOV M,A
INX D
INX H
LDAX D
MOV M,A
JMP .XC171
ORG $-0
.UP173: LXI H,.ERASER.
LDA .OP
CMP M
JNZ .UP175
LHLD .DG
MVI H,0
DAD H
LXI D,.IPR
DAD D
LXI D,.ITU
LDAX D
MOV M,A
INX D
INX H
LDAX D
MOV M,A
JMP .XC171
ORG $-0
.UP175: LXI H,.ERASER.
LDA .OA
CMP M
JNZ .UP176
LHLD .SP
MVI H,0
LXI D,.ISS
DAD H
DAD D
LXI D,.IAA
MOV A,M
STAX D
INX D
INX H
MOV A,M
STAX D
LHLD .ITU
XCHG
LHLD .IAA
DAD D
SHLD .IAA
LHLD .SP
MVI H,0
DAD H
LXI D,.ISS
DAD D
LXI D,.IAA
LDAX D
MOV M,A
INX D
INX H
LDAX D
MOV M,A
JMP .XC171
ORG $-0
.UP176: LXI H,.ERASER.
LDA .OR
CMP M
JNZ .UP177
LHLD .SP
MVI H,0
LXI D,.ISS
DAD H
DAD D
LXI D,.IAA
MOV A,M
STAX D
INX D
INX H
MOV A,M
STAX D
LHLD .ITU
XCHG
LHLD .IAA
CALL ?ISUB
EXTRN ?ISUB
SHLD .IAA
LHLD .SP
MVI H,0
DAD H
LXI D,.ISS
DAD D
LXI D,.IAA
LDAX D
MOV M,A
INX D
INX H
LDAX D
MOV M,A
JMP .XC171
ORG $-0
.UP177: LXI H,.ERASER.
LDA .OM
CMP M
JNZ .UP178
LHLD .SP
MVI H,0
LXI D,.ISS
DAD H
DAD D
LXI D,.IAA
MOV A,M
STAX D
INX D
INX H
MOV A,M
STAX D
LHLD .I10
XCHG
LHLD .IAA
CALL ?IMUL
EXTRN ?IMUL
SHLD .IAA
LHLD .ITU
XCHG
LHLD .IAA
DAD D
SHLD .IAA
LHLD .SP
MVI H,0
DAD H
LXI D,.ISS
DAD D
LXI D,.IAA
LDAX D
MOV M,A
INX D
INX H
LDAX D
MOV M,A
JMP .XC171
ORG $-0
.UP178: LXI H,.ERASER.
LDA .OH
CMP M
JNZ .UP179
LHLD .ITU
MOV A,L
STA .AA
MOV A,H
STA .BB
LDA .AA
LXI D,.F2
CALL ?BWRIT
EXTRN ?BWRIT
JMP .XC171
ORG $-0
.UP179:
CALL ..WN
.XC171:
JMP .F180
.F156:
LHLD .IMP
LXI D,.LS
DAD D
MOV A,M
STA .AA
LDA .UN
ORA A
JZ .F181
LXI H,.RC
LDA .AA
CMP M
JNZ $+5
XRA A
LXI B,013EH
STA .BB
JMP .F182
.F181:
LDA .C1
STA .BB
.F182:
LDA .BB
ORA A
JZ .F183
LDA .AA
LXI D,.F2
CALL ?BWRIT
EXTRN ?BWRIT
JMP .F184
.F183:
LDA .NL
LXI D,.F2
CALL ?BWRIT
EXTRN ?BWRIT
LDA .LF
LXI D,.F2
CALL ?BWRIT
EXTRN ?BWRIT
.F184:
.F180:
LHLD .IMP
INX H
SHLD .IMP
JMP .X153
.W153:
XRA A
STA .UT
RET
DSEG
DS 60
?STACK: DW 0
END ?START