esyslib.s      +  _sys_abort
_sys_copy
_sys_abort

_sys_abort:


,#24
-2

9

-2

__taskcall

.c
_sys_copy
_sys_copy:



6

-2

__taskcall


je I0023
32768

_1

_panic


I0023:
.c

_1:
31091
24435
28515
31088
25376
28257
29735
29472
28261
100
.text
fsversion.s   +w  e_fsveron
_fsveron

_fsveron:









_open



or 
jge I0013

_std_err

_1

_std_err


_perror

-1






024


_lseek
,#8
98

_super


_read

98
je I0016

_std_err

_2

_std_err


_perror


_close

-1




_close

_,#_super
_
16,#4991
I0019



I0019:
_
16,#9320
I001C



I001C:
-1



.ds

_: .zerow 2/2
_super: .zerow 98/2

_1:
25376
28257
28526
8308
28783
28261
.word 32
_2:
25376
28257
28526
8308
25970
25697
29472
28789
29285
25120
28524
27491
28448
8302
.word 0
.text
mtab.s        +  [
_etc_mtab
_err
_rewrite_mtab
_load_mtab
_put_mtab_entry
_get_mtab_entry
_etc_mtab

_etc_mtab:
_1
_iptr:
_mtab_in
_optr:
_mtab_out
_load_mtab

_load_mtab:


,#6




_etc_mtab
_open



or 
jge I0013
_2


_err


-1



512

_mtab_in


_read



jg I0016
_3


_err


-1



,#512
I0019

_std_err

_4

_std_err

_etc_mtab
_std_err

-1


I0019:

_close

#_mtab_in
I001C:
cmpb ()
je I001B
al,()


testb ___ctype+1,#8
je I001F
()
I001F:

I001C
I001B:
xor ax,ax



.ds
_rewrite_mtab
_rewrite_mtab:






511

_etc_mtab
_creat



or 
jge I0023
_5


_err


-1

I0021
I0023:
_optr
_mtab_out

_mtab_out


_write


or 
jg I0026
_6


_err


-1

I0021
I0026:

_close



I0021:

.ds
_get_mtab_entry
_get_mtab_entry:




_iptr,#_mtab_in+512
jb I0033
()
-1

I0031
I0033:
_iptr

_strcpy


I0036:
_iptr



testb ___ctype+1,#151
je I0039
_iptr
I0036
I0039:
_iptr
cmpb 
I0038
_iptr,#_mtab_in+512
jae I0038
_iptr
I0039
I0038:
_iptr
push 6(bp)
_strcpy


I003D:
_iptr



testb ___ctype+1,#151
je I00310
_iptr
I003D
I00310:
_iptr
cmpb 
I003F
_iptr,#_mtab_in+512
jae I003F
_iptr
I00310
I003F:
_iptr

_strcpy


I00314:
_iptr



testb ___ctype+1,#151
je I00317
_iptr
I00314
I00317:
_iptr
cmpb 
I00316
_iptr,#_mtab_in+512
jae I00316
_iptr
I00317
I00316:
_iptr
10()
_strcpy


I0031B:
_iptr



testb ___ctype+1,#151
je I0031E
_iptr
I0031B
I0031E:
_iptr
cmpb 
I0031D
_iptr,#_mtab_in+512
jae I0031D
_iptr
I0031E
I0031D:


I0031:

.s
_put_mtab_entry
_put_mtab_entry:


,#8



_strlen



_strlen



_strlen

-6(bp),ax
push 10()
_strlen

,

_optr



5
_mtab_out+512
jb I0043
-1

I0041
I0043:

_optr
_strcpy



_optr
_optr,
,#32
_optr

_optr
_strcpy



_optr
_optr,
,#32
_optr

_optr
_strcpy



_optr
_optr,
,#32
_optr
10()
_optr
_strcpy



_optr
_optr,
,#10
_optr


I0041:

.ds
_err
_err:



_std_err


_std_err

_etc_mtab
_std_err

_7

_perror

.c

_mtab_out: .zerow 514/2
_mtab_in: .zerow 514/2

_1:
25903
25460
27951
24948
98
_2:
8250
24931
28270
.word 29807
28448
25968
8302

_3:
8250
24931
28270
29807
29216
24933
8292

_4:
8250
26982
25964
29728
28527
27680
29281
25959
8250

_5:
8250
24931
28270
29807
28448
25974
30578
26994
25972
32
_6:
25376
30063
08
28192
29807
30496
26994
25972
32
_7:
.word 32
.text
fprintk.s     +p  _Fputk
_fprintk

__itoa:







11

I0014:


v 

#48
#57
jle I0016

_Xflag
je I0019
65

I001A
I0019:
97

I001A:

58






(),al


v 
,

I0014


11

I001D:










or 
I001D

.ds
__lota:







11

I0024:
10()
cwd




.rmu4

#48
#57
jle I0026
#7
I0026:


(),al
10()
cwd




.dvu4
,
,
8(bp)
push 6(bp)



.cmu4

I0024


11

I002A:










or 
I002A

.ds
_fprintk
_fprintk:


,#38



_3:
I0035F
13
68
I00344
79
I0033F
85
I0033D
88
I0033A
99
I00352
100
I00345
101
I00351
102
I00351
103
I00351
111
I00340
115
I00353
117
I0033E
120
I0033B



__io_table+4
,
I0033
_STDERR,#1
I003B
I0033:
__io_table+2
,
I0036
_STDERR
I003B
I0036:
__io_table+4
32

_1


_write



_exit

I003B:




-20(bp),ax
cmp -20()
I003D


_Fputk

.ds
I003D:
-20(),#37
je I00310
-20()
_Fputk

I003B
I00310:
-12()

-12()
-1,
-2

cmpb ,#45
I00313

-2
I00313:
-30(),#32

cmpb ,#48
I00316

-30(),#48
I00316:
-32()
I0031B:




-20(),
-20(),#48
jl I0031D
-20(),#57
jg I0031D
-20(),#48
I0031E
I0031D:
-20(),#42
I00318
#2
-2()
-20(),
I0031E:
0
mul -32()
-32(),
-20()
-32(),
I0031B
I00318:
-2
-3
-20(),#46
I00324
I00329:




-20(),
-20(),#48
jl I0032B
-20(),#57
jg I0032B
-20(),#48
I0032C
I0032B:
-20(),#42
I00324
#2
-2()
-20(),
I0032C:
0
mul -3
-34(bp),ax
mov -20()
-3,
-2
I00329
I00324:
-2
-20(),#108
je I00331
-20(),#76
I00332
I00331:
-2

cmpb 
je I00332




-20(),
I00332:
-20()
I00338
I0033A:
_Xflag
I0033B:
-20(),
I0033C
I0033D:
-2
I0033E:
-20(),#10
I0033C
I0033F:
-2
I00340:
-20(),#8
I0033C:
-2
je I00342
#4
-20()
-2()
-4()

__lota
,#8

I00339
I00342:
#2
-20()
-2()

__itoa


I00339
I00344:
-2
I00345:
-2
je I00347
#4
-4()
-2()
-3,
-3,
-3
jge I0034A
(),#45

-3
-3
sbb -3
I0034A:
0

-3
-3

__lota
,#8

I00339
I00347:
#2
-2()
-22(),
-22(bp),#0
jge I0034D
(),#45

-22()
I0034D:
0

-22()

__itoa


I00339
I00351:
-30(),#32
(),#63

I00339
I00352:
-30(),#32
#2
-2()
(),al

I00339
I00353:
-30(),#32
#2
-2()
-1,
-1
I00355
-1,#_2
I00355:
-3
I00358
-3,#32767
I00358:
-1
I0035D:
cmpb ()
je I00339
-3
jl I00339

I0035D
I0035F:
-20()
(),al

I00339
I00338:
_3

.csb2
I00339:

-1
-22(),
-32()
-22()
-32(),
-32()
jge I00361
-32()
I00361:
-2
I00364
-32()
I00364:
-32()
jge I00371
-1
cmpb ,#45
I0036F
-30(),#48
I0036F
-1



_Fputk

-1
-22()
I0036F:
-30()
_Fputk

inc -32(bp)
jne I0036F
I00371:
-22()
jl I00374
-1



_Fputk

-1
I00371
I00374:
-32()
je I003B
-30()
_Fputk

-32()
I00374
_Fputk
_Fputk:


_STDERR,#1
I0043

_fputk

I0044
I0043:

_putk

I0044:
.c

_STDERR: .zerow 2/2
_Xflag: .zerow 2/2

_1:
28774
26994
29806
8294
24931
27756
01
30496
29801
8296
24930
8292
29489
8308
29281
2663

_2:
28200
27765
10604
.word 0
.text
printk.s      +  b_printk

__itoa:







11

I0014:


v 

#48
#57
jle I0016

_Xflag
je I0019
65

I001A
I0019:
97

I001A:

58






(),al


v 
,

I0014


11

I001D:










or 
I001D

.ds
__ltoa:







11

I0024:
10()
cwd




.rmu4

#48
#57
jle I0026
#7
I0026:


(),al
10()
cwd




.dvu4
,
,


xor ax,ax
push 

.cmu4

I0024


11

I002A:










or 
I002A

.ds
_printk
_printk:


,#38



_2:
I00359
13
68
I0033E
79
I00339
85
I00337
88
I00334
99
I0034C
100
I0033F
101
I0034B
102
I0034B
103
I0034B
111
I0033A
115
I0034D
117
I00338
120
I00335



I0035:




-20(),
-20()
I0037


_putk

.ds
I0037:
-20(),#37
je I003A
-20()
_putk

I0035
I003A:
-12()

-12()
-1,
-2

cmpb ,#45
I003D

-2
I003D:
mov -30(bp),#32

cmpb ,#48
I00310

-30(),#48
I00310:
-32()
I00315:




-20(),
-20(),#48
jl I00317
-20(),#57
jg I00317
-20(),#48
I00318
I00317:
-20(),#42
I00312
#2
-2()
-20(),
I00318:
0
mul -32()
-32(),
-20()
-32(),
I00315
I00312:
-2
-3
-20(),#46
I0031E
I00323:




-20(),
-20(),#48
jl I00325
-20(),#57
jg I00325
-20(),#48
I00326
I00325:
-20(),#42
I0031E
#2
-2()
-20(),
I00326:
0
mul -3
-3,
-20()
-3,
-2
I00323
I0031E:
-2
_Xflag
-20(),#108
je I0032B
-20(),#76
I0032C
I0032B:
-2

cmpb 
je I0032C




-20(),
I0032C:
-20()
I00332
I00334:
inc _Xflag
I00335:
-20(),
I00336
I00337:
-2
I00338:
-20(),#10
I00336
I00339:
-2
I0033A:
-20(),#8
I00336:
-2
je I0033C
#4
-20()
-2()
-4()

__ltoa
,#8

I00333
I0033C:
#2
-20()
-2()

__itoa


I00333
I0033E:
-2
I0033F:
-2
je I00341
#4
-4()
-2()
-3,
-3,
-3
jge I00344
(),#45

-3
-3
sbb -3
I00344:
0

-3
-3

__ltoa
,#8

I00333
I00341:
#2
-2()
-22(),
-22()
jge I00347
(),#45

-22()
I00347:
0

-22()

__itoa


I00333
I0034B:
-30(),#32
(),#63

I00333
I0034C:
-30(),#32
#2
-2()
(),al

I00333
I0034D:
mov -30(bp),#32
#2
-2()
-1,
-1
I0034F
-1,#_1
I0034F:
-3
I00352
-3,#32767
I00352:
-1
I00357:
cmpb ()
je I00333
-3
jl I00333

I00357
I00359:
-20()
(),al

I00333
I00332:
_2

.csb2
I00333:

-1
-22(),
-32()
-22()
-32(),
-32()
jge I0035B
-32()
I0035B:
-2
I0035E
-32()
I0035E:
-32()
jge I0036B
-1
cmpb ,#45
I00369
-30(),#48
I00369
-1



_putk

-1
-22()
I00369:
-30()
_putk

-32()
I00369
I0036B:
-22()
jl I0036E
-1



_putk

-1
I0036B
I0036E:
-32()
je I0035
-30()
_putk

-32()
I0036E

_Xflag: .zerow 2/2

_1:
28200
27765
10604
.word 0
.text
strerror.s    o(tC   _strerror

.extern _sys_nerr, _sys_errlist
unknown: .asciz 'Unknown error'

_strerror:

2
unknown
or 
jle exit
_sys_nerr
jge exit
sal 1
_sys_errlist
exit:

curses.s      o(tC  _printw
_row
_cl
_so
_cm
_str
_mode
_refresh
_move
_fatal
_standout
_initscr
_addstr
_arp
_outc
_inch
_ttytype
_endwin
_termcap
_col
_touchwin
_clear
_new_tty
_old_tty
_se
_cp
_nscrn
_tc
_clrtoeol
_clrtobot
_cscrn
_standend
_fatal

_fatal:



_1

__io_table+4
_fprintf



_exit

.c
_outc
_outc:


__io_table+2

_fputc


.c
_move
_move:



_row,cl

_col,cl
.c
_clrtoeol
_clrtoeol:




al,_col


I0045:
#80
jge I0042
al,_mode

or 32

movb al,_row
cbw
80
mul 



_nscrn,al

I0045
I0042:
.s
_printw
_printw:


,#6


1
12()
10()



_str

_rintf
,#14

al,_row

,
al,_col


I0055:
#80
jge I0052
,#24
jge I0052

cmpb _str
je I0052

cmpb _str,#10
je I0059



al,_str


al,_mode


or 

80
mul 



_nscrn,al
I0053
I0059:



I0053:

I0055
I0052:

_col,cl

_row,cl
.ds
_clrtobot
_clrtobot:






_clrtoeol
al,_row



I0065:
#24
jge I0062

I0069:
#80
jge I0063
al,_mode

or 32

mov ax,#80
mul 



_nscrn,al

I0069
I0063:

I0065
I0062:
.ds
_standout
_standout:


_mode,#-128
.c
_standend
_standend:


_mode
.c
_addstr
_addstr:


_6

_5

_4

_3


_2

_printw
,#12
.c
_initscr
_initscr:






_7

_getenv

_ttytype,
_ttytype
I00A3
_8

_fatal

I00A3:
_ttytype
_termcap

_tgetent


1
je I00A6
_9

_fatal

I00A6:
_arp,#_tc
_arp

_10

_tgetstr


_cl,
_arp

_11

_tgetstr


_so,
_arp

_12

_tgetstr
pop bx
pop bx
_se,
_arp

_13

_tgetstr


_cm,
_row
_col
_mode

I00AB:
#24
jge I00A8

I00AF:
#80
jge I00A9
80
mul 


_cscrn,#32
80
mul 


_nscrn,#32

I00AF
I00A9:

I00AB
I00A8:
_outc



_cl
_tputs

.ds
_clear
_clear:


_row
_col
_clrtobot
.c
_inch
_inch:


al,_row

80
mul 

al,_col


al,_nscrn

127
.c
_touchwin
_touchwin:







I00D5:
#24
jge I00D2

I00D9:
#80
jge I00D3
80
mul 


_cscrn,#32

I00D9
I00D3:

I00D5
I00D2:
_outc



push _cl
call _tputs

.ds
_refresh
_refresh:


,#6




I00E5:
#24
jge I00E2

I00E9:
#80
jge I00E3
80
mul 


al,_nscrn


80
mul 


al,_cscrn



je I00E7






_cm
_tgoto

_cp,
_outc



_cp
_tputs

I00EE:
80
mul 


al,_nscrn


80
mul 


al,_cscrn



je I00E7

I00E11
80
mul 


al,_nscrn

128
128
I00E11
_outc



_so
_tputs

,#128
I00E12
I00E11:
,#128
I00E12
80
mul 


al,_nscrn

testb al,#128
I00E12
mov ax,#_outc



_se
_tputs


I00E12:
80
mul 


80
mul 

cl,_nscrn




_cscrn,al
80
mul 


al,_nscrn

127
__io_table+2

_fputc



I00EE
I00E7:

I00E9
I00E3:

I00E5
I00E2:
al,_row



al,_col



_cm
_tgoto

_cp,
_outc



_cp
_tputs


je I00E19
_outc



_se
_tputs

I00E19:
__io_table+2
_fflush

.ds
_endwin
_endwin:




3

_move


_refresh
.c
_cscrn

_cscrn: .zerow 1920/2
_nscrn
_nscrn: .zerow 1920/2
_new_tty
_new_tty: .zerow 6/2
_old_tty
_old_tty: .zerow 6/2
_str
_str: .zerow 256/2
_mode
_mode: .zerow 2/2
_col
_col: .zerow 2/2
_row
_row: .zerow 2/2
_se
_se: .zerow 2/2
_so
_so: .zerow 2/2
_cm
_cm: .zerow 2/2
_cl
_cl: .zerow 2/2
_cp
_cp: .zerow 2/2
_arp
_arp: .zerow 2/2
_ttytype
_ttytype: .zerow 2/2
_tc
_tc: .zerow 100/2
_termcap
_termcap: .zerow 1024/2

_1:
30051
29554
29541
8250
29477
10
_2:
29477

_3:

_4:

_5:

_6:

_7:
17748
19794

_8:

29728
29285
26989
24942
8300
31092
25968
29472
29797
26912
8302
28261
26998
28530
28014
28261
116
_9:

29728
29285
25453
28769
25888
29806
31090
26144
29295
29728
29285
26989
24942
108
_10:
27747

_11:
28531
.word 0
_12:
25971

_13:
28003
.word 0
.text
getpw.s       +  )_getpw
_getpw

_getpw:


,#8


_2

_1

_fopen



or 
I0018



I0018:

I001A:

_fgetc


,#10
je I0019
,#-1
I001D



I001D:

(),al

I001A
I0019:
()


,#2
I00112:

je I001F
I00114:





,#58
je I00110


je I00114



I00110:

2
I001F:

I0011A:





,#58
je I00119
,#48
jl I0011C
,#57
jle I0011D
I0011C:



I0011D:

48
0
mul 

,
A
I00119:

,
I0018


I0011:
pop ax
.ds

_1:
25903
25460
28719
29537
30579
100
_2:
114
.text
nlist.s       +  )_nlist
_nlist

_nlist:


,#74



_1


_fopen


-2,
-2
I0013
-1



-2


48

-7

_fread
,#8
1
I0015
cmpb -7,#1
I0015
cmpb -73(),#3
I0015
al,-70()



32
jbe I001C
-3
-3
-42()
adc -40()


I001D
I001C:



I001D:

cl,-70()
ch,ch
-6
adc -6
-62()
adc -60()



adc 


-2
_fseek
,#8

je I0016
I0015:
-2
_fclose

-1




I001F:

4
sal cl

or 
je I001E

4
sal cl

cmpb 
je I001E
bx,si
mov cx,#4
sal cl

12

sal cl

8
10

sal cl

14

I001F
I001E:

-4
-4
65535
0




6

.dvu4

I00115:

jle I00112
,
I00117
2
I00117:
-2


6

-2

_fread
,#8
1
je I0011A
-2
_fclose

-1


I0011A:

I0011F:
,
jge I00113

4
sal cl

cmpb 12
I0011D

4
sal cl

8

-2


_strncmp


I0011D
-2
16
.loi

4
sal cl

16
.sti

3
I0011D:

F
I00113:

5
I00112:
push -2
_fclose






.ds

_1:
114
.text
termcap.s     +  _tputs
_tgetflag
_tgetent
_capab
_tgoto
_tgetstr
_tgetnum
_capab

_capab:
_tgetent


_tgetent:


,#12




_strlen

,
_capab,
_1

_getenv


or 
I0013
#_2
I0014

cmpb (),#47
je I0014
_3

_getenv

,

je I0019


_strcmp



I0019
()
023



_strncat




I0019:
#_4
I0014:
_5


_fopen




I00112
_capab
-1


I00112:
-10()
-12(),
I00115:
024
-10()
-10()




_fgets


I00117

call _fclose
pop 
_capab



I00117:

_strlen

2
-10(),
-10()

cmpb ,#92
je I00115
I0011A:
-12()



testb ___ctype+1,#8
je I00119
-12()
A
I00119:
-12()
cmpb ,#35
I00121
2
I00121:

-12()

_strncmp


I00128

-12()
cmpb ,#124
2

-12()
cmpb ,#58
I00128
I00122:

_fclose




I00128:
-12()
cmpb 
0
-12()
cmpb ,#124
0
-12()
cmpb ,#58
0
-12()
I00128
I00120:
-12()
-12()
cmpb ,#124
1
2


.ds
_tgetnum
_tgetnum:






_capab
or 
je I0022
or 
I002B
I0022:
-1

I0021
I002B:
mov bx,si
inc si
cmpb ,#58
je I00211
cmpb -1()
I002B
-1

I0021
I00211:
al,()


testb ___ctype+1,#8
je I00210

I00211
I00210:




_strncmp


I002B
cmpb 2(),#35
I002B
3()

_atoi


I0021:

.ds
_tgetflag
_tgetflag:






_capab
or 
je I0032
or 
I003B
I0032:
-1

I0031
I003B:


cmpb ,#58
je I00311
cmpb -1()
I003B


I0031
I00311:
al,()


testb ___ctype+1,#8
je I00310

I00311
I00310:




_strncmp


I003B


I0031:

.ds
_tgetstr
_tgetstr:


,#8



_6:
I00431
10
48
I0042B
49
I0042B
50
I0042B
.word 51
.word I0042B
69
I00422
98
I00426
102
I00427
110
I00423
114
I00424
116
I00425
_7:
I00432
92
2
I0041F
I00432
I0041E

_capab


or 
je I0042

I004B
I0042:


I0041
I004B:


cmpb ,#58
je I00411
cmpb -1()
I004B


I0041
I00411:
al,()


testb ___ctype+1,#8
je I00410

I00411
I00410:




_strncmp


I004B
cmpb 2(),#61
I004B
#3
I0041A:
cmpb ()
je I00417
cmpb (),#58
je I00417
al,()


I0041C
I0041E:

al,()

64
(),al
I00418
I0041F:

al,()


I00420
I00422:
(),#27
I00418
I00423:
(),#10
I00418
I00424:
(),#13
I00418
I00425:
(),#9
I00418
I00426:
(),#8
jmp I00418
I00427:
(),#12
I00418
I0042B:


I0042F:
,#3
jge I0042C
al,()


testb ___ctype+1,#4
je I0042C
al,()

3

sal cl

#48
,


I0042F
I0042C:

(),al

I00418
I00431:
al,()
(),al
I00418
I00420:
_6

.csb2
I00432:
al,()
(),al
I00418
I0041C:
_7

.csa2
I00418:


I0041A
I00417:
()



,

,

I0041:

.ds
_tgoto
_tgoto:


,#8




_8: .zerow 24/2

_10:
I00520
6
37
I0051F
43
I005D
50
I00511
100
I00515
105
I005B
114
I005C

#_8


I0055:
cmpb ()
je I0052
cmpb (),#37
I0057
inc di
movb al,()


I0059
I005B:
,#1
I0053
I005C:
,#1
I0053
I005D:

I005F

I00510
I005F:

I00510:


al,()




(),cl



,
I0053
I00511:

I00513

I00514
I00513:

I00514:



100
cwd
iv 
,
10

cwd
iv 
48
(),al


cwd
iv 
#48
(),dl



,
I0053
I00515:

I00517

I00518
I00517:

I00518:



1000
cwd
iv 
,
,#99
jle I0051A
100

cwd
iv 
48
(),al

I0051A:
,#9
jle I0051D
10

cwd
iv 
cwd
iv 
#48
(),dl
inc si
I0051D:
10

cwd
iv 
#48
(),dl



,
I0053
I0051F:
(),#37

I0053
I00520:
_9

I0051
I0059:
_10

.csb2
I0057:
al,()
(),al

I0053:

I0055
I0052:
()
_8

I0051:

.ds
_tputs
_tputs:




or 
I0066


I0061
I0066:
cmpb ()
je I0065






()

I0066
I0065:


I0061:

.s

_1:
17748
19794
16707
80
_2:
25903
25460
29743
29285
25453
28769

_3:
17748
19794

_4:
25903
25460
29743
29285
25453
28769

_5:
114
_9:
20303
21328
.word 0
.text
popen.s       +  o_popen
_pclose
_popen

_popen:


,#10



cmpb (),#114
I0013


I0014

cmpb (),#119
I0016


I0014



I0014:

#2
je I0018


__pipe


jl I0018
__fork
,

jge I0019
I0018:



I0019:

I001E
-10(),#_pids
I00113:
-10(),#_pids+40
jae I00110
-10()

je I00111
-10()
_pids

cwd
iv 

__close

I00111:
-10(),#2
3
I00110:

sal 1



__close


or 
1f

1:

or 
1f

1:
sal 1




__dup2



or 
1f

1:
sal 1



__close


push ax

_3

_2

_1

__execl
,#10
27

__exit

I001E:

sal 1



sal 1

_pids,

or 
1f

1:
sal 1



__close


sal 1




_fdopen





.ds
_pclose
_pclose:


,#10








_gnal


,


3

_gnal


-10(),

_fclose

I0023:


__wait


#-1
je I0022

sal 1
_pids,
I0023
I0022:
#-1
I0029
,#-1
I0029:



_gnal


-10()
3

_signal
pop bx


sal 1
_pids

.ds

_pids: .zerow 40/2

_1:
25135
28265
29487
104
_2:
26739

_3:
25389
.word 0
.text
ttyname.s     +  _ttyname

_base:
25647
30309
_ttyname


_ttyname:


,#64


-3


_fstat



jl I0012
-30()
-4096
8192
je I0013





_base

_openr


or 
I001A



I001A:

_readr


or 
je I0019


-32()
2()
()
.cmu4

je I001D
I001A
I001D:
_base

_path

_strcpy


_1

_path

_strcat


10()

_path

_strcat


-6

_path

_stat



jl I001A
-60()
-4096
8192
je I00110
I001A
I00110:
-62()
-32(),
I001A
-6
-3,ax
jne I001A
mov -52()
-22(),
I001A

_closer

_path


I0019:

_closer





.ds

_path: .zerow 20/2

_1:
.word 47
.text
closedir.s    +]   _closer
_closer

_closer:






or 

8()

6(),#19997
je I0013

_errno,#9
-1



()
6()
8()
_free


_free


_close




jmp .dsret
fclose.s      o(tC  H_fclose
_fclose

_fclose:







I0015:
#20
jge I0012

sal 1
__io_table,
I0013

sal 1
__io_table
I0012


I0015

#20
jl I001A
-1


I001A:

_fflush

()
_close

testb 4(),#32
je I001D
6()
je I001D
6()
_free

I001D:
#2
jle I00111

_free

I00111:




jmp .dsret
opendir.s     +  _openr
_openr

_openr:


,#6



_1: .zerow 30/2




_open



or 
jge I0013




_1


_fstat



I0015
_1+4
-4096
16384
je I0016
I0015:

_close

_errno,#20




0

_malloc


or 
je I0019
048

_malloc

8(),
8()
I001A
I0019:
_errno
,
or 
je I001E

_free

I001E:

_close


_errno,



I001A:
(),
6(),#19997
4()
4()
2(),



jmp .dsret
setbuf.s      o(tC   _setbuf
_setbuf

_setbuf:




6()
je I0013
testb 4(),#32
je I0013
6()
_free


4(),#-101

6(),
6()
I0017
or 4(),#4
I0017:
6()
8(),
2(),#0
jmp .sret
fdopen.s      o(tC  _fdopen
_fdopen

_fdopen:


,#6



_1:
I001E
3
97
I001C
114
I001D
119
I001B



I0015:

sal 1
__io_table

#20
jl I0013





I0015





I0019
I001B:
or ,#2
I001A
I001C:
or ,#2
I001A
I001D:
or ,#1
I001A
I001E:



I0019:
_1

.csb2
I001A:
0

_malloc


or 
I00110



I00110:
2()

(),

4(),
024

_malloc

6(),
or 4(),#32
6()
8(),

sal 1
__io_table,



jmp .dsret
fopen.s       o(tC  _fopen
_fopen

_fopen:


,#8



_1:
I0011B
3
97
I001F
114
I00117
119
I001B



I0015:

sal 1
__io_table

#20
jl I0013





I0015





I0019
I001B:
or ,#2
438


_creat


,

jge I001A



I001F:
or ,#2



_open


,

jge I00111
_errno,#2
I00113
438


_creat


,

jge I00111
I00113:



I00111:






_lseek
,#8
I001A
I00117:
or ,#1



_open


,
,#0
jge I001A



I0011B:



I0019:
_1

.csb2
I001A:
or 
I0011D
#__stn
E
I0011D:
#1
I00120
#__stdout
E
I00120:
#2
I00123
#__stderr
E
I00123:
0

_malloc


or 
I0011E



I0011E:
2()

(),

4(),
or 
I00129
6(),#___stn
I0012A
I00129:
#1
I0012C
6(),#___stdout
I0012A
I0012C:
#2
I0012F
6()
I0012A
I0012F:
024

_malloc

6(),
I0012A:
6()
I00132
or 4(),#4
3
I00132:
#2
jl I00133
or 4(),#32
I00133:
6()
8(),

sal 1
__io_table,



jmp .dsret
putenv.s      +  _putenv
_putenv

_putenv:


,#8



_1:


_environ

I0013




61


_strchr



or 
je I0016
()
or 
je I0019
I001C:
()
()
,


je I0019

,
I001F:

cmpb 
je I001E











I001E
I001F
I001E:

cmpb 
I00112

cmpb ,#61
je I00113
I00112:
#2
I001C
I00113:
(),#61

(),



I0019:
(),#61
_environ

_1
I00117

or 
je I0011A
I0011E:


#2

I0011E
I0011A:
10

cwd
iv 
mul 
sal 1
20

_malloc
pop bx
mov 
or 
I00120



I00120:

_1,
_environ
,
_environ,
I00123:

,#2

(),
()
#2


2
I00123
I00122:
_environ
8
I00117:
10
_1
cwd
iv 
or 
I00118
10
_1
cwd
iv 
mul 
sal 1
20

_environ
_realloc



or 
I00129



I00129:
_environ,
I00118:
_1
sal 1
2



_1
sal 1


_1




jmp .dsret
regexp.s      +  -_regexec
_regcomp
_regcomp

_regcomp:


,#10



I0013
_1

_regerror






_regparse,
_regnpar,#1
_regze
_regze+2
_regcode,#_regdummy
56

_regc

-10()



_reg



I0016




_regze+2
_regze


32767

.cmi4

jl I0019
_2

_regerror




I0019:
_regze
48

_malloc


or 
I001C
_3

_regerror




I001C:

_regparse,
_regnpar,#1
46()
_regcode,
56

_regc

-10()



_reg



I001F

push ax

I001F:
40()
41()
42()
44()
47()


_regnext


cmpb 
I00112
#3
cmpb (),#8
I00115
al,3()
40(),al
6
I00115:
cmpb (),#1
I00116
al,41()


41(),al
I00116:
testb -10(),#4
je I00112


I00120:
or 
je I0011D
cmpb (),#8
I0011E
3()

_strlen

,
ja I0011E
3()
,
3()

_strlen

,
I0011E:

_regnext


I00120
I0011D:

42(),

44(),
I00112:



.ds
_reg:


,#10



,#1

je I0023
_regnpar,#10
jl I0026
_4

_regerror



I0021
I0026:
_regnpar
,
_regnpar

20

call _regnode


I0024
I0023:


I0024:
-10()

_regbranch


or 
I0029


I0021
I0029:
or 
je I002C


_regtail


I002D
I002C:

I002D:
testb -10(),#1
I002F

,#65534
I002F:

-10()
4
or 

I00212:
_regparse
cmpb ,#124
I00211
_regparse
-10()

_regbranch


or 
I00215


I0021
I00215:


_regtail


testb -10(),#1
I00218

,#65534
I00218:

-10()
4
or 

I00212
I00211:

je I0021B

30

I0021C
I0021B:


I0021C:
_regnode

,


_regtail



I00220:
or 
je I0021D


_regoptail
pop 


_regnext


I00220
I0021D:

je I00222
_regparse
_regparse
cmpb ,#41
je I00222
_5

_regerror



I0021
I00222:

I00223
_regparse
cmpb 
je I00223
_regparse
cmpb ,#41
I0022A
_6

_regerror



I0021
I0022A:
_7

_regerror



I0021
I00223:

I0021:

.ds
_regbranch:


,#8




6

_regnode



I0033:
_regparse
cmpb 
je I0032
_regparse
cmpb ,#124
je I0032
_regparse
cmpb ,#41
je I0032


_regpiece


or 
I0038


I0031
I0038:


1
or 

or 
I003B


ax,#4
or ax,(bx)

I003C
I003B:


_regtail


I003C:

I0033
I0032:
or 
I003E
9

_regnode

I003E:

I0031:

.ds
_regpiece:


,#8




_regatom


or 
I0043


I0041
I0043:
_regparse

-3(),al
cmpb -3(),#42
je I0046
cmpb -3(),#43
je I0046
cmpb -3(),#63
je I0046




I0041
I0046:
testb ,#1
I004B
cmpb -3(),#63
je I004B
_8

_regerror



I0041
I004B:
cmpb -3(),#43
je I004F
4

I00410
I004F:


I00410:


cmpb -3(),#42
I00412
testb ,#2
je I00412

0

_reginsert


I00413
I00412:
cmpb -3(),#42
I00416

6

_reginsert


ax,#7
push ax
_regnode



_regoptail




_regoptail


6

_regnode



_regtail


9

_regnode



_regtail


I00413
I00416:
cmpb -3(),#43
I00419
testb ,#2
je I00419

1

_reginsert


I00413
I00419:
cmpb -3(),#43
I0041D
6

_regnode




_regtail



7

_regnode


_regtail


6

_regnode



_regtail


9

_regnode



_regtail


I00413
I0041D:
cmpb -3(),#63
I00413

6

_reginsert


6

_regnode



_regtail


9

_regnode
pop bx
mov 


_regtail




_regoptail


I00413:
_regparse
_regparse
cmpb ,#42
je I00422
_regparse
cmpb ,#43
je I00422
_regparse
cmpb ,#63
I00423
I00422:
_9

_regerror



I0041
I00423:

I0041:

.ds
_regatom:


,#8




_17:
I00532
12

I0052A
36
I0055
40
I00524
41
I0052A
42
I0052D
43
I0052D
46
I0056
63
I0052D
91
I0057
92
I0052E
94
I0054
124
I0052A

()
_regparse
_regparse



I0052
I0054:


_regnode


I0053
I0055:


_regnode


I0053
I0056:
3

_regnode


or (),#3
I0053
I0057:
_regparse
cmpb ,#94
I0059
5

_regnode


_regparse
I005A
I0059:
4

_regnode


I005A:
_regparse
cmpb ,#93
je I005B
_regparse
cmpb ,#45
I00510
I005B:
_regparse
_regparse



_regc

I00510:
_regparse
cmpb 
je I005F
_regparse
cmpb ,#93
je I005F
_regparse
cmpb ,#45
I00514
_regparse
_regparse
cmpb ,#93
je I00516
_regparse
cmpb 
I00517
I00516:
45

_regc

I00510
I00517:
_regparse
al,-2


,


,


,
jle I00520
_10

_regerror



I0051
I00520:

,
jg I0051D

_regc


I00520
I0051D:
_regparse
I00510
I00514:
_regparse
_regparse
movb al,


_regc

I00510
I005F:


_regc

_regparse
cmpb ,#93
je I00522
_11

_regerror



I0051
I00522:
_regparse
or (),#3
I0053
I00524:




_reg



or 
I00526


I0051
I00526:

5
or ()
(),
I0053
I0052A:
_12

_regerror



I0051
I0052D:
_13

_regerror



I0051
I0052E:
_regparse
cmpb 
I00530
_14

_regerror



I0051
I00530:
8

_regnode


_regparse
_regparse



_regc



_regc

or (),#3
I0053
I00532:
_regparse
_15

_regparse
_strcn


,
,#0
jg I00534
_16

_regerror



I0051
I00534:

_regparse

-7(),al
,#1
jle I00537
cmpb -7(),#42
je I00536
cmpb -7(),#43
je I00536
cmpb -7(),#63
I00537
I00536:

I00537:
or (),#1
,#1
I0053D
or (),#2
I0053D:
8

_regnode


I00540:

jle I0053F
_regparse
_regparse



_regc


I00540
I0053F:


_regc

I0053
I0052:
_17

.csb2
I0053:

I0051:

.ds
_regnode:






_regcode
#_regdummy
I0063
_regze,#3
adc _regze+2

I0061
I0063:

al,
(),al

()

()

_regcode,

I0061:

.ds
_regc:


_regcode,#_regdummy
je I0073
_regcode
movb al,4(bp)
movb ,al
_regcode
I0074
I0073:
_regze,#1
adc _regze+2
I0074:
.c
_reginsert:


,#6


_regcode,#_regdummy
I0083
_regze,#3
adc _regze+2
.ds
I0083:
_regcode
_regcode,#3
_regcode
,
I0086:
,
jae I0085


al,()





I0086
I0085:

al,
(),al

()

()

.ds
_regtail:


,#6


,#_regdummy
I0093
.ds
I0093:

I0098:

_regnext


or 
I009A
I0095
I009A:

I0098
I0095:
cmpb (),#7
I009D


,
I009E
I009D:


,
I009E:
8

sar cl

1(),al


2(),al
.ds
_regoptail:

mov bp,sp
push 

or 
je I00A2
#_regdummy
je I00A2
cmpb (),#6
je I00A3
I00A2:
.s
I00A3:

3()

_regtail


.s
_regexec
_regexec:






or 
je I00B2

I00B3
I00B2:
_18

_regerror



I00B1
I00B3:
cmpb 46(),#156
je I00B7
_19

_regerror



I00B1
I00B7:
42()
je I00BA

I00BD:
42()




_strchr



or 
je I00BC
44()
42()

_strncmp


I00B10
I00BC
I00B10:

I00BD
I00BC:
or 
I00BA


I00B1
I00BA:

je I00B16

_regbol,
I00B17
I00B16:
_regbol
I00B17:
cmpb 41()
je I00B19


_regtry



I00B1
I00B19:

cmpb 40(di),#0
je I00B26
I00B1F:
al,40()



_strchr



or 
je I00B1D


_regtry



je I00B22


I00B1
I00B22:

I00B1F
I00B26:


_regtry



je I00B25


I00B1
I00B25:


cmpb 
I00B26
I00B1D:


I00B1:

.ds
_regtry:


,#6



_reginput,

_regstartp,

20
_regendp,


20

,#10
I00C5:

jle I00C2
()
#2
()
#2

I00C5
I00C2:

47

_regmatch


je I00C7




_reginput
20,


I00C1
I00C7:


I00C1:

.ds
_regmatch:


sub sp,#12
push 


_21:
I00D63

39
I00D62
I00D7
I00DB
I00DF
I00D1B
I00D20
I00D45
I00D6
I00D13
I00D6
I00D51
I00D51
I00D63
I00D63
I00D63
I00D63
I00D63
I00D63
I00D63
I00D63
I00D63
I00D2F
I00D2F
I00D2F
I00D2F
I00D2F
I00D2F
I00D2F
I00D2F
I00D2F
I00D63
I00D3E
I00D3E
I00D3E
I00D3E
I00D3E
I00D3E
I00D3E
I00D3E
I00D3E


I00D3:
or 
je I00D2

_regnext


al,()


I00D5
I00D7:
_regbol
_reginput,
je I00D6


I00D1
I00DB:
_reginput
cmpb 
je I00D6


I00D1
I00DF:
_reginput
cmpb 
I00D11


I00D1
I00D11:
_reginput
I00D6
I00D13:
3()
,



mov bx,_reginput





je I00D15


I00D1
I00D15:

_strlen

,
,#1
jle I00D18

_reginput

_strncmp


je I00D18


I00D1
I00D18:

_reginput
_reginput,
I00D6
I00D1B:
_reginput
cmpb 
je I00D1C
_reginput



3()

_strchr



I00D1D
I00D1C:


I00D1
I00D1D:
_reginput
I00D6
I00D20:
_reginput
cmpb 
je I00D21
_reginput



3()

_strchr



je I00D22
I00D21:


I00D1
I00D22:
_reginput
I00D6
I00D2F:
al,()

20
,
_reginput
,

_regmatch


je I00D31

sal 1
_regstartp

I00D34

sal 1
add bx,_regstartp


I00D34:


I00D1
I00D31:


I00D1
I00D3E:
al,()

30
,
_reginput
,

_regmatch


je I00D40

sal 1
_regendp

I00D43

sal 1
_regendp


I00D43:


I00D1
I00D40:


I00D1
I00D45:
cmpb (),#6
je I00D4B
3()

I00D6
I00D4B:
_reginput
,
3()

_regmatch


je I00D4D


I00D1
I00D4D:

_reginput,

_regnext


or 
je I00D49
cmpb (),#6
je I00D4B
I00D49:


I00D1
I00D51:
-5()
cmpb (),#8
I00D53
al,3()
-5(),al
I00D53:
cmpb (),#10
I00D56


I00D57
I00D56:


I00D57:
-12()
_reginput
-10(),
3()
push ax
call _regrepeat

,
I00D59:
-12()
,
jl I00D58
cmpb -5()
je I00D5B
_reginput



al,-5()



I00D5C
I00D5B:

_regmatch


je I00D5C


I00D1
I00D5C:


-10()
_reginput,
I00D59
I00D58:


I00D1
I00D62:


I00D1
I00D63:
_20

_regerror



I00D1
I00D5:
_21

.csa2
I00D6:

I00D3
I00D2:
_22

_regerror



I00D1:

.ds
_regrepeat:


,#6



_24:
I00E13
3
5
I00E4
I00EB
I00E10
I00E13
I00E13
I00E7


_reginput

3
,




I00E2
I00E4:

_strlen



bx,si
mov si,bx
I00E3
I00E7:




al,()



I00E3


I00E7
I00EB:
cmpb ()
je I00E3
al,()



_strchr



je I00E3


I00EB
I00E10:
cmpb ()
je I00E3
al,()



_strchr



I00E3


I00E10
I00E13:
_23

_regerror


I00E3
I00E2:
_24

.csa2
I00E3:
_reginput,

.ds
_regnext:






#_regdummy
I00F3


I00F1
I00F3:
8
al,1()

sal cl
cl,2()
ch,ch


or 
I00F6


I00F1
I00F6:
cmpb (),#7
I00F9




I00F1
I00F9:



I00F1:

.ds

_regendp: .zerow 2/2
_regstartp: .zerow 2/2
_regbol: .zerow 2/2
_reginput: .zerow 2/2
_regze: .zerow 4/2
_regcode: .zerow 2/2
_regdummy: .zerow 2/2
_regnpar: .zerow 2/2
_regparse: .zerow 2/2

_1:
21838
19532
24864
26482
28021
28261
116
_2:
25970
25959
28792
29728
28527
25120
26473

_3:
30063
8308
26223
29472
24944
25955

_4:
28532
8303
24941
31086
10272
41
_5:
28277
24941
25460
25960
8292
10536

_6:
28277
24941
25460
25960
8292
10536

_7:
30058
27502
28448
8302
28261
100
_8:
11050
28448
25968
24946
10
25376
30063
08
25120
8293
28005
29808
121
_9:
25966
29811
01
10784
11071

_10:
28265
24950
26988
8292
23899
29216
.word 28257
25959

_11:
28277
24941
25460
25960
8292
23899

_12:
28265
25972
28274
27745
29984
28786

_13:
11071
8234
28518
27756
30575
8307
28526
26740
28265
103
_14:
29300
26977
26988
26478
23584

_15:
9310
23342
10536
16252
10795
92
_16:
28265
25972
28274
27745
25632
29545
29537
25972
114
_18:
21838
19532
28704
29281
28001
29797
29285

_19:
28515
29298
28789
25972
8292
29296
26479
24946
109
_20:
25965
28525
31090
25376
29295
30066
29808
28521
110
_22:
28515
29298
28789
25972
8292
28528
28265
25972
29554

_23:
.word 28265
.word 25972
28274
27745
26144
30063
30060
112
.text
getopt.s      +  _optind
_opterr
_getopt
_optarg
_optopt
_opterr

_opterr:
_optind
1
_optind:
_getopt
1

_getopt:








_1:
1

_1,#1
I0013

_optind,
jge I0015
_optind
sal 1


cmpb ,#45
I0015
_optind
sal 1


cmpb 1
I0016
I0015:
-1



_optind
sal 1

_2


_strcmp



I0013
_optind
-1



_optind
sal 1


_1




_optopt,
,#58
je I001D


_strchr



or 
I001E
I001D:
_opterr
je I00112
__io_table+4
()
_fputs


__io_table+4
_3

call _fputs


__io_table+4

_fputc


__io_table+4
0

_fputc


I00112:
_optind
sal 1


_1

_1
cmpb 
I00115
_optind
_1,#1
I00115:
63


I001E:

cmpb (),#58
I00118
_optind
sal 1

_1



cmpb 
je I0011B
_optind
_optind
sal 1

_1



_optarg,
C
I0011B:
_optind

_optind,
jl I0011E
_opterr
1
__io_table+4
()
_fputs


__io_table+4
_4

_fputs


__io_table+4

_fputc


__io_table+4
0

_fputc


I00121:
_1,#1
63


I0011E:
_optind
_optind
sal 1


_optarg,
I0011C:
_1,#1
jmp I00119
I00118:
_optind
sal 1


_1

_1
cmpb 
I00124
_1,#1
_optind
I00124:
_optarg
I00119:



.ds
_optarg

_optarg: .zerow 2/2
_optopt
_optopt: .zerow 2/2

_2:
11565

_3:
8250
27753
25964
24935
8300
28783
26996
28271
11552
8237

_4:
8250
28783
26996
28271
29216
29029
26997
25970
8307
28257
24864
26482
28021
28261
8308
11565
.word 32
.text
puts.s        o(tC  z _puts
_puts

_puts:



__io_table+2

_fputs


-1(),al
__io_table+2
0

_fputc


al,-1()
cbw
jmp .cret
ctime.s       o(tC  m_mktime
_localtime
_tzset
_asctime
_ctime
_timezone
_gmtime
_fftime

_day:
_1
_2
_3
_4
_5
_6
_7
_month:
_8
_9
_10
_11
_12
_13
_14
_15
_16
_17
_18
_19
_asctime

_asctime:




or 
I0013
_20

_timebuf

_strcpy


I0014

10()
1900
8()
sal 1

()
2()
4()
6()
_month
12()
sal 1
_day
_21

_timebuf

_rintf
,#18
I0014:
_timebuf
.s
_ctime
_ctime:



_localtime


_asctime

.c

_days_per_mth:
31
28
31
30
31
30
31
31
30
31
30
.globl _timezone
31
_timezone:
-1,-1
_dst:
_mktime
-1

_mktime:


,#6



10()
70

or 
jge I0033
-1

65535

I0031
I0033:


4
cwd
iv 
cwd


0864
#1
.mli4



cwd


3184
#481
.mli4



adc 
,
,

2
4
cwd
iv 
or 
je I0036
_days_per_mth+2,#28
I0037
I0036:
_days_per_mth+2,#29
I0037:

I003B:
8(),
jle I0038

sal 1
_days_per_mth
cwd




0864
#1
.mli4



adc 
,
,

I003B
I0038:
6()

cwd




0864
#1
.mli4



adc 
-4(bp),cx
mov ,
4()
cwd




3600

.mli4



adc 
,
,
2()
cwd




60

.mli4



adc 
,
,
()
cwd

adc 

,
_timezone,#65535
I003D
_timezone+2,#-1
I003D
_tzset
I003D:
_timezone
_timezone+2
,
adc ,
_dst,#1
I00310

_indst


je I00310


3600
sbb 0

,
I00310:


I0031:


.ds
_gmtime
_gmtime:


,#12


#_the_time


2
,
,

jge I0043


I0041
I0043:




0864
push ax
call .dvi4
4
adc #0




7

.rmi4
12(),
#70
I0048:


481

3184

.cmi4

jge I004A
I0045
I004A:
4

cwd
iv 
or 
I004D


482

34048

.cmi4

jge I00410
I0045
I00410:


34048
sbb 482
,
,
I004E
I004D:


13184
sbb 481
,
,
I004E:

I0048
I0045:
10(),




0864

.dvi4
14(),
-10(),
4

cwd
iv 
or 
je I00413
8

I00414
I00413:
9

I00414:
_days_per_mth+2
-12()
I00418:
-12()
sal 1
_days_per_mth
-10(),
jl I00415
-12()
sal 1
-10()
ax,_days_per_mth
-10(),
-12()
I00418
I00415:
-12()
8(),
-10()

6(),




0864

.rmi4
,
,




3600

.dvi4
4(),




3600

.rmi4
,
,




60

.dvi4
2(),




60

.rmi4
(),
16()

I0041:

.ds
_localtime
_localtime:


,#6

_timezone,#65535
I0053
_timezone+2,#-1
I0053
_tzset
I0053:


2
_timezone
sbb _timezone+2
,
,


_gmtime


or 
I0056

I0051
I0056:
_dst,#-1
I0059
-1

jmp I005A
I0059:


I005A:
16()
_dst,#1
I005C

_indst


je I005C
16(),#1
4()

4(),
4(),#23
jle I005C
4()
24
4(),
12()

7
cwd
iv 
12(),
14()

14(),
6()

6(),
8()
sal 1
_days_per_mth
6(),
jle I005C
6(),#1
8()

8(),
I005C:

I0051:

.s
_tzset
_tzset:


_dst

_22

_getenv


_tzoffset


_timezone,
_timezone+2,
.c
_tzoffset:


,#8





,#1

,#-1
or 
je I0072
cmpb ()
I0073
I0072:



I0071
I0073:


I0077:
al,()


testb ___ctype+1,#3
je I0076
si
jmp I0077
I0076:

cmpb (),#45
I007D
,#-1

I007D:
al,()


testb ___ctype+1,#4
je I007C
al,()

48

0
mul 




I007D
I007C:

cwd


3600

.mli4

,
cmpb (),#58
I00710


I00713:
al,()


testb ___ctype+1,#4
je I00712
al,()

48

0
mul 




I00713
I00712:

cwd




60

.mli4



adc 
,
,
I00710:
al,()


testb ___ctype+1,#3
je I00716

,#1
I00716:

cwd




.mli4


I0071:


.ds
_indst:




8(),#3
I0083
10(),#87
jge I0086
mov ax,12(si)
30
6()
7
jge I0086


I0081
I0086:
12()
6()

jge I008A


I0081
I008A:


I0081
I0083:
8(),#9
I008D
12()
31
6()
7
jge I00810


I0081
I00810:


I0081
I008D:
8(),#3
jle I00813
8(),#9
jge I00813


I0081
I00813:


I0081:

.s
_fftime
_fftime:



10()

sbb 

8
#4

.cif
.8
.c

_the_time: .zerow 18/2
_timebuf: .zerow 26/2

_1:
30035
110
_2:
28493
110
_3:
30036
101
_4:
25943
100
_5:
26708
117
_6:
29254
105
_7:
24915
116
_8:
24906
110
_9:
25926
98
_10:
24909
114
_11:
28737
114
_12:
24909
121
_13:
.word 30026
110
_14:
30026
108
_15:
30017
103
_16:
25939
112
_17:
25423
116
_18:

118
_19:
25924
99
_20:
16191
8255
16191
8255
16191
16160
14911
16191
16186
8255
16191
16191
10
_21:
11813
29491
9504
13102
9587
25651
9504
12848
14948
12325
25650
9530
12848
8292
12325
25652
10
_22:
23124
.word 0
.text

_sigsetjmp.s  +>	   _glongjmp
_glongjmp

_glongjmp:





testb ,#2
je I0013


_longjmp


I0014



__longjmp


I0014:
jmp .dsret
assert.s      o(sC  ___bad_assertion
___assert
___bad_assertion

___bad_assertion:





_1

__io_table+4
_fprintf
,#10
_abort
.c
___assert
___assert:




_2

__io_table+4
_fprintf
,#8
_abort
.c

_1:
29505
25971
29810
28521
8302
9506
8819
26144
26977
25964
11364
26144
27753
8293
9506
8819
8236
26988
25966
9504
2660

_2:
29505
25971
29810
28521
8302
29285
28530
8306
28265
26144
27753
8293
9506
8819
28448
8302
26988
25966
9504
2677
.word 0
.text
lock.s        +  _lock
_unlock
_syserr
_syserr

_syserr:



_1

__io_table+4
_fprintf



_exit

.c
_lock
_lock:


,#6



_lockpath



I0023:



_creat



,#-1
I0022
_errno,#13
I0022

#3
jl I0027


I0021
I0027:
5

_sleep

I0023
I0022:
,#-1
je I0029

_close

-1
I002A
I0029:
_2

_syserr

I002A:


I0021:

.ds
_unlock
_unlock:



_lockpath


_unlink

-1
I0033
_3

_syserr

I0033:
.c
_lockpath:



_4: .zerow 20/2

_5

_4
push ax
call _strcpy



_4

_strcat


.c

_1:
28515
27765
28260
29735
9504
2675

_2:
28524
27491

_3:
28277
28524
27491

_5:
29743
28781
.word 47
.text
setjmp.s      +)   j
.define _setjmp, _longjmp, __longjmp
.extern _setjmp, _longjmp, __longjmp
.extern _sigprocmask
.extern __longjerr
.extern __sigjmp
.extern .sti, .gto
.text
|
| Warning:  this code depends on the C language declaration of
| jmp_buf in <setjmp.h>, and on the definitions of the flags
| SC_ONSTACK, SC_SIGCONTEXT, and SC_NOREGLOCALS in <sys/sigcontext.h>.
SC_SIGCONTEXT=2
SC_NOREGLOCALS=4
|
| _setjmp is called with two or three arguments. If called with three
| arguments, the second argument should be 0 or 1, and if it is 0,
| the signal context should not be restored on the longjmp.
| The last argument is added by the compiler, | which recognizes the
| "setjmp" identifier and adds an extra parameter: the | return address
| (there is no portable way to obtain this in the compiler intermediate code).
|
| _setjmp(jmp_buf, 0/1, retaddr)
| or
| _setjmp(jmp_buf, retaddr)
|
_setjmp:
	push	bp
	mov	bp,sp

	push	0(bp)		| frame pointer
	lea	ax, 4(bp)
	push	ax		| stack pointer
	push	2(bp)		| program counter; take it from the return
				| area. We could also get it from either
				| 6(bp) or 8(bp), but this is faster.
	xor	ax, ax
	push	ax		| signal mask high
	push	ax		| signal mask low
	mov	ax,*SC_NOREGLOCALS	| flags (4 is SC_NOREGLOCALS)
	push	ax

	mov	ax, 6(bp)	| get the savemask arg
	cmp	ax, *0
	je	nosigstate	| don't save signal state

	or	-12(bp), *SC_SIGCONTEXT		| flags |= SC_SIGCONTEXT

	lea	ax, -10(bp)
	push	ax
	xor	ax, ax
	push	ax
	push	ax
	call	_sigprocmask	| fill in signal mask
	add	sp, *6

nosigstate:
	mov	bx, 4(bp)	| jmp_buf
	mov	cx, *12		| sizeof(jmp_buf)
	call	.sti		| sp = src addr, bx = dest addr, cx = count
	xor	ax, ax
	mov	sp,bp
	pop	bp
	ret

|
| _longjmp() should be called for a setjmp() call that did not save the
| signal context.
|

__longjmp:
	push	bp
	mov	bp, sp

	mov	bx,4(bp)

| Check that this jmp_buf has no saved registers.
	mov 	ax, (bx)		| get flags
	test 	ax, *4
	je	__longjerr

| Set up the value to return in ax.
	mov	ax, 6(bp)		| value to return
	or	ax, ax
	jne	nonzero
	mov	ax, *1
nonzero:
	add	bx, *6
	jmp	.gto

|
| longjmp() should be called for a setjmp() call that DID save the
| signal context.
|

_longjmp:
	push	bp
	mov	bp, sp

| Check that this is a jmp_buf with no saved regs and with signal context info.
	mov	bx, 4(bp)		| pointer to jmp_buf
	mov	ax, (bx)		| get the flags
	test 	ax, *4			| check for no saved registers
	je	__longjerr
	test	ax, *2			| check for signal context
	je	__longjerr
	
| Compute the value to return
	mov	ax, 6(bp)		| proposed value to return
	or	ax, ax
	jne	nonzero1
	mov	ax, *1
nonzero1:

| Call _sigjmp to restore the old signal context.
	push	ax
	push	bx
	call	__sigjmp
	add	sp, *4
_longjerr.s   +W   __longjerr
__longjerr

__longjerr:



_1:
28524
26478
8298
29285
28530
2674


_1

_strlen


_1



__write


_abort
jmp I0013
vprint.s      +   _vprintf
_vfprintf
_vfprintf

_vfprintf:






__doprintf

.c
_vprintf
_vprintf:





__io_table+2
__doprintf

__io_table+2
testb 4,#64
je I0023
__io_table+2
_fflush

I0023:
jmp .cret
fprintf.s     o(tC  _fprintf
_printf
_fprintf

_fprintf:








__doprintf

testb 4(),#64
je I0013

_fflush


.s
_printf
_printf:





__io_table+2
__doprintf

__io_table+2
testb 4,#64
je I0023
__io_table+2
_fflush

I0023:
jmp .cret
sprintf.s     o(tC   _rintf
_rintf

_rintf:


,#10


-10(),#-1
,#130
,
,



-10()

__doprintf

-10()



_fputc


si
jmp .sret
doprintf.s    o(tC  
__doprintf

__itoa:







11

I0014:


v 

#48
#57
jle I0016
#7



(),al


v 
,

I0014


11

I001A:










or 
I001A

.ds
_ltoa:







11

I0024:
10()
cwd




.rmu4

#48
#57
jle I0026
#7
I0026:


(),al
10()
cwd




.dvu4
,
,





.cmu4

I0024


11

I002A:



movb al,






or 
I002A

.ds
__doprintf
__doprintf:


,#38



_2:
I00359
13
68
I0033E
79
I00339
85
I00337
88
I00334
99
I0034C
100
I0033F
101
I0034B
102
I0034B
103
I0034B
111
I0033A
115
I0034D
117
I00338
120
I00335


-3,
I0035:





or 
I0037
.ds
I0037:
#37
je I003A


_fputc


I0035
I003A:
-12()

-12()
-1,
-2

cmpb ,#45
I003D

-2
I003D:
-30(),#32

cmpb ,#48
I00310

-30(),#48
I00310:
-22()
I00315:




mov di,ax
cmp di,#48
jl I00317
#57
jg I00317
#48
I00318
I00317:
#42
I00312
-3,#2
-3
-2
I00318:
0
mul -22()
-22(),
-22(),
I00315
I00312:
-2
-2
#46
I0031E
I00323:





#48
jl I00325
#57
jg I00325
#48
I00326
I00325:
#42
I0031E
-3,#2
-3
-2
I00326:
0
mul -2
-2,
-2,
-2
I00323
I0031E:
-32()
#108
je I0032B
#76
I0032C
I0032B:
-32()

cmpb 
je I0032C





I0032C:

I00332
I00334:
-32()
I00335:

I00336
I00337:
-32()
I00338:
#10
I00336
I00339:
-32()
I0033A:
#8
I00336:
-32()
je I0033C
-3,#4
-3

-2
-4

_ltoa
,#8
si,ax
jmp I00333
I0033C:
-3,#2
-3

-2

__itoa


I00333
I0033E:
-32()
I0033F:
-32()
je I00341
-3,#4
-3
-4
-2
-3,
-3,
-3
jge I00344
(),#45

-3
-3
sbb -3
I00344:
0

-3
-3

_ltoa
,#8

I00333
I00341:
-3,#2
-3
-2
-20(),
-20()
jge I00347
(),#45

-20()
I00347:
0

-20()

__itoa


I00333
I0034B:
-30(),#32
(),#63

I00333
I0034C:
-30(),#32
-3,#2
-3
-2
(),al

I00333
I0034D:
-30(),#32
-3,#2
-3
-2
-1,
-1
I0034F
-1,#_1
I0034F:
-2
I00352
-2,#32767
I00352:
-16(bp)
I00357:
cmpb ()
je I00333
-2
jl I00333

I00357
I00359:

(),al

I00333
I00332:
_2

.csb2
I00333:

-1
-20(),
-22()
-20()
-22(),
-22()
jge I0035B
-22()
I0035B:
-2
I0035E
-22()
I0035E:
-22()
jge I0036B
-1
cmpb ,#45
I00369
-30(),#48
I00369
-1
-1




_fputc


-20()
I00369:

-30()
_fputc


-22()
I00369
I0036B:
-20()
jl I0036E
-1
-1




_fputc


I0036B
I0036E:
-22()
je I0035

-30()
_fputc


-22()
I0036E

_1:
28200
27765
10604
.word 0
.text
fputs.s       o(tC   _fputs
_fputs

_fputs:







cmpb ()







_fputc




4()
16


je 1f

1:
cx
jmp .dsret
fwrite.s      o(tC   _fwrite
_fwrite

_fwrite:


,#6





je I0013

,
jbe I0013


I001A:




10()

_fputc


10()
testb 4,
je I0019


I0019:

1


I001A

I0016




jmp .dsret
putw.s        +   _putw
_putw

_putw:







,#2













_fputc




testb 4(),
je I0016
-1






jmp .dsret
vsprintf.s    o(tC   _vrintf
_vrintf

_vrintf:


,#10


-10(),#-1
,#130
,
,


-10()

_vfprintf

-10()



_fputc


si
jmp .sret
fputc.s       o(tC  %_fputc
_fputc

_fputc:









testb 4(),#24
je I0013
-1



testb 4(),#2
I0016
-1



testb 4(),#4
je I0019




()
_write


2(),#1

I001A
I0019:
___cleanup,#__cleanup
8()

1

cl,

8(),



2()

2(),
2(),#1024
jl I001A
testb 4(),#128
I001A
2()
6()
()
_write


6()
8(),

I001A:

je I00110
or 
jle I00112
2(),
je I00113
I00112:
or 
jge I00117
or 4(),
8
I00117:
or 4(),#8
I00118:
-1


I00113:
2()
I00110:

al,



jmp .dsret
cleanup.s     o(tC   __cleanup
__cleanup

__cleanup:





I0015:
#20
jge I0012

sal 1
__io_table
je I0013

sal 1
__io_table
_fflush



I0015

jmp .sret
freopen.s     o(tC  e_freopen
_freopen

_freopen:


,#6




_1:
I0011A
3
97
I00112
114
I00116
119
I001E


I0015:
#20
jge I0012

sal 1
__io_table,
I0013
I0012


I0015

#20
jl I001A
-1


I001A:
4()
,


0
,

_fflush

()
_close





I001C
I001E:
or ,#2
438


_creat




jge I001D



I00112:
or ,#2



_open




jge I00114



I00114:






_lseek
,#8
I001D
I00116:
or ,#1



call _open
pop 



jge I001D



I0011A:



I001C:
_1

.csb2
I001D:
2()

(),

4(),
6()
8(),



jmp .dsret
fseek.s       o(tC  _fseek
_fseek

_fseek:


,#10



,#65535
,#-1
4(),#-25
testb 4(),#1
je I0013
10(),#2
jge I0016
6()
je I0016
testb 4(),#4
I0016
2()


,
,
10()
I001B





()
_lseek
,#8
-10(),
,

cwd
-10()
sbb 

adc 
,
,
I001C
I001B:

cwd



sbb 
,
,
I001C:
or 
jle I0016

cwd




.cmi4

jg I0016
6()
cwd




8()
cwd



sbb 


.cmi4

jl I0016

8()
8(),
2()

2(),



I0016:
push 10()


()
_lseek
,#8
,
,
2()
I0014

testb 4(),#2
je I0014

_fflush

10()


()
_lseek
,#8
,
,
I0014:
,#65535
I00116
,#-1
I00116
-1


I00116:




jmp .dsret
fflush.s      o(tC   _fflush
_fflush

_fflush:






testb 4(),#4
I0012
testb 4(),#2
I0013





2()
jg I0017



I0017:
2()
6()
()
_write


2(),
I001A
2()
6()
8(),


I001A:
or 4(),
-1



jmp .dsret
fputk.s       +r  '_fputk

_bufp:
_outbuf
_fputk

_fputk:



I0013
_bufp,#_outbuf
jbe I0016
_bufp
_outbuf

_outbuf



_write


_bufp,#_outbuf
.c

_bufp


_bufp
_bufp,#_outbuf+1024
I0019
024

_outbuf



_write

_bufp,#_outbuf
I0019:
.c

_outbuf: .zerow 1024/2
.text
malloc.s      o(tC  P
_calloc
_malloc
_free
_realloc

_grow:




__top
-2
je I0013
_assert_failed

__top

1023
64512

__top,
ja I0015

_brk


je I0016
I0015:




__top
-2,
-2()
__top
_free

__top,




.s
_malloc
_malloc:


,#12



I0023
,#2
I0023:
-12()
I0028:
-12(),#2
jae I0025


65534
2
-10(),
-10(),#4
jae I002A


I0021
I002A:
__bottom
I002D
4

_sbrk


#-1
I00210


I0021
I00210:


-2

2()

ja I00213
_assert_failed
I00213:
#2
__bottom,
__top,si
mov -2()
I002D:

__empty
I00218:
or 
je I00215
-2()
,
-10()


,
jb I00216

jb I0021A
I00216
I0021A:

2()

jae I0021E
2()

ja I00221
_assert_failed
I00221:

-2(),
-2(),
()
(),
(),
I0021E:

je I00224
()


I00225
I00224:
()
__empty,
I00225:

I0021
I00216:
,
()
I00218
I00215:
-10()
_grow


I0026
I0025
I0026:
-12()
I0028
I0025:
-12(),#2
I0022A
_assert_failed
I0022A:


I0021:

.ds
_realloc
_realloc:


,#14



-1,
,#65532
jbe I0033


I0031
I0033:


65534
2
-10(),
-1
mov ax,-2(bx)
,

-1
-12(),

__empty
I0038:
or 
je I0035
,
jae I003A
I0035
I003A:
,
I0036
-1
-2()
-2,

je I00310
()


I00311
I00310:
()
__empty,
I00311:
-1
-2
,
I0035
I0036:
,
()
I0038
I0035:
-10()
-1

,
jb I00313
-1,
ja I00313

2()

jae I00317
2()

ja I0031A
_assert_failed
I0031A:

-2(),
-1
-2,

_free

I00317:
-1
I0031
I00313:

_malloc


or 
I0031D


I0031
I0031D:
-12()
-1

_memcpy

-1
_free


I0031:

.ds
_calloc
_calloc:

mov bp,sp





mul 
,

_malloc


or 
I0043


I0041
I0043:

I0048:


1
,

je I0045
()

I0048
I0045:

I0041:

.ds
_free
_free:


,#6



,


-2,
ja I0053
_assert_failed
I0053:

__empty
I0058:
or 
je I0055
,
jae I0056
I0055
I0056:

()
I0058
I0055:

,
or 
je I005D

(),
I005E
I005D:

__empty,
I005E:
or 
je I00510

-2,
jbe I00513
_assert_failed
I00513:

-2,
I00510

-2()
-2,
()


I00510:
or 
je I00519

-2(),
jbe I0051C
call _assert_failed
I0051C:

-2(),
I00519

-2
-2(),


(),
I00519:
.ds
_assert_failed:


30

_1



_write

_abort
.c

__empty: .zerow 2/2
__top: .zerow 2/2
__bottom: .zerow 2/2

_1:
29537
25971
29810
26144
26977
25964
8292
28265
27680
25193
27951
27745
28524
11875
2659
.word 0
.text
peekpoke.s    +M  _peek
_poke
_peek

_peek:




_1:
-1

_1
jge I0013


_2

_open


_1,

_1
jl I0015

4


2: sal #1
rcl 1

1:


adc 



_1
_lseek
,#8





.cmu4

jl I0015


-1()

_1
_read

1
je I0016
I0015:
-1




al,-1()



.c
_poke
_poke:




_3:
-1


-1(),al
_3
jge I0023


_4

_open


_3,
I0023:
_3
jl I0025

4


2: sal #1
rcl 1

1:


adc 



_3
_lseek
add sp,#8





.cmu4

jl I0025


-1()

_3
_write

1
je I0026
I0025:
-1

I0021
I0026:

al,-1()

I0021:

.c

_2:
25647
30309
27951
28005

_4:
25647
30309
27951
28005
.word 0
.text
perror.s      o(tC  >_perror
_sys_errlist
_sys_nerr
_sys_errlist

_sys_errlist:
_1
_2
_3
_4
_5
_6
_7
_8
_9
_10
_11
_12
_13
_14
_15
_16
_17
_18
_19
_20
_21
_22
_23
_24
_25
_26
_27
_28
_29
_30
_31
_32
_33
_34
_35
_36
_37
_38
_39
_40
_sys_nerr
_sys_nerr:
_perror
40

_perror:




_errno
jl I0012
_errno,#40
jl I0013

4

_41



_write

I0014


_strlen





_write



_42



_write

_errno
sal 1
_sys_errlist
_strlen

_errno
sal 1

_sys_errlist(bx)


_write



_43



_write

I0014:
.s

_1:
29253
28530
8306
48
_2:

8308
30575
25966
114
_3:

29472
25461
8296
26982
25964
28448
8306
26980
25970
29795
29295
121
_4:

29472
25461
8296
29296
25455
29541
115
_5:
28233
25972
29298
28789
25972
8292
31091
29811
28005
25376
27745
108
_6:
12105
8271
29285
28530
114
_7:

29472
25461
8296
25956
26998
25955
28448
8306
25697
29284
29541
115
_8:
29249
8295
26988
29811
29728
28527
27680
28271
103
_9:
30789
25445
26144
.word 29295
24941
8308
29285
28530
114
_10:
24898
8292
26982
25964
28192
28021
25954
114
_11:

25376
26984
08
25970
110
_12:

27936
29295
8293
29296
25455
29541
25971
115
_13:

8308
28261
30063
26727
25376
29295
101
_14:
25936
28018
29545
26995
28271
25632
28261
25961
100
_15:
24898
8292
25697
29284
29541
115
_16:
27714
25455
8299
25956
26998
25955
29216
29029
26997
25970
100
_17:
28493
28277
8308
25956
26998
25955
25120
29557
121
_18:
26950
25964
25888
27000
29811
115
_19:
29251
29551
11635
25956
26998
.word 25955
.word 27680
28265
107
_20:

29472
25461
8296
25956
26998
25955

_21:

8308
8289
26980
25970
29795
29295
121
_22:
29513
24864
25632
29289
25445
28532
31090

_23:
28233
24950
26988
8292
29281
30055
25965
29806

_24:
26950
25964
29728
25185
25964
28448
25974
26226
28524
119
_25:
28500
8303
24941
31086
28448
25968
8302
26982
25964
115
_26:

8308
8289
31092
25968
29303
29801
29285

_27:
25940
29816
26144
27753
8293
30050
31091

_28:
26950
25964
29728
28527
27680
29281
25959

_29:

29472
24944
.word 25955
27680
26213
8308
28271
25632
30309
25449
101
_30:
27721
25964
24935
8300
25971
27493

_31:
25938
25697
28461
27758
8313
26982
25964
29472
29561
25972
109
_32:
28500
8303
24941
31086
27680
28265
29547

_33:
29250
27503
28261
28704
28777
101
_34:
24909
26740
24864
26482
28021
28261
116
_35:
25938
30067
29804
29728
28527
27680
29281
25959

_36:
25938
28531
29301
25955
25632
24933
27748
25455
8299
30305
26991
25956
100
_37:
26950
25964
24942
25965
29728
28527
27680
28271
103
_38:

27680
25455
29547
24864
.word 24950
27753
25185
25964

_39:
30022
25454
26996
28271
28192
29807
26912
28781
25964
25965
29806
01

_40:
26948
25970
29795
29295
8313
28526
8308
28005
29808
121
_41:
28233
24950
26988
8292
29285
28274
2671

_42:
8250

_43:
.word 10
.text
portio.s      +O  _port_in
_port_out

_portfd:
-1
_mode_opened:
_port_in


_port_in:





test _mode_opened,#1
I0013
test _mode_opened,#2
je I0016
_portfd
_close



_1

_open


_portfd,
I0017



_2

_open


_portfd,
I0017:
or _mode_opened,#1

_portfd
jl I0018





_portfd
_lseek
,#8





.cmu4

jl I0018


-1()

_portfd
_read

1
je I0019
I0018:
(),#65535
()

I0019:
al,-1()

(),
()


.s
_port_out
_port_out:




-1(),al
test _mode_opened,#2
I0023
test _mode_opened,#1
je I0026
_portfd
call _close
pop 


_3

_open


_portfd,
I0027
I0026:


_4

_open


_portfd,
I0027:
or _mode_opened,#2
I0023:
_portfd
jl I0028





_portfd
_lseek
,#8





.cmu4

jl I0028


-1()

_portfd
_write

1
je I0029
I0028:
-1

I0021
I0029:

al,-1()

I0021:

.c

_1:
25647
30309
28719
29295
116
_2:
25647
30309
28719
29295
116
_3:
25647
30309
28719
29295
116
_4:
25647
30309
28719
29295
116
.text
prints.s      o(tC  ,_prints
_Buf
_Bufp
_prints

_prints:


,#12




_1:
I00119
2
99
I001E
115
I001F

_Bufp,#_Buf

,

cmpb ()

cmpb (),#37
je I0016





_put





I0019:
al,()

48
jl I0018
al,()

57
jg I0018
al,()

48

0
mul 




I0019
I0018:
al,()


I001C
I001E:

,#2



_put



I001F:


,
,#2

-10(),
I00111:



-11(),al


je I00110
al,-11()


_put

1
I00110:


-10()
ax
sub ax,di
neg 


jle I0013
I00117:



je I0013
32

_put

7
I00119:
37

_put






_put


I001C:
_1

.csb2

_Bufp
_Buf

_Buf



_write

.ds
_put:


_Bufp,#_Buf+128
jae I0023
_Bufp
al,

_Bufp
I0023:
.c
_Bufp

_Bufp: .zerow 2/2
_Buf
_Buf: .zerow 128/2
.text
putk.s        +  $_putk

_bufp:
_outbuf
_putk

_putk:



I0013
_bufp,#_outbuf
jbe I0016
_bufp
_outbuf

_outbuf



_write


_bufp,#_outbuf
.c

_bufp


_bufp
_bufp,#_outbuf+1024
I0019
024

_outbuf



_write

_bufp,#_outbuf
I0019:
.c

_outbuf: .zerow 1024/2
.text
stderr.s      +  o _std_err
_std_err

_std_err:








cmpb ()










_write

jmp .dsret
getpass.s     +  `_getpass
_saveg
_getpass

_getpass:


,



_1: .zerow 10/2




_2

__open



or 
jge I0013






_gnal


_saveg,

_strlen





__write




__gtty



6
.loi
-1
6
.sti
,#65527



__stty


9

_1


__read





cmpb _1,#10
je I0015




_1


__read

I0016
I0015:


_1
-1


__stty




_3



__write
add sp,#6
or 
je I0019

__close

I0019:
_saveg


_gnal


_1
.ds
_saveg

_saveg: .zerow 2/2

_2:
25647
30309
29743
31092

_3:
.word 10
.text
waitpid.s     +(   C .define	_waitpid
.extern	__waitpid
.align 2
_waitpid: 
j __waitpid
.system.s      o(tC  _system
_system

_system:


,#10


_fork

or 
I0013



_3

_2

_1

_execl
,#10
27

_exit


or 
jge I0016
32512







_gnal


,


3

_gnal


-10(),
I0019:


_wait



je I0018
#-1
je I0018
I0019
I0018:
#-1
I001D
,#-1
I001D:



_gnal


-10()
3

_gnal





.ds

_1:
25135
28265
29487
104
_2:
26739

_3:
25389
.word 0
.text
wait.s        +(   7 .define	_wait
.extern	__wait
.align 2
_wait: 
j __wait
.unlink.s      +(   ? .define	_unlink
.extern	__unlink
.align 2
_unlink: 
j __unlink
.umount.s      +(   ? .define	_umount
.extern	__umount
.align 2
_umount: 
j __umount
.umask.s       +(   ; .define	_umask
.extern	__umask
.align 2
_umask: 
j __umask
.times.s       +(   ; .define	_times
.extern	__times
.align 2
_times: 
j __times
.uniqport.s    o(tC  _uniqport
_uniqport

_uniqport:


,#10



_1: .zerow 2/2

_1
I0017
-10()

_time

16
-10()


2: sar #1
rcr 1

1:
-10()
adc 

_getpid



_srand

_1,#1
I0017:

#3
I001A:
_rand



,



8

sar cl

,dl


,




255

,cl

or 
I001A

2
or 
I0015

4
je I0017
I0015:
jmp .dsret
utime.s       +(   ; .define	_utime
.extern	__utime
.align 2
_utime: 
j __utime
.write.s       +(   ; .define	_write
.extern	__write
.align 2
_write: 
j __write
._utime.s      +Y	  __utime
__utime

__utime:


,#28




or 
I0013


__time


,


-1,
-1,


-1,
-12(),
I0014

()
2()
-1,
-1,
4()
6()
-1,
-12(),
I0014:

_strlen


-2,
-10(),
-2

30



__syscall

jmp .dsret
time.s        +(   7 .define	_time
.extern	__time
.align 2
_time: 
j __time
.sync.s        +(   7 .define	_sync
.extern	__sync
.align 2
_sync: 
j __sync
.stime.s       +(   ; .define	_stime
.extern	__stime
.align 2
_stime: 
j __stime
.getcwd.s      +%   ? .define	_getcwd
.extern	__getcwd
.align 2
_getcwd: 
j __getcwd
._getcwd.s     +  w__getcwd
__getcwd

__getcwd:


,#386



or 


ja I0013

_errno,#22




-26
-310()

_1

_stat



jge I0017



I0017:
-30
-4096
16384
je I001D



I001D:


_2

_chr


jge I00110



I00110:
-340()

_3

_stat



jge I00113



I00113:
-33
-4096
16384
je I00116



I00116:
-340()
-310(),
I00119
,#1
I00119:

je I0011C
-33
-30,
I0011C
I001C
I0011C:


_4

_open


,

jge I00123
xor ax,


I00123:
or 
I00122
6

-38


_read

16
I00122


-38


.cmu4

I00127
I00123
I00127:

A
-38
-30,
I00123
#1
I00123
I0012A:
-279()
4

-38

-279()

_strncat

-370()

-279()

_stat



jge I00130

_close

-26

_go_back




I00130:
-370()
-310(),
I00123
-36
-30,
I00123
#1
I00123
I00122:

_close

or 
I00137
-26

_go_back




I00137:
-26

_strlen

15
255
jbe I0013A
_errno,#34
-26
push ax
call _go_back




I0013A:
_5

-26

_strcat


4

-38

-26

_strncat

-340()
-310(),
-33
-30,
I001D
I001C:
-26

_strlen


,
jae I0013D
_errno,#34
-26

_go_back




I0013D:
-26

_strlen


I00140
_6


_strcpy




I00140:
()
I00143:
47

-26

_strrchr


,

je I00142


_strcat




I00143
I00142:

_chr


je I00146



I00146:



.ds
_go_back:




I0023:
47
push ax
push 
_strrchr



or 
je I0022
1()

_chr

()
I0023
I0022:
.s

_1:
46
_2:
11822

_3:
46
_4:
46
_5:
47
_6:
.word 47
.text
stat.s        +'   7 .define	_stat
.extern	__stat
.align 2
_stat: 
j __stat
.sleep.s       +'   ; .define	_sleep
.extern	__sleep
.align 2
_sleep: 
j __sleep
._sleep.s      +B	  __sleep

__alfun:


.c
__sleep
__sleep:


,#24



I0023


I0021
I0023:


_alarm


or 
je I0025
,
jae I0026
I0025:

-10()

-12(),#__alfun
-20()

-12()

4

_gaction


_alarm

-2

_gemptyset

-2

_gsuend



_alarm




-20()

4

_gaction

,
jae I002A





_alarm

I002A:

I0021
I0026:

_alarm

_pause


_alarm



_alarm






I0021:

jmp .dsret
sigsuspend.s  +'   O .define	_sigsuspend
.extern	__sigsuspend
.align 2
_sigsuspend: 
j __sigsuspend
.sigaction.s   +'   K .define	_sigaction
.extern	__sigaction
.align 2
_sigaction: 
j __sigaction
.signal.s      +  
_gnal
_gnal

_gnal:


,


or 
jle I0012

jg I0012
#9
I0013

_errno,#22
-1





__gemptyset

,#4
#4
je I0018
#5
je I0018
or ,#2
I0018:

,
-1




__gaction


jge I001C
-1


I001C:
-1


jmp .sret
_sigaction.s  +4	   __gaction
__gaction

__gaction:


,#24

-1,

-1,

-12(),
-10(),#___gurn
-2

71



__syscall

jmp .cret
__sigreturn.s +(   Q .define ___sigreturn
.extern __sigreturn
___sigreturn: 
add sp, #4
j __sigreturn
.sigreturn.s   +'   K .define	_sigreturn
.extern	__sigreturn
.align 2
_sigreturn: 
j __sigreturn
._sigreturn.s  +:	  q__gurn
__gjmp
__gjmp

__gjmp:


,#38




-3,

2
4
-3,
-3,
6
-10(),
8

10
-2,

-1,
-3

__gurn

.ds
__gurn
__gurn:







_1: .zerow 24/2



__gfillset







__gprocmask

2()
4()
_1+10,
_1+10+2,
()
_1+6,
_1+18,
_1

75



__syscall

jmp .sret
sigprocmask.s +'   S .define	_sigprocmask
.extern	__sigprocmask
.align 2
_sigprocmask: 
j __sigprocmask
.sigpending.s  +'   O .define	_sigpending
.extern	__sigpending
.align 2
_sigpending: 
j __sigpending
.setuid.s      +'   ? .define	_setuid
.extern	__setuid
.align 2
_setuid: 
j __setuid
.setgid.s      +'   ? .define	_setgid
.extern	__setgid
.align 2
_setgid: 
j __setgid
.rmdir.s       +'   ; .define	_rmdir
.extern	__rmdir
.align 2
_rmdir: 
j __rmdir
.rename.s      +'   ? .define	_rename
.extern	__rename
.align 2
_rename: 
j __rename
.cuserid.s     +f   _cuserid
_cuserid

_cuserid:







_1: .zerow 256/2

or 
I0013
#_1

_geteuid

_getpwuid


or 
I0016
()




()

_strcpy





jmp .dsret
getlogin.s    +   _getlogin
_getlogin

_getlogin:





_1: .zerow 256/2

_getuid

_getpwuid


or 
I0013




()
_1

_strcpy


_1



jmp .sret
seekdir.s     +  _seekr
_seekr

_seekr:







or 

8()

6(),#19997
je I0013

_errno,#9
.ds

4()
2(),
jge I0017
2()
8()
6
4


.cmu4

jle I0018
I0017:
2()
I0018:
#1
I001E:
4()
2(),
jl I00112

_readr


je I00110
2()
I00112:
2()
8()
,

6
4


.cmu4

jg I00110
I00118:
4()
8()
,
jae I00115

6
4


.cmu4

I00116

8()
2(),
.ds
I00116:


8

,
8
I00115:

4()
2(),
I001E
I00110:
or 
I0011D
_errno,#22
jmp .dsret
I0011D:

4()
4()
2(),




()
_lseek
,#8





.cmu4

0
.ds
I00120:





.cmu4

I001E
jmp .dsret
readdir.s     +  G_readr
_readr

_readr:






or 

8()

6(),#19997
je I0019

_errno,#9



I0019:
4()
2(),
jl I001B
4()
4()
2(),
I001B:
4()
I001E
048

8()
()
_getdents

4(),
4()
jg I001E



I001E:
2()
8()

2()
8()
2(),
2()
or ()
je I0019



jmp .dsret
fgets.s       o(tC   _fgets
_fgets

_fgets:








I0013






jle I0015

_fgetc


#-1
je I0015

(),al

#10
I0016
I0015:
#-1
I001D
,
I001D



I001D:
()



jmp .dsret
fread.s       o(tC   _fread
_fread

_fread:


,#8




,

je I0013

,
jbe I0013

,
I001A:
10()
_fgetc


#-1
je I001C




I0019
I001C:


I0019:

1
,

I001A

I0016




jmp .dsret
gets.s        o(tC   _gets
_gets

_gets:








__io_table
_fgetc


#-1

#10


(),al



#-1
I0017



I0017:
()



jmp .dsret
getw.s        +   _getw
_getw

_getw:


,#6



,#2








_fgetc

(),al



testb 4(),#8
I0015
testb 4(),
je I0016
I0015:
-1






jmp .dsret
scanf.s       o(tC  _scanf
__doscanf
_sscanf
_fscanf
_scanf

_scanf:





__io_table


__doscanf
,#8
.c
_fscanf
_fscanf:








__doscanf
,#8
.c
_sscanf
_sscanf:








__doscanf
,#8
.c
_rnc:


_rnc_code
je I0043
_rnc_arg
_rnc_arg


_ic,
_ic
I0044
_ic,#-1
I0044
I0043:
_rnc_arg
_fgetc

_ic,
I0044:
.c
_ugc:


_rnc_code
je I0053
_rnc_arg
I0054
I0053:
_rnc_arg
_ic
_ungetc


I0054:
.c
_scnindex:




I0063:









je I0062
cmpb (si),#0
jne I0063


I0061
I0062:


I0061:

.s
__doscanf
__doscanf:


,#26




_1:
I00733
7
91
I00793
99
I0076F
100
I00737
111
I00734
115
I00783
117
I00737
120
I00738


10()

_rnc_arg,

_rnc_code,
_rnc
_ic,#-1
I007A
,#-1
I0075
I007A:
al,()


testb ___ctype+1,#8
je I0079

I007A
I0079:
cmpb ()
I007D
I007F
I007D:
_ic
jge I00711
I0075
I00711:
cmpb (),#37
je I00714
I00717:
_ic
testb ___ctype+1,#8
je I00716
_rnc
I00717
I00716:
al,()

_ic,
je I0071A
I007F
I0071A:

_rnc
I007A
I00714:

-12(),#1
cmpb (),#42
I0071D

-12()
I0071D:
al,()


testb ___ctype+1,#4
je I00720
mov -1,#1
-1
I00725:
al,()


testb ___ctype+1,#4
je I00721





0
mul -1


48
-1,
I00725
I00720:
-1
-1,#65535
I00721:
al,()

___tmp,al
bl,___tmp
bh,bh
testb ___ctype+1,#1
je I0072A
cl,___tmp
ch,ch
65
97

I0072B
I0072A:

al,___tmp

I0072B:


108
1f

1:
-1,
-1
je I00727

I00727:
cmpb (),#99
je I0072D
I00730:
_ic
testb ___ctype+1,#8
je I0072D
_rnc
I00730
I0072D:
-20()
al,()


I00732
I00734:
,#8
I00735
I00737:
,#10
I00735
I00738:
,
-1,#2
jb I00735
_ic,#48
I00735
_rnc
_ic
___tmp,cl
bl,___tmp
bh,bh
testb ___ctype+1,#1
je I00741
cl,___tmp
ch,ch
65
97
push cx
jmp I00742
I00741:

al,___tmp

I00742:

120
I0073E
-1
2
-1,
-20(),#1
_rnc
I00735
I0073E:
_ugc
_ic,#48
I00735:


-10()
-1
je I00744
_ic,#43
I00744
_rnc
I0074C
I00744:
-1
je I0074C
_ic,#45
I0074C
-10(),#1
_rnc
I0074C:
-1

1
-1,

je I0074B
_ic
testb ___ctype+1,#4
je I0074F
_ic
48
,
jle I0074F
_ic
48
_ic,
I00750
I0074F:
,
I0074B
_ic
___tmp,cl
bl,___tmp
bh,bh
testb ___ctype+1,#1
je I00758
cl,___tmp
ch,ch
65
97

I00759
I00758:

al,___tmp

I00759:

97
jb I0074B
_ic
___tmp,cl
bl,___tmp
bh,bh
testb ___ctype+1,#1
je I0075B
cl,___tmp
ch,ch
65
97

jmp I0075C
I0075B:

al,___tmp

I0075C:

102
ja I0074B
_ic
___tmp,cl
bl,___tmp
bh,bh
testb ___ctype+1,#1
je I0075E
cl,___tmp
ch,ch
65
97

I0075F
I0075E:

al,___tmp

I0075F:

10
97
_ic,
I00750:

cwd




.mli4


_ic
cwd



adc 
,
,
_rnc
-20(),#1
I0074C
I0074B:
-12()
je I00761
-10()
je I00764


sbb 
I00764:
-1
je I00767

#2




2,
I00761
I00767:

#2



I00761:
-20()
je I007F
-12()
je I00733

I00733
I0076F:
-1
I00774
-1,#1
I00774:
-1

1
-1,

je I00773
cmp _ic
jl I00773
-12()
je I00778
_ic
()
()



I00778:
_rnc
-20(),#1
I00774
I00773:
-12()
je I0077B
#2
I0077B:
-20()
je I00733
-12()
je I00733

I00733
I00783:
-1

1
-1,

je I00782
_ic
testb ___ctype+1,#8
I00782
_ic
jle I00782
-12()
je I00788
_ic
()
()



I00788:
_rnc
-20(),#1
I00783
I00782:
-12()
je I0078B

#2


I0078B:
-20()
je I007F
-12()
je I00733

I00733
I00793:

cmpb (),#94
I00795
-22(),#1

I00796
I00795:
-22()
I00796:
-2,
I00798:
-2
cmpb ,#93
je I00797
-2
cmpb 
je I00797
-2
I00798
I00797:
-2
cmpb 
I0079C
I0075
I0079C:
-2

I0079F:
mov ax,-1

1
-1,

je I0079E
_ic
testb ___ctype+1,#8
I0079E
_ic
jle I0079E

_ic
_scnindex


-22()

je I0079E
-12()
je I007A5
_ic
()
()



I007A5:
_rnc
-20(),#1
I0079F
I0079E:
-2
(),#93
-12()
je I007A8

#2


I007A8:
-20()
je I007F
-12()
je I00733

I00733
I00732:
_1

.csb2
I00733:

I007A
I007F:
_ic
jl I0075
_ugc
I0075:

.ds

_rnc_code: .zerow 2/2
_rnc_arg: .zerow 2/2
_ic: .zerow 2/2
.text

uname.s       +(   ; .define	_uname
.extern	__uname
.align 2
_uname: 
j __uname
._uname.s      +T	  %___upart
__uname
___upart

___upart:


,#6


10()

,
I0014:

I0017:

1024
1026


jb I0019
024



_read


or 
jg I001C
,
I001F
-1


I001F:

,#10
#1
I001C:

1024,





1026,
I0019:

1024


1024,




,
jbe I0016

(),al


#10
I0017
-1()

cmpb ,#35
je I0014




.ds
__uname
__uname:


,#1030




_1:
-1

_1,#-1
je I0023
_errno,
-1

I0021
I0023:

push ax
mov _2

_open


_1,
_1
jge I0026
_errno,#13
-1

I0021
I0026:

-1030()


,
9


-1030()

_1
___upart
,#8

I0028
9

9()

-1030()

_1
___upart
,#8

I0028
9

18()

-1030()

_1
___upart
,#8

I0028
9

27()

-1030()

_1
___upart
,#8

I0028
9

36()

-1030()

_1
___upart
,#8

I0028
5

45()

-1030()

_1
___upart
,#8

je I0029
I0028:
_errno,#5
#-1
I0029:
_1
_close

_1,#-1

I0021:

.ds

_2:
25903
25460
.word 29999
24942
25965
.word 0
.text
fgetc.s       o(tC  _fgetc
_fgetc

_fgetc:





testb 4(),#24
je I0013
-1



testb 4(),#1
I0016
-1



2()
jg I0019
testb 4(),#4
je I001C


-1()

()
_read

2(),
I001D
I001C:
024

6()
()
_read

2(),
I001D:
2()
jg I001F
2()
I00112
or 4(),#8
3
I00112:
or 4(),
I00113:
-1


I001F:
6()
8(),
I0019:
2()

2(),
testb 4(),#4
je I00115

al,-1()


I00115:
8()

1
8(),






jmp .sret
getdents.s    +z  ~_getdents

_NameLen:







14




I0015:
cmpb ()



jbe I0012
I0015



.ds
_getdents
_getdents:


,



_1: .zerow 30/2
_2: .zerow 514/2


I0023
_errno,#14
-1

I0021
I0023:
_1


_fstat



je I0026
-1

I0021
I0026:
_1+4
-4096
16384
je I0029
_errno,#20
-1

I0021
I0029:






_lseek
,#8
,
,





.cmu4

jge I002C
-1

I0021
I002C:
_errno
,

I00211:
,
I002E
I00214:
512

_2


call _read

-12(),
-12(),#-1
I00212
_errno,#4
je I00214
I00212:
-12()
jg I00217
-12()
I0021
I00217:
#_2
I0021C:
_2
-12()

jbe I00219
()
je I0021A

10
-4

2()

_NameLen



4

cwd
iv 

sal cl
-1,
-1






jbe I00221
_errno,#22
-1

I0021
I00221:

()
(),
2(),

_2
cwd

adc 
4(),
6(),
-1
8(),
al,16()
-15(),al
16()

10
-1


2()

10()

_strncpy

al,-15()
16(),al
-1


I0021A:

I0021C
I00219:
_2
-12()

jae I00211
_errno,#5
mov -1

I0021
I002E:

_errno,



I0021:

jmp .dsret
getpwent.s    +  r_getpwent
_setpwent
_getpwnam
_getpwuid
_endpwent

__pw_file:
25903
25460
28719
29537
30579
100
__pw:
_setpwent
-1

_setpwent:


__pw
jl I0013




__pw
_lseek
,#8
I0014



__pw_file

_open


__pw,
I0014:
__bufcnt
__pw
.c
_endpwent
_endpwent:


__pw
jl I0023
__pw
_close

I0023:
__pw,#-1
__bufcnt
.c
_getline:


__pw
jge I0033
_setpwent

jge I0033


I0031
I0033:
__buf,#__pwbuf
I0038:
__bufcnt
jg I003A
024

__buffer

__pw
_read

__bufcnt,
__bufcnt
jg I003D


I0031
I003D:
__pnt,#__buffer
I003A:
__pnt
__pnt


push ax
mov __buf


__buf
__pnt
cmpb ,#10
je I0036
__buf,#__pwbuf+255
jb I0038
I0036:
__pnt
__bufcnt
__buf

__buf,#__pwbuf


I0031:

.c
_skip_period:


I0043:
__buf
cmpb ,#58
je I0042
__buf
I0043
I0042:
__buf

__buf
.c
_getpwent
_getpwent:


_getline

I0053


I0051
I0053:
__buf
__pwd,
_skip_period
__buf
__pwd+10,
_skip_period
__buf
_atoi

__pwd+2,
_skip_period
__buf
_atoi

__pwd+4,al
_skip_period
__buf
__pwd+12,
_skip_period
__buf
__pwd+6,
_skip_period
__buf
__pwd+8,
__pwd

I0051:

.c
_getpwnam
_getpwnam:




_setpwent
I0063:
_getpwent

or 
je I0062

push (si)
_strcmp



I0063
I0062:
_endpwent
or 
je I0069

I0061
I0069:


I0061:

.s
_getpwuid
_getpwuid:




_setpwent
I0073:
_getpwent

or 
je I0072

2(),
I0073
I0072:
_endpwent
or 
je I0079

I0071
I0079:


I0071:

.s

__pwd: .zerow 14/2
__bufcnt: .zerow 2/2
__buf: .zerow 2/2
__pnt: .zerow 2/2
__buffer: .zerow 1024/2
__pwbuf: .zerow 256/2
.text
getgrent.s    +|  _endgrent
_getgrnam
_getgrgid
_setgrent
_getgrent

__gr_file:
25903
25460
26415
28530
28789

__gfd:
_setgrent
-1

_setgrent:


__gfd
jl I0013




__gfd
__lseek
,#8
I0014



__gr_file

_open


__gfd,
I0014:
__bufcnt
__gfd
.c
_endgrent
_endgrent:


__gfd
jl I0023
__gfd
__close

I0023:
__gfd,#-1
__bufcnt
.c
_getline:


__gfd
jge I0033
_setgrent

jge I0033


I0031
I0033:
__buf,#__grbuf
I0038:
__bufcnt
jg I003A
024

__buffer

__gfd
__read

__bufcnt,
__bufcnt
jg I003D


I0031
I003D:
__pnt,#__buffer
I003A:
__pnt
__pnt

movb al,(bx)

__buf


__buf
__pnt
cmpb ,#10
I0038
__pnt
__bufcnt
__buf

__buf,#__grbuf


I0031:

.c
_skip_period:


I0043:
__buf
cmpb 
je I0042
__buf
cmpb ,#58
je I0042
__buf
I0043
I0042:
__buf

__buf
.c
_getgrent
_getgrent:


_getline

I0053


I0051
I0053:
__buf
_grp,
_skip_period
__buf
_grp+2,
_skip_period
__buf
_atoi

_grp+4,al
_skip_period
_grp

I0051:

.c
_getgrnam
_getgrnam:




_setgrent
I0063:
_getgrent

or 
je I0062

()
_strcmp



I0063
I0062:
_endgrent
or 
je I0069

I0061
I0069:


I0061:

.s
_getgrgid
_getgrgid:




_setgrent
I0073:
_getgrent

or 
je I0072
al,4()

,
I0073
I0072:
_endgrent
or 
je I0079

I0071
I0079:


I0071:

.s

_grp: .zerow 8/2
__bufcnt: .zerow 2/2
__buf: .zerow 2/2
__pnt: .zerow 2/2
__buffer: .zerow 1024/2
__grbuf: .zerow 256/2
.text
read.s        +&   7 .define	_read
.extern	__read
.align 2
_read: 
j __read
.ptrace.s      +&   ? .define	_ptrace
.extern	__ptrace
.align 2
_ptrace: 
j __ptrace
.pipe.s        +&   7 .define	_pipe
.extern	__pipe
.align 2
_pipe: 
j __pipe
.pause.s       +&   ; .define	_pause
.extern	__pause
.align 2
_pause: 
j __pause
.pathconf.s    +&   G .define	_pathconf
.extern	__pathconf
.align 2
_pathconf: 
j __pathconf
._pathconf.s   +#	   __pathconf
__pathconf

__pathconf:


,#6




__open



or 
jge I0013
-1

65535





_fpathconf


,
,

__close





dx
jmp .sret
open.s        +&   7 .define	_open
.extern	__open
.align 2
_open: 
j __open
.mount.s       +&   ; .define	_mount
.extern	__mount
.align 2
_mount: 
j __mount
.mknod.s       +&   ; .define	_mknod
.extern	__mknod
.align 2
_mknod: 
j __mknod
.mkfifo.s      +&   ? .define	_mkfifo
.extern	__mkfifo
.align 2
_mkfifo: 
j __mkfifo
._mkfifo.s     +	  ] __mkfifo
__mkfifo

__mkfifo:



or 4096






__mknod4
,#10
jmp .cret
_mknod.s      +	  I __mknod
__mknod

__mknod:








__mknod4
,#10
jmp .cret
mknod4.s      +&   ? .define	_mknod4
.extern	__mknod4
.align 2
_mknod4: 
j __mknod4
.mkdir.s       +&   ; .define	_mkdir
.extern	__mkdir
.align 2
_mkdir: 
j __mkdir
.ftell.s       o(tC  B_ftell
_ftell

_ftell:


,#6




testb 4(),#1
je I0013

2()

I0014

testb 4(),#2
je I0016
6()
je I0016
testb 4(),#4
I0016
8()
6()

I0014

-1

65535


I0014:





()
_lseek
,#8

,

jge I001B



I001B:

cwd

adc 

,




dx
jmp .dsret
rewinddir.s   +   _rewindr
_rewindr

_rewindr:




or 

8()

6(),#19997
je I0013

_errno,#14
.s

4()
4()
2(),




()
_lseek
,#8
jmp .sret
telldir.s     +   _tellr
_tellr

_tellr:




or 

8()

6(),#19997
je I0013

or 
je I0017
8()
I0013
I0017:
_errno,#9
-1

65535



4()
2(),
jge I001C
2()
8()
6
4

I001C:





()
_lseek
,#8




dx
jmp .sret
lseek.s       +&   ; .define	_lseek
.extern	__lseek
.align 2
_lseek: 
j __lseek
.link.s        +&   7 .define	_link
.extern	__link
.align 2
_link: 
j __link
.abort.s       o(sC  D _abort
_abort

_abort:


6

_getpid

_kill


jmp .cret
kill.s        +&   7 .define	_kill
.extern	__kill
.align 2
_kill: 
j __kill
.isatty.s      +%   ? .define	_isatty
.extern	__isatty
.align 2
_isatty: 
j __isatty
.stty.s        +(   7 .define	_stty
.extern	__stty
.align 2
_stty: 
j __stty
.gtty.s        +%   7 .define	_gtty
.extern	__gtty
.align 2
_gtty: 
j __gtty
._gtty.s       +	  ? __gtty
__gtty

__gtty:



9704


__ioctl

jmp .cret
_stty.s       +G	  ? __stty
__stty

__stty:



9705


__ioctl

jmp .cret
ioctl.s       +%   ; .define	_ioctl
.extern	__ioctl
.align 2
_ioctl: 
j __ioctl
.getuid.s      +%   ? .define	_getuid
.extern	__getuid
.align 2
_getuid: 
j __getuid
.getppid.s     +%   C .define	_getppid
.extern	__getppid
.align 2
_getppid: 
j __getppid
.tmpnam.s      o(tC   _tmpnam
_tmpnam

_tmpnam:







_1: .zerow 28/2

or 
I0013
_1

I0014


I0014:

_2


_strcpy


_3


_strcat



_mktemp

.ds

_2:
29743
28781

_3:
29743
28781
22574
22616
22616
.word 88
.text
mktemp.s      +&   ? .define	_mktemp
.extern	__mktemp
.align 2
_mktemp: 
j __mktemp
._mktemp.s     +	  Y__mktemp
__mktemp

__mktemp:


,#6


__getpid
,


cmpb ()
je I0016




cmpb (),#88
I0015
10

cwd
iv 
#48
(),dl

cwd
iv 
,
I0016
I0015:

cmpb ()
je I0019
#97
I001E:
#122
jg I0019

(),al



__access



jge I001C


I001C:

I001E
I0019:
_1



.ds

_1:
.word 47
.text
getpid.s      +%   ? .define	_getpid
.extern	__getpid
.align 2
_getpid: 
j __getpid
.getgid.s      +%   ? .define	_getgid
.extern	__getgid
.align 2
_getgid: 
j __getgid
.geteuid.s     +%   C .define	_geteuid
.extern	__geteuid
.align 2
_geteuid: 
j __geteuid
.getegid.s     +%   C .define	_getegid
.extern	__getegid
.align 2
_getegid: 
j __getegid
.fpathconf.s   +%   K .define	_fpathconf
.extern	__fpathconf
.align 2
_fpathconf: 
j __fpathconf
._fpathconf.s  +  __fpathconf
__fpathconf

__fpathconf:


,#30

_1:
I00113
1
8
I0014
I001B
I001C
I001D
I001E
I001F
I00111
I00112
I00110


I0012
I0014:
-30()


__fstat



je I0016
-1

65535



-2
-4096
16384
I0019





I0019:


27


I001B:


55


I001C:


55


I001D:


4


I001E:


55


I001F:


7168


I00110:





I00111:
-1

65535


I00112:


23


I00113:
mov _errno,#22
-1

65535



_1

.csa2


dx
jmp .cret
fstat.s       +%   ; .define	_fstat
.extern	__fstat
.align 2
_fstat: 
j __fstat
.fork.s        +%   7 .define	_fork
.extern	__fork
.align 2
_fork: 
j __fork
.dup2.s        +$   7 .define	_dup2
.extern	__dup2
.align 2
_dup2: 
j __dup2
.dup.s         +$   3 .define	_dup
.extern	__dup
.align 2
_dup: 
j __dup
._dup.s        +  8 __dup
__dup

__dup:






__fcntl

jmp .cret
_dup2.s       +   __dup2
__dup2

__dup2:






or 
jl I0012
#20
jle I0013

_errno,#9
-1



3


__fcntl



jge I0017
-1


I0017:

I001A


I001A:

__close





__fcntl




jmp .dsret
fcntl.s       +%   ; .define	_fcntl
.extern	__fcntl
.align 2
_fcntl: 
j __fcntl
.creat.s       +$   ; .define	_creat
.extern	__creat
.align 2
_creat: 
j __creat
.close.s       +$   ; .define	_close
.extern	__close
.align 2
_close: 
j __close
.chroot.s      +$   ? .define	_chroot
.extern	__chroot
.align 2
_chroot: 
j __chroot
.chown.s       +$   ; .define	_chown
.extern	__chown
.align 2
_chown: 
j __chown
.chmod.s       +$   ; .define	_chmod
.extern	__chmod
.align 2
_chmod: 
j __chmod
.chdir.s       +$   ; .define	_chdir
.extern	__chdir
.align 2
_chdir: 
j __chdir
.execlp.s      +k  _execvp
_execlp
_execlp

_execlp:










_execvp




.ds
_execvp
_execvp:


,#1300



_5:
I00224
3
2
I00215
8
I00219
13
I00214

47


_strchr



I0022
_1

_getenv


or 
I0023
I0022:
#_2
I0023:

_strlen

,
,#2
I0027:
58


_strchr


-1,
-1
I002A

_strlen

-12(),
I002B
I002A:
-1

-12(),
I002B:

-12()
254
jb I002D
_errno,#36
-1

I0021
I002D:
-12()

-270()

_strncpy

-12()
je I00210
mov -12()
-12()
-270()

,#47
I00210:
-270()
-12()


_strcpy



-270()

_execv


_errno
I00212
I00214:
_errno
,
I00215:
-1
I00217

_errno,
-1

I0021
I00217:
-1


I0027
I00219:

I0021B:

sal 1


je I0021A
#512
jl I0021E
_errno,#8
-1

I0021
I0021E:

sal 1





sal 1
-1300()



I0021B
I0021A:
-1300(),#_3
-270()
-129,


sal 1
-1300()


_environ
,
I00223:


je I00220
,#2
I00223
I00220:

_environ

cwd
iv 



cx
push _environ
-1300()

_4

__
,#10
_errno,#8
-1

I0021
I00224:
-1

I0021
I00212:
_5

.csb2
I0021:

.ds

_1:
16720
18516

_2:

_3:
26739

_4:
25135
28265
29487
104
.text
execv.s       +$   ; .define	_execv
.extern	__execv
.align 2
_execv: 
j __execv
.execl.s       +$   ; .define	_execl
.extern	__execl
.align 2
_execl: 
j __execl
.execle.s      +$   ? .define	_execle
.extern	__execle
.align 2
_execle: 
j __execle
.execve.s      +$   ? .define	_execve
.extern	__execve
.align 2
_execve: 
j __execve
.brk.s         +$   3 .define	_brk
.extern	__brk
.align 2
_brk: 
j __brk
._exec.s       +  3__
__execv
_
__execl
__execle
__execl

__execl:








_environ


_



.ds
__execle
__execle:


,#6





I0023:

#2

je I0022
I0023
I0022:
()


_

,

.ds
__execv
__execv:


_environ


_

.c
_
_:







I0043:

sal 1


je I0042

I0043
I0042:

I0046:

sal 1


je I0045

I0046
I0045:





__
,#10
.ds
.globl ___execve
__:


,#42


-1
10()
2
12()

-12(),
12()
10()
-10(),
10()
jl I0052
12()
jl I0052
10()
-10(),
jl I0052
-10()
-12(),
jge I0053
I0052:
-1,#1
I0053:
#2
I005B:
or 
je I0058
-12()
-10()
-1,
-10()
-1,
jge I005D
-1,#1
I005D:
-1
-10(),

I005B
I0058:


I00512:
10(),
jle I005F

#2

_strlen

-10()
-1,
-10()
-1,
jge I00514
-1,#1
I00514:
-1
-10(),

I00512
I005F:


I00519:
12(),
jle I00516

#2

_strlen

-10()
-1,
-10()
-1,
jge I0051B
-1,#1
I0051B:
-1
-10(),ax
inc di
jmp I00519
I00516:
-10()

-1,
-10()
-1,
jge I0051E
-1,#1
I0051E:

-1
cwd
iv 
sal 1
-10(),
-1
je I00521
_errno,#7
-1

I0051
I00521:
-10()
__sbrk

-1,
-1,#-1
I00524
_errno,#7
-1

I0051
I00524:
-1
-12()
sal 1
-1
,
10()
(),
#2

I00529:
10(),
jle I00526

-1
(),
#2

,#2

,
I0052B:








je I00527
I0052B
I00527:

I00529
I00526:
()
#2

I00530:
12(),
jle I0052D

-1
(),
#2

,#2

,
I00532:




movb (bx),al



je I0052E
I00532
I0052E:

I00530
I0052D:
()
#2

_strlen


-3,
-10()
-3,

-32(),
-1
-30(),
-42()

59



__syscall

-10()


__sbrk

-40()
I0051:

jmp .dsret
sbrk.s        +'   7 .define	_sbrk
.extern	__sbrk
.align 2
_sbrk: 
j __sbrk
.alarm.s       +$   ; .define	_alarm
.extern	__alarm
.align 2
_alarm: 
j __alarm
.access.s      +$   ? .define	_access
.extern	__access
.align 2
_access: 
j __access
._access.s     +  z __access
__access

__access:


,#24

-1,
-2


__loadname


-2

33



__syscall

jmp .cret
_alarm.s      +  \ __alarm
__alarm

__alarm:


,#24

-20(),
-2

7



__syscall

jmp .cret
_brk.s        +  Z__sbrk
__brk
__brk

__brk:


,#24

-1,
-2

7



__syscall


jge I0013
-1




__brkze,




.c
__sbrk
__sbrk:






__brkze

__brkze


jle I0025

ja I0022
I0025:

jge I0023

jae I0023
I0022:
-1

I0021
I0023:

__brk


I0029

I0021
I0029:
-1

I0021:

jmp .dsret
_chdir.s      +  g __chr
__chr

__chr:


,#24
-2


__loadname


-2

2



__syscall

jmp .cret
_chmod.s      +  u __chmod
__chmod

__chmod:


,#24

-1,
-2


__loadname


-2

5



__syscall

jmp .cret
_chown.s      +   __chown
__chown

__chown:


,#24



_strlen


-20(),

-1,

-1,
-1,
-2

6



__syscall

jmp .sret
_chroot.s     +  o __chroot
__chroot

__chroot:


,#24
-2


__loadname


-2

61



__syscall

jmp .cret
_close.s      +  ] __close
__close

__close:


,#24

-20(),
-2

6



__syscall

jmp .cret
_creat.s      +  v __creat
__creat

__creat:


,#24

-1,
-2


__loadname


-2

8



__syscall

jmp .cret
_exit.s       +  X __exit
__exit

__exit:


,#24

-20(),
-2





__syscall

jmp .cret
_fcntl.s      +  __fcntl
__fcntl

__fcntl:


,#26


_1:
I0013

7
I0016
I0013
I0016
I0013
I0016
I0019
I0019
I0019



-1
-1

I0012

#2
-2()
-1,

I0019:
#2
-2()
-1,


_1

.csa2


-22(),

-20(),
-2

55



__syscall

jmp .sret
_fork.s       +  L __fork
__fork

__fork:


,#24
-2





__syscall

jmp .cret
_fstat.s      +  g __fstat
__fstat

__fstat:


,#24

-20(),

-1,
-2

8



__syscall

jmp .cret
_getegid.s    +  { __getegid
__getegid

__getegid:


,#24
-2

47



__syscall


jge I0013
-1



-20()


jmp .cret
_geteuid.s    +  y __geteuid
__geteuid

__geteuid:


,#24
-2

4



__syscall


jge I0013
-1



-20()


jmp .cret
_getgid.s     +  U __getgid
__getgid

__getgid:


,#24
-2

47



__syscall

jmp .cret
_getpid.s     +	  S __getpid
__getpid

__getpid:


,#24
-2

0



__syscall

jmp .cret
_getppid.s    +	  y __getppid
__getppid

__getppid:


,#24
-2

0



__syscall


jge I0013
-1



-20()


jmp .cret
_getuid.s     +	  S __getuid
__getuid

__getuid:


,#24
-2

4



__syscall

jmp .cret
_ioctl.s      +	  __ioctl
__ioctl

__ioctl:


,#64




_1:
I0019
5
29704
I0016
29705
I0014
29712
I0018
29713
I0015
29714
I0017


-60(),

-5,

I0012
I0014:

cl,2()
ch,ch
,


cl,3()
ch,ch
-10(),
,
8
al,1()

sal cl
dl,()
dh,dh
or 

-3,
-3,



2: sal 1
rcl #1

1:

16
-3
-3

2: sal #1
rcl 1

1:

or 
or 
or -10()
or 
-5,
-52(),
4()
cwd
-50(),
-4,
-6

54



__syscall



I0015:


movb cl,(si)
ch,ch
-1,
-12(),

cl,1()
ch,ch
-1,
-1,

cl,2()
ch,ch
-22(),
-20(),

cl,3()
ch,ch
-2,
-2,

cl,4()
ch,ch
-30(),
-2,

cl,5()
ch,ch
-3,
-32(),
16
-1
-1

2: sal 1
rcl #1

1:

4
-1
-12()

2: sal #1
rcl 1

1:

or 
or 

8
-22()
-20()

2: sal #1
rcl 1

1:

or 
or 


-2
-2

2: sal #1
rcl 1

1:

or 
or 
-5,
-52(),

-3
-32()

2: sal 1
rcl #1

1:

8
-30()
-2

2: sal #1
rcl 1

1:

or dx
or cx,bx
mov -50(),
-4,
-6

54



__syscall




-6

54



__syscall


8
-5
-52()

2: sar #1
rcr 1

1:

#0
2(),al

-5
-52()

2: sar #1
rcr 1

1:

#0
3(),al
65535

-50()
-4
4(),
16
-5
-52()

2: sar #1
rcr 1

1:
65535
#0
-3,
-3,
-3
-3

0
(),al
8
-3
-3

2: sar #1
rcr 1

1:

#0
1(),al


I0017:
-6

54



__syscall



4
mov ax,-54(bp)
-52()

2: sar #1
rcr 1

1:

#0
(),al
16
-5
-52()

2: sar #1
rcr 1

1:

#0
1(),al
8
-5
-52()

2: sar #1
rcr 1

1:

#0
2(),al

-5
-52()

2: sar #1
rcr 1

1:

#0
3(),al
8
-50()
-4

2: sar #1
rcr 1

1:

#0
4(),al

-50()
-4

2: sar #1
rcr 1

1:

#0
5(),al


I0018:

cwd
-50(),
-4,
-6

54



__syscall



I0019:
-4,
-6

54



__syscall




_1

jmp .csb2
I0011:

jmp .dsret
_isatty.s     +	   __isatty
__isatty

__isatty:


,#24
-1,#29704

-20(),
-2

54



__syscall


jge I0013








jmp .cret
_kill.s       +	  f __kill
__kill

__kill:


,#24

-20(),

-1,
-2

37



__syscall

jmp .cret
_link.s       +	   __link
__link

__link:


,#24





_strlen


-20(),

_strlen


-1,
-1,
-12(),
-2

9



__syscall

jmp .dsret
_lseek.s      +	   __lseek
__lseek

__lseek:


,#24

-20(),


-1,
-12(),
10()
-1,
-2

9



__syscall


jge I0013
-1

65535



-12()
-1


dx
jmp .cret
_mkdir.s      +	   __mkr
__mkr

__mkr:


,#24



_strlen


-20(),

-1,
-1,
-2

39



__syscall

jmp .sret
_mknod4.s     +	   __mknod4
__mknod4

__mknod4:


,#24



_strlen


-20(),

-1,

-1,
-1,
12()
10()


65535

.cmu4

jle I0013
10()
12()

10()
-12(),
-2

4



__syscall

jmp .sret
_mount.s      + 	   __mount
__mount

__mount:


,#24





_strlen


-20(),

_strlen


-1,

-1,
-1,
-12(),
-2

1



__syscall

jmp .dsret
_open.s       +"	   __open
__open

__open:


,#26





testb ,#64
je I0013

_strlen


-22(),

-20(),
#2
-2()
-1,
-1,
I0014

-2


__loadname



-20(),
I0014:
-2

5



__syscall

jmp .dsret
_pause.s      +%	  P __pause
__pause

__pause:


,#24
-2

9



__syscall

jmp .cret
_pipe.s       +'	   __pipe
__pipe

__pipe:


,#24


-2

42



__syscall


jge I0013
-1



-20()
(),
-1
2(),




jmp .sret
_ptrace.s     +)	  __ptrace
__ptrace

__ptrace:


,#24

-20(),

-1,

10()
-1,
-12(),
12()
1
-10(),
,
-2

6



__syscall


jge I0013
-1

65535



-10(),#65535
I0016
,#-1
I0016
_errno


-10()


dx
jmp .cret
_read.s       ++	  p __read
__read

__read:


,#24

-20(),

-1,

-1,
-2

3



__syscall

jmp .cret
_rename.s     +-	   __rename
__rename

__rename:


,#24





_strlen


-20(),

_strlen


-1,
-1,
-12(),
-2

38



__syscall

jmp .dsret
_rmdir.s      +/	  i __rmr
__rmr

__rmr:


,#24
-2


__loadname


-2

40



__syscall

jmp .cret
_setgid.s     +0	  g __setgid
__setgid

__setgid:


,#24
al,

-20(),
-2

46



__syscall

jmp .cret
_setuid.s     +2	  _ __setuid
__setuid

__setuid:


,#24

-20(),
-2

3



__syscall

jmp .cret
_sigpending.s +6	   __gpenng
__gpenng

__gpenng:


,#24
-2

73



__syscall


jge I0013
-1




-1
-12()

2,
-22()


jmp .cret
_sigprocmask.s+8	  (__gprocmask
__gprocmask

__gprocmask:


,#24




or 
I0013
-20(),#4
-1
-12()
I0014


-20(),
()
2()
-1,
-12(),
I0014:
-2

74



__syscall


jge I0016
-1



or 
je I0019
-1
-12()
(),
2(),
I0019:
-22()


jmp .dsret
_sigsuspend.s +@	  u __gsuend
__gsuend

__gsuend:


,#24


2
-1,
-12(),
-2

72



__syscall

jmp .cret
_stat.s       +D	   __stat
__stat

__stat:


,#24



_strlen


-20(),
-1,

-12(),
-2

8



__syscall

jmp .sret
_stime.s      +F	  j __stime
__stime

__stime:


,#24


2
-1,
-12(),
-2

5



__syscall

jmp .cret
_sync.s       +I	  O __sync
__sync

__sync:


,#24
-2

36



__syscall

jmp .cret
_time.s       +K	   __time
__time

__time:


,#24


-2

3



__syscall


jge I0013
-1

65535



or 
je I0016
-1
-12()
(),
2(),

-12()
-1


dx
jmp .sret
_times.s      +N	  __times
__times

__times:


,#24




-2

43



__syscall


jge I0013
-1

65535



-20()
-1
(),
2(),
-1
-1
4(),
6(),
-12()
-10()
8(),
10(),


12(),
14(),




dx
jmp .sret
_umask.s      +O	  ^ __umask
__umask

__umask:


,#24

-20(),
-2

60



__syscall

jmp .cret
_umount.s     +Q	  m __umount
__umount

__umount:


,#24
-2


__loadname


-2

2



__syscall

jmp .cret
_unlink.s     +V	  m __unlink
__unlink

__unlink:


,#24
-2


__loadname


-2

0



__syscall

jmp .cret
_wait.s       +[	   __wait
__wait

__wait:


,#24


-2

7



__syscall


jge I0013
-1



or 
je I0016
-20()
(),

-22()


jmp .sret
_waitpid.s    +\	   __waitpid
__waitpid

__waitpid:


,#24



-20(),

-1,
-2

1



__syscall


jge I0013
-1



or 
je I0016
-20()
(),

-22()


jmp .sret
_write.s      +^	  s __write
__write

__write:


,#24

-20(),

-1,

-1,
-2

4



__syscall

jmp .cret
iaar.s        o(tC  ] .iaar


.iaar:
 
 
 #2
.unknown
 .unknown
  
  
  
 
mul 4

 


ilar.s        o(tC  Q .ilar


.ilar:
 
 
.unknown
 #2
 .unknown
  
  
 
.lar2
 .lar2
isar.s        o(tC  P .isar


.isar:
 
 
 2
.unknown
 .unknown
  
  
 
.sar2
 .sar2
hypot.s       +  _cabs
_hypot
_hypot

_hypot:


,#8

_1:
,0
,0
_2:
,0
,0
_3:
,0
,0


8
.loi
.zrf8
.cmf8


jge I0013

8
.loi
.ngf8

8
.sti

12()
8
.loi
.zrf8
.cmf8


jge I0016
12()
8
.loi
.ngf8
12()
8
.sti


8
.loi
12()
8
.loi
.cmf8


jle I0019
12()
8
.loi

8
.sti

8
.loi
12()
8
.sti

8
.loi

8
.sti
I0019:
12()
8
.loi
_1
8
.loi
.cmf8


I001C
_2
8
.loi

I001C:

8
.loi
bx,12(bp)
mov 8
.loi
.dvf8

8
.sti

8
.loi

8
.loi
.mlf8
_3
8
.loi
.adf8
_sqrt
,#8
.lfr8
12()
8
.loi
.mlf8

.8
.c
_cabs
_cabs:


12()
8
.loi

8
.loi
_hypot

.lfr8
.ret8
jmp .cret
sincos.s      o(tC  _cos
_n

_series:


,#18


_1:
,0
,0
,0
,0
,0
,0
,0
,0
,0
,0


8
.loi

8
.loi
.mlf8

8
.sti
_1+32
8
.loi
-1
8
.sti
#3
I0015:
or 
jl I0012

3
sal cl
_1
8
.loi

8
.loi
-1
8
.loi
.mlf8
.adf8
-1
8
.sti

I0015


8
.loi
-1
8
.loi
.mlf8
.8
.s
_n
_n:



_2:
,0
,0
_3:
,0
,0
_4:
,0
,0
_5:
,0
,0
_6:
,0
,0
_7:
,0
,0
_8:
,0
,0
_9:
,0
,0
_10:
,0
,0
_11:
.word 0,0
,0


8
.loi
_2
8
.loi
.cmf8


jg I0022

8
.loi
_3
8
.loi
.cmf8


jge I0027
I0022:
.zrf8

8
.sti
I0027:

8
.loi
_4
8
.loi
.cmf8


jle I002A

8
.loi
_5
8
.loi
.sbf8

8
.sti
I0027
I002A:

8
.loi
_6
8
.loi
.cmf8


jge I0029
_7
8
.loi

8
.loi
.adf8

8
.sti
I002A
I0029:

8
.loi
_8
8
.loi
.cmf8


jle I002D
_9
8
.loi

8
.loi
.sbf8

8
.sti
I002D:

8
.loi
_10
8
.loi
call .cmf8


jge I00210

8
.loi
_11
8
.loi
.adf8
.ngf8

8
.sti
I00210:

8
.loi
_series
,#8
.lfr8
.8
.c
_cos
_cos:



_12:
,0
,0

_12
8
.loi

8
.loi
.adf8
_n
,#8
.lfr8
.ret8
jmp .cret
fslib.s       +u  
_conv2
_old_icopy
_new_icopy
_bitmapze
_conv_inode
_conv4
_bitmapze

_bitmapze:




13



2: sar #1
rcr 1

1:


cwd
13

2: sal 1
rcl #1

1:




.cmi4

jge I0013



.s
_conv2
_conv2:





je I0023

65535

I0021
I0023:
8

sar cl



sal cl
or 

I0021:

.s
_conv4
_conv4:


,#8



je I0033


I0031
I0033:

65535



_conv2



16



2: sar #1
rcr 1

1:
65535

xor ax,ax
push 
_conv2




16


2: sal #1
rcl 1

1:

or 
or 
,
,


I0031:


.ds
_conv_inode
_conv_inode:







_1:
I0043
4
4991
I0044
9320
I0046
26660
I0047
32531
I0045

12()
I0042
I0044:


10()


_old_icopy
,#8
I0043
I0045:


10()


_old_icopy
,#8
I0043
I0046:


10()


_new_icopy
,#8
I0043
I0047:


10()


_new_icopy
,#8
I0043
I0042:
_1

.csb2
I0043:
.ds
_old_icopy
_old_icopy:








I0053
push (di)
push 10()
_conv2


(),
2()
10()
_conv2


4(),
6()
4()
10()
_conv4

8(),
10(),
10()
8()
10()
_conv4

16(),
18(),
12()
14()
20()
22()
al,13()
2(),al
al,12()
6(),al
70(),#7
72(),#512

I0058:
,#9
jge I0054

sal 1
14()


10()
_conv2




sal 1
sal 1
24()


2,

I0058
I0053:
()
10()
_conv2


(),
4()
10()
_conv2


2(),
10()
8()
10()
_conv4

4(),
6(),
18()
16()
10()
_conv4

8(),
10(),
al,2()
13(),al
al,6(si)
movb 12(di),al

I005C:
,#9
jge I0054

sal 1
sal 1
24()


10()
_conv2



sal 1
14()



I005C
I0054:
.ds
_new_icopy
_new_icopy:








I0063
()
10()
_conv2


(),
4()
10()
_conv2


4(),
2()
10()
_conv2


2(),al
6()
10()
_conv2


6(),al
10()
8()
10()
_conv4

8(),
10(),
14()
12()
10()
_conv4

12(),
14(),
22()
20()
10()
_conv4

20(),
22(),
18()
16()
10()
_conv4

16(),
18(),
70(),#7
72(),#256

I0068:
cmp ,#10
jge I0064

sal 1
sal 1
24()

2

10()
_conv4


sal 1
sal 1
24()


2,

I0068
I0063:
()
10()
_conv2


(),
4()
10()
_conv2


4(),
al,2()


10()
_conv2


2(),
al,6()


10()
_conv2


6(),
10()
8()
10()
_conv4

8(),
10(),
14()
12()
10()
_conv4

12(),
14(),
22()
20()
10()
_conv4

20(),
22(),
18()
16()
10()
_conv4

16(),
18(),

I006C:
,#10
jge I0064

sal 1
sal 1
24()

2

10()
_conv4
add sp,#6
mov 
sal 1
sal 1
24()


2,

I006C
I0064:
jmp .dsret
sysconf.s     +  _sysconf
_sysconf

_sysconf:



_1:
I001E
1
9
I0014
I0015
I0016
I0017
I0018
I0019
I001A
I001B
I001C
I001D


I0012
I0014:


4096


I0015:


00





60


I0017:




I0018:


0


I0019:
-1

65535


I001A:
-1

65535


I001B:
3

401


I001C:


0


I001D:


3


I001E:
_errno,#22
-1

65535



_1

.csa2


dx
jmp .cret
cii.s         o(tC   .cii


.cii:
  



#1
2f

#2
2:
 
je 8f
 #2
je 1f
 #4
 9f
 2
 9f
 
8:
 
1:
 4
 9f
cwd
 
 
9:
  
EILLINS = 18
.fat
 EILLINS
 
 .fat
csa2.s        o(tC   .csa2


.csa2:


  
 2
 4
ja 1f
sal 1

 6
test 
jnz 2f
1:
 
test 
jnz 2f
ECASE = 20
.fat
 ECASE
 
 .fat
2:
 
csb2.s        o(tC   .csb2


.csb2:



2
1:
4
 
jl 4f
 
 1b
2
2:
test 
jnz 3f
ECASE = 20
.fat
 ECASE
 
 .fat
3:
 
4:

2b
cuu.s         o(tC   .ciu
.cui



.ciu:
.cui:
:
  



 
je 8f
 #2
je 1f
 #4
 9f
 2
 9f
 
8:
 
1:
 4
 9f
 
 
 
9:
  
EILLINS = 18
.fat
 EILLINS
 
 .fat
fakfp.s       o(tC  .mlf,.dvf,.ngf,.adf,.sbf,.cmf,.zrf,.fif,.fef
.mlf8,.dvf8,.ngf8,.adf8,.sbf8,.cmf8,.zrf8,.fif8,.fef8
.mlf4,.dvf4,.ngf4,.adf4,.sbf4,.cmf4,.zrf4,.fif4,.fef4
.cif,.cfi,.cuf,.cfu,.cff


.mlf:
.dvf:
.ngf:
.adf:
.sbf:
.cmf:
.zrf:
.fif:
.fef:
.mlf4:
.dvf4:
.ngf4:
.adf4:
.sbf4:
.cmf4:
.zrf4:
.fif4:
.fef4:
.mlf8:
.dvf8:
.ngf8:
.adf8:
.sbf8:
.cmf8:
.zrf8:
.fif8:
.fef8:
.cif:
.cfi:
.cuf:
.cfu:
.cff:
  
EILLINS = 18
.fat
 EILLINS
 
 .fat
strhp.s       o(tC   .strhp

.reghp, .limhp, .fat
EHEAP = 17

.strhp:


.reghp,
.limhp
jb 1f
01000
0177000
.limhp,

jae 2f
1:

2:
EHEAP
.fat
unknown.s     o(tC  > .unknown

.fat
EILLINS = 18

.unknown:
 EILLINS

 .fat
adi.s         o(sC  q .a



.a:
  
 2
 1f
 
 
 
1:
 4
 9f
 
 
 
 
adc 
 
 
9:
.trpilin

 .trpilin
sbi.s         o(tC  ~ .sbi



.sbi:
  
 2
 1f
 
 
 
 
1:
 4
 9f
 
 
 
 
 
sbb 
 
 
9:
.trpilin
 
 .trpilin
fat.s         o(tC  , .fat


.fat:
.trp
.stop
 .trp
 .stop

mon.s         o(tC   .mon


.mon:
.stop
 .stop
stop.s        o(tC   .stop

.stop:
_exit
trp.s         o(tC  p.trpvz
.trpilin
.trpcase
.trprang
.trpset
.trpnofp
.trpheap
.trp


.M: .zerow 24/2


.trpvz
.trpilin
.trpcase
.trprang
.trpset
.trpnofp
.trpheap
.trp

.trpvz:
6
#.Mvz
.Trp
.trpilin:
8
#.Milin
.Trp
.trpcase:
0
#.Mcase
.Trp
.trprang:

#.Mrang
.Trp
.trpset:

#.Mset
.Trp
.trpnofp:
8
#.Mnofp
.Trp
.trpheap:
7
#.Mheap
.Trp

.Trp:
 
.trppc
xchg .trppc
test 
jz 2f
 
 
 

2:
2




.Write
_exit

.trp:

#21
jae 1f
sal #1
.Mtable


test 
jz 1f

2f
1:
.Mtrp+14
6

1:
#7
'0'
,dl

sar #1
sar #1
sar #1
 1b
#.Mtrp
2:
.Trp

.Write:


.M+2,#4

.M+4,

.M+6,

.M+10,
.M





.M
3
int 32






.Mtable:
, .Mrang, .Mset, 0, 0, 0, .Mvz, 0
, 0, 0, 0, 0, 0, 0, 0
, .Mheap, .Milin, .Milin, .Mcase

.Mvz: .asciz "Error: Divion by 0 \n"
.Milin: .asciz "Illegal EM instruct'n\n"
.Mcase: .asciz "Err in EM case instr \n"
.Mrang: .asciz "Variable out of range\n"
.Mset: .asciz "Err in EM set instr \n"
.Mnofp: .asciz "Floating pt not impl.\n"
.Mheap: .asciz "Heap overflow \n"

.Mtrp: .asciz "EM trap 0000000 octal\n"
exit.s        o(tC   _exit
___cleanup
_exit

_exit:


___cleanup
je I0013
___cleanup
()














.c
___cleanup

___cleanup: .zerow 2/2
.text
amoeba.s      o(sC  G_trans
_putrep
_getreq
_timeout

_Timeout:
_trans
300

_trans:


,


-1,

-1,

-12(),
10()
-10(),
12()
,
1
,
_Timeout
,
_mess+2,#69
_mess+4,#2
-1
_mess+18,
_mess+8,#14
_mess



_sendrec



or 
je I0013



_mess+2


.s
_getreq
_getreq:


,


-1,

-1,

-12(),
_mess+2,#69
_mess+4,#3
-1
_mess+18,
_mess+8,#14
_mess



_sendrec



or 
je I0023

I0021
I0023:
_mess+2
I0021:

.s
_putrep
_putrep:

mov bp,sp
sub ,


-1,

-1,

-12(),
_mess+2,#69
_mess+4,#4
-1
_mess+18,
_mess+8,#14
_mess



_sendrec



or 
je I0033

I0031
I0033:
_mess+2
I0031:

.s
_timeout
_timeout:




_Timeout

jb I0043

_Timeout,
I0043:

.s

_mess: .zerow 24/2
.text
call.s        o(tC  e
_callx
_callm3
_len


:



__M+4,
10()
__M+6,
12()
__M+8,
1
_,
1
__M+12,
1
__M+14,





.c
_callm3
_callm3:






10()



__M+4,

__M+6,
10()
__M+8,
#_
#14
jg I0023
I0026:



je I0023
10()
10()

(),al

I0026
I0023:





.ds
_callx
_callx:





__M+2,
__M


_sendrec



or 
je I0033

I0031
I0033:
__M+2
jge I0036
__M+2

_errno,
-1

I0031
I0036:
push __M+2
I0031:

.s
_len
_len:







I0043:


cmpb 
je I0042

I0043
I0042:

ax
jmp .dsret
receive.s     o(tC    send.s        o(tC    syscall.s     +   __syscall
__syscall

__syscall:







2(),


__sendrec



or 
je I0013
2(),

2()
jge I0016
2()

_errno,
-1



2()


jmp .dsret
sendrec.s     o(tC   _send, _receive, _sendrec
SEND = 1
RECEIVE = 2
BOTH = 3
SYSVEC = 32
_send, _receive, _sendrec
_send: *SEND
L0
_receive:
*RECEIVE
L0
_sendrec:
*BOTH
L0
L0: 



int SYSVEC


taskcall.s    +   __taskcall
__taskcall

__taskcall:







2(),


__sendrec



or 
je I0013
2(),

2(si)
jmp .dsret
strtol.s      o(tC  _strtol
_strtol

_strtol:


,





-12()
-1
-1

je I0016

,

al,()


or 
je I0015

testb ___ctype+1,#8
je I0015

I0016
I0015:
#43
je I0019
#45
I001A
I0019:

#45
1f

1:
-12(),

I001A:

I001E
,#10
cmpb (),#48
I001F
,#8

al,()


#120
je I00113
#88
I001F
I00113:
,

I001F
I001E:
,
I001F
cmpb (),#48
I001F

al,()


120
1f

1:

or 
I0011B
#88
I001F
I0011B:

I001F:

cwd
32767

65535



.dvi4
-10(),
,

I00120:

al,()


or di,di
je I0011F

testb ___ctype+1,#4
3
#48
I00124
I00123:


testb ___ctype+1,#1
6
55

I00127
I00126:
87

I00127:




I00124:
or 
jl I0011F
,
jg I00129
F
I00129:
-1,#1



-10()
.cmi4

jle I0012D
-1,#1
I0012D:
-1
I00120

cwd


.mli4
,
,

cwd
65535
32767

sbb 




.cmi4

jle I00133
-1,#1
I00120
I00133:

cwd

adc 
,
,
I00120
I0011F:
-1
I00136




I00136:
-12()
je I00139
-1
I00139



sbb 
,
,
I00139:
-1
je I0013D
_errno,#34
cmp -12()
je I00140

,#-32768
D
I00140:
,#65535
,#32767
I0013D:

je I00143

,
I00143:




dx
jmp .dsret
sigfillset.s  +'   O .define	_sigfillset
.extern	__sigfillset
.align 2
_sigfillset: 
j __sigfillset
.sigemptyset.s +'   S .define	_sigemptyset
.extern	__sigemptyset
.align 2
_sigemptyset: 
j __sigemptyset
.sigaddset.s   +'   K .define	_sigaddset
.extern	__sigaddset
.align 2
_sigaddset: 
j __sigaddset
.sigdelset.s   +'   K .define	_sigdelset
.extern	__sigdelset
.align 2
_sigdelset: 
j __sigdelset
.sigismember.s +'   S .define	_sigismember
.extern	__sigismember
.align 2
_sigismember: 
j __sigismember
._sigset.s     +<	  __gemptyset
__gaddset
__gfillset
__gdelset
__gismember
__gaddset

__gaddset:




,
jbe I0013
_errno,#22
-1




cwd




2: sal 1
rcl #1

1:
or ()
or 2()
(),
2(),




.s
__gdelset
__gdelset:




,
jbe I0023
_errno,#22
-1

I0021
I0023:

cwd




2: sal 1
rcl #1

1:
not 
not 
()
2()
(),
2(),


I0021:

.s
__gemptyset
__gemptyset:




2

.c
__gfillset
__gfillset:



,#65535
2,#1

.c
.globl __sigismember
__gismember:


,
jbe I0053
_errno,#22
-1

I0051
I0053:

cwd




2: sal 1
rcl #1

1:


2





.cmu4

je I0056


I0051
I0056:


I0051:

jmp .cret
strtoul.s     o(tC  _strtoul
_strtoul

_strtoul:


,





-12()
-1
-1

je I0016

,

al,()


or 
je I0015

testb ___ctype+1,#8
je I0015

I0016
I0015:
#43
je I0019
#45
I001A
I0019:

#45
1f

1:
-12(),

I001A:

I001E
,#10
cmpb (),#48
I001F
,#8

al,()


#120
je I00113
#88
I001F
I00113:
,

I001F
I001E:
,
I001F
cmpb (),#48
I001F

al,()


120
1f

1:

or 
I0011B
#88
I001F
I0011B:

I001F:

cwd
-1

65535



.dvi4
-10(),
,

I00120:

al,()


or di,di
je I0011F

testb ___ctype+1,#4
3
#48
I00124
I00123:


testb ___ctype+1,#1
6
55

I00127
I00126:
87

I00127:




I00124:
or 
jl I0011F
,
jg I00129
F
I00129:
-1,#1



-10()
.cmu4

jle I0012D
-1,#1
I0012D:
-1
I00120

cwd




.mli4
,
,

cwd
65535
-1

sbb 




.cmu4

jle I00133
-1,#1
I00120
I00133:

cwd

adc 
,
,
I00120
I0011F:
-1
I00136




I00136:
-12()
je I00139
-1
I00139



sbb 
,
,
I00139:
-1,#0
je I0013D
_errno,#34
,#65535
,#-1
I0013D:

je I00140

,
I00140:




dx
jmp .dsret
atoi.s        o(sC  B_atoi
_atoi

_atoi:


,#6






al,()


or 


testb ___ctype+1,#8




#43
je I0016
#45
I001B


#45
1f

1:
,

I001B:




48

or 
jl I001A
#10
jge I001A
3

sal cl

sal 1


,
I001B
I001A:

je I001F




I001F:



jmp .dsret
atol.s        o(sC  _atol
_atol

_atol:


,#8







al,()


or 


testb ___ctype+1,#8




#43
je I0016
#45
I001B


#45
1f

1:
,

I001B:




48

or 
jl I001A
#10
jge I001A
3



2: sal 1
rcl #1

1:


sal 1
rcl 1

adc 

cwd

adc 
,
,
I001B
I001A:

je I001F



sbb 



I001F:




dx
jmp .dsret
lrand.s       +  _seed
_lrand

__lseed:
1,0
_seed

_seed:




__lseed
__lseed+2
,
,


__lseed,
__lseed+2,


.c
_lrand
_lrand:


__lseed+2
__lseed


62237

.rmi4


6807

.mli4


__lseed+2
__lseed


62237

.dvi4


836

.mli4



sbb 
__lseed,
__lseed+2,
__lseed+2
jge I0023
__lseed,#65535
adc __lseed+2,#32767
I0023:
__lseed
__lseed+2
jmp .cret
getenv.s      o(tC  *_getenv
_getenv

_getenv:


,#6


_environ


I0013





_environ
,
I0019:


je I0016



I001B:
al,()


al,()



I001A
cmpb ()
je I001A


I001B
I001A:
cmpb ()
I0017
cmpb (),#61
I0017
1()


I0017:
,#2
I0019





jmp .dsret
bcmp.s        +Y  7 _bcmp
_bcmp

_bcmp:





_memcmp

jmp .cret
bzero.s       +\  ; _bzero
_bzero

_bzero:






_memset

jmp .cret
rand.s        o(tC   _rand
_srand

__seed:
1,0
_srand

_srand:




__seed,
__seed+2,
.c
_rand
_rand:


0077
838
__seed+2
__seed
.mli4
12345
adc #0
__seed,
__seed+2,
16
__seed

2: sar #1
rcr 1

1:
32767
#0
bx
jmp .cret
lfr6.s        o(tC  : .lfr6

.area

.lfr6:

.area+4
.area+2
.area

lfr8.s        o(tC  D .lfr8

.area

.lfr8:

.area+6
.area+4
.area+2
.area

ret6.s        o(tC  6 .6

.area

.6:

.area
.area+2
.area+4

ret8.s        o(tC  @ .8

.area

.8:

.area
.area+2
.area+4
.area+6

lsearch.s     +  _lfind
_lsearch
_lsearch

_lsearch:








mul 10()




I0015:

jbe I0012
12()


()



I0013



10()


I0015

10()


_bcopy


,#1



.ds
_lfind
_lfind:








mul 10()




I0025:

jbe I0022
12()


()



I0023

I0021
I0023:
10()


I0025
I0022:


I0021:

jmp .dsret
bcopy.s       +Z  : _bcopy
_bcopy

_bcopy:





_memcpy

jmp .cret
memmove.s     o(tC  _memmove, _memcpy

_memmove:
_memcpy:



6()
4()
2()

 exit

je exit
jb left_to_right

jae left_to_right
right_to_left:

std




10
jbe byte_move
test #1
jnz word_unaligned
movb

word_unaligned:


shr 1
rep
movw
jnc exit



exit
left_to_right:

cld
10
jbe byte_move
test #1
jz word_move
movb

word_move:
shr 1
rep
movw
adc 
byte_move:
rep
movb
exit:
cld



getgroups.s   +%   K .define	_getgroups
.extern	__getgroups
.align 2
_getgroups: 
j __getgroups
._getgroups.s  + 	  9 __getgroups
__getgroups

__getgroups:



jmp .cret
index.s       +  A _index
_index

_index:


al,



_strchr


jmp .cret
rindex.s      +  E _rindex
_rindex

_rindex:


al,



_strrchr


jmp .cret
bsearch.s     o(tC   _bsearch
_bsearch

_bsearch:


,#6




,

#0
jbe I0012

shr 1
mul 10()



12()


()




I0016




jge I0019

shr 1


I0019:
10()

,

1
shr 1







jmp .dsret
crypt.s       +a  _crypt
_crypt

_crypt:


,#76



_1: .zerow 14/2


I0015:
#67
jge I0012
-67(_)

I0015


cmpb 1
I0017





1,al
I0017:

al,1


sal cl





128

cwd
iv 
-7,

I001C:

cmpb 
je I0019
#8
jge I0019

I00111:
#7
jge I001E




#1
sal cl
test 
je I00113


4
I00113:


I00114:
3

sal cl

-67()




1
I001E:
4

cwd
iv 






cwd
iv 


sal cl

test 
je I00116


7
I00116:
xor ax,ax
push 
I00117:

56
-67()





I001C
I0019:



testb al,#1
je I00119


A
I00119:


I0011A:

-3(),al

al,1

testb al,#1
je I0011C


D
I0011C:


I0011D:

,al
test -7,#1
je I0011F


I00120
I0011F:


I00120:

-1(),al
I00122:
-7
-7

1
#65
I00127:
or 
jl I00124


-67()

al,-67(_)


I00127
I00124:
al,-1()
-67(),al
I00122
I00121:

I0012B:
#12
jge I00128

2
_1

I0012F:
#6
jge I0012C

2
_1
-7,
-7



6
mul 

-67()

cmpb 
je I00131
mov cx,di

sal cl

2
I00131:


I00132:


or 
-7


I0012F
I0012C:

2
_1
-7,
-7


48


2
al,_1

57
jle I00134

2
_1
-7,
-7


7

I00134:

2
al,_1

90
jle I00129

2
_1
-7,
-7


6

I00129:

I0012B
I00128:

cl,
_1,cl
bl,1
_1+1,bl
_1+13
_1
jmp .dsret
ffs.s         +m   _ffs
_ffs

_ffs:






or 
I0013




#1
I0018:
test #1
je I0016




sar #1
I0018


jmp .dsret
itoa.s        +  _itoa
_itoa

_itoa:


,#6



_next

jge I0013
_next
_next
_qbuf,#45



I0016
_next
_next
_qbuf,#48
I0017

#10000
I0019:
or 
jle I0017

cwd
iv 


I001B
or 
jle I001C
I001B:

48
_next
_next
_qbuf,al
,#1
I001C:

mul 


,
10

cwd
iv 

I0019
I0017:
_next
_qbuf
_qbuf
.ds

_qbuf: .zerow 8/2
_next: .zerow 2/2
.text
loadname.s    +   __loadname
__loadname

__loadname:







_strlen



4(),

8(),
#14
ja I0013

10()

_strcpy



jmp .dsret
memccpy.s     +   _memccpy
_memccpy

_memccpy:


,#8


10()
jg I0013







,
10()
,
I0018:

jle I0015



(),al







I0016




I0018
I0015:




jmp .dsret
memcpy.s      o(tC  7_memcpy
_memcpy

_memcpy:


,#6



ja I0013






jb I0016

1



ja I0016

1




1




,
I001C:

jbe I0017



(),al


1
,
I001C


,
I00110:

jbe I0017



(),al


1
,
0
I0017:



jmp .dsret
qsort.s       o(tC  _qsort
_qsort

_qsort:




10()
_qcompar,

jbe I0013

1
mul 





_qsort1


.s
_qsort1:


,#10


I0025:

,
ja I0027
.ds
I0027:







sal 1
cwd
iv 
mul 


,

I002B:

jbe I00212
_qcompar


()


-10(),
-10()
jg I00212
-10()
jge I002F



I002B
I002F:








_qexchange

I002B
I00212:

,
jbe I00211
_qcompar


()


-10(),
-10()
jge I00215
cmp si,di
jbe I00218



_qexchange








,
I002B
I00218:


,




_q3exchange
,#8




I00212
I00215:
-10()
I0021B


,



_qexchange

I00212
I0021B:




,
I00212
I00211:

jbe I0021E









_q3exchange
,#8




,


I002B
I0021E:







_qsort1



,
I0025
_qexchange:




si,6(bp)
push 

I0033:



jle I0032
al,()


al,()
(),al


(),al

I0033
I0032:
.ds
_q3exchange:







I0043:
10()
10()

jle I0042




al,()


al,()
(),al


(),al

I0043
I0042:
.ds

_qcompar: .zerow 2/2
.text
regsub.s      +  _regsub
_regsub

_regsub:


,#10







I0013

_1

_regerror

.ds


cmpb 46,#156
je I0018
_2

_regerror

.ds
I0018:


I001B:



-5(),al


je I001A
cmpb -5(),#38
I001E

I001F
I001E:
cmpb -5(),#92
I00111
al,()

48
jl I00111
al,()

57
jg I00111




48
,
I001F
I00111:
,#-1
I001F:

jge I00116
cmpb -5(),#92
I00119
cmpb (),#92
je I00118
cmpb (),#38
I00119
I00118:



-5(),al
I00119:
al,-5()
(),al

I001B
I00116:

sal 1


je I001B

20

sal 1
bx,ax
cmp (bx)
je I001B

20

sal 1



sal 1



-10(),

sal 1

-10()


_strncpy

-10()


-10()
je I001B
cmpb -1()
I001B
_3

_regerror

.ds
I001A:
()

.ds

_1:
21838
19532
28704
29281
8301
28532
29216
26469
30067
98
_2:
24932
24941
25959
8292
25970
25959
28792
26144
01
29728
8303
25970
29543
25205

_3:
24932
24941
25959
8292
24941
25460
8296
29811
26994
26478
.word 0
.text
stb.s         o(tC  l ___stb
___stb

___stb:







jle I0013
I0017:



(),al


I0017

jmp .dsret
swab.s        +   _swab
_swab

_swab:








sar 1
,


jl I0012



-1(),al



(),al

al,-1()
(),al



jmp .dsret
ungetc.s      o(tC   _ungetc
_ungetc

_ungetc:






or 
jl I0012
testb 4(),#1

testb 4(),#4
je I0013

-1



2(),#1024
jl I0018
-1


I0018:
6()
8(),
I001B
8()
I001B:
2()

2(),
8()
8()





jmp .dsret
abs.s         o(sC  M _abs
_abs

_abs:




or 
jge I0013








jmp .sret
ctermid.s     +d   _ctermid
_ctermid

_ctermid:





_1: .zerow 256/2

or 
I0013
#_1

_2


_strcpy



.s

_2:
25647
30309
29743
31092
.word 0
.text
strcoll.s     o(tC  / _strcoll

.extern _strcmp
_strcoll:
_strcmp
strxfrm.s     o(tC  a _strxfrm

.extern _strncpy, _strlen
_strxfrm:

6
4
2
_strncpy

4
_strlen
,#2

xor.s         o(tC  B .xor



.xor:
 



sar 1
1:

()
stow
 1b


vectab.s      o(tC  5 ___vectab
___vectab

___vectab: .zerow 32/2
.text
vars.s        o(tC   .reghp, .limhp, .ignmask, .trppc
.reghp, .limhp, .ignmask, .trppc


.reghp:
 endbss
.limhp:
 endbss
.ignmask:
 0
.trppc:
 0
strtok.s      o(tC  _strtok

scan: 

_strtok:




cld

or 
jnz s2_length
scan
or 
jz exit
s2_length:

-1
al,al
repne
scab
not 

jz string_finished



delim_:
lodb
orb al,al
jz string_finished


repne
scab
je delim_
-1()
token_:
lodb
orb al,al
jz string_finished


repne
scab
token_
-1(),*0
scan,
exit
string_finished:
scan
exit:






strstr.s      o(tC  _strstr

_strstr:


,#2





ah,()
orb ah,ah
je exit
cld
-1
al,al
repne
scab
not 

,
-1

repne
scab
not 

jbe not_found



s1_:

jz not_found

cmpb ah,
s1_



repe
cmpb
s1_
exit
not_found:

exit:






strspn.s      o(tC  _strn

_strn:






cld

cmpb (),*0
jz exit
cmpb 1(),*0
jz find_mismatch
-1
al,al
repne
scab
not 



s1_:
lodb

orb al,al
jz exit


repne
scab
je s1_
exit
find_mismatch:
al,()

-1
repe
scab



exit:






strrchr.s     o(tC   _strrchr

_strrchr:



ah,4()
2()
cld
-1
al,al
repne
scab
not 

al,ah
std
repne
scab
exit


exit:
cld



strpbrk.s     o(tC  _strpbrk

_strpbrk:



2
4

cld

cmpb (),*0
jz exit
cmpb 1(),*0
jz find_match
-1
repne
scab
not 


s1_:
lodb
orb al,al
jz exit


repne
scab
s1_





find_match:
dl,()
test #1
jz word_
lodb
cmpb al,dl
je one_past
orb al,al
jz no_match
word_:
lodw
cmpb al,dl
je two_past
orb al,al
jz no_match
cmpb ah,dl
je one_past
orb ah,ah
jnz word_
no_match:




two_past:

one_past:


exit:



strncpy.s     o(tC  _strncpy

_strncpy:



6
 exit
2
4
cld
cmpb (),*0
je zero_fill
test #1
jz set_length
movb

jz exit
set_length:

shr 1
jz last_byte
word_copy:
lodw
orb al,al
jz restore_length
stow
orb ah,ah
nz word_copy
jz restore_length
last_byte:
test #1
jz exit
movb
exit
restore_length:
shl 1
#1

zero_fill:

*10
jbe zero_bytes
test #1
jz zero_words
stob

zero_words:
shr 1
rep
stow
adc 
zero_bytes:
rep
stob
exit:


2

strncmp.s     o(tC  _strncmp

_strncmp:




6
 exit
2
4

je exit
cld
test #1
jz setup_
lodb
orb al,al
jz last_byte_test
cmpb al,()
last_byte_test


jz exit

setup_:

shr 1
jz fetch_last_byte
#2
word_:
lodw
#2
orb al,al
jz last_byte_test
()
find_mismatch
orb ah,ah
nz word_
0
jz exit
test #1
jz exit
#2
fetch_last_byte:
al,()
last_byte_test
find_mismatch:
cmpb al,()
last_byte_test
al,ah

last_byte_test:

subb al,()
sbbb ah,ah
exit:



strncat.s     o(tC   _strncat

_strncat:



6()
2()

 exit
cld
-1
al,al
repne
scab

6()
4()
byte_:
lodb
stob
orb al,al
nz byte_
jz exit
(),*0
exit:




strlen.s      o(tC  Q _strlen

_strlen:


2()
-1
al,al
cld
repne
scab
not 




strcspn.s     o(tC  _strcn

_strcn:






cld
-1
cmpb (),*0
jz s1_length
cmpb 1(),*0
jz find_match

al,al
repne
scab
not 


s1_:
lodb

orb al,al
jz exit


repne
scab
s1_
exit
s1_length:


al,al
repne
scab
not 


exit
find_match:
dl,()
test #1
jz word_
lodb

orb al,al
je exit
cmpb al,dl
je exit
word_:
lodw

orb al,al
je exit
cmpb al,dl
je exit

orb ah,ah
je exit
cmpb ah,dl
word_
exit:






strcpy.s      o(tC   _strcpy

_strcpy:



4()
2()

cld
test #1
jz word_copy
lodb
stob
orb al,al
jz exit
word_copy:
lodw
orb al,al
jz move_last_byte
stow
orb ah,ah
jnz word_copy
exit
move_last_byte:
stob
exit:




strcmp.s      o(tC  p_strcmp

_strcmp:



2()
4()


je exit
cld
test #1
jz setup_
lodb
orb al,al
jz last_byte_test
cmpb al,()
last_byte_test

setup_:
#2
word_:
lodw
#2
orb al,al
jz last_byte_test
()
find_mismatch
orb ah,ah
jnz word_

exit
find_mismatch:
cmpb al,()
last_byte_test
al,ah

last_byte_test:

subb al,()
sbbb ah,ah
exit:



strchr.s      o(tC  _strchr

_strchr:


dl,4()
2()
cld
test #1
jz word_
lodb
cmpb al,dl
je one_past
orb al,al
jz no_match
word_:
lodw
cmpb al,dl
je two_past
orb al,al
jz no_match
cmpb ah,dl
je one_past
orb ah,ah
jnz word_
no_match:



two_past:

one_past:




strcat.s      o(tC   _strcat

_strcat:



2()

4()
cmpb (),*0
je exit
cld
-1
al,al
repne
scab

test #1
jz word_copy
movb
word_copy:
lodw
orb al,al
jz move_last_byte
stow
orb ah,ah
jnz word_copy
exit
move_last_byte:
stob
exit:




sti.s         o(tC  g .sti





.sti:
 
  


sar 1
jnb 1f
 
stob

 
1:

 
rep
mov
 ,


 
set.s         o(tC   .set




.set:
  
 

,


 

sar 1
1:
 4(_),


 1b

 8
v 
 
jae 2f

dl,bits()
 
 
orb 4(),dl


2:
ESET = 2
.error

 ESET
.error



bits:
.byte 1,2,4,8,16,32,64,128
sar2.s        o(tC   .sar2


.sar2:



 

xchg  
 
 4

imul 

 
sar 1
jnb 1f

 
stob

 
1:


 
rep
mov
 ,


 
rmu4.s        o(tC  7.rmu4


yl=6
yh=8
xl=10
xh=12

.rmu4:


  
 yl()
 yh()
or 
 7f
1:
 
 xl()
 xh()
2:
v 
xchg 
v 
 
9:







,#8
 

7:
 
 
 xl()
 xh()
 16
1:
shl 1
rcl #1
rcl 1
 
ja 3f
jb 2f
 yl(),
jbe 2f
3:
 1b

 9b
2:
 yl()
sbb 
 
 1b
1:

 9b
rmi4.s        o(tC  .rmi4


yl=6
yh=8
xl=10
xh=12

.rmi4:


  
 yl()
 yh()
cwd
 
 7f
 
jge 1f
 
je 7f
1:
 
 xl()
 xh()
 
jge 2f
 
 
sbb 
2:
v 
xchg 
v  
 
9:
 xh()
jge 1f
 
 
sbb 0
1:



 



,#8


7:
 
 
 
jge 1f
 
 yl()
sbb 
1:
 xl()
 xh()
 
jge 1f
 
 
sbb 
1:
 16
1:
shl 1
rcl #1
rcl 1
 
ja 3f
jb 2f
 yl(),
jbe 2f
3:
 1b

 9b
2:
 yl()
sbb 
 
 1b
1:

 9b
return.s      o(tC   .define .sdret, .dsret, .sret, .dret, .cret 
.text

.dsret:
	pop	di
.sret:
	pop	si
.cret:
	mov	sp,bp
	pop	bp
	ret

.sdret:
	pop	si
.dret:
	pop	di
	jmp	.cret
.retarea.s     o(tC   .area


.area:
.zerow 8/2
rck.s         o(tC  ] .rck




.rck:
 
jl 2f
 2
jg 2f

2:
 
ERANGE = 1
.error
 ERANGE
 .error
 

printdat.s    o(tC  \__io_table
___stn
__stderr
___stdout
__stdout
__stn
__stn

__stn:


1
___stn
___stn
__stdout
__stdout:
1

66
___stdout
___stdout
__stderr
__stderr:
2

6

__io_table

__io_table:
__stn
__stdout
__stderr
















___stdout


___stdout: .zerow 1024/2
___stn
___stn: .zerow 1024/2
.text
nop.s         o(tC   .nop

.nop:

mli4.s        o(tC  o .mli4


yl=2
yh=4




.mli4:



mul yh 



mul yl 

  
 

mul yl 
 

,#4

message.s     o(tC  5 __M
__M

__M:











.word 0
.text
memset.s      o(tC   _memset

_memset:


8()
al,6()
4()

 exit
cld
*10
jbe byte_set
ah,al
test #1
jz word_aligned
stob

word_aligned:
shr 1
rep
stow
adc 
byte_set:
rep
stob
exit:



memcmp.s      o(tC  _memcmp

_memcmp:




6
 exit
2
4

je exit
cld
*10
ja word_compare
byte_compare:
repe
cmpb
one_past_mismatch



word_compare:
test #1
jz word_aligned
cmpb
one_past_mismatch

word_aligned:

shr 1
jz almost_done
repe
cmp
je almost_done
#2
#2
cmpb
one_past_mismatch
at_mismatch
almost_done:
test #1
jz exit
at_mismatch
one_past_mismatch:


at_mismatch:

al,()
subb al,()
sbbb ah,ah
exit:



memchr.s      o(tC  j _memchr

_memchr:



6()
 exit
al,4()
2()
cld
repne
scab
exit


exit:



loi.s         o(tC  r .loi





.loi:
 



 
sar 1
jnb 1f
 ah,ah
lodb

 
 
1:
 ,

 
rep
mov


 
lar2.s        o(tC   .lar2


.lar2:



 



 
 4
imul 
 
sar 1
jnb 1f
 ah,ah
lodb


 
 
1:
 
4
 
 ,
 
 
rep
mov


 
ior.s         o(tC  D .ior



.ior:
 



sar 1
1:

or ()
stow
 1b


inn.s         o(tC   .inn




.inn:
 
 8
v 
 
2
 
 
jae 1f


testb al,bits
jz 1f

2f
1:

2:

 ,

 


bits:
.byte 1,2,4,8,16,32,64,128
gto.s         o(tC  ! .gto


.gto:
 4
 ,2
 @
getutil.s     o(tC  _get_base, _get_ze, _get_tot_mem
_get_base, _get_ze, _get_tot_mem
endbss




_get_base: 
ds


_get_ze: 
endbss 



_get_tot_mem:
cli
es

6384 

L1: es,
seg es
()xA5A4 

seg es
() 
0xA5A4 
L2 
4096 
0xA000 
L1
L2: 
es
sti

exg.s         o(tC  J .exg



.exg:

,
#4


sar 1
1:

xchg ()

 1b
2:


errno.s       +h  ( _errno
_errno

_errno:
.word 0
.text
environ.s     +f  - _environ
_environ

_environ:
21331
.text
dvu4.s        o(tC  #.dvu4

yl=6
yh=8
xl=10
xh=12


.dvu4:


  
 yl()
 yh()
or 
 7f
 
 xl()
 xh()
v 
xchg 
v 
9:






,#8
 

7:
 
 
 xl()
 xh()
 16
1:
shl 1
rcl #1
rcl 1
 
ja 3f
jb 2f
 yl(),
jbe 2f
3:
 1b
 9b
2:
 yl()
sbb 
 
 1b
 9b
dvi4.s        o(tC  .dvi4

yl=6
yh=8
xl=10
xh=12


.dvi4:


  
 yl()
 yh()
cwd
 
 
 7f
 
jge 1f
 
je 7f
1:
 
 xl()
 xh()
 
jge 2f
 
 
sbb 
not 
2:
v 
xchg 
v  
9:
 
jge 1f
 
 
sbb 0
1:






,#8
 

7:
  
 
 
 
jge 1f
 
 yl()
sbb 
1:
 xl()
 xh()
 
jge 1f
 
 
sbb 
not -2()
1:
 16
1:
shl 1
rcl #1
rcl 1
 
ja 3f
jb 2f
 yl(),
jbe 2f
3:
 1b
 1f
2:
 yl()
sbb 
 
 1b
1:
  
 9b
ctype.s       o(tC  ___tmp
___ctype
___ctype

___ctype:
8192




10280
10280
8232








34848







1040
1028
1028
1028
1028
4100



16705
16705
16705













16962
16962
16962












32































.word 0
.word 0






























___tmp


___tmp: .zerow 2/2
.text
com.s         o(tC  7 .com



.com:



sar 1
1:
not 


 1b

cmu4.s        o(tC  p .cmu4


.cmu4:
  
 
 
 


xchg 2()

 
ja 1f
jb 2f
 
ja 1f
je 3f
2:
-1

3:


1:


cms.s         o(tC  ` .cms



.cms:
  
 


 
 
 
 
sar 1
repe
cmp
je 1f
 
1:


 ,
 
cmi4.s        o(tC  .define .cmi4

.text
.cmi4:
	pop     bx              | return address
	pop     cx
	pop     dx
	pop     ax
	push	si
	mov	si,sp
	xchg	bx,2(si)
	pop	si
	cmp     bx,dx
	jg      1f
	jl      2f
	cmp     ax,cx
	ja      1f
	je      3f
2:
	mov	ax,#-1
	ret
3:
	xor	ax,ax
	ret
1:
	mov	ax,#1
	ret
.brksize.s     +)   K .define __brksize
.data
.extern endbss, __brksize
__brksize: .word  endbss
.blm.s         o(tC  B .blm



.blm:



2
4
rep
mov



,#4


and.s         o(sC  D .and





.and:
 



sar 1
1:

()
stow
 1b


_sendrec.s    +)   .define __send, __receive, __sendrec
SEND = 1
RECEIVE = 2
BOTH = 3
SYSVEC = 32
.extern __send, __receive, __sendrec
__send: mov cx,*SEND
j L0
__receive: 
mov cx,*RECEIVE
j L0
__sendrec: 
mov cx,*BOTH
j L0
L0: push bp
mov bp,sp
mov ax,4(bp)
mov bx,6(bp)
int SYSVEC
pop bp
ret
.