Files
Digital-Research-Source-Code/CPM OPERATING SYSTEMS/CPM 68K/1.0X SOURCES/v102/bugs/lo68.cpm
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

3403 lines
43 KiB
Plaintext

.globl _couthd
.data
_couthd:
.dc.w 0
.ds.b 26
.globl __iob
.comm __iob,224
.globl _symptr
.comm _symptr,4
.globl _cszmt
.comm _cszmt,2
.globl _bmte
.comm _bmte,4
.globl _emte
.comm _emte,4
.globl _eirt
.comm _eirt,256
.globl _saveirt
.comm _saveirt,256
.globl _girt
.comm _girt,256
.globl _savgirt
.comm _savgirt,256
.globl _pirt
.comm _pirt,4
.globl _lmte
.comm _lmte,4
.globl _savlmte
.comm _savlmte,4
.globl _ibuf
.comm _ibuf,520
.globl _tbuf
.comm _tbuf,520
.globl _obuf
.comm _obuf,520
.globl _rbuf
.comm _rbuf,520
.globl _rtbuf
.comm _rtbuf,520
.globl _rdbuf
.comm _rdbuf,520
.globl _sflag
.comm _sflag,2
.globl _textbase
.comm _textbase,4
.globl _database
.comm _database,4
.globl _bssbase
.comm _bssbase,4
.globl _textsize
.comm _textsize,4
.globl _datasize
.comm _datasize,4
.globl _bsssize
.comm _bsssize,4
.globl _stacksiz
.comm _stacksiz,4
.globl _textstar
.comm _textstar,4
.globl _datastar
.comm _datastar,4
.globl _bssstart
.comm _bssstart,4
.globl _ifilname
.comm _ifilname,4
.globl _fsymp
.comm _fsymp,1024
.globl _firstsym
.comm _firstsym,4
.globl _extmatch
.comm _extmatch,2
.globl _noload
.comm _noload,2
.globl _lbfictr
.comm _lbfictr,32
.globl _libfctr
.comm _libfctr,4
.globl _lbfioff
.comm _lbfioff,1024
.globl _libptr
.comm _libptr,4
.globl _lib2hd
.comm _lib2hd,4
.globl _lib3_hdr
.comm _lib3_hdr,60
.globl _libhdsiz
.comm _libhdsiz,2
.globl _libhd
.comm _libhd,80
.globl _undflg
.comm _undflg,2
.globl _dafnc
.comm _dafnc,2
.globl _pass2
.comm _pass2,2
.globl _stlen
.comm _stlen,4
.globl _Xflag
.comm _Xflag,2
.globl _Dflag
.comm _Dflag,2
.globl _Bflag
.comm _Bflag,2
.globl _Zflag
.comm _Zflag,2
.globl _etextptr
.comm _etextptr,4
.globl _edataptr
.comm _edataptr,4
.globl _endptr
.comm _endptr,4
.globl _lastdup
.comm _lastdup,4
.globl _rtfnc
.comm _rtfnc,2
.globl _rdfnc
.comm _rdfnc,2
.globl _saverbit
.comm _saverbit,2
.globl _lib2hd
.data
_lib2hd:
.dc.w 0,0
.globl _libname
.data
_libname:
.dc.b 108,105,98,54,46,97,0
.even
.globl _ofilname
.data
_ofilname:
*line 40
.dc.l L2
.globl _tfbase
.data
_tfbase:
*line 46
.dc.l L3
.globl _tdisk
.data
_tdisk:
*line 47
.dc.l L4
.globl _tfchar
.data
_tfchar:
.dc.w 0,0
.globl _tfilname
.data
_tfilname:
.dc.b 0
.ds.b 79
.globl _etexstr
.data
_etexstr:
.dc.b 95,101,116,101,120,116,0,0,0
.even
.globl _edatstr
.data
_edatstr:
.dc.b 95,101,100,97,116,97,0,0,0
.even
.globl _eendstr
.data
_eendstr:
.dc.b 95,101,110,100,0,0,0,0,0
.even
.globl _ignflg
.data
_ignflg:
.dc.w 0
.globl _debug
.data
_debug:
.dc.w 0
.globl _exstat
.data
_exstat:
.dc.w 0
.globl _main
.text
_main:
~~main:
~i=R7
~j=R6
~p=R13
~p1=R11
~pc=R12
~argc=8
~argv=10
link R14,#0
movem.l R5-R7/R11-R13,-(sp)
*line 90
jsr _buildf
*line 91
jsr _intsytab
*line 92
move.l #_fsymp,_firstsym
*line 93
move.l #_lbfictr,_libfctr
*line 94
move.l #_lbfioff,_libptr
*line 95
cmp #1,8(R14)
bgt L9
L10:
*line 97
move.l #L11,(sp)
jsr _printf
*line 98
move #-1,(sp)
jsr _endit
L9:
*line 100
move.l 10(R14),R13
add.l #4,R13
*line 101
move #1,R7
L13:
*line 101
cmp 8(R14),R7
bge L12
*line 102
move.l (R13)+,R12
*line 108
move.l #L15,(sp)
move.l R12,-(sp)
jsr __strcmp
addq.l #4,sp
tst R0
beq L14
*line 111
cmp.b #45,(R12)
bne L16
*line 112
add.l #1,R12
move.b (R12),R0
ext.w R0
bra L18
L19:
*line 115
sub.l #1,R12
bra L17
L20:
*line 120
tst.b 1(R12)
beq L21
*line 121
move.l -(R13),(sp)
move.l #L22,-(sp)
jsr _printf
addq.l #4,sp
*line 122
move #-1,(sp)
jsr _exit
L21:
*line 124
move.l (R13)+,_ofilname
*line 125
add #1,R7
bra L14
L23:
*line 129
add #1,_sflag
bra L14
L24:L25:
*line 134
add #1,_Xflag
bra L14
L26:L27:L28:L29:
*line 142
add #1,_Zflag
*line 143
move #16,(sp)
add.l #1,R12
move.l R12,-(sp)
jsr _lgetnum
addq.l #4,sp
move.l R0,_textstar
*line 144
move.l _textstar,_textbase
bra L14
L30:L31:
*line 149
add #1,_Dflag
*line 150
move #16,(sp)
add.l #1,R12
move.l R12,-(sp)
jsr _lgetnum
addq.l #4,sp
move.l R0,_datastar
bra L14
L32:L33:
*line 155
add #1,_Bflag
*line 156
move #16,(sp)
add.l #1,R12
move.l R12,-(sp)
jsr _lgetnum
addq.l #4,sp
move.l R0,_bssstart
bra L14
L34:L35:
*line 161
add #1,_ignflg
bra L14
L36:
*line 165
add #1,_saverbit
bra L14
L37:L38:
*line 170
move.l _lmte,R11
*line 171
add.l #1,R12
*line 172
clr R6
L40:
*line 172
cmp #8,R6
bge L39
*line 173
move.b (R12),(R11)+
*line 175
tst.b (R12)
beq L42
*line 175
add.l #1,R12
L42:L41:
*line 172
add #1,R6
bra L40
L39:
*line 178
move.l _lmte,R8
move #2048,8(R8)
*line 179
clr (sp)
jsr _addsym
bra L14
L43:
*line 183
move.l (R13)+,_tdisk
*line 184
add #1,R7
*line 185
jsr _buildf
bra L14
bra L17
L18:sub #66,R0
cmp #56,R0
bhi L17
asl #2,R0
move R0,R8
add.l #L44,R8
move.l (R8),R8
jmp (R8)
.data
L44:.dc.l L32
.dc.l L17
.dc.l L30
.dc.l L17
.dc.l L17
.dc.l L17
.dc.l L17
.dc.l L34
.dc.l L17
.dc.l L17
.dc.l L17
.dc.l L17
.dc.l L17
.dc.l L17
.dc.l L17
.dc.l L17
.dc.l L17
.dc.l L17
.dc.l L28
.dc.l L37
.dc.l L17
.dc.l L17
.dc.l L24
.dc.l L17
.dc.l L26
.dc.l L17
.dc.l L17
.dc.l L17
.dc.l L17
.dc.l L17
.dc.l L17
.dc.l L17
.dc.l L33
.dc.l L17
.dc.l L31
.dc.l L17
.dc.l L43
.dc.l L17
.dc.l L17
.dc.l L35
.dc.l L17
.dc.l L17
.dc.l L19
.dc.l L17
.dc.l L17
.dc.l L20
.dc.l L17
.dc.l L17
.dc.l L36
.dc.l L23
.dc.l L29
.dc.l L38
.dc.l L17
.dc.l L17
.dc.l L25
.dc.l L17
.dc.l L27
.text
L17:L16:
*line 190
move.l R12,(sp)
jsr _p1load
L14:
*line 101
add #1,R7
bra L13
L12:
*line 192
jsr _resolve
*line 193
add #1,_pass2
*line 194
move.l 10(R14),R13
add.l #4,R13
*line 195
move.l #_fsymp,_firstsym
*line 196
move.l #_lbfictr,_libfctr
*line 197
move.l #_lbfioff,_libptr
*line 198
jsr _makeofil
*line 199
move #1,R7
L46:
*line 199
cmp 8(R14),R7
bge L45
*line 200
move.l (R13)+,R12
*line 206
move.l #L48,(sp)
move.l R12,-(sp)
jsr __strcmp
addq.l #4,sp
tst R0
beq L47
*line 208
cmp.b #45,(R12)
bne L49
*line 209
add.l #1,R12
move.b (R12),R0
ext.w R0
bra L51
L52:
*line 212
sub.l #1,R12
bra L50
L53:L54:
*line 217
add.l #4,R13
*line 218
add #1,R7
bra L47
L55:L56:L57:L58:L59:L60:L61:L62:L63:L64:L65:L66:L67:L68:L69:L70:bra L47
bra L50
L51:sub #66,R0
cmp #56,R0
bhi L50
asl #2,R0
move R0,R8
add.l #L71,R8
move.l (R8),R8
jmp (R8)
.data
L71:.dc.l L68
.dc.l L50
.dc.l L66
.dc.l L50
.dc.l L50
.dc.l L50
.dc.l L50
.dc.l L60
.dc.l L50
.dc.l L50
.dc.l L50
.dc.l L50
.dc.l L50
.dc.l L50
.dc.l L50
.dc.l L50
.dc.l L50
.dc.l L50
.dc.l L64
.dc.l L62
.dc.l L50
.dc.l L50
.dc.l L56
.dc.l L50
.dc.l L58
.dc.l L50
.dc.l L50
.dc.l L50
.dc.l L50
.dc.l L50
.dc.l L50
.dc.l L50
.dc.l L69
.dc.l L50
.dc.l L67
.dc.l L50
.dc.l L53
.dc.l L50
.dc.l L50
.dc.l L61
.dc.l L50
.dc.l L50
.dc.l L52
.dc.l L50
.dc.l L50
.dc.l L54
.dc.l L50
.dc.l L50
.dc.l L70
.dc.l L55
.dc.l L65
.dc.l L63
.dc.l L50
.dc.l L50
.dc.l L57
.dc.l L50
.dc.l L59
.text
L50:L49:
*line 242
move.l R12,(sp)
jsr _p2load
L47:
*line 199
add #1,R7
bra L46
L45:
*line 244
jsr _finalwr
L8:tst.l (sp)+
movem.l (sp)+,R6-R7/R11-R13
unlk R14
rts
.globl _buildf
.text
_buildf:
~~buildf:
link R14,#-4
*line 248
clr.b _tfilname
*line 249
move.l _tdisk,(sp)
move.l #_tfilname,-(sp)
jsr _strcat
addq.l #4,sp
*line 250
move.l _tfbase,(sp)
move.l #_tfilname,-(sp)
jsr _strcat
addq.l #4,sp
*line 257
move.l #_tfilname,(sp)
jsr _strlen
ext.l R0
add.l #_tfilname,R0
sub.l #1,R0
move.l R0,_tfchar
L72:unlk R14
rts
.globl _ii
.data
_ii:
.dc.w 0
.globl _p1load
.text
_p1load:
~~p1load:
~ap=8
link R14,#-4
*line 269
clr _ii
*line 270
move.l 8(R14),(sp)
jsr _openfile
*line 271
cmp #-147,_couthd
bne L74
*line 272
move #16,_libhdsiz
*line 273
jsr _searchli
bra L75
L74:
*line 275
cmp #$ffffff65,_couthd
bne L76
*line 276
move #28,_libhdsiz
*line 277
jsr _searchli
bra L77
L76:
*line 279
cmp #15393,_couthd
bne L78
*line 280
move.l #_ibuf,(sp)
jsr _xgetw
*line 281
move.l #_ibuf,(sp)
jsr _xgetw
*line 282
move.l #_ibuf,(sp)
jsr _xgetw
*line 283
move #60,_libhdsiz
*line 284
jsr _searchli
bra L79
L78:
*line 287
clr (sp)
jsr _do1load
*line 288
add.l #4,_firstsym
*line 289
jsr _addsizes
L79:L77:L75:
*line 291
move _ibuf,(sp)
jsr _close
L73:unlk R14
rts
.globl _lbctr
.data
_lbctr:
.dc.w 0,0
.globl _libfilsi
.data
_libfilsi:
.dc.w 0,0
.globl _searchli
.text
_searchli:
~~searchli:
link R14,#-4
*line 303
move.l _libfctr,R8
clr (R8)
*line 304
move.l #2,_lbctr
L82:
*line 305
jsr _rdlibhdr
tst R0
beq L81
*line 306
jsr _savsymta
*line 307
clr _extmatch
*line 308
clr _noload
*line 309
move.l #_libhd,_ifilname
*line 310
jsr _readhdr
*line 311
move #1,(sp)
jsr _do1load
*line 312
move _extmatch,R0
cmp _noload,R0
ble L83
*line 314
tst _noload
beq L84
*line 314
move.l _lastdup,(sp)
jsr _prdup
L84:
*line 315
jsr _addsizes
*line 316
add.l #4,_firstsym
*line 317
move.l _libfctr,R8
add #1,(R8)
*line 318
move.l _libptr,R8
move.l _lbctr,(R8)
add.l #4,_libptr
bra L85
L83:
*line 321
jsr _restsymt
L85:
*line 323
btst #0,3+_libfilsi
beq L86
*line 324
move.l #_ibuf,(sp)
jsr _xgetc
*line 325
add.l #1,_lbctr
L86:
*line 327
move _libhdsiz,R0
ext.l R0
add.l _libfilsi,R0
add.l R0,_lbctr
*line 328
move.l #_ibuf,(sp)
move.l _lbctr,-(sp)
jsr _lbseek
addq.l #4,sp
bra L82
L81:
*line 330
add.l #2,_libfctr
L80:unlk R14
rts
.globl _rdlibhdr
.text
_rdlibhdr:
~~rdlibhdr:
~i=R7
~p=R13
~pc=R12
link R14,#0
movem.l R6-R7/R12-R13,-(sp)
*line 341
move.l #_libhd,R13
*line 342
clr R7
L89:
*line 342
cmp #28,R7
bge L88
*line 343
move.l #_ibuf,(sp)
jsr _xgetc
move.b R0,(R13)+
L90:
*line 342
add #1,R7
bra L89
L88:
*line 344
clr.l 14+_libhd
*line 345
move.l 22+_libhd,_libfilsi
*line 347
tst.b _libhd
bne L91
*line 347
clr R0
bra L87
L91:
*line 348
move #1,R0
bra L87
L87:tst.l (sp)+
movem.l (sp)+,R7-R7/R12-R13
unlk R14
rts
.globl _openfile
.text
_openfile:
~~openfile:
~i=R7
~p=R13
~ap=8
link R14,#0
movem.l R6-R7/R13-R13,-(sp)
*line 361
move.l 8(R14),R13
*line 362
cmp.b #45,(R13)
bne L93
add.l #1,R13
move.l R13,R8
cmp.b #108,(R8)
bne L93
*line 364
add.l #1,R13
move.l R13,R8
tst.b (R8)
beq L94
*line 364
move.b (R13),3+_libname
bra L95
L94:
*line 366
move.b #54,3+_libname
L95:
*line 367
move.l #_libname,R13
bra L96
L93:
*line 370
move.l 8(R14),R13
L96:
*line 371
move #1,(sp)
move.l #_ibuf,-(sp)
move.l R13,-(sp)
jsr _xfopen
addq.l #8,sp
move R0,_ibuf
bge L97
*line 372
move.l R13,(sp)
move.l #L98,-(sp)
jsr _printf
addq.l #4,sp
*line 373
move #-1,(sp)
jsr _endit
L97:
*line 375
move.l R13,_ifilname
*line 376
move.l #_couthd,(sp)
move _ibuf,-(sp)
jsr _readshor
addq.l #2,sp
tst R0
beq L99
*line 377
move.l _ifilname,(sp)
move.l #L100,-(sp)
jsr _printf
addq.l #4,sp
*line 378
move #-1,(sp)
jsr _endit
L99:
*line 380
clr 2+_ibuf
*line 381
cmp #$ffffff65,_couthd
beq L101
*line 382
clr (sp)
clr.l -(sp)
move _ibuf,-(sp)
jsr _lseek
addq.l #6,sp
*line 383
jsr _readhdr
L101:
*line 385
tst _pass2
beq L102
*line 386
move #1,(sp)
move.l #_rbuf,-(sp)
move.l R13,-(sp)
jsr _xfopen
addq.l #8,sp
L102:L92:tst.l (sp)+
movem.l (sp)+,R7-R7/R13-R13
unlk R14
rts
.globl _readshor
.text
_readshor:
~~readshor:
~s=10
~fd=8
~ts=-2
link R14,#-6
*line 399
move #2,(sp)
move.l R14,-(sp)
sub.l #2,(sp)
move 8(R14),-(sp)
jsr _read
addq.l #6,sp
cmp #2,R0
beq L104
*line 399
move #1,R0
bra L103
L104:
*line 400
move.l 10(R14),R8
move -2(R14),(R8)
*line 401
clr R0
bra L103
L103:unlk R14
rts
.globl _readhdr
.text
_readhdr:
~~readhdr:
~i=R7
~p=R13
link R14,#0
movem.l R6-R7/R13-R13,-(sp)
*line 409
move.l #_couthd,R13
*line 410
clr R7
L107:
*line 410
cmp #14,R7
bge L106
*line 411
move.l #_ibuf,(sp)
jsr _xgetw
move R0,(R13)+
L108:
*line 410
add #1,R7
bra L107
L106:
*line 412
cmp #24602,_couthd
beq L109
*line 413
move.l _ifilname,(sp)
move.l #L110,-(sp)
jsr _printf
addq.l #4,sp
*line 414
move #-1,(sp)
jsr _endit
L109:
*line 416
tst 26+_couthd
beq L111
*line 417
move.l #L112,(sp)
jsr _printf
*line 418
move.l _ifilname,(sp)
move.l #L113,-(sp)
jsr _printf
addq.l #4,sp
*line 419
move #-1,(sp)
jsr _endit
L111:L105:tst.l (sp)+
movem.l (sp)+,R7-R7/R13-R13
unlk R14
rts
.globl _do1load
.text
_do1load:
~~do1load:
~i=R7
~libflg=8
~l=R6
link R14,#0
movem.l R5-R7,-(sp)
*line 435
move.l _firstsym,R8
move.l _lmte,(R8)
*line 436
move.l 2+_couthd,R6
add.l 6+_couthd,R6
add.l #28,R6
*line 438
tst 8(R14)
beq L115
*line 438
move.l _lbctr,R0
add.l #28,R0
add.l R0,R6
L115:
*line 439
move.l #_ibuf,(sp)
move.l R6,-(sp)
jsr _lbseek
addq.l #4,sp
*line 440
move.l 14+_couthd,R7
L117:
*line 441
tst.l R7
ble L116
*line 442
jsr _getsym
*line 443
jsr _relocsym
*line 444
move 8(R14),(sp)
jsr _addsym
*line 445
sub.l #14,R7
bra L117
L116:L114:tst.l (sp)+
movem.l (sp)+,R6-R7
unlk R14
rts
.globl _getsym
.text
_getsym:
~~getsym:
~i=R7
~p=R13
link R14,#0
movem.l R6-R7/R13-R13,-(sp)
*line 458
move.l _lmte,R13
*line 459
clr R7
L120:
*line 459
cmp #4,R7
bge L119
*line 460
move.l #_ibuf,(sp)
jsr _xgetw
move R0,(R13)+
L121:
*line 459
add #1,R7
bra L120
L119:
*line 461
move.l #_ibuf,(sp)
jsr _xgetw
move R0,(R13)+
*line 463
move.l #_ibuf,(sp)
jsr _xgetw
move R0,(R13)
*line 464
move.l #_ibuf,(sp)
jsr _xgetw
move R0,2(R13)
L118:tst.l (sp)+
movem.l (sp)+,R7-R7/R13-R13
unlk R14
rts
.globl _relocsym
.text
_relocsym:
~~relocsym:
~l=R7
link R14,#0
movem.l R6-R7,-(sp)
*line 474
clr.l R7
*line 476
move.l _lmte,R8
btst #3,8(R8)
bne L122
*line 478
move.l _lmte,R8
btst #1,8(R8)
beq L123
*line 478
move.l _textbase,R7
bra L124
L123:
*line 480
move.l _lmte,R8
btst #2,8(R8)
beq L125
*line 480
move.l _database,R7
bra L126
L125:
*line 482
move.l _lmte,R8
btst #0,8(R8)
beq L127
*line 482
move.l _bssbase,R7
bra L128
L127:
*line 485
move.l _lmte,R8
btst #6,8(R8)
bne L122
*line 487
move.l _lmte,R8
move 8(R8),(sp)
move.l #L129,-(sp)
jsr _printf
addq.l #4,sp
*line 488
move #-1,(sp)
jsr _endit
L128:L126:L124:
*line 490
move.l R7,R0
move.l _lmte,R9
add.l R0,10(R9)
L122:tst.l (sp)+
movem.l (sp)+,R7-R7
unlk R14
rts
.globl _addsym
.text
_addsym:
~~addsym:
~libflg=8
~p=R13
link R14,#0
movem.l R7-R7/R13-R13,-(sp)
*line 510
move.l _lmte,R8
btst #3,8(R8)
beq L131
*line 511
move.l #_eirt,(sp)
jsr _lemt
move.l R0,R13
*line 512
jsr _mmte
bra L132
L131:
*line 514
move.l _lmte,R8
btst #5,8(R8)
beq L133
*line 515
tst 8(R14)
beq L134
*line 516
move.l #_eirt,(sp)
jsr _lemt
move.l R0,R13
*line 517
cmp.l _lmte,R13
beq L135
*line 518
add #1,_extmatch
L135:L134:
*line 521
move.l #_girt,(sp)
jsr _lemt
move.l R0,R13
*line 523
cmp.l _lmte,R13
bne L136
*line 523
jsr _mmte
bra L137
L136:L138:
*line 526
tst 8(R14)
beq L139
*line 527
add #1,_noload
*line 528
move.l R13,_lastdup
bra L140
L139:
*line 531
move.l _lmte,R8
move 8(R8),R0
cmp 8(R13),R0
bne L10000
move.l _lmte,R8
move.l 10(R8),R0
cmp.l 10(R13),R0
beq L141
L10000:*line 531
move.l R13,(sp)
jsr _prdup
L141:L140:L137:bra L142
L133:
*line 536
move.l _lmte,R8
cmp.b #76,(R8)
beq L130
*line 538
tst _Xflag
beq L130
*line 539
jsr _addmte
L142:L132:L130:tst.l (sp)+
movem.l (sp)+,R13-R13
unlk R14
rts
.globl _prdup
.text
_prdup:
~~prdup:
~p=8
link R14,#-4
*line 547
move.l _ifilname,(sp)
move.l 8(R14),-(sp)
move.l #L144,-(sp)
jsr _printf
addq.l #8,sp
*line 548
add #1,_exstat
L143:unlk R14
rts
.globl _intsytab
.text
_intsytab:
~~intsytab:
~i=R7
~p1=R13
~p2=R12
link R14,#0
movem.l R6-R7/R12-R13,-(sp)
*line 559
move #5402,(sp)
jsr _sbrk
move.l R0,_bmte
*line 561
btst #0,3+_bmte
beq L146
*line 561
add.l #1,_bmte
L146:
*line 562
move.l _bmte,R0
add.l #5400,R0
move.l R0,_emte
*line 563
move.l _bmte,_lmte
*line 564
move #300,_cszmt
*line 565
move.l #_eirt,R13
*line 566
move.l #_girt,R12
*line 567
clr R7
L148:
*line 567
cmp #32,R7
bge L147
*line 568
move.l R13,(R13)+
*line 569
clr.l (R13)+
*line 570
move.l R12,(R12)+
*line 571
clr.l (R12)+
L149:
*line 567
add #1,R7
bra L148
L147:L145:tst.l (sp)+
movem.l (sp)+,R7-R7/R12-R13
unlk R14
rts
.globl _lemt
.text
_lemt:
~~lemt:
~airt=8
~mtpt=R13
link R14,#0
movem.l R7-R7/R13-R13,-(sp)
*line 626
jsr _hash
asl #2,R0
ext.l R0
add.l 8(R14),R0
move.l R0,_pirt
*line 627
move.l _pirt,R8
move.l 4(R8),R13
*line 629
move.l R13,R0
bne L151
*line 629
move.l _lmte,R13
bra L152
L151:
*line 631
move.l _pirt,R8
move.l (R8),R8
move.l _lmte,14(R8)
L152:
*line 632
move.l R13,(sp)
jsr _nextsy
bra L150
L150:tst.l (sp)+
movem.l (sp)+,R13-R13
unlk R14
rts
.globl _nextsy
.text
_nextsy:
~~nextsy:
~amtpt=8
~i=R7
~p1=R12
~p2=R11
~mtpt=R13
link R14,#0
movem.l R6-R7/R11-R13,-(sp)
*line 643
move.l 8(R14),R13
L154:
*line 647
move.l R13,R12
*line 648
move.l _lmte,R11
*line 649
clr R7
L156:
*line 649
cmp #4,R7
bge L155
*line 650
cmpm (R12)+,(R11)+
beq L158
*line 651
move.l 14(R13),R13
bra L154
L158:L157:
*line 649
add #1,R7
bra L156
L155:
*line 655
move.l R13,R0
bra L153
L153:tst.l (sp)+
movem.l (sp)+,R7-R7/R11-R13
unlk R14
rts
.globl _mmte
.text
_mmte:
~~mmte:
link R14,#-4
*line 666
move.l _pirt,R8
move.l _lmte,(R8)
*line 668
move.l _pirt,R8
tst.l 4(R8)
bne L160
*line 668
move.l _pirt,R8
move.l _lmte,4(R8)
L160:
*line 669
jsr _addmte
L159:unlk R14
rts
.globl _addmte
.text
_addmte:
~~addmte:
link R14,#-4
*line 676
add.l #18,_lmte
*line 677
move.l _lmte,R0
cmp.l _emte,R0
blo L162
*line 678
move #1800,(sp)
jsr _sbrk
cmp.l #-1,R0
bne L163
*line 679
move.l #L164,(sp)
jsr _printf
*line 680
move #-1,(sp)
jsr _exit
bra L165
L163:
*line 683
add.l #1800,_emte
*line 684
add #100,_cszmt
L165:L162:L161:unlk R14
rts
.globl _hash
.text
_hash:
~~hash:
~i=R6
~p=R13
~ht1=R7
link R14,#0
movem.l R5-R7/R13-R13,-(sp)
*line 698
clr R7
*line 699
move.l _lmte,R13
*line 700
clr R6
L168:
*line 700
cmp #8,R6
bge L167
*line 701
move.b (R13)+,R0
ext.w R0
add R0,R7
L169:
*line 700
add #1,R6
bra L168
L167:
*line 702
move R7,R0
and #62,R0
bra L166
L166:tst.l (sp)+
movem.l (sp)+,R6-R7/R13-R13
unlk R14
rts
.globl _pack
.text
_pack:
~~pack:
~pkptr=R12
~pkstr=R13
~i=R7
~apkptr=12
~apkstr=8
link R14,#0
movem.l R6-R7/R12-R13,-(sp)
*line 718
move.l 8(R14),R13
*line 719
move.l 12(R14),R12
*line 720
clr R7
L172:
*line 720
cmp #4,R7
bge L171
*line 721
move (R13)+,(R12)+
L173:
*line 720
add #1,R7
bra L172
L171:L170:tst.l (sp)+
movem.l (sp)+,R7-R7/R12-R13
unlk R14
rts
.globl _gettempf
.text
_gettempf:
~~gettempf:
~i=R7
~j=R6
link R14,#0
movem.l R5-R7,-(sp)
*line 738
move.l _tfchar,R8
move.b (R8),R0
ext.w R0
move.l _tfchar,R9
add.b #1,(R9)
*line 740
move #1,(sp)
move #384,-(sp)
move.l #_tfilname,-(sp)
jsr _xcreat
addq.l #6,sp
move R0,R6
tst R6
blt L175
*line 741
move R6,R0
bra L174
L175:
*line 743
move.l #_tfilname,(sp)
move.l #L176,-(sp)
jsr _printf
addq.l #4,sp
*line 744
move #-1,(sp)
jsr _endit
L174:tst.l (sp)+
movem.l (sp)+,R6-R7
unlk R14
rts
.globl _addsizes
.text
_addsizes:
~~addsizes:
link R14,#-4
*line 751
move.l 2+_couthd,R0
add.l R0,_textbase
*line 752
move.l 6+_couthd,R0
add.l R0,_database
*line 753
move.l 10+_couthd,R0
add.l R0,_bssbase
L177:unlk R14
rts
.globl _savsymta
.text
_savsymta:
~~savsymta:
~i=R7
~p1=R13
~p2=R12
link R14,#0
movem.l R6-R7/R12-R13,-(sp)
*line 764
move.l _lmte,_savlmte
*line 765
move.l #_eirt,R12
*line 766
move.l #_saveirt,R13
*line 767
clr R7
L180:
*line 767
cmp #64,R7
bge L179
*line 768
move.l (R12)+,(R13)+
L181:
*line 767
add #1,R7
bra L180
L179:
*line 769
move.l #_girt,R12
*line 770
move.l #_savgirt,R13
*line 771
clr R7
L183:
*line 771
cmp #64,R7
bge L182
*line 772
move.l (R12)+,(R13)+
L184:
*line 771
add #1,R7
bra L183
L182:L178:tst.l (sp)+
movem.l (sp)+,R7-R7/R12-R13
unlk R14
rts
.globl _restsymt
.text
_restsymt:
~~restsymt:
~i=R7
~p1=R13
~p2=R12
link R14,#0
movem.l R6-R7/R12-R13,-(sp)
*line 782
move.l _savlmte,_lmte
*line 783
move.l #_eirt,R13
*line 784
move.l #_saveirt,R12
*line 785
clr R7
L187:
*line 785
cmp #64,R7
bge L186
*line 786
move.l (R12)+,(R13)+
L188:
*line 785
add #1,R7
bra L187
L186:
*line 787
move.l #_girt,R13
*line 788
move.l #_savgirt,R12
*line 789
clr R7
L190:
*line 789
cmp #64,R7
bge L189
*line 790
move.l (R12)+,(R13)+
L191:
*line 789
add #1,R7
bra L190
L189:L185:tst.l (sp)+
movem.l (sp)+,R7-R7/R12-R13
unlk R14
rts
.globl _resolve
.text
_resolve:
~~resolve:
~p=R13
link R14,#0
movem.l R7-R7/R13-R13,-(sp)
*line 802
move.l _textbase,R0
sub.l _textstar,R0
move.l R0,_textsize
*line 803
move.l _database,_datasize
*line 804
move.l _bssbase,_bsssize
*line 806
tst _Dflag
beq L193
*line 806
move.l _datastar,_database
bra L194
L193:
*line 808
move.l _textbase,R0
add.l #1,R0
and.l #-2,R0
move.l R0,_database
*line 809
move.l _database,_datastar
L194:
*line 812
tst _Bflag
beq L195
*line 812
move.l _bssstart,_bssbase
bra L196
L195:
*line 814
move.l _database,R0
add.l _datasize,R0
add.l #1,R0
and.l #-2,R0
move.l R0,_bssbase
*line 815
move.l _bssbase,_bssstart
L196:
*line 817
move.l _textstar,_textbase
*line 818
jsr _fixsyms
*line 819
jsr _fixexts
*line 820
tst.l _etextptr
beq L197
*line 821
move.l _lmte,(sp)
move.l #_etexstr,-(sp)
jsr _pack
addq.l #4,sp
*line 822
move.l #_eirt,(sp)
jsr _lemt
move.l R0,R13
L200:
*line 824
move.l _textsize,10(R13)
*line 825
and #-2049,8(R13)
*line 826
or #-24576,8(R13)
L199:
*line 827
move.l 14(R13),(sp)
jsr _nextsy
move.l R0,R13
cmp.l _lmte,R13
bne L200
L198:L197:
*line 829
tst.l _edataptr
beq L201
*line 830
move.l _lmte,(sp)
move.l #_edatstr,-(sp)
jsr _pack
addq.l #4,sp
*line 831
move.l #_eirt,(sp)
jsr _lemt
move.l R0,R13
L204:
*line 833
move.l _textsize,R0
add.l _datasize,R0
move.l R0,10(R13)
*line 834
and #-2049,8(R13)
*line 835
or #-24576,8(R13)
L203:
*line 836
move.l 14(R13),(sp)
jsr _nextsy
move.l R0,R13
cmp.l _lmte,R13
bne L204
L202:L201:
*line 838
tst.l _endptr
beq L205
*line 839
move.l _lmte,(sp)
move.l #_eendstr,-(sp)
jsr _pack
addq.l #4,sp
*line 840
move.l #_eirt,(sp)
jsr _lemt
move.l R0,R13
L208:
*line 842
move.l _textsize,R0
add.l _datasize,R0
add.l _bsssize,R0
move.l R0,10(R13)
*line 843
and #-2049,8(R13)
*line 844
or #-24576,8(R13)
L207:
*line 845
move.l 14(R13),(sp)
jsr _nextsy
move.l R0,R13
cmp.l _lmte,R13
bne L208
L206:L205:L192:tst.l (sp)+
movem.l (sp)+,R13-R13
unlk R14
rts
.globl _fixsyms
.text
_fixsyms:
~~fixsyms:
~p=R13
link R14,#0
movem.l R7-R7/R13-R13,-(sp)
*line 857
move.l _bmte,R13
L211:
*line 857
cmp.l _lmte,R13
bcc L210
*line 859
btst #3,8(R13)
bne L212
*line 861
btst #2,8(R13)
beq L213
*line 861
move.l _database,R0
add.l R0,10(R13)
bra L214
L213:
*line 863
btst #0,8(R13)
beq L215
*line 863
move.l _bssbase,R0
add.l R0,10(R13)
L215:L214:L212:
*line 857
add.l #18,R13
bra L211
L210:L209:tst.l (sp)+
movem.l (sp)+,R13-R13
unlk R14
rts
.globl _fixexts
.text
_fixexts:
~~fixexts:
~p=R13
~sx1=R12
~sx2=R11
link R14,#0
movem.l R7-R7/R11-R13,-(sp)
*line 874
move.l #_eirt,R12
L218:
*line 874
cmp.l #252+_eirt,R12
bcc L217
*line 876
lea 4(R12),R11
move.l R11,R8
tst.l (R8)
beq L219
*line 879
move.l (R11),R11
L221:
*line 880
*line 882
tst.l 10(R11)
beq L222
*line 882
move.l R11,(sp)
jsr _asgncomn
bra L223
L222:
*line 884
move.l R11,(sp)
jsr _asgnext
L223:
*line 885
move.l R11,R13
*line 887
cmp.l (R12),R13
beq L220
*line 888
move.l 14(R11),R11
bra L221
L220:L219:
*line 874
add.l #8,R12
bra L218
L217:L216:tst.l (sp)+
movem.l (sp)+,R11-R13
unlk R14
rts
.globl _asgncomn
.text
_asgncomn:
~~asgncomn:
~l=R7
~p=R13
~p1=R12
~ap=8
link R14,#0
movem.l R6-R7/R12-R13,-(sp)
*line 901
move.l 8(R14),R13
*line 902
move.l _lmte,(sp)
move.l R13,-(sp)
jsr _pack
addq.l #4,sp
*line 903
move.l #_girt,(sp)
jsr _lemt
move.l R0,R12
*line 904
cmp.l _lmte,R12
beq L225
*line 905
move.l 8(R14),R8
move.l 10(R12),10(R8)
bra L224
L225:
*line 908
clr.l R7
*line 909
move.l #_eirt,(sp)
jsr _lemt
L228:
*line 912
cmp.l 10(R13),R7
bge L229
*line 912
move.l 10(R13),R7
L229:
*line 913
clr.l 10(R13)
L227:
*line 914
move.l 14(R13),(sp)
jsr _nextsy
move.l R0,R13
cmp.l _lmte,R13
bne L228
L226:
*line 916
move #-24320,8(R13)
*line 917
move.l _bssbase,R0
add.l _bsssize,R0
move.l R0,10(R13)
*line 918
move.l 8(R14),R8
move.l 10(R13),10(R8)
*line 919
add.l R7,_bsssize
*line 920
move.l #_girt,(sp)
jsr _lemt
*line 921
jsr _mmte
L224:tst.l (sp)+
movem.l (sp)+,R7-R7/R12-R13
unlk R14
rts
.globl _asgnext
.text
_asgnext:
~~asgnext:
~p=R13
~ap=8
~pg=R12
link R14,#0
movem.l R7-R7/R12-R13,-(sp)
*line 932
move.l 8(R14),R13
*line 933
move.l _lmte,(sp)
move.l R13,-(sp)
jsr _pack
addq.l #4,sp
*line 934
move.l #_girt,(sp)
jsr _lemt
move.l R0,R12
*line 935
cmp.l _lmte,R12
bne L231
*line 936
move.l #_eirt,(sp)
jsr _lemt
move.l R0,R12
*line 937
cmp.l _lmte,R12
bne L232
*line 938
move.l #L233,(sp)
jsr _printf
*line 939
move #-1,(sp)
jsr _endit
L232:L235:
*line 941
move.l 14(R13),(sp)
jsr _nextsy
move.l R0,R13
cmp.l _lmte,R13
beq L234
*line 942
tst.l 10(R13)
beq L236
*line 943
move.l 8(R14),(sp)
jsr _asgncomn
bra L230
L236:bra L235
L234:
*line 948
move.l 8(R14),(sp)
jsr _spendsym
tst R0
bne L230
*line 949
tst _undflg
bne L237
*line 950
move.l #L238,(sp)
jsr _printf
*line 951
add #1,_undflg
*line 952
add #1,_exstat
L237:
*line 954
move.l R13,(sp)
jsr _prtsym
bra L239
L231:
*line 957
move.l 10(R12),10(R13)
L239:L230:tst.l (sp)+
movem.l (sp)+,R12-R13
unlk R14
rts
.globl _prtsym
.text
_prtsym:
~~prtsym:
~i=R7
~p=R13
~ap=8
link R14,#0
movem.l R6-R7/R13-R13,-(sp)
*line 969
move.l 8(R14),R13
*line 970
clr R7
L242:
*line 970
cmp #8,R7
bge L241
*line 972
tst.b (R13)
beq L244
*line 972
move.l #14+__iob,(sp)
move.b (R13)+,R0
ext.w R0
move R0,-(sp)
jsr _fputc
addq.l #2,sp
bra L245
L244:bra L241
L245:L243:
*line 970
add #1,R7
bra L242
L241:
*line 976
move.l #14+__iob,(sp)
move #10,-(sp)
jsr _fputc
addq.l #2,sp
L240:tst.l (sp)+
movem.l (sp)+,R7-R7/R13-R13
unlk R14
rts
.globl _p2load
.text
_p2load:
~~p2load:
~ap=8
link R14,#-4
*line 986
move.l 8(R14),(sp)
jsr _openfile
*line 987
cmp #-147,_couthd
bne L247
*line 988
move #16,_libhdsiz
*line 989
jsr _loadlib
bra L248
L247:
*line 991
cmp #$ffffff65,_couthd
bne L249
*line 992
move #28,_libhdsiz
*line 993
jsr _loadlib
bra L250
L249:
*line 995
cmp #15393,_couthd
bne L251
*line 996
move #60,_libhdsiz
*line 997
jsr _loadlib
bra L252
L251:
*line 1000
clr (sp)
jsr _do2load
*line 1001
jsr _addsizes
L252:L250:L248:
*line 1003
move _ibuf,(sp)
jsr _close
*line 1004
move _rbuf,(sp)
jsr _close
L246:unlk R14
rts
.globl _makeofil
.text
_makeofil:
~~makeofil:
~l=-4
link R14,#-8
*line 1014
move #1,(sp)
move #438,-(sp)
move.l _ofilname,-(sp)
jsr _xcreat
addq.l #6,sp
move R0,_obuf
bge L254
*line 1015
move.l _ofilname,(sp)
move.l #L255,-(sp)
jsr _printf
addq.l #4,sp
*line 1016
move #-1,(sp)
jsr _endit
L254:
*line 1018
move #512,2+_obuf
*line 1019
move.l #8+_obuf,4+_obuf
*line 1021
move _Dflag,R0
or _Bflag,R0
beq L256
*line 1021
move.l #_obuf,(sp)
move #24603,-(sp)
jsr _xputw
addq.l #2,sp
bra L257
L256:
*line 1023
move.l #_obuf,(sp)
move #24602,-(sp)
jsr _xputw
addq.l #2,sp
L257:
*line 1089
move.l #_obuf,(sp)
move _textsize,-(sp)
jsr _xputw
addq.l #2,sp
*line 1090
move.l #_obuf,(sp)
move 2+_textsize,-(sp)
jsr _xputw
addq.l #2,sp
*line 1091
move.l #_obuf,(sp)
move _datasize,-(sp)
jsr _xputw
addq.l #2,sp
*line 1092
move.l #_obuf,(sp)
move 2+_datasize,-(sp)
jsr _xputw
addq.l #2,sp
*line 1093
move.l #_obuf,(sp)
move _bsssize,-(sp)
jsr _xputw
addq.l #2,sp
*line 1094
move.l #_obuf,(sp)
move 2+_bsssize,-(sp)
jsr _xputw
addq.l #2,sp
*line 1095
move.l _lmte,R0
sub.l _bmte,R0
move.l R0,-4(R14)
*line 1096
move.l #_obuf,(sp)
move -4(R14),-(sp)
jsr _xputw
addq.l #2,sp
*line 1097
move.l #_obuf,(sp)
move -2(R14),-(sp)
jsr _xputw
addq.l #2,sp
*line 1098
move.l #_obuf,(sp)
move _stacksiz,-(sp)
jsr _xputw
addq.l #2,sp
*line 1099
move.l #_obuf,(sp)
move 2+_stacksiz,-(sp)
jsr _xputw
addq.l #2,sp
*line 1100
move.l #_obuf,(sp)
move _textstar,-(sp)
jsr _xputw
addq.l #2,sp
*line 1101
move.l #_obuf,(sp)
move 2+_textstar,-(sp)
jsr _xputw
addq.l #2,sp
*line 1102
tst _saverbit
beq L258
*line 1103
move.l #_obuf,(sp)
clr -(sp)
jsr _xputw
addq.l #2,sp
bra L259
L258:
*line 1107
move.l #_obuf,(sp)
move #-1,-(sp)
jsr _xputw
addq.l #2,sp
L259:
*line 1111
move _Dflag,R0
or _Bflag,R0
beq L260
*line 1112
move.l #_obuf,(sp)
move _datastar,-(sp)
jsr _xputw
addq.l #2,sp
*line 1113
move.l #_obuf,(sp)
move 2+_datastar,-(sp)
jsr _xputw
addq.l #2,sp
*line 1114
move.l #_obuf,(sp)
move _bssstart,-(sp)
jsr _xputw
addq.l #2,sp
*line 1115
move.l #_obuf,(sp)
move 2+_bssstart,-(sp)
jsr _xputw
addq.l #2,sp
L260:
*line 1119
move.l #_tbuf,(sp)
jsr _tmpbinit
*line 1120
move.l _tfchar,R8
move.b (R8),_dafnc
*line 1121
tst _saverbit
beq L261
*line 1122
move.l #_rtbuf,(sp)
jsr _tmpbinit
*line 1123
move.l _tfchar,R8
move.b (R8),_rtfnc
*line 1124
move.l #_rdbuf,(sp)
jsr _tmpbinit
*line 1125
move.l _tfchar,R8
move.b (R8),_rdfnc
L261:L253:unlk R14
rts
.globl _tmpbinit
.text
_tmpbinit:
~~tmpbinit:
~abufp=8
~bufp=R13
link R14,#0
movem.l R7-R7/R13-R13,-(sp)
*line 1135
move.l 8(R14),R13
*line 1136
jsr _gettempf
move R0,(R13)
*line 1137
move #512,2(R13)
*line 1138
lea 8(R13),R8
move.l R8,4(R13)
L262:tst.l (sp)+
movem.l (sp)+,R13-R13
unlk R14
rts
.globl _endit
.text
_endit:
~~endit:
~stat=8
link R14,#-4
*line 1144
tst.b _dafnc
beq L264
*line 1145
move.l _tfchar,R8
move.b _dafnc,(R8)
*line 1146
move.l #_tfilname,(sp)
jsr _unlink
L264:
*line 1148
tst _saverbit
beq L265
*line 1149
move.l _tfchar,R8
move.b _rtfnc,(R8)
*line 1150
move.l #_tfilname,(sp)
jsr _unlink
*line 1151
move.l _tfchar,R8
move.b _rdfnc,(R8)
*line 1152
move.l #_tfilname,(sp)
jsr _unlink
L265:
*line 1154
move 8(R14),(sp)
jsr _exit
L263:unlk R14
rts
.globl _loadlib
.text
_loadlib:
~~loadlib:
~i=R7
~j=R6
~l=R5
link R14,#0
movem.l R4-R7,-(sp)
*line 1167
move.l _libfctr,R8
move (R8),R7
add.l #2,_libfctr
*line 1169
tst R7
beq L266
L268:
*line 1170
move R7,R0
sub #1,R7
tst R0
beq L267
*line 1171
move.l _libptr,R8
move.l (R8),R5
add.l #4,_libptr
*line 1172
move.l #_ibuf,(sp)
move.l R5,-(sp)
jsr _lbseek
addq.l #4,sp
*line 1173
move.l #_rbuf,(sp)
move.l R5,-(sp)
jsr _lbseek
addq.l #4,sp
*line 1174
jsr _rdlibhdr
*line 1175
jsr _readhdr
*line 1176
move.l R5,_lbctr
*line 1177
move #1,(sp)
jsr _do2load
*line 1178
jsr _addsizes
bra L268
L267:L266:tst.l (sp)+
movem.l (sp)+,R5-R7
unlk R14
rts
.globl _lbseek
.text
_lbseek:
~~lbseek:
~al=8
~bn=R7
~bp=12
link R14,#0
movem.l R6-R7,-(sp)
*line 1191
move.l 8(R14),R7
clr.l R0
move #9,R0
asr.l R0,R7
clr.l R0
move #9,R0
asl.l R0,R7
*line 1192
clr (sp)
move.l R7,-(sp)
move.l 12(R14),R8
move (R8),-(sp)
jsr _lseek
addq.l #6,sp
tst.l R0
bge L270
*line 1193
move.l _ifilname,(sp)
move.l #L271,-(sp)
jsr _printf
addq.l #4,sp
*line 1194
jsr _endit
L270:
*line 1196
move.l 12(R14),R8
clr 2(R8)
*line 1197
move.l 12(R14),R0
add.l #8,R0
move.l 12(R14),R9
move.l R0,4(R9)
L273:
*line 1198
cmp.l 8(R14),R7
bge L272
*line 1199
move.l 12(R14),(sp)
jsr _xgetc
L274:
*line 1198
add.l #1,R7
bra L273
L272:L269:tst.l (sp)+
movem.l (sp)+,R7-R7
unlk R14
rts
.globl _extval
.text
_extval:
~~extval:
~extno=8
~p=R13
~pg=R12
link R14,#0
movem.l R7-R7/R12-R13,-(sp)
*line 1215
move 8(R14),R0
muls #18,R0
move.l R0,R13
add.l _symptr,R13
*line 1216
btst #3,8(R13)
bne L276
*line 1217
move.l 10(R13),R0
bra L275
L276:
*line 1219
move.l _lmte,(sp)
move.l R13,-(sp)
jsr _pack
addq.l #4,sp
*line 1220
move.l #_girt,(sp)
jsr _lemt
move.l R0,R12
*line 1222
cmp.l _lmte,R12
bne L277
*line 1222
move.l #_eirt,(sp)
jsr _lemt
move.l R0,R12
L277:
*line 1223
move.l 10(R12),R0
bra L275
L275:tst.l (sp)+
movem.l (sp)+,R12-R13
unlk R14
rts
.globl _extbase
.text
_extbase:
~~extbase:
~extno=8
~i=R7
~p=R13
~pg=R12
link R14,#0
movem.l R6-R7/R12-R13,-(sp)
*line 1236
move 8(R14),R0
muls #18,R0
move.l R0,R13
add.l _symptr,R13
*line 1237
btst #3,8(R13)
bne L279
*line 1238
move.l R13,R12
bra L280
L279:
*line 1241
move.l _lmte,(sp)
move.l R13,-(sp)
jsr _pack
addq.l #4,sp
*line 1242
move.l #_girt,(sp)
jsr _lemt
move.l R0,R12
*line 1244
cmp.l _lmte,R12
bne L281
*line 1244
move.l #_eirt,(sp)
jsr _lemt
move.l R0,R12
L281:L280:
*line 1246
move 8(R12),R7
*line 1248
btst #10,R7
beq L282
*line 1248
move #1,R0
bra L278
bra L283
L282:
*line 1250
btst #9,R7
beq L284
*line 1250
move #2,R0
bra L278
bra L285
L284:
*line 1252
btst #8,R7
beq L286
*line 1252
move #3,R0
bra L278
L286:L285:L283:
*line 1253
clr R0
bra L278
L278:tst.l (sp)+
movem.l (sp)+,R7-R7/R12-R13
unlk R14
rts
.globl _do2load
.text
_do2load:
~~do2load:
~longf=-2
~i=R7
~j=R6
~libflg=8
~l=R4
~p=R13
~wasext=-10
~l1=-8
~pr=R12
~tpc=R5
~saof=-4
link R14,#-10
movem.l R3-R7/R12-R13,-(sp)
*line 1273
clr.l R5
*line 1274
move.l #_obuf,R13
*line 1275
move.l #_rtbuf,R12
*line 1276
move #-1,-4(R14)
*line 1277
move.l _firstsym,R8
move.l (R8),_symptr
add.l #4,_firstsym
*line 1278
move.l 2+_couthd,R4
add.l 6+_couthd,R4
add.l 14+_couthd,R4
add.l #28,R4
*line 1280
tst 8(R14)
beq L288
*line 1280
move.l _lbctr,R0
add.l #28,R0
add.l R0,R4
L288:
*line 1281
move.l #_rbuf,(sp)
move.l R4,-(sp)
jsr _lbseek
addq.l #4,sp
*line 1282
move.l 2+_couthd,R4
L289:L291:
*line 1284
sub.l #2,R4
tst.l R4
blt L290
*line 1285
clr -2(R14)
*line 1286
move.l #_ibuf,(sp)
jsr _xgetw
move R0,R7
*line 1287
move.l #_rbuf,(sp)
jsr _xgetw
move R0,R6
*line 1288
add.l #2,R5
*line 1289
clr -10(R14)
*line 1290
move R6,R0
and #7,R0
bra L293
L294:L295:
*line 1294
move.l R13,(sp)
move R7,-(sp)
jsr _xputw
addq.l #2,sp
*line 1296
tst _saverbit
beq L296
*line 1296
move.l R12,(sp)
move R6,-(sp)
jsr _xputw
addq.l #2,sp
L296:bra L292
L297:
*line 1300
move R7,-8(R14)
*line 1302
tst _saverbit
beq L298
*line 1302
move.l R12,(sp)
move R6,-(sp)
jsr _xputw
addq.l #2,sp
L298:
*line 1303
move.l #_ibuf,(sp)
jsr _xgetw
move R0,-6(R14)
*line 1304
move.l #_rbuf,(sp)
jsr _xgetw
move R0,R6
*line 1305
add.l #2,R5
*line 1306
add #1,-2(R14)
*line 1307
sub.l #2,R4
L299:
*line 1309
move R6,R0
and #7,R0
bra L301
L302:
*line 1313
tst _saverbit
beq L303
*line 1313
move.l R12,(sp)
move R6,-(sp)
jsr _xputw
addq.l #2,sp
L303:bra L300
L304:L305:L306:bra L307
L308:
*line 1321
move.l _textbase,R0
add.l R0,-8(R14)
*line 1323
tst _saverbit
beq L309
*line 1323
move.l R12,(sp)
move R6,-(sp)
jsr _xputw
addq.l #2,sp
L309:bra L300
L310:
*line 1327
move.l _database,R0
add.l R0,-8(R14)
*line 1329
tst _saverbit
beq L311
*line 1329
move.l R12,(sp)
move R6,-(sp)
jsr _xputw
addq.l #2,sp
L311:bra L300
L312:
*line 1333
move.l _bssbase,R0
add.l R0,-8(R14)
*line 1335
tst _saverbit
beq L313
*line 1335
move.l R12,(sp)
move R6,-(sp)
jsr _xputw
addq.l #2,sp
L313:bra L300
L314:
*line 1339
add #1,-10(R14)
*line 1340
move R6,R0
asr #3,R0
move R0,(sp)
jsr _extval
add.l R0,-8(R14)
*line 1342
tst _saverbit
beq L315
*line 1342
move.l R12,(sp)
move R6,R0
asr #3,R0
move R0,-(sp)
jsr _extbase
addq.l #2,sp
move R0,-(sp)
jsr _xputw
addq.l #2,sp
L315:bra L300
L316:
*line 1346
move R6,R0
asr #3,R0
move R0,(sp)
jsr _extval
add.l -8(R14),R0
sub.l _textbase,R0
sub.l R5,R0
add.l #2,R0
move.l R0,-8(R14)
*line 1347
move.l -8(R14),R0
cmp.l #$ffff8000,R0
blt L10001
cmp.l #32767,-8(R14)
ble L317
L10001:*line 1349
move.l _ifilname,(sp)
move.l R5,-(sp)
move.l #L318,-(sp)
jsr _printf
addq.l #8,sp
*line 1350
move R6,R0
asr #3,R0
move R0,(sp)
jsr _prextnam
*line 1351
add #1,_exstat
L317:
*line 1353
clr -8(R14)
*line 1355
tst _saverbit
beq L319
*line 1355
move.l R12,(sp)
clr -(sp)
jsr _xputw
addq.l #2,sp
L319:bra L320
bra L300
L301:cmp #7,R0
bhi L306
asl #2,R0
move R0,R8
add.l #L321,R8
move.l (R8),R8
jmp (R8)
.data
L321:.dc.l L302
.dc.l L310
.dc.l L308
.dc.l L312
.dc.l L314
.dc.l L305
.dc.l L316
.dc.l L304
.text
L300:
*line 1359
tst _ignflg
bne L322
tst -2(R14)
bne L322
move.l -8(R14),R0
and.l #$ffff8000,R0
beq L322
tst -4(R14)
beq L322
*line 1360
move.l _ifilname,(sp)
move.l #L323,-(sp)
jsr _printf
addq.l #4,sp
*line 1362
tst -10(R14)
beq L324
*line 1362
move R6,R0
asr #3,R0
move R0,(sp)
jsr _prextnam
L324:
*line 1363
add #1,_exstat
*line 1364
tst 8(R14)
beq L325
*line 1365
move.l _libptr,R8
move.l -4(R8),-8(R14)
*line 1366
move -6(R14),(sp)
move.l #L326,-(sp)
jsr _printf
addq.l #4,sp
*line 1367
clr.l -8(R14)
L325:
*line 1369
clr -4(R14)
L322:
*line 1372
tst -2(R14)
beq L327
*line 1372
move.l R13,(sp)
move -8(R14),-(sp)
jsr _xputw
addq.l #2,sp
L327:L320:
*line 1374
move.l R13,(sp)
move -6(R14),-(sp)
jsr _xputw
addq.l #2,sp
bra L292
L328:L329:L330:L331:L332:
*line 1387
move R7,R8
move.l R8,-8(R14)
bra L299
L333:L307:
*line 1392
move.l _ifilname,(sp)
move.l #L334,-(sp)
jsr _printf
addq.l #4,sp
*line 1393
move #-1,(sp)
jsr _endit
bra L292
L293:cmp #7,R0
bhi L333
asl #2,R0
move R0,R8
add.l #L335,R8
move.l (R8),R8
jmp (R8)
.data
L335:.dc.l L295
.dc.l L329
.dc.l L328
.dc.l L330
.dc.l L331
.dc.l L297
.dc.l L332
.dc.l L294
.text
L292:bra L291
L290:
*line 1397
cmp.l #_obuf,R13
bne L336
*line 1398
move.l #_tbuf,R13
*line 1399
move.l #_rdbuf,R12
*line 1400
move.l 6+_couthd,R4
bra L289
L336:L287:tst.l (sp)+
movem.l (sp)+,R4-R7/R12-R13
unlk R14
rts
.globl _finalwr
.text
_finalwr:
~~finalwr:
link R14,#-4
*line 1412
move.l _textsize,R0
add.l _textstar,R0
cmp.l _textbase,R0
beq L338
*line 1413
move.l #L339,(sp)
jsr _printf
*line 1414
add #1,_exstat
L338:
*line 1416
move.l _datasize,(sp)
move.b _dafnc,R0
ext.w R0
move R0,-(sp)
move.l #_tbuf,-(sp)
jsr _cpdata
addq.l #6,sp
*line 1417
jsr _osymt
*line 1418
tst _saverbit
beq L340
*line 1419
move.l _textsize,(sp)
move.b _rtfnc,R0
ext.w R0
move R0,-(sp)
move.l #_rtbuf,-(sp)
jsr _cpdata
addq.l #6,sp
*line 1420
move.l _datasize,(sp)
move.b _rdfnc,R0
ext.w R0
move R0,-(sp)
move.l #_rdbuf,-(sp)
jsr _cpdata
addq.l #6,sp
L340:
*line 1422
move.l #_obuf,(sp)
jsr _myfflush
*line 1423
clr (sp)
move.l #$e,-(sp)
move _obuf,-(sp)
jsr _lseek
addq.l #6,sp
tst.l R0
blt L10002
move #4,(sp)
move.l #_stlen,-(sp)
move _obuf,-(sp)
jsr _write
addq.l #6,sp
cmp #4,R0
beq L341
L10002:*line 1424
move.l #L342,(sp)
jsr _printf
*line 1425
add #1,_exstat
L341:
*line 1427
move _exstat,(sp)
jsr _endit
L337:unlk R14
rts
.globl _cpdata
.text
_cpdata:
~~cpdata:
~j=R7
~pb=R13
~fnc=12
~size=14
link R14,#0
movem.l R6-R7/R13-R13,-(sp)
*line 1436
move.l 8(R14),R13
*line 1436
move.l R13,(sp)
jsr _myfflush
*line 1437
move (R13),(sp)
jsr _close
*line 1438
move 12(R14),R0
move.l _tfchar,R9
move.b R0,(R9)
*line 1439
move #1,(sp)
move.l R13,-(sp)
move.l #_tfilname,-(sp)
jsr _xfopen
addq.l #8,sp
tst R0
bge L344
*line 1440
move.l #_tfilname,(sp)
move.l #L345,-(sp)
jsr _printf
addq.l #4,sp
*line 1441
move #-1,(sp)
jsr _endit
L344:L347:
*line 1443
tst.l 14(R14)
ble L346
*line 1445
move.l R13,(sp)
jsr _xgetw
move R0,R7
*line 1446
move.l #_obuf,(sp)
move R7,-(sp)
jsr _xputw
addq.l #2,sp
*line 1447
sub.l #2,14(R14)
bra L347
L346:L343:tst.l (sp)+
movem.l (sp)+,R7-R7/R13-R13
unlk R14
rts
.globl _osymt
.text
_osymt:
~~osymt:
~p=R13
link R14,#0
movem.l R7-R7/R13-R13,-(sp)
*line 1458
clr.l _stlen
*line 1460
tst _sflag
bne L348
*line 1464
move.l _bmte,R13
L350:
*line 1464
cmp.l _lmte,R13
bcc L349
*line 1466
btst #3,8(R13)
bne L351
*line 1468
btst #5,8(R13)
bne L10003
cmp.b #76,(R13)
beq L351
tst _Xflag
beq L351
L10003:*line 1469
move.l R13,(sp)
jsr _osyme
L351:
*line 1464
add.l #18,R13
bra L350
L349:L348:tst.l (sp)+
movem.l (sp)+,R13-R13
unlk R14
rts
.globl _ll
.data
_ll:
.dc.w 0,0
.globl _osyme
.text
_osyme:
~~osyme:
~osypt=R13
~i=R7
~aosypt=8
~p1=R12
link R14,#0
movem.l R6-R7/R12-R13,-(sp)
*line 1485
move.l 8(R14),R13
*line 1487
move.l R13,R12
*line 1489
add.l #14,_stlen
*line 1492
move.l R13,R12
*line 1493
clr R7
L354:
*line 1493
cmp #4,R7
bge L353
*line 1494
move.l #_obuf,(sp)
move (R12)+,-(sp)
jsr _xputw
addq.l #2,sp
L355:
*line 1493
add #1,R7
bra L354
L353:
*line 1497
move.l #_obuf,(sp)
move 8(R13),-(sp)
jsr _xputw
addq.l #2,sp
*line 1498
move.l 10(R13),_ll
*line 1499
move.l #_obuf,(sp)
move _ll,-(sp)
jsr _xputw
addq.l #2,sp
*line 1500
move.l #_obuf,(sp)
move 2+_ll,-(sp)
jsr _xputw
addq.l #2,sp
L352:tst.l (sp)+
movem.l (sp)+,R7-R7/R12-R13
unlk R14
rts
.globl _lgetnum
.text
_lgetnum:
~~lgetnum:
~i=R5
~j=R6
~pc=R13
~apc=8
~ardx=12
~trdx=R7
link R14,#0
movem.l R4-R7/R13-R13,-(sp)
*line 1515
move.l 8(R14),R13
*line 1517
cmp #16,12(R14)
bne L357
*line 1517
move #4,R7
bra L358
L357:
*line 1519
cmp #8,12(R14)
bne L359
*line 1519
move #3,R7
bra L360
L359:
*line 1521
cmp #2,12(R14)
bne L361
*line 1521
move #1,R7
bra L362
L361:
*line 1523
clr.l R0
bra L356
L362:L360:L358:
*line 1524
clr.l R5
L364:
*line 1525
*line 1526
move.b (R13)+,R6
ext.w R6
*line 1528
cmp #48,R6
blt L365
cmp #57,R6
bgt L365
*line 1528
sub #48,R6
bra L366
L365:
*line 1531
cmp #97,R6
blt L367
cmp #102,R6
bgt L367
*line 1531
add #-87,R6
bra L368
L367:
*line 1533
cmp #65,R6
blt L369
cmp #70,R6
bgt L369
*line 1533
add #-55,R6
bra L370
L369:bra L363
L370:L368:L366:
*line 1537
tst R6
blt L371
cmp 12(R14),R6
bge L371
*line 1537
clr.l R0
move R7,R0
asl.l R0,R5
move R6,R0
ext.l R0
add.l R0,R5
bra L372
L371:bra L363
L372:bra L364
L363:
*line 1541
move.l R5,R0
bra L356
L356:tst.l (sp)+
movem.l (sp)+,R5-R7/R13-R13
unlk R14
rts
.globl _spendsym
.text
_spendsym:
~~spendsym:
~p=R13
~ap=8
link R14,#0
movem.l R7-R7/R13-R13,-(sp)
*line 1552
move.l 8(R14),R13
*line 1553
move.l R13,(sp)
move.l #_etexstr,-(sp)
jsr _eqstr
addq.l #4,sp
tst R0
beq L374
*line 1554
move.l R13,_etextptr
*line 1555
move #1,R0
bra L373
L374:
*line 1557
move.l R13,(sp)
move.l #_edatstr,-(sp)
jsr _eqstr
addq.l #4,sp
tst R0
beq L375
*line 1558
move.l R13,_edataptr
*line 1559
move #1,R0
bra L373
L375:
*line 1561
move.l R13,(sp)
move.l #_eendstr,-(sp)
jsr _eqstr
addq.l #4,sp
tst R0
beq L376
*line 1562
move.l R13,_endptr
*line 1563
move #1,R0
bra L373
L376:
*line 1565
clr R0
bra L373
L373:tst.l (sp)+
movem.l (sp)+,R13-R13
unlk R14
rts
.globl _eqstr
.text
_eqstr:
~~eqstr:
~i=R7
~p1=R13
~p2=R12
~ap1=8
~ap2=12
link R14,#0
movem.l R6-R7/R12-R13,-(sp)
*line 1577
move.l 8(R14),R13
*line 1578
move.l 12(R14),R12
*line 1579
clr R7
L379:
*line 1579
cmp #8,R7
bge L378
*line 1580
cmpm.b (R13)+,(R12)+
beq L381
*line 1581
clr R0
bra L377
L381:L380:
*line 1579
add #1,R7
bra L379
L378:
*line 1584
move #1,R0
bra L377
L377:tst.l (sp)+
movem.l (sp)+,R7-R7/R12-R13
unlk R14
rts
.globl _prextnam
.text
_prextnam:
~~prextnam:
~extno=8
~p=R13
~pc=R12
link R14,#0
movem.l R7-R7/R12-R13,-(sp)
*line 1595
move 8(R14),R0
muls #18,R0
move.l R0,R13
add.l _symptr,R13
*line 1596
move.l #L383,(sp)
jsr _printf
*line 1597
move.l R13,R12
L385:
*line 1597
move.l R13,R0
add.l #8,R0
cmp.l R0,R12
bcc L384
*line 1599
tst.b (R12)
beq L384
*line 1600
move.l #14+__iob,(sp)
move.b (R12),R0
ext.w R0
move R0,-(sp)
jsr _fputc
addq.l #2,sp
L386:
*line 1597
add.l #1,R12
bra L385
L384:
*line 1602
move.l #14+__iob,(sp)
move #10,-(sp)
jsr _fputc
addq.l #2,sp
L382:tst.l (sp)+
movem.l (sp)+,R12-R13
unlk R14
rts
.data
L2:.dc.b 99,46,111,117,116,0
L3:.dc.b 108,111,88,88,88,88,88,65,0
L4:.dc.b 0
L11:.dc.b 58,32,73,110,118,97,108,105,100,32,108,111,54,56,32,97,114,103,117,109,101,110,116,32,108,105,115,116,10,0
L15:.dc.b 46,111,0
L22:.dc.b 58,32,73,108,108,101,103,97,108,32,111,112,116,105,111,110,32,37,115,10,0
L48:.dc.b 46,111,0
L98:.dc.b 58,32,117,110,97,98,108,101,32,116,111,32,111,112,101,110,32,37,115,10,0
L100:.dc.b 58,32,114,101,97,100,32,101,114,114,111,114,32,111,110,32,102,105,108,101,58,32,37,115,10,0
L110:.dc.b 58,32,102,105,108,101,32,102,111,114,109,97,116,32,101,114,114,111,114,58,32,37,115,10,0
L112:.dc.b 58,32,70,105,108,101,32,102,111,114,109,97,116,32,101,114,114,111,114,0
L113:.dc.b 58,32,110,111,32,114,101,108,111,99,97,116,105,111,110,32,98,105,116,115,32,105,110,32,37,115,10,0
L129:.dc.b 58,32,70,105,108,101,32,70,111,114,109,97,116,32,101,114,114,111,114,58,32,73,110,118,97,108,105,100,32,115,121,109,98,111,108,32,102,108,97,103,115,32,61,32,37,111,10,0
L144:.dc.b 58,32,37,115,32,100,117,112,108,105,99,97,116,101,32,100,101,102,105,110,105,116,105,111,110,32,105,110,32,37,115,10,0
L164:.dc.b 58,32,115,121,109,98,111,108,32,116,97,98,108,101,32,111,118,101,114,102,108,111,119,10,0
L176:.dc.b 58,32,85,110,97,98,108,101,32,116,111,32,111,112,101,110,32,116,101,109,112,111,114,97,114,121,32,102,105,108,101,58,32,37,115,10,0
L233:.dc.b 58,32,97,115,103,110,101,120,116,32,98,111,116,99,104,10,0
L238:.dc.b 58,32,85,110,100,101,102,105,110,101,100,32,115,121,109,98,111,108,40,115,41,10,0
L255:.dc.b 58,32,85,110,97,98,108,101,32,116,111,32,99,114,101,97,116,101,32,37,115,10,0
L271:.dc.b 58,32,115,101,101,107,32,101,114,114,111,114,32,111,110,32,102,105,108,101,32,37,115,10,0
L318:.dc.b 58,32,114,101,108,97,116,105,118,101,32,97,100,100,114,101,115,115,32,111,118,101,114,102,108,111,119,32,97,116,32,37,108,120,32,105,110,32,37,115,10,0
L323:.dc.b 58,32,115,104,111,114,116,32,97,100,100,114,101,115,115,32,111,118,101,114,102,108,111,119,32,105,110,32,37,115,10,0
L326:.dc.b 108,105,98,114,97,114,121,32,111,102,102,115,101,116,32,61,32,37,120,10,0
L334:.dc.b 58,32,70,105,108,101,32,102,111,114,109,97,116,32,101,114,114,111,114,58,32,105,110,118,97,108,105,100,32,114,101,108,111,99,97,116,105,111,110,32,102,108,97,103,32,105,110,32,37,115,10,0
L339:.dc.b 58,32,102,105,110,97,108,119,114,58,32,116,101,120,116,32,115,105,122,101,32,101,114,114,111,114,10,0
L342:.dc.b 58,32,111,117,116,112,117,116,32,102,105,108,101,32,119,114,105,116,101,32,101,114,114,111,114,10,0
L345:.dc.b 58,32,117,110,97,98,108,101,32,116,111,32,114,101,111,112,101,110,32,37,115,10,0
L383:.dc.b 58,32,101,120,116,101,114,110,97,108,32,110,97,109,101,58,32,0