BSD 4 release
[unix-history] / usr / src / cmd / px / 32iostat.s
CommitLineData
b202b2da 1#\f
31cef89c
BJ
2# Copyright (c) 1979 Regents of the University of California
3#
4# char sccsid[] = "@(#)32iostat.s 4.2 10/16/80";
b202b2da
CH
5#
6# FILE ACTIVATION AND STATUS OPERATIONS
7#
8_UNIT:
9 incl r10
10 calls $1,_unit
11 jmp (r8)
12_UNITINP:
13 incl r10
14 pushal stdin
15 calls $1,_unit
16 jmp (r8)
17_UNITOUT:
18 incl r10
19 moval stdout,r7
20 movl stdout+PFNAME,_file
21 jmp (r8)
22_EOF:
31cef89c
BJ
23 incl r10
24 movl r7,r6 #save active file
25 calls $1,_unit
26 movw $1,-(sp)
27 bitw $EOF,FUNIT(r7)
28 bneq l3202
29 calls $0,_iosync
30 bitw $EOF,FUNIT(r7)
31 bneq l3202
32 clrw (sp)
b202b2da 33l3202:
31cef89c
BJ
34 movl r6,r7 #restore active file
35 movl PFNAME(r7),_file
36 jmp (r8)
37_EOLN:
b202b2da 38 incl r10
31cef89c 39 movl r7,r6 #save active file
b202b2da
CH
40 calls $1,_unit
41 clrw -(sp)
b202b2da 42 calls $0,_iosync
31cef89c 43 bitw $EOLN,FUNIT(r7)
b202b2da 44 beql l3205
b202b2da
CH
45 incw (sp)
46l3205:
31cef89c
BJ
47 movl r6,r7 #restore active file
48 movl PFNAME(r7),_file
b202b2da 49 jmp (r8)