Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_FS_1_19910112 - c/old/kc/runtm.fai
There are no other files named runtm.fai in the archive.
	TITLE	runtm
	.LIBRARY C:CLIB
	EXTERN	.START
ch:	BLOCK	20
ieof:	0
runtm:
	ADJSP	17,173
	SETZB	2,-172(17)
	SETZ	3,
	MOVEI	4,-17(17)
	HRLI	4,331100
	DPB	3,4
	MOVEI	5,-27(17)
	HRLI	5,331100
	DPB	3,5
	MOVE	7,-174(17)
	JUMPLE	7,$1
	MOVEI	10,-170(17)
	HRLI	10,331100
	MOVEM	10,-30(17)
$2::
	SOS	-174(17)
	MOVE	12,-174(17)
	JUMPE	12,$3
	PUSHJ	17,.getty
	MOVE	3,-30(17)
	IBP	-30(17)
	DPB	0,3
	CAIE	0,15
	JRST	$4
	MOVE	5,-30(17)
	MOVNI	4,1
	ADJBP	4,-30(17)
	MOVEM	4,-30(17)
	JRST	$3
$4::
	JRST	$2
$3::
	PUSHJ	17,.getty
	SETZ	2,
	MOVE	4,-30(17)
	IBP	-30(17)
	DPB	2,4
	MOVEI	3,-170(17)
	HRLI	3,331100
	MOVEM	3,-30(17)
	SETZB	5,-171(17)
$5::
	MOVE	7,-171(17)
	JUMPN	7,$6
	MOVEI	6,1
	LDB	10,-30(17)
	CAIE	10,40
	SETZ	6,
	JUMPN	6,$10
	MOVEI	13,1
	LDB	14,-30(17)
	CAIE	14,11
	SETZ	13,
	JUMPE	13,$7
$10::
$11::
	MOVEI	3,1
	LDB	4,-30(17)
	CAIE	4,40
	SETZ	3,
	JUMPN	3,$13
	MOVEI	7,1
	LDB	10,-30(17)
	CAIE	10,11
	SETZ	7,
	JUMPE	7,$12
$13::
	MOVE	15,-30(17)
	IBP	-30(17)
	JRST	$11
$12::
$7::
	LDB	3,-30(17)
	CAIE	3,73
	JRST	$14
	MOVE	6,-30(17)
	IBP	-30(17)
	MOVEI	5,1
	LDB	13,-30(17)
	CAIE	13,40
	SETZ	5,
	JUMPN	5,$16
	MOVEI	7,1
	LDB	10,-30(17)
	CAIE	10,11
	SETZ	7,
	JUMPE	7,$15
$16::
$17::
	MOVEI	15,1
	LDB	2,-30(17)
	CAIE	2,40
	SETZ	15,
	JUMPN	15,$21
	MOVEI	5,1
	LDB	6,-30(17)
	CAIE	6,11
	SETZ	5,
	JUMPE	5,$20
$21::
	MOVE	3,-30(17)
	IBP	-30(17)
	JRST	$17
$20::
$15::
$14::
	LDB	2,-30(17)
	MOVE	7,2
	IDIVI	7,10
	MOVM	10,10
	CAME	2,$31(10)
	JRST	$30
	JRST	@$32(10)
$31::
	0
	-1
	12
	-1
	74
	15
	76
	-1
$32::
	$23
	$30
	$25
	$30
	$26
	$24
	$27
	$30
$23::
$24::
$25::
	MOVEI	11,1
	MOVEM	11,-171(17)
	JRST	$22
$26::
	MOVE	3,-30(17)
	IBP	-30(17)
	MOVEI	5,-27(17)
	HRLI	5,331100
	LDB	6,5
	JUMPE	6,$33
	MOVE	2,$34
	PUSH	17,2
	PUSHJ	17,abort
	ADJSP	17,-1
$33::
	MOVEI	2,-27(17)
	HRLI	2,331100
	PUSH	17,2
	PUSH	17,-31(17)
	PUSHJ	17,getstr
	ADJSP	17,-2
	MOVEM	0,-30(17)
	JRST	$22
$27::
	MOVE	3,-30(17)
	IBP	-30(17)
	MOVEI	2,-17(17)
	HRLI	2,331100
	LDB	4,2
	JUMPE	4,$35
	MOVE	2,$36
	PUSH	17,2
	PUSHJ	17,abort
	ADJSP	17,-1
$35::
	MOVEI	2,-17(17)
	HRLI	2,331100
	PUSH	17,2
	PUSH	17,-31(17)
	PUSHJ	17,getstr
	ADJSP	17,-2
	MOVEM	0,-30(17)
	JRST	$22
$30::
	MOVE	3,-30(17)
	MOVE	4,-172(17)
	AOS	-172(17)
	ADDI	4,-70(17)
	MOVEM	3,(4)
	MOVEI	2,-7(17)
	HRLI	2,331100
	PUSH	17,2
	PUSH	17,-31(17)
	PUSHJ	17,getstr
	ADJSP	17,-2
	MOVEM	0,-30(17)
	LDB	2,-30(17)
	JUMPN	2,$37
	MOVEI	4,1
	MOVEM	4,-171(17)
	JRST	$22
$37::
	SETZ	5,
	MOVE	7,-30(17)
	IBP	-30(17)
	DPB	5,7
$22::
	JRST	$5
$6::
$1::
	MOVEI	2,-17(17)
	HRLI	2,331100
	PUSH	17,2
	MOVEI	3,-30(17)
	HRLI	3,331100
	PUSH	17,3
	PUSHJ	17,setup
	ADJSP	17,-2
	PUSHJ	17,stdio
	MOVEI	16,-70(17)
	PUSH	17,16
	PUSH	17,-173(17)
	PUSHJ	17,main
	ADJSP	17,-2
	PUSHJ	17,sexit
	PUSH	17,[0]
	PUSHJ	17,exit
	ADJSP	17,-174
	POPJ	17,
$36::	POINT	9,.+1,8
	BYTE	(9) 45,163,164,144
	BYTE	(9) 157,165,164,40
	BYTE	(9) 162,145,144,151
	BYTE	(9) 162,145,143,164
	BYTE	(9) 145,144,40,155
	BYTE	(9) 157,162,145,40
	BYTE	(9) 164,150,141,156
	BYTE	(9) 40,157,156,143
	BYTE	(9) 145,56,0

$34::	POINT	9,.+1,8
	BYTE	(9) 45,163,164,144
	BYTE	(9) 151,156,40,162
	BYTE	(9) 145,144,151,162
	BYTE	(9) 145,143,164,145
	BYTE	(9) 144,40,155,157
	BYTE	(9) 162,145,40,164
	BYTE	(9) 150,141,156,40
	BYTE	(9) 157,156,143,145
	BYTE	(9) 56,0

setup:
	ADJSP	17,1
	MOVEI	2,3
	MOVEM	2,(17)
$42::
	MOVE	4,(17)
	CAIL	4,20
	JRST	$41
	MOVE	5,[-1]
	MOVEI	6,ch
	ADD	6,(17)
	MOVEM	5,(6)
$40::
	MOVE	10,(17)
	AOS	(17)
	JRST	$42
$41::
	LDB	7,-2(17)
	JUMPE	7,$43
	SETZ	2,
	PUSH	17,2
	PUSH	17,-3(17)
	PUSHJ	17,creat
	ADJSP	17,-2
	JRST	$44
$43::
	SETZ	0,
$44::
	MOVEI	2,ch
	MOVEM	0,(2)
	LDB	4,-3(17)
	JUMPE	4,$45
	SETZ	2,
	PUSH	17,2
	PUSH	17,-4(17)
	PUSHJ	17,creat
	ADJSP	17,-2
	JRST	$46
$45::
	MOVEI	0,1
$46::
	MOVEI	2,ch
	MOVEM	0,1(2)
	MOVEI	3,1
	MOVEI	4,ch
	MOVEM	3,2(4)
	SETZB	5,ieof
	ADJSP	17,-1
	POPJ	17,
exit:
	ADJSP	17,1
	SETZB	2,0(17)
$51::
	MOVE	4,(17)
	CAIL	4,20
	JRST	$50
	MOVEI	5,ch
	ADD	5,(17)
	MOVE	6,(5)
	CAMN	6,[-1]
	JRST	$52
	PUSH	17,(17)
	PUSHJ	17,close
	ADJSP	17,-1
$52::
$47::
	MOVE	3,(17)
	AOS	(17)
	JRST	$51
$50::
	PUSH	17,-2(17)
	PUSHJ	17,.exit
	ADJSP	17,-2
	POPJ	17,
getstr:
$53::
	MOVEI	2,1
	LDB	3,-1(17)
	CAIE	3,73
	SETZ	2,
	JUMPN	2,$54
	MOVEI	6,1
	LDB	7,-1(17)
	CAIN	7,40
	JRST	$55
	LDB	12,-1(17)
	CAIN	12,11
	JRST	$55
	SETZ	6,
$55::
	JUMPN	6,$54
	LDB	3,-1(17)
	JUMPE	3,$54
	LDB	5,-1(17)
	IBP	-1(17)
	MOVE	11,-2(17)
	IBP	-2(17)
	DPB	5,11
	JRST	$53
$54::
	SETZ	10,
	DPB	10,-2(17)
	MOVE	0,-1(17)
	POPJ	17,
abort:
$56::
	LDB	2,-1(17)
	JUMPE	2,$57
	LDB	2,-1(17)
	IBP	-1(17)
	PUSH	17,2
	PUSHJ	17,.putty
	ADJSP	17,-1
	JRST	$56
$57::
	PUSH	17,[12]
	PUSHJ	17,.putty
	ADJSP	17,-1
	PUSH	17,[0]
	PUSHJ	17,.exit
	ADJSP	17,-1
	POPJ	17,
write:
	ADJSP	17,4
	MOVEI	2,1
	MOVEI	3,ch
	ADD	3,-5(17)
	MOVE	4,(3)
	MOVEM	4,-3(17)
	CAIL	4,1
	SETZ	2,
	JUMPN	2,$61
	MOVEI	6,1
	MOVE	10,-7(17)
	CAILE	10,0
	SETZ	6,
	JUMPE	6,$60
$61::
	MOVE	0,[-1]
	ADJSP	17,-4
	POPJ	17,
$60::
	MOVE	12,-3(17)
	CAIE	12,1
	JRST	$62
	MOVE	14,-7(17)
	MOVEM	14,-2(17)
$65::
	MOVE	15,-2(17)
	SOS	-2(17)
	JUMPE	15,$64
	LDB	2,-6(17)
	IBP	-6(17)
	PUSH	17,2
	PUSHJ	17,.putty
	ADJSP	17,-1
$63::
	JRST	$65
$64::
	MOVE	0,-7(17)
	ADJSP	17,-4
	POPJ	17,
$62::
	PUSH	17,-7(17)
	PUSH	17,-7(17)
	PUSH	17,-5(17)
	PUSHJ	17,.write
	ADJSP	17,-3
	JUMPE	0,$66
	MOVE	3,-7(17)
	JRST	$67
$66::
	MOVE	3,[-1]
$67::
	MOVE	0,3
	ADJSP	17,-4
	POPJ	17,
bwrite:
	ADJSP	17,5
	MOVEI	2,1
	MOVEI	3,ch
	ADD	3,-6(17)
	MOVE	4,(3)
	MOVEM	4,-4(17)
	CAIL	4,1
	SETZ	2,
	JUMPN	2,$71
	MOVEI	6,1
	MOVE	10,-10(17)
	CAIL	10,0
	SETZ	6,
	JUMPE	6,$70
$71::
	MOVE	0,[-1]
	ADJSP	17,-5
	POPJ	17,
$70::
	MOVE	12,-4(17)
	CAIE	12,1
	JRST	$72
	MOVE	14,-10(17)
	MOVEM	14,-3(17)
$75::
	MOVE	15,-3(17)
	SOS	-3(17)
	JUMPE	15,$74
	LDB	2,-7(17)
	IBP	-7(17)
	PUSH	17,2
	PUSHJ	17,.putty
	ADJSP	17,-1
$73::
	JRST	$75
$74::
	MOVE	0,-10(17)
	ADJSP	17,-5
	POPJ	17,
$72::
	PUSH	17,-10(17)
	PUSH	17,-10(17)
	PUSH	17,-6(17)
	PUSHJ	17,.write
	ADJSP	17,-3
	JUMPE	0,$76
	MOVE	3,-10(17)
	JRST	$77
$76::
	MOVE	3,[-1]
$77::
	MOVE	0,3
	ADJSP	17,-5
	POPJ	17,
iwrite:
	ADJSP	17,5
	MOVEI	2,1
	MOVEI	3,ch
	ADD	3,-6(17)
	MOVE	4,(3)
	MOVEM	4,-4(17)
	CAIL	4,1
	SETZ	2,
	JUMPN	2,$101
	MOVEI	6,1
	MOVE	10,-10(17)
	CAIL	10,0
	SETZ	6,
	JUMPE	6,$100
$101::
	MOVE	0,[-1]
	ADJSP	17,-5
	POPJ	17,
$100::
	MOVE	12,-4(17)
	CAIE	12,1
	JRST	$102
	MOVE	14,-10(17)
	MOVEM	14,-3(17)
$105::
	MOVE	15,-3(17)
	SOS	-3(17)
	JUMPE	15,$104
	LDB	2,-7(17)
	IBP	-7(17)
	PUSH	17,2
	PUSHJ	17,.putty
	ADJSP	17,-1
$103::
	JRST	$105
$104::
	MOVE	0,-10(17)
	ADJSP	17,-5
	POPJ	17,
$102::
	PUSH	17,-10(17)
	PUSH	17,-10(17)
	PUSH	17,-6(17)
	PUSHJ	17,.write
	ADJSP	17,-3
	JUMPE	0,$106
	MOVE	3,-10(17)
	JRST	$107
$106::
	MOVE	3,[-1]
$107::
	MOVE	0,3
	ADJSP	17,-5
	POPJ	17,
read:
	ADJSP	17,6
	MOVEI	2,1
	MOVEI	3,ch
	ADD	3,-7(17)
	MOVE	4,(3)
	MOVEM	4,-5(17)
	CAIE	4,1
	SETZ	2,
	JUMPN	2,$111
	MOVEI	6,1
	MOVE	10,-11(17)
	CAIL	10,0
	SETZ	6,
	JUMPE	6,$110
$111::
	MOVE	0,[-1]
	ADJSP	17,-6
	POPJ	17,
$110::
	MOVE	12,-5(17)
	JUMPN	12,$112
	MOVE	13,ieof
	JUMPE	13,$113
	SETZ	2,
	MOVE	0,2
	ADJSP	17,-6
	POPJ	17,
$113::
	SETZB	3,-4(17)
$116::
	MOVE	5,-11(17)
	SOS	-11(17)
	JUMPE	5,$115
	PUSHJ	17,.getty
	DPB	0,-10(17)
	LDB	2,-10(17)
	IBP	-10(17)
	JUMPN	2,$117
	MOVEI	4,1
	MOVEM	4,ieof
	JRST	$115
$117::
$114::
	MOVE	6,-4(17)
	AOS	-4(17)
	JRST	$116
$115::
	MOVE	0,-4(17)
	ADJSP	17,-6
	POPJ	17,
$112::
	PUSH	17,-11(17)
	PUSH	17,-11(17)
	PUSH	17,-7(17)
	PUSHJ	17,.read
	ADJSP	17,-3
	MOVE	0,0
	ADJSP	17,-6
	POPJ	17,
	ADJSP	17,-6
	POPJ	17,
bread:
	ADJSP	17,10
	MOVEI	2,1
	MOVEI	3,ch
	ADD	3,-11(17)
	MOVE	4,(3)
	MOVEM	4,-7(17)
	CAIE	4,1
	SETZ	2,
	JUMPN	2,$121
	MOVEI	6,1
	MOVE	10,-13(17)
	CAIL	10,0
	SETZ	6,
	JUMPE	6,$120
$121::
	MOVE	0,[-1]
	ADJSP	17,-10
	POPJ	17,
$120::
	MOVE	12,-7(17)
	JUMPN	12,$122
	MOVE	13,ieof
	JUMPE	13,$123
	SETZ	2,
	MOVE	0,2
	ADJSP	17,-10
	POPJ	17,
$123::
	SETZB	3,-6(17)
$126::
	MOVE	5,-13(17)
	SOS	-13(17)
	JUMPE	5,$125
	PUSHJ	17,.getty
	DPB	0,-12(17)
	LDB	2,-12(17)
	IBP	-12(17)
	JUMPN	2,$127
	MOVEI	4,1
	MOVEM	4,ieof
	JRST	$125
$127::
$124::
	MOVE	6,-6(17)
	AOS	-6(17)
	JRST	$126
$125::
	MOVE	0,-6(17)
	ADJSP	17,-10
	POPJ	17,
$122::
	PUSH	17,-13(17)
	PUSH	17,-13(17)
	PUSH	17,-11(17)
	PUSHJ	17,.read
	ADJSP	17,-3
	MOVE	0,0
	ADJSP	17,-10
	POPJ	17,
	ADJSP	17,-10
	POPJ	17,
iread:
	ADJSP	17,10
	MOVEI	2,1
	MOVEI	3,ch
	ADD	3,-11(17)
	MOVE	4,(3)
	MOVEM	4,-7(17)
	CAIE	4,1
	SETZ	2,
	JUMPN	2,$131
	MOVEI	6,1
	MOVE	10,-13(17)
	CAIL	10,0
	SETZ	6,
	JUMPE	6,$130
$131::
	MOVE	0,[-1]
	ADJSP	17,-10
	POPJ	17,
$130::
	MOVE	12,-7(17)
	JUMPN	12,$132
	MOVE	13,ieof
	JUMPE	13,$133
	SETZ	2,
	MOVE	0,2
	ADJSP	17,-10
	POPJ	17,
$133::
	SETZB	3,-6(17)
$136::
	MOVE	5,-13(17)
	SOS	-13(17)
	JUMPE	5,$135
	PUSHJ	17,.getty
	DPB	0,-12(17)
	LDB	2,-12(17)
	IBP	-12(17)
	JUMPN	2,$137
	MOVEI	4,1
	MOVEM	4,ieof
	JRST	$135
$137::
$134::
	MOVE	6,-6(17)
	AOS	-6(17)
	JRST	$136
$135::
	MOVE	0,-6(17)
	ADJSP	17,-10
	POPJ	17,
$132::
	PUSH	17,-13(17)
	PUSH	17,-13(17)
	PUSH	17,-11(17)
	PUSHJ	17,.read
	ADJSP	17,-3
	MOVE	0,0
	ADJSP	17,-10
	POPJ	17,
	ADJSP	17,-10
	POPJ	17,
open:
	PUSH	17,[7]
	PUSH	17,-3(17)
	PUSH	17,-3(17)
	PUSHJ	17,.ofile
	ADJSP	17,-3
	POPJ	17,
bopen:
	PUSH	17,[10]
	PUSH	17,-3(17)
	PUSH	17,-3(17)
	PUSHJ	17,.ofile
	ADJSP	17,-3
	POPJ	17,
iopen:
	PUSH	17,[44]
	PUSH	17,-3(17)
	PUSH	17,-3(17)
	PUSHJ	17,.ofile
	ADJSP	17,-3
	POPJ	17,
.ofile:
	ADJSP	17,5
	PUSH	17,-7(17)
	PUSHJ	17,getmod
	ADJSP	17,-1
	MOVEM	0,-7(17)
	CAME	0,[-1]
	JRST	$140
	MOVE	0,[-1]
	ADJSP	17,-5
	POPJ	17,
$140::
$141::
	PUSH	17,[100001]
	PUSH	17,-7(17)
	PUSHJ	17,.getch
	ADJSP	17,-2
	MOVEM	0,-4(17)
	MOVE	3,-4(17)
	JUMPGE	3,$143
	MOVE	0,[-1]
	ADJSP	17,-5
	POPJ	17,
$143::
	MOVE	5,-4(17)
	CAIGE	5,2
	JRST	$141
$142::
	PUSH	17,-10(17)
	PUSH	17,-10(17)
	PUSH	17,-6(17)
	PUSHJ	17,.open
	ADJSP	17,-3
	JUMPN	0,$144
	MOVE	0,[-1]
	ADJSP	17,-5
	POPJ	17,
$144::
	PUSHJ	17,getfd
	MOVEM	0,-3(17)
	JUMPE	0,$145
	MOVE	3,-4(17)
	MOVEI	2,ch
	ADD	2,-3(17)
	MOVEM	3,(2)
	MOVE	0,-3(17)
	ADJSP	17,-5
	POPJ	17,
$145::
	MOVE	0,[-1]
	ADJSP	17,-5
	POPJ	17,
creat:
	ADJSP	17,1
	PUSH	17,[7]
	PUSH	17,-4(17)
	PUSH	17,-4(17)
	PUSHJ	17,.cfile
	ADJSP	17,-3
	MOVEM	0,(17)
	JUMPGE	0,$146
	SETZ	3,
	MOVE	0,3
	ADJSP	17,-1
	POPJ	17,
$146::
	MOVE	0,(17)
	ADJSP	17,-1
	POPJ	17,
	ADJSP	17,-1
	POPJ	17,
bcreat:
	PUSH	17,[10]
	PUSH	17,-3(17)
	PUSH	17,-3(17)
	PUSHJ	17,.cfile
	ADJSP	17,-3
	MOVE	0,0
	POPJ	17,
	POPJ	17,
icreat:
	PUSH	17,[10]
	PUSH	17,-3(17)
	PUSH	17,-3(17)
	PUSHJ	17,.cfile
	ADJSP	17,-3
	MOVE	0,0
	POPJ	17,
	POPJ	17,
.cfile:
	ADJSP	17,5
$147::
	PUSH	17,[400001]
	PUSH	17,-7(17)
	PUSHJ	17,.getch
	ADJSP	17,-2
	MOVEM	0,-4(17)
	MOVE	3,-4(17)
	JUMPGE	3,$151
	MOVE	0,[-1]
	ADJSP	17,-5
	POPJ	17,
$151::
	MOVE	5,-4(17)
	CAIGE	5,2
	JRST	$147
$150::
	PUSH	17,[2]
	PUSHJ	17,getmod
	ADJSP	17,-1
	MOVEM	0,-7(17)
	PUSH	17,-10(17)
	PUSH	17,-10(17)
	PUSH	17,-6(17)
	PUSHJ	17,.open
	ADJSP	17,-3
	JUMPG	0,$152
	MOVE	0,[-2]
	ADJSP	17,-5
	POPJ	17,
$152::
	PUSHJ	17,getfd
	MOVEM	0,-3(17)
	JUMPE	0,$153
	MOVE	3,-4(17)
	MOVEI	2,ch
	ADD	2,-3(17)
	MOVEM	3,(2)
	MOVE	0,-3(17)
	ADJSP	17,-5
	POPJ	17,
$153::
	MOVE	0,[-1]
	ADJSP	17,-5
	POPJ	17,
getmod:
	MOVE	3,-1(17)
	CAIN	3,2
	JRST	$157
	CAIN	3,1
	JRST	$156
	JUMPE	3,$155
	JRST	$160
$155::
	MOVEI	0,200000
	POPJ	17,
$156::
	MOVEI	0,100000
	POPJ	17,
$157::
	MOVEI	0,300000
	POPJ	17,
$160::
	MOVE	0,[-1]
	POPJ	17,
$154::
	POPJ	17,
close:
	ADJSP	17,1
	MOVEI	2,ch
	ADD	2,-2(17)
	MOVE	3,(2)
	MOVEM	3,(17)
	MOVE	5,(17)
	CAME	5,[-1]
	JRST	$161
	MOVE	2,$162
	PUSH	17,2
	PUSHJ	17,abort
	ADJSP	17,-1
$161::
	MOVE	3,(17)
	CAIL	3,2
	JRST	$163
	ADJSP	17,-1
	POPJ	17,
$163::
	PUSH	17,(17)
	PUSHJ	17,.close
	ADJSP	17,-1
	MOVE	2,[-1]
	MOVEI	3,ch
	ADD	3,-2(17)
	MOVEM	2,(3)
	ADJSP	17,-1
	POPJ	17,
$162::	POINT	9,.+1,8
	BYTE	(9) 106,151,154,145
	BYTE	(9) 40,156,145,166
	BYTE	(9) 145,162,40,157
	BYTE	(9) 160,145,156,145
	BYTE	(9) 144,56,0

getfd:
	ADJSP	17,1
	MOVEI	2,3
	MOVEM	2,(17)
$164::
	MOVEI	3,1
	MOVE	5,(17)
	CAIL	5,20
	SETZ	3,
	JUMPE	3,$165
	MOVEI	6,ch
	ADD	6,(17)
	MOVE	7,(6)
	CAMN	7,[-1]
	JRST	$165
	MOVE	12,(17)
	AOS	(17)
	JRST	$164
$165::
	MOVE	13,(17)
	CAIL	13,20
	JRST	$166
	MOVE	15,(17)
	JRST	$167
$166::
	SETZ	15,
$167::
	MOVE	0,15
	ADJSP	17,-1
	POPJ	17,
atoi:
	ADJSP	17,2
	SETZB	2,0(17)
	SETZB	3,-1(17)
$172::
	MOVEI	4,1
	MOVE	6,-3(17)
	MOVE	7,-1(17)
	ADJBP	7,6
	LDB	5,7
	CAIGE	5,60
	SETZ	4,
	JUMPE	4,$171
	MOVE	12,-3(17)
	MOVE	13,-1(17)
	ADJBP	13,12
	LDB	11,13
	CAILE	11,71
	JRST	$171
	MOVE	2,-3(17)
	MOVE	6,-1(17)
	ADJBP	6,2
	LDB	3,6
	MOVE	15,(17)
	IMULI	15,12
	ADD	3,15
	SUBI	3,60
	MOVEM	3,(17)
$170::
	AOS	-1(17)
	MOVE	4,-1(17)
	JRST	$172
$171::
	MOVE	0,(17)
	ADJSP	17,-2
	POPJ	17,
ttyskp:
	MOVE	3,-1(17)
	JUMPN	3,$173
	PUSH	17,[-1]
	PUSHJ	17,tskp
	ADJSP	17,-1
	MOVE	0,0
	POPJ	17,
$173::
	MOVE	3,-1(17)
	MOVE	2,4(3)
	MOVE	4,ch(2)
	PUSH	17,4
	PUSHJ	17,tskp
	ADJSP	17,-1
	MOVE	0,0
	POPJ	17,
	POPJ	17,

	INTERN	runtm,exit,creat,close,write,bwrite,iwrite,read,bread
	INTERN	iread,open,bopen,iopen,getfd,bcreat,icreat,atoi,ttyskp
	EXTERN	.iob,stdin,stdout,stderr,.getty,stdio,main,sexit
	EXTERN	.exit,.putty,.write,.read,.getch,.open,.close,tskp
	END