sync with current reality

This commit is contained in:
Oliver Lehmann 2015-11-17 22:15:01 +01:00
parent fc007db01e
commit f495e52540
29 changed files with 1919 additions and 9694 deletions

View File

@ -1,8 +1,15 @@
all: touch
cd conf/ && make
cd dev/ && make
clean:
rm -f touch
cd conf/ && make clean
cd dev/ && make clean
cd conf ; make $@
cd dev ; make $@
cd sys ; make $@
all:
cd conf ; make $@
cd dev ; make $@
cd sys ; make $@
install: all
cd conf ; make $@
cd dev ; make $@
cd sys ; make $@
cd h ; make $@

24
WEGA/src/uts/README.md Normal file
View File

@ -0,0 +1,24 @@
# WEGA
aktuell sind hier lediglich die WEGA Kernel-Quellen zu finden. Diese sind teilweise aus zur Verfügung stehenden Original-Quellen von WEGA entstanden, und teilweise durch Disassemblierung der Original-Objects und "Rückwärtsübersetzung" in C-Code unter Zuhilfnahme der im Netz verfügbaren Quellen von V7, SYSIII und Plexis.
In seinem aktuellen Zustand kann der Kernel vollständig compiliert werden und ist von seiner Lauffähigkeit kompatibel zu dem original ausgelieferten WEGA-Kernel.
Folgende Objekte haben Abweichungen zum Originalkernel und werden deshalb direkt als Objekt verwendet und nicht compiliert:
## ``sys/u.s``
Das Array "u" (wird für den user-Struct verwendet) muss auf der Adresse 0xf600 im Segment 62 (0x3e) liegen. Leider ist es mir aktuell nicht möglich dies so zu vereinbaren. Die Assemblerdirektive $ABS kann nur im Segment 1 arbeiten, und ich habe noch nicht rausgefunden, wie ich den Assembler überreden kann, sich auf das Segment 62 absolut zu beziehen.
## ``sys/lock.c``
```
0000 T _lkdata not existing
0282 T _unlk not existing
0392 T _locked not existing
044a T _deadlock not existing
04b6 T _unlock not existing
0546 T _lockalloc not existing
05b8 T _lockfree not existing
05f2 T _lockadd not existing
0664 T _lkfront not existing
```

View File

@ -18,17 +18,14 @@ MOD= 644
all: $(OBJ)
install: $(OBJ)
sh -c 'test -d $(IDIR) || mkdir $(IDIR)'
sh -c 'for file in ${IFILES} ; do \
cp $$file $(IDIR) ; \
chmog $(MOD) $(OWN) $(GRP) $(IDIR)/$$file ; \
done'
chmog 666 wega system $(IDIR)/bstart.o
BOOTLIB: $(BL_OBJ) ../conf_times ../touch
# modify the objectfiles to make them as equal as possible to the
# original objects stored in BOOTLIB
sh -c 'while read line ; do ../touch $$line ; done < ../conf_times'
rm -f BOOTLIB
BOOTLIB: $(BL_OBJ)
ar qc BOOTLIB bmch.o boot.o bsys.o bconf.o bmisc.o bmd.o bfd.o bud.o brm.o
libb.a: sa.function.o bmisc.o
@ -38,6 +35,8 @@ libb.a: sa.function.o bmisc.o
conf.o:
scc $(CFLAGS) -c $<
u.o:
cp u.obj u.o
clean:
rm -f $(BL_OBJ) $(OBJ)

BIN
WEGA/src/uts/conf/u.obj Normal file

Binary file not shown.

View File

@ -1,9 +1,12 @@
u module
$segmented
$abs %F600
global
constant
BASE := %f600
global
$abs BASE ! how the hell segment 62 can be adressed here?? !
_u array [%572 byte]
_u array [%572 byte]
end u

View File

@ -1,9 +0,0 @@
090716394688 bmch.o
090716412588 boot.o
090716434488 bsys.o
090716442888 bconf.o
090716453388 bmisc.o
090716461188 bmd.o
090716464888 bfd.o
090716470788 bud.o
090716472588 brm.o

View File

@ -20,15 +20,13 @@ MOD= 644
all: LIB2
install: LIB2
sh -c 'test -d $(IDIR) || mkdir $(IDIR)'
sh -c 'for file in $(IFILES) ; do \
cp $$file $(IDIR) ; \
chmog $(MOD) $(OWN) $(GRP) $(IDIR)/$$file ; \
done'
LIB2: $(OBJ) ../dev_times ../touch
# modify the objectfiles to make them as equal as possible to the
# original objects stored in LIB2
sh -c 'while read line ; do ../touch $$line ; done < ../dev_times'
LIB2: $(OBJ)
chmog 666 26 1 koppel.o
chmog 666 26 1 fd.o
chmog 644 89 0 tty.o
@ -57,10 +55,6 @@ udev6.o:
# this files are written in plain ASM
clist.o:
$(CAS) -u -o $@ $*.s
tt0.o:
$(CAS) -u -o $@ $*.s
tty.o:
$(CAS) -u -o $@ $*.s
clean:
rm -f $(OBJ) LIB2

File diff suppressed because it is too large Load Diff

View File

@ -204,6 +204,7 @@ caddr_t arg;
if (copyout((caddr_t)&cb, arg, sizeof(cb)))
u.u_error = EFAULT;
break;
case TCXONC:
switch (arg) {
case 0:
@ -224,7 +225,7 @@ caddr_t arg;
break;
case TCSBRK:
ttywait(tp);
if(arg == 0)
if(0 == arg)
(*tp->t_proc)(tp, T_BREAK);
break;

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +0,0 @@
121609432888 bio.o
040708363389 siok.o
060114274088 koppel.o
012508262788 ud.o
090815530288 fd.o
082722551983 mem.o
082722565383 sys.o
020818134084 tty.o
092916045583 tt0.o
082723101183 partab.o
123007241988 md.o
051110215688 disk.o
050410262089 lp.o
072813564288 rd.o
072813532388 mt.o
031613285089 cpu2.o
102813530786 udev1.o
102813531986 udev2.o
102813533386 udev3.o
102813534586 udev4.o
102813535686 udev5.o
102813540886 udev6.o
091612431983 clist.o
101516305786 dump.o

18
WEGA/src/uts/h/Makefile Normal file
View File

@ -0,0 +1,18 @@
IFILES= mdsize.h sysparm.h ver.h
IDIR= /usr/sys/h
OWN= bin
GRP= system
MOD= 644
clean:
all:
install: all
sh -c 'test -d $(IDIR) || mkdir $(IDIR)'
sh -c 'for file in $(IFILES) ; do \
cp $$file $(IDIR) ; \
chmog $(MOD) $(OWN) $(GRP) $(IDIR)/$$file ; \
done'

34
WEGA/src/uts/sys/Makefile Normal file
View File

@ -0,0 +1,34 @@
CAS= cas
AS= as
CC= scc
CFLAGS= -O
OBJ= main.o trap.o sig.o iget.o prf.o slp.o subr.o rdwri.o fio.o malloc.o \
alloc.o machdep.o nami.o pipe.o sysent.o sys3.o sys1.o sys4.o sys2.o \
acct.o text.o ureg.o break.o lock.o mkseg.o debug.o timer.o
IDIR= /usr/sys/sys
OWN= bin
GRP= system
MOD= 644
all: LIB1
install: LIB1
sh -c 'test -d $(IDIR) || mkdir $(IDIR)'
cp LIB1 $(IDIR)
chmog $(MOD) $(OWN) $(GRP) $(IDIR)/LIB1
LIB1: $(OBJ)
ar cr LIB1 $(OBJ)
# No source available for this files
lock.o:
cp lock.obj lock.o
clean:
rm -f $(OBJ) LIB1

View File

@ -156,7 +156,7 @@ struct state *state;
case 'B':
case 'b':
{ printf("reakpoint @");
kadr = (unsigned int *)((long)(gethex() & UMASK) & KMASK);
kadr = (unsigned int *)((long)(gethex() & UMASK));
for (bp_cnt = 0; breakpt[bp_cnt].a && ++bp_cnt<NBPTS; );
if (bp_cnt >= NBPTS){
printf("KDB: No more break slots\n");

View File

@ -1,976 +0,0 @@
.seg
.psec data
.data
fp := r15;
sp := rr14;
_debugwstr::
.byte %40
.byte %5b
.byte %24
.byte %5d
.byte %64
.byte %65
.byte %62
.byte %75
.byte %67
.byte %2e
.byte %63
.byte %9
.byte %9
.byte %52
.byte %65
.byte %76
.byte %20
.byte %3a
.byte %20
.byte %34
.byte %2e
.byte %31
.byte %20
.byte %9
.byte %30
.byte %39
.byte %2f
.byte %31
.byte %37
.byte %2f
.byte %38
.byte %33
.byte %20
.byte %30
.byte %32
.byte %3a
.byte %35
.byte %36
.byte %3a
.byte %30
.byte %37
.byte %0
.even
_kdebug::
.word %0
.comm 0, _buffer1;
.comm 0, _buffer2;
.comm 0, _buffer3;
.comm 0, _buffer4;
.comm 0, _buffer5;
.comm 0, _canonb;
.comm 4, _rootdir;
.comm 4, _runq;
.comm 2, _lbolt;
.comm 4, _lifetime;
.comm 4, _time;
.comm 2, _nblkdev;
.comm 2, _nchrdev;
.comm 2, _mpid;
.comm 1, _runin;
.comm 1, _runout;
.comm 1, _runrun;
.comm 1, _curpri;
.comm 2, _maxmem;
.comm 2, _umemory;
.comm 4, _swplo;
.comm 2, _nswap;
.comm 2, _updlock;
.comm 4, _rablock;
.comm 128, _msgbuf;
.comm 2, _rootdev;
.comm 2, _swapdev;
.comm 2, _pipedev;
.comm 4, _serial;
.comm 2, _numterm;
.comm 2, _manboot;
.comm 2, _blkacty;
.comm 2, _cputype;
.comm 112, _sysinfo;
.comm 6, _syswait;
.comm 2, _dk_busy;
.comm 128, _dk_time;
.comm 12, _dk_numb;
.comm 12, _dk_wds;
.comm 4, _tk_nin;
.comm 4, _tk_nout;
.comm 200, _callout;
.comm 50, _breakpt;
_kdbstr:
.=.+6
_hzif:
.byte %30
.byte %31
.byte %32
.byte %33
.byte %34
.byte %35
.byte %36
.byte %37
.byte %38
.byte %39
.byte %41
.byte %42
.byte %43
.byte %44
.byte %45
.byte %46
.even
_foo:
.word 0
_format:
.=.+16
.byte 0
.byte 0
.even
_kval:
.word 0
/*~~gethex:*/
.psec
.code
_gethex::
{
dec fp,#~L2
subl rr2,rr2
jpr L20000
L96:
cpb |_stkseg+~L1+1|(fp),#97
jpr ge,L20005
L98:
cpb |_stkseg+~L1+1|(fp),#48
jpr lt,L100
cpb |_stkseg+~L1+1|(fp),#57
jpr gt,L100
ldb rl2,|_stkseg+~L1+1|(fp)
subb rl2,#48
L20007:
ldb |_stkseg+~L1+1|(fp),rl2
ldl rr2,|_stkseg+~L1+2|(fp)
slal rr2,#4
ldb rl5,|_stkseg+~L1+1|(fp)
extsb r5
exts rr4
addl rr2,rr4
L20000:
ldl |_stkseg+~L1+2|(fp),rr2
callr _getchar
ldb |_stkseg+~L1+1|(fp),rl2
testb rl2
jpr eq,L10000
cpb rl2,#65
jpr lt,L96
cpb rl2,#70
jpr gt,L96
extsb r2
sub r2,#55
jpr L20007
L20005:
cpb |_stkseg+~L1+1|(fp),#102
jpr gt,L98
ldb rl2,|_stkseg+~L1+1|(fp)
extsb r2
sub r2,#87
jpr L20007
L100:
ldl rr2,|_stkseg+~L1+2|(fp)
L10000:
inc fp,#~L2
ret
~L1 := 0
~L2 := 10
} /* _gethex */
.psec data
.data
/*~~zpr:*/
.psec
.code
_zpr::
{
dec fp,#~L2
ld |_stkseg+~L1+0|(fp),r7
ldl rr2,#_hzif
ldl |_stkseg+~L1+4|(fp),rr2
ld |_stkseg+~L1+2|(fp),r7
ld r6,r7
sra r6,#12
and r6,#15
subb rh6,rh6
ldl rr2,|_stkseg+~L1+4|(fp)
ldb rl4,rr2(r6)
ldb _kdbstr,rl4
ld r6,|_stkseg+~L1+2|(fp)
ldb rl6,rh6
extsb r6
and r6,#15
subb rh6,rh6
ldb rl4,rr2(r6)
ldb _kdbstr+1,rl4
ld r6,|_stkseg+~L1+2|(fp)
sra r6,#4
and r6,#15
subb rh6,rh6
ldb rl4,rr2(r6)
ldb _kdbstr+2,rl4
ld r6,|_stkseg+~L1+2|(fp)
and r6,#15
subb rh6,rh6
ldb rl4,rr2(r6)
ldb _kdbstr+3,rl4
clrb _kdbstr+4
ldl rr2,#_kdbstr
inc fp,#~L2
ret
~L1 := 0
~L2 := 12
} /* _zpr */
.psec data
.data
L115:
.byte %4b,%44,%42,%3a,%20,%55,%6e,%73
.byte %65,%74,%20,%62,%72,%65,%61,%6b
.byte %70,%6f,%69,%6e,%74,%a,%0
.even
L117:
.byte %4b,%44,%42,%3a,%20,%40,%25,%58
.byte %20,%42,%72,%65,%61,%6b,%70,%6f
.byte %69,%6e,%74,%a,%0
.even
L122:
.byte %4b,%44,%42,%3e,%7,%0
.even
L127:
.byte %75,%6d,%70,%20,%63,%61,%6c,%6c
.byte %20,%74,%6f,%20,%40,%0
.even
L132:
.byte %72,%65,%61,%6b,%70,%6f,%69,%6e
.byte %74,%20,%40,%0
.even
L137:
.byte %4b,%44,%42,%3a,%20,%4e,%6f,%20
.byte %6d,%6f,%72,%65,%20,%62,%72,%65
.byte %61,%6b,%20,%73,%6c,%6f,%74,%73
.byte %a,%0
.even
L140:
.byte %20,%46,%41,%55,%4c,%54,%20,%0
.even
L143:
.byte %73,%65,%72,%20,%73,%70,%61,%63
.byte %65,%20,%64,%0
.even
L147:
.byte %68,%79,%73,%69,%63,%61,%6c,%20
.byte %73,%70,%61,%63,%65,%20,%64,%0
.even
L150:
.byte %69,%73,%70,%6c,%61,%79,%20,%40
.byte %0
.even
L151:
.byte %66,%6f,%72,%20,%0
.even
L152:
.byte %77,%6f,%72,%64,%73,%a,%0
.even
L158:
.byte %a,%0
.even
L159:
.byte %25,%73,%0
.even
L160:
.byte %25,%73,%3a,%20,%0
.even
L162:
.byte %20,%46,%41,%55,%4c,%54,%20,%0
.even
L165:
.byte %20,%46,%41,%55,%4c,%54,%20,%0
.even
L167:
.byte %25,%73,%20,%0
.even
L169:
.byte %20,%20,%7c,%25,%73,%7c,%0
.even
L172:
.byte %6f,%64,%69,%66,%79,%20,%0
.even
L177:
.byte %65,%67,%69,%73,%74,%65,%72,%20
.byte %0
.even
L178:
.byte %28,%25,%73,%29,%20,%77,%69,%74
.byte %68,%20,%0
.even
L179:
.byte %4f,%4b,%20,%0
.even
L186:
.byte %65,%6d,%6f,%72,%79,%20,%40,%0
.even
L187:
.byte %28,%25,%73,%29,%20,%77,%69,%74
.byte %68,%20,%0
.even
L188:
.byte %4f,%4b,%20,%0
.even
L194:
.byte %20,%46,%41,%55,%4c,%54,%20,%0
.even
.even
L196:
.word 77
.word 82
.word 109
.word 114
.even
L200:
.byte %65,%67,%69,%73,%74,%65,%72,%73
.byte %a,%0
.even
L205:
.byte %72,%25,%64,%3a,%25,%73,%20,%0
.even
L206:
.byte %a,%66,%63,%77,%3d,%25,%73,%20
.byte %0
.even
L207:
.byte %70,%63,%73,%65,%67,%3d,%25,%73
.byte %20,%0
.even
L208:
.byte %70,%63,%6f,%66,%66,%3d,%25,%73
.byte %0
.even
L211:
.byte %69,%6e,%67,%6c,%65,%20,%73,%74
.byte %65,%70,%a,%0
.even
L215:
.byte %61,%70,%65,%20,%63,%72,%61,%73
.byte %68,%20,%64,%75,%6d,%70,%a,%0
.even
L216:
.byte %77,%72,%69,%74,%61,%62,%6c,%65
.byte %20,%74,%61,%70,%65,%20,%6c,%6f
.byte %61,%64,%65,%64,%20,%69,%6e,%20
.byte %64,%72,%69,%76,%65,%20,%30,%3f
.byte %20,%0
.even
L224:
.byte %6f,%6e,%74,%69,%6e,%75,%65,%a
.byte %0
.even
L227:
.byte %78,%69,%74,%a,%0
.even
.even
/*~~debug:*/
.psec
.code
_debug::
{
.psec data
.data
.even
L197:
.long L185
.long L176
.long L185
.long L176
.even
L228:
.long L131
.long L223
.long L149
.long L226
.long L128
.long L128
.long L128
.long L128
.long L126
.long L128
.long L128
.long L171
.long L128
.long L128
.long L146
.long L128
.long L199
.long L210
.long L214
.long L142
.long L128
.long L128
.long L128
.long L128
.long L128
.long L128
.long L128
.long L128
.long L128
.long L128
.long L128
.long L128
.long L131
.long L223
.long L149
.long L226
.long L128
.long L128
.long L128
.long L128
.long L126
.long L128
.long L128
.long L171
.long L128
.long L128
.long L146
.long L128
.long L199
.long L210
.long L214
.long L142
.psec
.code
sub fp,#~L2
ldl |_stkseg+~L1+0|(fp),rr6
test _kdebug
jpr eq,L10006
callr _dvi
ld |_stkseg+~L1+12|(fp),r2
ldl rr2,|_stkseg+~L1|(fp)
ld r4,rr2(#32)
and r4,#255
ld |_stkseg+~L1+22|(fp),r4
ld |_stkseg+~L1+20|(fp),#5
cp |_stkseg+~L1+22|(fp),#2
jpr ne,L120
clr |_stkseg+~L1+20|(fp)
L20009:
ld r3,|_stkseg+~L1+20|(fp)
mult rr2,#10
ld r2,_breakpt(r3)
test r2
jpr eq,L109
ld r5,|_stkseg+~L1+20|(fp)
mult rr4,#10
ld r2,_breakpt+2(r5)
ldl rr4,|_stkseg+~L1|(fp)
ld r3,rr4(#36)
and r3,#16128
cp r2,r3
jpr ne,L109
ld r7,|_stkseg+~L1+20|(fp)
mult rr6,#10
ld r2,_breakpt+4(r7)
ld r3,rr4(#38)
dec r3,#2
cp r2,r3
jpr eq,L110
L109:
inc |_stkseg+~L1+20|(fp),#1
cp |_stkseg+~L1+20|(fp),#5
jpr lt,L20009
L110:
cp |_stkseg+~L1+20|(fp),#5
jpr lt,L113
ldl rr6,#L115
L20020:
callr _printf
jpr L120
L113:
ld r3,|_stkseg+~L1+20|(fp)
mult rr2,#10
ldl rr4,#_breakpt
add r5,r3
clr @rr4
ld r3,|_stkseg+~L1+20|(fp)
mult rr2,#10
ldl rr4,_breakpt+2(r3)
ldl |_stkseg+~L1+8|(fp),rr4
ld r3,|_stkseg+~L1+20|(fp)
mult rr2,#10
ldl rr4,_breakpt+2(r3)
ldl rr6,#L117
callr _printf
ldl rr4,#_stkseg+~L1+36
add r5,fp
ldb rl6,|_stkseg+~L1+8|(fp)
ldb rh6,#0
ld r7,_mmut
callr _getsd
ldb rl2,|_stkseg+~L1+39|(fp)
ldb |_stkseg+~L1+41|(fp),rl2
ldb rl3,|_stkseg+~L1+39|(fp)
andb rl3,#254
ldb |_stkseg+~L1+39|(fp),rl3
ldl rr4,#_stkseg+~L1+36
add r5,fp
ldb rl6,|_stkseg+~L1+8|(fp)
ldb rh6,#0
ld r7,_mmut
callr _loadsd
ld r3,|_stkseg+~L1+20|(fp)
mult rr2,#10
ld r2,_breakpt+6(r3)
ldl rr4,|_stkseg+~L1+8|(fp)
ld @rr4,r2
ldb rl3,|_stkseg+~L1+41|(fp)
ldb |_stkseg+~L1+39|(fp),rl3
ldl rr4,#_stkseg+~L1+36
add r5,fp
ldb rl6,|_stkseg+~L1+8|(fp)
ldb rh6,#0
ld r7,_mmut
callr _loadsd
ldl rr2,|_stkseg+~L1|(fp)
add r3,#38
dec @rr2,#2
L120:
ldl rr6,#L122
callr _printf
callr _getchar
ld |_stkseg+~L1+18|(fp),r2
sub r2,#66
cp r2,#51
jpr ugt,L128
rl r2,#2
ldl rr4,L228(r2)
jp @rr4
L126:
ldl rr6,#L127
callr _printf
callr _gethex
and r2,#32512
ldl |_stkseg+~L1+32|(fp),rr2
call @rr2
L128:
ldk r7,#10
callr _putchar
jpr L120
L131:
ldl rr6,#L132
callr _printf
callr _gethex
and r2,#16128
ldl |_stkseg+~L1+8|(fp),rr2
clr |_stkseg+~L1+20|(fp)
L135:
ld r3,|_stkseg+~L1+20|(fp)
mult rr2,#10
ld r2,_breakpt(r3)
test r2
jpr eq,L134
inc |_stkseg+~L1+20|(fp),#1
cp |_stkseg+~L1+20|(fp),#5
jpr lt,L135
L134:
cp |_stkseg+~L1+20|(fp),#5
jpr lt,L136
ldl rr6,#L137
jpr L20020
L136:
ld r3,|_stkseg+~L1+20|(fp)
mult rr2,#10
ldl rr4,#_breakpt
add r5,r3
ld @rr4,#1
ld r3,|_stkseg+~L1+20|(fp)
mult rr2,#10
ldl rr4,#_breakpt+2
add r5,r3
ldl rr2,|_stkseg+~L1+8|(fp)
ldl @rr4,rr2
ld r3,|_stkseg+~L1+20|(fp)
mult rr2,#10
ldl rr4,#_breakpt+6
add r5,r3
ldl rr2,|_stkseg+~L1+8|(fp)
ld r6,@rr2
ld @rr4,r6
ldl rr4,#_stkseg+~L1+36
add r5,fp
ldb rl6,|_stkseg+~L1+8|(fp)
ldb rh6,#0
ld r7,_mmut
callr _getsd
ldb rl2,|_stkseg+~L1+39|(fp)
ldb |_stkseg+~L1+41|(fp),rl2
ldb rl3,|_stkseg+~L1+39|(fp)
andb rl3,#254
ldb |_stkseg+~L1+39|(fp),rl3
ldl rr4,#_stkseg+~L1+36
add r5,fp
ldb rl6,|_stkseg+~L1+8|(fp)
ldb rh6,#0
ld r7,_mmut
callr _loadsd
ldl rr6,|_stkseg+~L1+8|(fp)
ld r5,#127
callr _skbyte
test r2
jpr ne,L10009
ldl rr6,|_stkseg+~L1+8|(fp)
inc r7,#1
ldk r5,#2
callr _skbyte
test r2
jpr eq,L139
L10009:
ldl rr6,#L140
L20027:
callr _printf
jpr L128
L139:
ldb rl2,|_stkseg+~L1+41|(fp)
ldb |_stkseg+~L1+39|(fp),rl2
ldl rr4,#_stkseg+~L1+36
add r5,fp
ldb rl6,|_stkseg+~L1+8|(fp)
ldb rh6,#0
ld r7,_mmut
callr _loadsd
jpr L128
L142:
ldl rr6,#L143
callr _printf
ldl rr2,#_fubyte
jpr L20010
L146:
ldl rr6,#L147
callr _printf
ldl rr2,#_fpbyte
jpr L20010
L149:
ldl rr2,#_fkbyte
L20010:
ldl |_stkseg+~L1+32|(fp),rr2
ldl rr6,#L150
callr _printf
callr _gethex
and r2,#32512
ldl |_stkseg+~L1+4|(fp),rr2
ldl rr6,#L151
callr _printf
callr _gethex
ldl |_stkseg+~L1+28|(fp),rr2
ldl rr6,#L152
callr _printf
clr |_stkseg+~L1+16|(fp)
ldl rr2,|_stkseg+~L1+28|(fp)
addl rr2,#7
srll rr2,#3
slal rr2,#3
ldl |_stkseg+~L1+28|(fp),rr2
subl rr2,rr2
L20012:
ldl |_stkseg+~L1+24|(fp),rr2
cpl rr2,|_stkseg+~L1+28|(fp)
jpr uge,L128
test |_stkseg+~L1+16|(fp)
jpr ne,L156
testl rr2
jpr eq,L157
ldl rr6,#L158
callr _printf
L157:
ld r7,|_stkseg+~L1+4|(fp)
callr _zpr
ldl |_stkseg+~L1+42|(fp),rr2
ldl rr6,#L159
ldl rr4,rr2
callr _printf
ldl rr2,#_stkseg+~L1+4
add r3,fp
ld r7,rr2(#2)
callr _zpr
ldl |_stkseg+~L1+42|(fp),rr2
ldl rr6,#L160
ldl rr4,rr2
callr _printf
L156:
ldl rr2,|_stkseg+~L1+32|(fp)
ldl |_stkseg+~L1+42|(fp),rr2
ldl rr4,#_format
add r5,|_stkseg+~L1+16|(fp)
ldl rr6,|_stkseg+~L1+4|(fp)
call @rr2
test r2
jpr eq,L161
ldl rr6,#L162
jpr L20027
L161:
ld r2,|_stkseg+~L1+16|(fp)
ldb rl3,_format(r2)
subb rh3,rh3
ldb rh3,rl3
clrb rl3
ld _kval,r3
ldb rl3,_format(r2)
cpb rl3,#32
jpr ult,L10010
ldb rl3,_format(r2)
cpb rl3,#126
jpr ule,L163
L10010:
ld r2,|_stkseg+~L1+16|(fp)
ldl rr4,#_format
add r5,r2
ldb @rr4,#32
L163:
inc |_stkseg+~L1+16|(fp),#1
inc |_stkseg+~L1+6|(fp),#1
ldl rr2,|_stkseg+~L1+32|(fp)
ldl |_stkseg+~L1+42|(fp),rr2
ldl rr4,#_format
add r5,|_stkseg+~L1+16|(fp)
ldl rr6,|_stkseg+~L1+4|(fp)
call @rr2
test r2
jpr eq,L164
ldl rr6,#L165
jpr L20027
L164:
ld r2,|_stkseg+~L1+16|(fp)
ldb rl3,_format(r2)
subb rh3,rh3
or r3,_kval
ld _kval,r3
ld r2,|_stkseg+~L1+16|(fp)
ldb rl3,_format(r2)
cpb rl3,#32
jpr ult,L10011
ldb rl3,_format(r2)
cpb rl3,#126
jpr ule,L166
L10011:
ld r2,|_stkseg+~L1+16|(fp)
ldl rr4,#_format
add r5,r2
ldb @rr4,#32
L166:
inc |_stkseg+~L1+16|(fp),#1
inc |_stkseg+~L1+6|(fp),#1
ld r7,_kval
callr _zpr
ldl |_stkseg+~L1+42|(fp),rr2
ldl rr6,#L167
ldl rr4,rr2
callr _printf
ld r3,|_stkseg+~L1+16|(fp)
exts rr2
div rr2,#16
test r2
jpr ne,L153
ldl rr6,#L169
ldl rr4,#_format
callr _printf
clr |_stkseg+~L1+16|(fp)
L153:
ldl rr2,|_stkseg+~L1+24|(fp)
addl rr2,#1
jpr L20012
L171:
ldl rr6,#L172
callr _printf
callr _getchar
ldl rr4,#L196
ld r6,#4
cpir r2,@rr4,r6,eq
jpr ne,L128
sll r6,#2
neg r6
ldl rr4,L197+12(r6)
jp @rr4
L176:
ldl rr6,#L177
callr _printf
callr _gethex
ldl |_stkseg+~L1+28|(fp),rr2
slal rr2,#1
ldl rr4,|_stkseg+~L1|(fp)
ld r7,rr4(r3)
callr _zpr
ldl |_stkseg+~L1+42|(fp),rr2
ldl rr6,#L178
ldl rr4,rr2
callr _printf
callr _gethex
ld |_stkseg+~L1+14|(fp),r3
ldl rr6,#L179
callr _printf
callr _getchar
cp r2,#89
jpr eq,L183
cp r2,#121
jpr ne,L128
L183:
ldl rr2,|_stkseg+~L1+28|(fp)
slal rr2,#1
ldl rr4,|_stkseg+~L1|(fp)
add r5,r3
ld r2,|_stkseg+~L1+14|(fp)
ld @rr4,r2
jpr L128
L185:
ldl rr6,#L186
callr _printf
callr _gethex
and r2,#32512
ldl |_stkseg+~L1+8|(fp),rr2
ld r7,@rr2
callr _zpr
ldl |_stkseg+~L1+42|(fp),rr2
ldl rr6,#L187
ldl rr4,rr2
callr _printf
callr _gethex
ld |_stkseg+~L1+14|(fp),r3
ldl rr6,#L188
callr _printf
callr _getchar
cp r2,#89
jpr eq,L192
cp r2,#121
jpr ne,L128
L192:
ldl rr4,#_stkseg+~L1+36
add r5,fp
ldb rl6,|_stkseg+~L1+8|(fp)
ldb rh6,#0
ld r7,_mmut
callr _getsd
ldb rl2,|_stkseg+~L1+39|(fp)
ldb |_stkseg+~L1+41|(fp),rl2
ldb rl3,|_stkseg+~L1+39|(fp)
andb rl3,#254
ldb |_stkseg+~L1+39|(fp),rl3
ldl rr4,#_stkseg+~L1+36
add r5,fp
ldb rl6,|_stkseg+~L1+8|(fp)
ldb rh6,#0
ld r7,_mmut
callr _loadsd
ldl rr6,|_stkseg+~L1+8|(fp)
ldb rl5,|_stkseg+~L1+14|(fp)
ldb rh5,#0
callr _skbyte
test r2
jpr ne,L10012
ldl rr6,|_stkseg+~L1+8|(fp)
inc r7,#1
ldb rl5,|_stkseg+~L1+14|(fp)
ldb rh5,#0
callr _skbyte
test r2
jpr eq,L139
L10012:
ldl rr6,#L194
jpr L20027
L199:
ldl rr6,#L200
callr _printf
subl rr2,rr2
L20013:
ldl |_stkseg+~L1+24|(fp),rr2
cpl rr2,#16
jpr ult,L20015
ldl rr2,|_stkseg+~L1|(fp)
ld r7,rr2(#34)
callr _zpr
ldl |_stkseg+~L1+42|(fp),rr2
ldl rr6,#L206
ldl rr4,rr2
callr _printf
ldl rr2,|_stkseg+~L1|(fp)
ld r7,rr2(#36)
callr _zpr
ldl |_stkseg+~L1+42|(fp),rr2
ldl rr6,#L207
ldl rr4,rr2
callr _printf
ldl rr2,|_stkseg+~L1|(fp)
ld r7,rr2(#38)
callr _zpr
ldl |_stkseg+~L1+42|(fp),rr2
ldl rr6,#L208
ldl rr4,rr2
jpr L20027
L20015:
ldl rr2,|_stkseg+~L1+24|(fp)
ldk r2,#0
and r3,#7
testl rr2
jpr ne,L204
ldk r7,#10
callr _putchar
L204:
ldl rr2,|_stkseg+~L1+24|(fp)
slal rr2,#1
ldl rr4,|_stkseg+~L1|(fp)
ld r7,rr4(r3)
callr _zpr
ldl |_stkseg+~L1+42|(fp),rr2
ldl rr6,#L205
ldl rr4,|_stkseg+~L1+24|(fp)
callr _printf
ldl rr2,|_stkseg+~L1+24|(fp)
addl rr2,#1
jpr L20013
L210:
ldl rr6,#L211
callr _printf
ldl rr2,|_stkseg+~L1|(fp)
add r3,#34
set @rr2,#0
jpr L20018
L214:
ldl rr6,#L215
callr _printf
ldl rr6,#L216
callr _printf
callr _getchar
cp r2,#89
jpr eq,L220
cp r2,#121
jpr ne,L128
L220:
ldl rr6,|_stkseg+~L1|(fp)
callr _dump
jpr L128
L223:
ldl rr6,#L224
jpr L20019
L226:
ldl rr6,#L227
L20019:
callr _printf
L20018:
ld r7,|_stkseg+~L1+12|(fp)
callr _rvi
ldk r2,#1
L10006:
add fp,#~L2
ret
~L1 := 0
~L2 := 46
} /* _debug */
.psec data
.data

618
WEGA/src/uts/sys/lock.adb Normal file
View File

@ -0,0 +1,618 @@
? 0x000/i
<<%0>>%0000: sub sp,#%001e
<<%0>>%0004: ldm <<%0>>%0012(sp),r8,#6
<<%0>>%000c: ldl rr2,<<%0>>%0024
<<%0>>%0012: ldl |<<%0>>%000c|(sp),rr2
<<%0>>%0016: ldl rr4,#%00000004
<<%0>>%001c: add r5,sp
<<%0>>%001e: ldl rr2,#%00000008
<<%0>>%0024: add r3,sp
<<%0>>%0026: ldl rr6,|<<%0>>%000c|(sp)
<<%0>>%002a: calr _lkfront
<<%0>>%002c: ldl rr12,rr2
<<%0>>%002e: testl rr2
<<%0>>%0030: jp z/eq,<<%0>>%0274
<<%0>>%0036: ldl rr2,|<<%0>>%0008|(sp)
<<%0>>%003a: ldl |<<%0>>%0000|(sp),rr2
<<%0>>%003e: ldl rr4,|<<%0>>%000c|(sp)
<<%0>>%0042: ld r7,rr4(#%0002)
<<%0>>%0046: bit r7,#2
<<%0>>%0048: jr z/eq,_lkdata+%50
<<%0>>%004a: ld r7,#%0080
<<%0>>%004e: jr _lkdata+%52
<<%0>>%0050: sub r7,r7
<<%0>>%0052: ldl rr4,rr12
<<%0>>%0054: ldl rr2,|<<%0>>%0004|(sp)
<<%0>>%0058: calr _locked
<<%0>>%005a: test r2
<<%0>>%005c: jp nz/ne,<<%0>>%0274
<<%0>>%0062: ldl rr2,rr12
<<%0>>%0064: add r3,#%004a
<<%0>>%0068: ldl rr10,rr2
<<%0>>%006a: ldl rr2,|<<%0>>%000c|(sp)
<<%0>>%006e: ld r4,rr2(#%0002)
<<%0>>%0072: bit r4,#0
<<%0>>%0074: jr z/eq,_lkdata+%7a
<<%0>>%0076: sub r4,r4
<<%0>>%0078: jr _lkdata+%7e
<<%0>>%007a: ld r4,#%0100
<<%0>>%007e: ld |<<%0>>%0010|(sp),r4
<<%0>>%0082: jp <<%0>>%0256
<<%0>>%0088: ldl rr2,rr8
<<%0>>%008a: inc r3,#10
<<%0>>%008c: ldl rr4,|<<%0>>%0008|(sp)
<<%0>>%0090: cpl rr4,@rr2
<<%0>>%0092: jp lt,<<%0>>%0260
<<%0>>%0098: ldl rr2,rr8(#%0006)
<<%0>>%009c: cpl rr2,<<%0>>%0020
<<%0>>%00a2: jp nz/ne,<<%0>>%0242
<<%0>>%00a8: ldl rr4,rr8(#%000a)
<<%0>>%00ac: cpl rr4,|<<%0>>%0004|(sp)
<<%0>>%00b0: jr gt,_lkdata+%b6
<<%0>>%00b2: ldk r3,#1
<<%0>>%00b4: jr _lkdata+%b8
<<%0>>%00b6: sub r3,r3
<<%0>>%00b8: ldl rr4,rr8(#%000e)
<<%0>>%00bc: cpl rr4,|<<%0>>%0004|(sp)
<<%0>>%00c0: jr gt,_lkdata+%c6
<<%0>>%00c2: ldk r4,#2
<<%0>>%00c4: jr _lkdata+%c8
<<%0>>%00c6: sub r4,r4
<<%0>>%00c8: add r3,r4
<<%0>>%00ca: ldl rr4,rr8(#%000a)
<<%0>>%00ce: cpl rr4,|<<%0>>%0008|(sp)
<<%0>>%00d2: jr gt,_lkdata+%d8
<<%0>>%00d4: ldk r4,#4
<<%0>>%00d6: jr _lkdata+%da
<<%0>>%00d8: sub r4,r4
<<%0>>%00da: add r3,r4
<<%0>>%00dc: ldl rr4,rr8(#%000e)
<<%0>>%00e0: cpl rr4,|<<%0>>%0008|(sp)
<<%0>>%00e4: jr gt,_lkdata+%ea
<<%0>>%00e6: ldk r4,#8
<<%0>>%00e8: jr _lkdata+%ec
<<%0>>%00ea: sub r4,r4
<<%0>>%00ec: add r3,r4
<<%0>>%00ee: ld r4,rr8(#%0004)
<<%0>>%00f2: and r4,#%0100
<<%0>>%00f6: cp r4,|<<%0>>%0010|(sp)
<<%0>>%00fa: jr nz/ne,<<%0>>%0102
<<%0>>%00fc: ld r4,#%0010
<<%0>>%0100: jr <<%0>>%0104
<<%0>>%0102: sub r4,r4
<<%0>>%0104: add r3,r4
<<%0>>%0106: ld r2,r3
<<%0>>%0108: dec r2,#4
<<%0>>%010a: cp r2,#%001b
<<%0>>%010e: jp ugt,<<%0>>%0256
<<%0>>%0114: rl r2,#2
<<%0>>%0116: ldl rr4,_lockwstr+%2a(r2)
<<%0>>%011c: jp @rr4
<<%0>>%011e: test |<<%0>>%0010|(sp)
<<%0>>%0122: jr z/eq,<<%0>>%0132
<<%0>>%0124: ldl rr4,rr8(#%000a)
<<%0>>%0128: ldl |<<%0>>%0000|(sp),rr4
<<%0>>%012c: jp <<%0>>%0268
<<%0>>%0132: ldl rr2,|<<%0>>%0008|(sp)
<<%0>>%0136: ldl |<<%0>>%0000|(sp),rr2
<<%0>>%013a: ldl rr6,rr10
<<%0>>%013c: ld r5,|<<%0>>%0010|(sp)
<<%0>>%0140: ldl rr2,|<<%0>>%0004|(sp)
<<%0>>%0144: calr _lockadd
<<%0>>%0146: test r2
<<%0>>%0148: jr z/eq,<<%0>>%01e6
<<%0>>%014a: test |<<%0>>%0010|(sp)
<<%0>>%014e: jp nz/ne,<<%0>>%0274
<<%0>>%0154: ldl rr2,rr8(#%000a)
<<%0>>%0158: cpl rr2,|<<%0>>%0004|(sp)
<<%0>>%015c: jr ge,<<%0>>%01d0
<<%0>>%015e: ldl rr2,|<<%0>>%0004|(sp)
<<%0>>%0162: ldl |<<%0>>%0000|(sp),rr2
<<%0>>%0166: ldl rr2,rr8(#%000a)
<<%0>>%016a: ld r5,#%0100
<<%0>>%016e: ldl rr6,rr10
<<%0>>%0170: calr _lockadd
<<%0>>%0172: test r2
<<%0>>%0174: jr z/eq,<<%0>>%01b0
<<%0>>%0176: test |<<%0>>%0010|(sp)
<<%0>>%017a: jr z/eq,<<%0>>%024e
<<%0>>%017c: ldl rr2,rr8(#%000a)
<<%0>>%0180: ldl |<<%0>>%0000|(sp),rr2
<<%0>>%0184: ldl rr6,rr10
<<%0>>%0186: ld r5,|<<%0>>%0010|(sp)
<<%0>>%018a: ldl rr2,|<<%0>>%0004|(sp)
<<%0>>%018e: calr _lockadd
<<%0>>%0190: test r2
<<%0>>%0192: jr nz/ne,<<%0>>%0202
<<%0>>%0194: ldl rr2,<<%0>>%0000
<<%0>>%019a: testl rr2
<<%0>>%019c: jr nz/ne,<<%0>>%01f2
<<%0>>%019e: ldl rr4,@rr8
<<%0>>%01a0: ldl @rr10,rr4
<<%0>>%01a2: ldl rr6,@rr10
<<%0>>%01a4: calr _lockfree
<<%0>>%01a6: ldb <<%0>>%0015,#%23
<<%0>>%01ae: jr <<%0>>%0274
<<%0>>%01b0: ldl rr2,|<<%0>>%0008|(sp)
<<%0>>%01b4: ldl |<<%0>>%0000|(sp),rr2
<<%0>>%01b8: ldl rr6,@rr10
<<%0>>%01ba: sub r5,r5
<<%0>>%01bc: ldl rr2,|<<%0>>%0004|(sp)
<<%0>>%01c0: calr _lockadd
<<%0>>%01c2: test r2
<<%0>>%01c4: jr z/eq,<<%0>>%01e6
<<%0>>%01c6: ldl rr2,@rr8
<<%0>>%01c8: ldl @rr10,rr2
<<%0>>%01ca: ldl rr6,@rr10
<<%0>>%01cc: calr _lockfree
<<%0>>%01ce: jr <<%0>>%0274
<<%0>>%01d0: ldl rr2,|<<%0>>%0008|(sp)
<<%0>>%01d4: ldl |<<%0>>%0000|(sp),rr2
<<%0>>%01d8: ldl rr2,rr8(#%000a)
<<%0>>%01dc: sub r5,r5
<<%0>>%01de: ldl rr6,rr10
<<%0>>%01e0: calr _lockadd
<<%0>>%01e2: test r2
<<%0>>%01e4: jr nz/ne,<<%0>>%0274
<<%0>>%01e6: ldl rr2,rr8
<<%0>>%01e8: inc r3,#10
<<%0>>%01ea: ldl rr4,|<<%0>>%0008|(sp)
<<%0>>%01ee: ldl @rr2,rr4
<<%0>>%01f0: jr <<%0>>%0274
<<%0>>%01f2: ldl rr2,rr8(#%000e)
<<%0>>%01f6: ldl |<<%0>>%0004|(sp),rr2
<<%0>>%01fa: cpl rr2,|<<%0>>%0008|(sp)
<<%0>>%01fe: jr nz/ne,<<%0>>%0256
<<%0>>%0200: jr <<%0>>%0274
<<%0>>%0202: test |<<%0>>%0010|(sp)
<<%0>>%0206: jr z/eq,<<%0>>%0218
<<%0>>%0208: ldl rr2,rr8(#%000e)
<<%0>>%020c: ldl |<<%0>>%0004|(sp),rr2
<<%0>>%0210: cpl rr2,|<<%0>>%0008|(sp)
<<%0>>%0214: jr nz/ne,<<%0>>%0256
<<%0>>%0216: jr <<%0>>%0274
<<%0>>%0218: ldl rr2,rr8(#%000a)
<<%0>>%021c: cpl rr2,|<<%0>>%0004|(sp)
<<%0>>%0220: jr ge,<<%0>>%024e
<<%0>>%0222: ldl rr2,rr8
<<%0>>%0224: inc r3,#14
<<%0>>%0226: ldl rr4,|<<%0>>%0004|(sp)
<<%0>>%022a: ldl @rr2,rr4
<<%0>>%022c: jr <<%0>>%0256
<<%0>>%022e: ldl rr2,rr8
<<%0>>%0230: inc r3,#10
<<%0>>%0232: ldl rr4,|<<%0>>%0004|(sp)
<<%0>>%0236: jr <<%0>>%01ee
<<%0>>%0238: ldl rr2,rr8(#%000e)
<<%0>>%023c: cpl rr2,|<<%0>>%0004|(sp)
<<%0>>%0240: jr z/eq,<<%0>>%0246
<<%0>>%0242: ldl rr10,rr8
<<%0>>%0244: jr <<%0>>%0256
<<%0>>%0246: ldl rr2,rr8(#%000a)
<<%0>>%024a: ldl |<<%0>>%0004|(sp),rr2
<<%0>>%024e: ldl rr2,@rr8
<<%0>>%0250: ldl @rr10,rr2
<<%0>>%0252: ldl rr6,rr8
<<%0>>%0254: calr _lockfree
<<%0>>%0256: ldl rr8,@rr10
<<%0>>%0258: testl rr8
<<%0>>%025a: jp nz/ne,_lkdata+%88
<<%0>>%0260: ldl rr2,|<<%0>>%0008|(sp)
<<%0>>%0264: ldl |<<%0>>%0000|(sp),rr2
<<%0>>%0268: ldl rr6,rr10
<<%0>>%026a: ld r5,|<<%0>>%0010|(sp)
<<%0>>%026e: ldl rr2,|<<%0>>%0004|(sp)
<<%0>>%0272: calr _lockadd
<<%0>>%0274: ldm r8,<<%0>>%0012(sp),#6
<<%0>>%027c: add sp,#%001e
<<%0>>%0280: ret
<<%0>>%0282: sub sp,#%001c
<<%0>>%0286: ldm <<%0>>%0010(sp),r8,#6
<<%0>>%028e: ldl rr2,<<%0>>%0024
<<%0>>%0294: ldl |<<%0>>%000c|(sp),rr2
<<%0>>%0298: ldl rr4,#%00000004
<<%0>>%029e: add r5,sp
<<%0>>%02a0: ldl rr2,#%00000008
<<%0>>%02a6: add r3,sp
<<%0>>%02a8: ldl rr6,|<<%0>>%000c|(sp)
<<%0>>%02ac: calr _lkfront
<<%0>>%02ae: ldl rr12,rr2
<<%0>>%02b0: testl rr2
<<%0>>%02b2: jr z/eq,<<%0>>%0384
<<%0>>%02b4: add r3,#%004a
<<%0>>%02b8: ldl rr10,rr2
<<%0>>%02ba: jr _unlk+%fc
<<%0>>%02bc: ld r2,rr8(#%0004)
<<%0>>%02c0: bit r2,#4
<<%0>>%02c2: jr z/eq,_unlk+%50
<<%0>>%02c4: ldl rr2,rr8
<<%0>>%02c6: inc r3,#4
<<%0>>%02c8: res @rr2,#4
<<%0>>%02ca: ldl rr6,rr8
<<%0>>%02cc: call _lkdata
<<%0>>%02d2: ldl rr2,rr8(#%000a)
<<%0>>%02d6: cpl rr2,|<<%0>>%0004|(sp)
<<%0>>%02da: jr ge,_unlk+%8a
<<%0>>%02dc: ldl rr2,rr8
<<%0>>%02de: inc r3,#14
<<%0>>%02e0: ldl rr4,|<<%0>>%0008|(sp)
<<%0>>%02e4: cpl rr4,@rr2
<<%0>>%02e6: jr ge,_unlk+%8a
<<%0>>%02e8: ldl rr2,rr8(#%000e)
<<%0>>%02ec: ldl |<<%0>>%0000|(sp),rr2
<<%0>>%02f0: ld r5,rr8(#%0004)
<<%0>>%02f4: ldl rr6,rr8
<<%0>>%02f6: ldl rr2,|<<%0>>%0008|(sp)
<<%0>>%02fa: calr _lockadd
<<%0>>%02fc: test r2
<<%0>>%02fe: jr nz/ne,<<%0>>%0384
<<%0>>%0300: ldl rr2,rr8
<<%0>>%0302: inc r3,#14
<<%0>>%0304: ldl rr4,|<<%0>>%0004|(sp)
<<%0>>%0308: ldl @rr2,rr4
<<%0>>%030a: jr <<%0>>%0384
<<%0>>%030c: ldl rr2,rr8
<<%0>>%030e: inc r3,#10
<<%0>>%0310: ldl rr4,|<<%0>>%0004|(sp)
<<%0>>%0314: cpl rr4,@rr2
<<%0>>%0316: jr gt,_unlk+%ae
<<%0>>%0318: ldl rr2,rr8
<<%0>>%031a: inc r3,#14
<<%0>>%031c: ldl rr6,|<<%0>>%0008|(sp)
<<%0>>%0320: cpl rr6,@rr2
<<%0>>%0322: jr ge,_unlk+%ae
<<%0>>%0324: ldl rr2,rr8
<<%0>>%0326: inc r3,#10
<<%0>>%0328: ldl rr0,|<<%0>>%0008|(sp)
<<%0>>%032c: ldl @rr2,rr0
<<%0>>%032e: jr <<%0>>%0384
<<%0>>%0330: ldl rr2,rr8
<<%0>>%0332: inc r3,#14
<<%0>>%0334: ldl rr4,|<<%0>>%0004|(sp)
<<%0>>%0338: ldl @rr2,rr4
<<%0>>%033a: ldl rr10,rr8
<<%0>>%033c: jr _unlk+%fc
<<%0>>%033e: ldl rr2,rr8(#%0006)
<<%0>>%0342: cpl rr2,<<%0>>%0020
<<%0>>%0348: jr nz/ne,_unlk+%b8
<<%0>>%034a: ldl rr2,rr8
<<%0>>%034c: inc r3,#10
<<%0>>%034e: ldl rr4,|<<%0>>%0008|(sp)
<<%0>>%0352: cpl rr4,@rr2
<<%0>>%0354: jr le,<<%0>>%0384
<<%0>>%0356: ldl rr2,rr8(#%000e)
<<%0>>%035a: cpl rr2,|<<%0>>%0004|(sp)
<<%0>>%035e: jr le,_unlk+%b8
<<%0>>%0360: ldl rr2,rr8
<<%0>>%0362: inc r3,#10
<<%0>>%0364: ldl rr4,|<<%0>>%0004|(sp)
<<%0>>%0368: cpl rr4,@rr2
<<%0>>%036a: jr gt,_unlk+%3a
<<%0>>%036c: ldl rr2,rr8(#%000e)
<<%0>>%0370: cpl rr2,|<<%0>>%0008|(sp)
<<%0>>%0374: jr gt,_unlk+%3a
<<%0>>%0376: ldl rr2,@rr8
<<%0>>%0378: ldl @rr10,rr2
<<%0>>%037a: ldl rr6,rr8
<<%0>>%037c: calr _lockfree
<<%0>>%037e: ldl rr8,@rr10
<<%0>>%0380: testl rr8
<<%0>>%0382: jr nz/ne,_unlk+%bc
<<%0>>%0384: ldm r8,<<%0>>%0010(sp),#6
<<%0>>%038c: add sp,#%001c
<<%0>>%0390: ret
<<%0>>%0392: sub sp,#%001e
<<%0>>%0396: ldm <<%0>>%0012(sp),r8,#6
<<%0>>%039e: ld |<<%0>>%000a|(sp),r7
<<%0>>%03a2: ldl rr8,<<%0>>%0022(sp)
<<%0>>%03a8: ldl rr10,rr2
<<%0>>%03aa: ldl rr12,rr4
<<%0>>%03ac: ldl rr2,rr12(#%004a)
<<%0>>%03b0: ldl |<<%0>>%000c|(sp),rr2
<<%0>>%03b4: jr _locked+%a0
<<%0>>%03b6: ldl rr2,|<<%0>>%000c|(sp)
<<%0>>%03ba: ldl rr4,@rr2
<<%0>>%03bc: ldl |<<%0>>%000c|(sp),rr4
<<%0>>%03c0: jr _locked+%a0
<<%0>>%03c2: inc r3,#10
<<%0>>%03c4: cpl rr8,@rr2
<<%0>>%03c6: jr le,_locked+%a8
<<%0>>%03c8: ldl rr2,|<<%0>>%000c|(sp)
<<%0>>%03cc: ldl rr4,rr2(#%0006)
<<%0>>%03d0: cpl rr4,<<%0>>%0020
<<%0>>%03d6: jr z/eq,_locked+%24
<<%0>>%03d8: inc r3,#14
<<%0>>%03da: cpl rr10,@rr2
<<%0>>%03dc: jr ge,_locked+%24
<<%0>>%03de: ldl rr2,|<<%0>>%000c|(sp)
<<%0>>%03e2: inc r3,#4
<<%0>>%03e4: ld r4,|<<%0>>%000a|(sp)
<<%0>>%03e8: and r4,#%0100
<<%0>>%03ec: and r4,@rr2
<<%0>>%03ee: jr nz/ne,_locked+%24
<<%0>>%03f0: bit |<<%0>>%000a|(sp),#7
<<%0>>%03f4: jr z/eq,_locked+%70
<<%0>>%03f6: ldb <<%0>>%0015,#%0d
<<%0>>%03fe: ldk r2,#1
<<%0>>%0400: jr _locked+%aa
<<%0>>%0402: ldl rr6,|<<%0>>%000c|(sp)
<<%0>>%0406: calr _deadlock
<<%0>>%0408: test r2
<<%0>>%040a: jr nz/ne,_locked+%6c
<<%0>>%040c: ldl rr2,|<<%0>>%000c|(sp)
<<%0>>%0410: inc r3,#4
<<%0>>%0412: set @rr2,#4
<<%0>>%0414: ldl rr6,|<<%0>>%000c|(sp)
<<%0>>%0418: ld r5,#%0028
<<%0>>%041c: call _lkdata
<<%0>>%0422: ldl rr2,rr12(#%004a)
<<%0>>%0426: ldl |<<%0>>%000c|(sp),rr2
<<%0>>%042a: testb <<%0>>%0015
<<%0>>%0430: jr nz/ne,_locked+%6c
<<%0>>%0432: ldl rr2,|<<%0>>%000c|(sp)
<<%0>>%0436: testl rr2
<<%0>>%0438: jr nz/ne,_locked+%30
<<%0>>%043a: sub r2,r2
<<%0>>%043c: ldm r8,<<%0>>%0012(sp),#6
<<%0>>%0444: add sp,#%001e
<<%0>>%0448: ret
<<%0>>%044a: sub sp,#%0012
<<%0>>%044e: ldm <<%0>>%000a(sp),r10,#4
<<%0>>%0456: ldl rr12,rr6
<<%0>>%0458: jr _deadlock+%52
<<%0>>%045a: ldl rr2,rr12(#%0006)
<<%0>>%045e: ldl rr4,rr2(#%0016)
<<%0>>%0462: ldl rr10,rr4
<<%0>>%0464: cpl rr4,#%00000000
<<%0>>%046a: jr c/ult,_deadlock+%5c
<<%0>>%046c: ld r3,<<%0>>%0000
<<%0>>%0472: mult rr2,#%0012
<<%0>>%0476: ldl rr4,#%00000000
<<%0>>%047c: add r5,r3
<<%0>>%047e: cpl rr10,rr4
<<%0>>%0480: jr nc/uge,_deadlock+%5c
<<%0>>%0482: ldl rr2,rr10(#%0006)
<<%0>>%0486: cpl rr2,<<%0>>%0020
<<%0>>%048c: jr nz/ne,_deadlock+%50
<<%0>>%048e: ldb <<%0>>%0015,#%23
<<%0>>%0496: ldk r2,#1
<<%0>>%0498: jr _deadlock+%5e
<<%0>>%049a: ldl rr12,rr10
<<%0>>%049c: ldl rr2,rr12(#%0006)
<<%0>>%04a0: cpb @rr2,#%01
<<%0>>%04a4: jr z/eq,_deadlock+%10
<<%0>>%04a6: sub r2,r2
<<%0>>%04a8: ldm r10,<<%0>>%000a(sp),#4
<<%0>>%04b0: add sp,#%0012
<<%0>>%04b4: ret
<<%0>>%04b6: sub sp,#%001c
<<%0>>%04ba: ldm <<%0>>%0010(sp),r8,#6
<<%0>>%04c2: ldl rr12,rr6
<<%0>>%04c4: ldl rr2,rr12(#%004a)
<<%0>>%04c8: testl rr2
<<%0>>%04ca: jr z/eq,_unlock+%82
<<%0>>%04cc: ldl rr2,rr6
<<%0>>%04ce: add r3,#%004a
<<%0>>%04d2: ldl rr8,rr2
<<%0>>%04d4: clr |<<%0>>%000e|(sp)
<<%0>>%04d8: clr |<<%0>>%000c|(sp)
<<%0>>%04dc: ld r2,|<<%0>>%000c|(sp)
<<%0>>%04e0: sla r2,#2
<<%0>>%04e4: ldl rr4,<<%0>>%0068(r2)
<<%0>>%04ea: testl rr4
<<%0>>%04ec: jr z/eq,_unlock+%50
<<%0>>%04ee: ld r2,|<<%0>>%000c|(sp)
<<%0>>%04f2: sla r2,#2
<<%0>>%04f6: ldl rr4,<<%0>>%0068(r2)
<<%0>>%04fc: inc r5,#2
<<%0>>%04fe: cpl rr12,@rr4
<<%0>>%0500: jr nz/ne,_unlock+%50
<<%0>>%0502: inc |<<%0>>%000e|(sp)
<<%0>>%0506: inc |<<%0>>%000c|(sp)
<<%0>>%050a: cp |<<%0>>%000c|(sp),#%0014
<<%0>>%0510: jr lt,_unlock+%26
<<%0>>%0512: test |<<%0>>%000e|(sp)
<<%0>>%0516: jr z/eq,_unlock+%7c
<<%0>>%0518: jr _unlock+%82
<<%0>>%051a: ldl rr2,@rr10
<<%0>>%051c: ldl @rr8,rr2
<<%0>>%051e: ldl rr6,rr10
<<%0>>%0520: calr _lockfree
<<%0>>%0522: jr _unlock+%7c
<<%0>>%0524: ldl rr2,rr10(#%0006)
<<%0>>%0528: cpl rr2,<<%0>>%0020
<<%0>>%052e: jr z/eq,_unlock+%64
<<%0>>%0530: ldl rr8,rr10
<<%0>>%0532: ldl rr10,@rr8
<<%0>>%0534: testl rr10
<<%0>>%0536: jr nz/ne,_unlock+%6e
<<%0>>%0538: ldm r8,<<%0>>%0010(sp),#6
<<%0>>%0540: add sp,#%001c
<<%0>>%0544: ret
<<%0>>%0546: dec sp,#12
<<%0>>%0548: ldm <<%0>>%0004(sp),r10,#4
<<%0>>%0550: ldl rr12,#%00000000
<<%0>>%0556: ldl rr2,rr12(#%0006)
<<%0>>%055a: testl rr2
<<%0>>%055c: jr nz/ne,_lockalloc+%4a
<<%0>>%055e: ldl rr2,rr12
<<%0>>%0560: inc r3,#6
<<%0>>%0562: ldl rr4,#%00000000
<<%0>>%0568: ldl @rr2,rr4
<<%0>>%056a: ldl rr10,#%00000012
<<%0>>%0570: jr _lockalloc+%34
<<%0>>%0572: ldl rr6,rr10
<<%0>>%0574: calr _lockfree
<<%0>>%0576: add r11,#%0012
<<%0>>%057a: ld r3,<<%0>>%0000
<<%0>>%0580: mult rr2,#%0012
<<%0>>%0584: ldl rr4,#%00000000
<<%0>>%058a: add r5,r3
<<%0>>%058c: cpl rr10,rr4
<<%0>>%058e: jr c/ult,_lockalloc+%2c
<<%0>>%0590: ldl rr10,@rr12
<<%0>>%0592: testl rr10
<<%0>>%0594: jr nz/ne,_lockalloc+%5c
<<%0>>%0596: ldb <<%0>>%0015,#%23
<<%0>>%059e: subl rr2,rr2
<<%0>>%05a0: jr _lockalloc+%66
<<%0>>%05a2: ldl rr2,@rr10
<<%0>>%05a4: ldl @rr12,rr2
<<%0>>%05a6: subl rr2,rr2
<<%0>>%05a8: ldl @rr10,rr2
<<%0>>%05aa: ldl rr2,rr10
<<%0>>%05ac: ldm r10,<<%0>>%0004(sp),#4
<<%0>>%05b4: inc sp,#12
<<%0>>%05b6: ret
<<%0>>%05b8: dec sp,#12
<<%0>>%05ba: ldm <<%0>>%0004(sp),r10,#4
<<%0>>%05c2: ldl rr12,rr6
<<%0>>%05c4: ldl rr10,#%00000000
<<%0>>%05ca: ld r2,rr12(#%0004)
<<%0>>%05ce: bit r2,#4
<<%0>>%05d0: jr z/eq,_lockfree+%28
<<%0>>%05d2: ldl rr2,rr6
<<%0>>%05d4: inc r3,#4
<<%0>>%05d6: res @rr2,#4
<<%0>>%05d8: ldl rr6,rr12
<<%0>>%05da: call _lkdata
<<%0>>%05e0: ldl rr2,@rr10
<<%0>>%05e2: ldl @rr12,rr2
<<%0>>%05e4: ldl @rr10,rr12
<<%0>>%05e6: ldm r10,<<%0>>%0004(sp),#4
<<%0>>%05ee: inc sp,#12
<<%0>>%05f0: ret
<<%0>>%05f2: sub sp,#%001e
<<%0>>%05f6: ldm <<%0>>%0012(sp),r8,#6
<<%0>>%05fe: ldl rr8,rr2
<<%0>>%0600: ld r11,r5
<<%0>>%0602: ldl rr12,rr6
<<%0>>%0604: calr _lockalloc
<<%0>>%0606: ldl |<<%0>>%000c|(sp),rr2
<<%0>>%060a: testl rr2
<<%0>>%060c: jr nz/ne,_lockadd+%28
<<%0>>%060e: ldb <<%0>>%0015,#%23
<<%0>>%0616: ldk r2,#1
<<%0>>%0618: jr _lockadd+%64
<<%0>>%061a: ldl rr2,|<<%0>>%000c|(sp)
<<%0>>%061e: ldl rr4,@rr12
<<%0>>%0620: ldl @rr2,rr4
<<%0>>%0622: ldl rr4,|<<%0>>%000c|(sp)
<<%0>>%0626: ldl @rr12,rr4
<<%0>>%0628: ldl rr2,|<<%0>>%000c|(sp)
<<%0>>%062c: inc r3,#6
<<%0>>%062e: ldl rr4,<<%0>>%0020
<<%0>>%0634: ldl @rr2,rr4
<<%0>>%0636: ldl rr2,|<<%0>>%000c|(sp)
<<%0>>%063a: inc r3,#10
<<%0>>%063c: ldl @rr2,rr8
<<%0>>%063e: ldl rr2,|<<%0>>%000c|(sp)
<<%0>>%0642: inc r3,#14
<<%0>>%0644: ldl rr4,<<%0>>%0022(sp)
<<%0>>%064a: ldl @rr2,rr4
<<%0>>%064c: ldl rr2,|<<%0>>%000c|(sp)
<<%0>>%0650: inc r3,#4
<<%0>>%0652: ld @rr2,r11
<<%0>>%0654: sub r2,r2
<<%0>>%0656: ldm r8,<<%0>>%0012(sp),#6
<<%0>>%065e: add sp,#%001e
<<%0>>%0662: ret
<<%0>>%0664: sub sp,#%0030
<<%0>>%0668: ldm <<%0>>%0024(sp),r8,#6
<<%0>>%0670: ldl rr8,rr2
<<%0>>%0672: ldl rr10,rr4
<<%0>>%0674: ldl rr12,rr6
<<%0>>%0676: ld r7,@rr12
<<%0>>%0678: call _lkdata
<<%0>>%067e: ldl |<<%0>>%0016|(sp),rr2
<<%0>>%0682: testl rr2
<<%0>>%0684: jr nz/ne,_lkfront+%60
<<%0>>%0686: jr _lkfront+%c2
<<%0>>%0688: ldl rr6,#%0100009a
<<%0>>%068e: call _lkdata
<<%0>>%0694: jr _lkfront+%c2
<<%0>>%0696: ldl rr6,|<<%0>>%001a|(sp)
<<%0>>%069a: ld r5,#%0080
<<%0>>%069e: call _lkdata
<<%0>>%06a4: test r2
<<%0>>%06a6: jr z/eq,_lkfront+%80
<<%0>>%06a8: ldb <<%0>>%0015,#%0d
<<%0>>%06b0: jr _lkfront+%c2
<<%0>>%06b2: ld r4,rr2(#%0006)
<<%0>>%06b6: bit r4,#12
<<%0>>%06b8: jr z/eq,_lkfront+%44
<<%0>>%06ba: ldb <<%0>>%0015,#%1d
<<%0>>%06c2: jr _lkfront+%c2
<<%0>>%06c4: ldl rr2,|<<%0>>%0016|(sp)
<<%0>>%06c8: ldl rr4,rr2(#%0002)
<<%0>>%06cc: ldl |<<%0>>%001a|(sp),rr4
<<%0>>%06d0: testl rr4
<<%0>>%06d2: jr z/eq,_lkfront+%24
<<%0>>%06d4: ldl rr2,|<<%0>>%0016|(sp)
<<%0>>%06d8: ldb rl4,@rr2
<<%0>>%06da: extsb r4
<<%0>>%06dc: and r4,#%0002
<<%0>>%06e0: test r4
<<%0>>%06e2: jr z/eq,_lkfront+%32
<<%0>>%06e4: ld |<<%0>>%001e|(sp),#%7000
<<%0>>%06ea: ldl rr2,|<<%0>>%001a|(sp)
<<%0>>%06ee: ld r4,rr2(#%0006)
<<%0>>%06f2: and r4,#%f000
<<%0>>%06f6: and r4,|<<%0>>%001e|(sp)
<<%0>>%06fa: jr nz/ne,_lkfront+%4e
<<%0>>%06fc: ldl rr6,rr12(#%0004)
<<%0>>%0700: ldl rr4,#%0000000c
<<%0>>%0706: add r5,sp
<<%0>>%0708: ldk r3,#10
<<%0>>%070a: call _lkdata
<<%0>>%0710: test r2
<<%0>>%0712: jr z/eq,_lkfront+%c6
<<%0>>%0714: ldb <<%0>>%0015,#%0e
<<%0>>%071c: jr _lkfront+%c2
<<%0>>%071e: ldb <<%0>>%0015,#%16
<<%0>>%0726: subl rr2,rr2
<<%0>>%0728: jr <<%0>>%07ae
<<%0>>%072a: ld r2,rr12(#%0002)
<<%0>>%072e: cp r2,#%0000
<<%0>>%0732: jr lt,_lkfront+%ba
<<%0>>%0734: cp r2,#%0007
<<%0>>%0738: jr gt,_lkfront+%ba
<<%0>>%073a: bit r2,#1
<<%0>>%073c: jr z/eq,<<%0>>%0770
<<%0>>%073e: cp |<<%0>>%0014|(sp),#%0001
<<%0>>%0744: jr nz/ne,_lkfront+%ec
<<%0>>%0746: ldl rr2,|<<%0>>%0016|(sp)
<<%0>>%074a: ldl rr4,rr2(#%0006)
<<%0>>%074e: jr _lkfront+%fc
<<%0>>%0750: cp |<<%0>>%0014|(sp),#%0002
<<%0>>%0756: jr nz/ne,<<%0>>%0768
<<%0>>%0758: ldl rr2,|<<%0>>%001a|(sp)
<<%0>>%075c: ldl rr4,rr2(#%000e)
<<%0>>%0760: addl rr4,|<<%0>>%0010|(sp)
<<%0>>%0764: ldl |<<%0>>%0010|(sp),rr4
<<%0>>%0768: ldl rr2,|<<%0>>%0010|(sp)
<<%0>>%076c: ldl @rr10,rr2
<<%0>>%076e: jr <<%0>>%077a
<<%0>>%0770: ldl rr2,|<<%0>>%0016|(sp)
<<%0>>%0774: ldl rr4,rr2(#%0006)
<<%0>>%0778: ldl @rr10,rr4
<<%0>>%077a: ldl rr2,@rr10
<<%0>>%077c: cpl rr2,#%00000000
<<%0>>%0782: jr lt,_lkfront+%ba
<<%0>>%0784: ldl rr2,|<<%0>>%000c|(sp)
<<%0>>%0788: testl rr2
<<%0>>%078a: jr z/eq,<<%0>>%0794
<<%0>>%078c: ldl rr2,@rr10
<<%0>>%078e: addl rr2,|<<%0>>%000c|(sp)
<<%0>>%0792: jr <<%0>>%079a
<<%0>>%0794: ldl rr2,#%40000000
<<%0>>%079a: ldl @rr8,rr2
<<%0>>%079c: ldl rr2,@rr10
<<%0>>%079e: cpl rr2,@rr8
<<%0>>%07a0: jr ge,_lkfront+%ba
<<%0>>%07a2: ldl rr2,@rr10
<<%0>>%07a4: ldl <<%0>>%0028,rr2
<<%0>>%07aa: ldl rr2,|<<%0>>%001a|(sp)
<<%0>>%07ae: ldm r8,<<%0>>%0024(sp),#6
<<%0>>%07b6: add sp,#%0030
<<%0>>%07ba: ret

658
WEGA/src/uts/sys/lock.asm Normal file
View File

@ -0,0 +1,658 @@
fp := fp
_lkdata::
! U _stkseg !
! U _u !
! U _locklist !
{
0000 030f0014 sub fp,#%001e
0004 5cf9080580000012 ldm <<%0>>%0012(fp),r8,#6
000c 540280000024 ldl rr2,<<%0>>%0024
0012 5df2000c ldl |<<%0>>%0c|(fp),rr2
0016 140400000004 ldl rr4,#%00000004
001c 81f5 add r5,fp
001e 140200000008 ldl rr2,#%00000008
0024 81f3 add r3,fp
0026 54f6000c ldl rr6,|<<%0>>%0c|(fp)
002a dce4 calr _lkfront
002c 942c ldl rr12,rr2
002e 9c28 testl rr2
0030 5e0680000274 jp z,<<%0>>%0274
0036 54f20008 ldl rr2,|<<%0>>%08|(fp)
003a 5df20000 ldl |<<%0>>%00|(fp),rr2
003e 54f4000c ldl rr4,|<<%0>>%0c|(fp)
0042 31470002 ld r7,rr4(#%0002)
0046 a772 bit r7,#2
0048 e603 jr z,%0050
004a 21070080 ld r7,#%0080
004e e801 jr %0052
0050 8377 sub r7,r7
0052 94c4 ldl rr4,rr12
0054 54f20004 ldl rr2,|<<%0>>%04|(fp)
0058 de64 calr _locked
005a 8d24 test r2
005c 5e0e80000274 jp nz,<<%0>>%0274
0062 94c2 ldl rr2,rr12
0064 0103004a add r3,#%004a
0068 942a ldl rr10,rr2
006a 54f2000c ldl rr2,|<<%0>>%0c|(fp)
006e 31240002 ld r4,rr2(#%0002)
0072 a740 bit r4,#0
0074 e602 jr z,%007a
0076 8344 sub r4,r4
0078 e802 jr %007e
007a 21040100 ld r4,#%0100
007e 6ff40010 ld |<<%0>>%10|(fp),r4
0082 5e0880000256 jp <<%0>>%0256
0088 9482 ldl rr2,rr8
008a a939 inc r3,#10
008c 54f40008 ldl rr4,|<<%0>>%08|(fp)
0090 1024 cpl rr4,@rr2
0092 5e0180000260 jp lt,<<%0>>%0260
0098 35820006 ldl rr2,rr8(#%0006)
009c 500280000020 cpl rr2,<<%0>>%0020
00a2 5e0e80000242 jp nz,<<%0>>%0242
00a8 3584000a ldl rr4,rr8(#%000a)
00ac 50f40004 cpl rr4,|<<%0>>%04|(fp)
00b0 ea02 jr gt,%00b6
00b2 bd31 ldk r3,#1
00b4 e801 jr %00b8
00b6 8333 sub r3,r3
00b8 3584000e ldl rr4,rr8(#%000e)
00bc 50f40004 cpl rr4,|<<%0>>%04|(fp)
00c0 ea02 jr gt,%00c6
00c2 bd42 ldk r4,#2
00c4 e801 jr %00c8
00c6 8344 sub r4,r4
00c8 8143 add r3,r4
00ca 3584000a ldl rr4,rr8(#%000a)
00ce 50f40008 cpl rr4,|<<%0>>%08|(fp)
00d2 ea02 jr gt,%00d8
00d4 bd44 ldk r4,#4
00d6 e801 jr %00da
00d8 8344 sub r4,r4
00da 8143 add r3,r4
00dc 3584000e ldl rr4,rr8(#%000e)
00e0 50f40008 cpl rr4,|<<%0>>%08|(fp)
00e4 ea02 jr gt,%00ea
00e6 bd48 ldk r4,#8
00e8 e801 jr %00ec
00ea 8344 sub r4,r4
00ec 8143 add r3,r4
00ee 31840004 ld r4,rr8(#%0004)
00f2 07040100 and r4,#%0100
00f6 4bf40010 cp r4,|<<%0>>%10|(fp)
00fa ee03 jr nz,%0102
00fc 21040010 ld r4,#%0010
0100 e801 jr %0104
0102 8344 sub r4,r4
0104 8143 add r3,r4
0106 a132 ld r2,r3
0108 ab23 dec r2,#4
010a 0b02001b cp r2,#%001b
010e 5e0b80000256 jp ugt,<<%0>>%0256
0114 b322 rl r2,#2
0116 54248100002a ldl rr4,<<%1>>%002a(r2) ! ldl rr4,_lockwstr+%2a(r2) !
011c 1e48 jp @rr4
011e 4df40010 test |<<%0>>%10|(fp)
0122 e607 jr z,%0132
0124 3584000a ldl rr4,rr8(#%000a)
0128 5df40000 ldl |<<%0>>%00|(fp),rr4
012c 5e0880000268 jp <<%0>>%0268
0132 54f20008 ldl rr2,|<<%0>>%08|(fp)
0136 5df20000 ldl |<<%0>>%00|(fp),rr2
013a 94a6 ldl rr6,rr10
013c 61f50010 ld r5,|<<%0>>%10|(fp)
0140 54f20004 ldl rr2,|<<%0>>%04|(fp)
0144 ddaa calr _lockadd
0146 8d24 test r2
0148 e64e jr z,%01e6
014a 4df40010 test |<<%0>>%10|(fp)
014e 5e0e80000274 jp nz,<<%0>>%0274
0154 3582000a ldl rr2,rr8(#%000a)
0158 50f20004 cpl rr2,|<<%0>>%04|(fp)
015c e939 jr ge,%01d0
015e 54f20004 ldl rr2,|<<%0>>%04|(fp)
0162 5df20000 ldl |<<%0>>%00|(fp),rr2
0166 3582000a ldl rr2,rr8(#%000a)
016a 21050100 ld r5,#%0100
016e 94a6 ldl rr6,rr10
0170 ddc0 calr _lockadd
0172 8d24 test r2
0174 e61d jr z,%01b0
0176 4df40010 test |<<%0>>%10|(fp)
017a e669 jr z,%024e
017c 3582000a ldl rr2,rr8(#%000a)
0180 5df20000 ldl |<<%0>>%00|(fp),rr2
0184 94a6 ldl rr6,rr10
0186 61f50010 ld r5,|<<%0>>%10|(fp)
018a 54f20004 ldl rr2,|<<%0>>%04|(fp)
018e ddcf calr _lockadd
0190 8d24 test r2
0192 ee37 jr nz,%0202
0194 540280000000 ldl rr2,<<%0>>%0000
019a 9c28 testl rr2
019c ee2a jr nz,%01f2
019e 1484 ldl rr4,@rr8
01a0 1da4 ldl @rr10,rr4
01a2 14a6 ldl rr6,@rr10
01a4 ddf7 calr _lockfree
01a6 4c05800000152323 ldb <<%0>>%0015,#%15
01ae e862 jr %0274
01b0 54f20008 ldl rr2,|<<%0>>%08|(fp)
01b4 5df20000 ldl |<<%0>>%00|(fp),rr2
01b8 14a6 ldl rr6,@rr10
01ba 8355 sub r5,r5
01bc 54f20004 ldl rr2,|<<%0>>%04|(fp)
01c0 dde8 calr _lockadd
01c2 8d24 test r2
01c4 e610 jr z,%01e6
01c6 1482 ldl rr2,@rr8
01c8 1da2 ldl @rr10,rr2
01ca 14a6 ldl rr6,@rr10
01cc de0b calr _lockfree
01ce e852 jr %0274
01d0 54f20008 ldl rr2,|<<%0>>%08|(fp)
01d4 5df20000 ldl |<<%0>>%00|(fp),rr2
01d8 3582000a ldl rr2,rr8(#%000a)
01dc 8355 sub r5,r5
01de 94a6 ldl rr6,rr10
01e0 ddf8 calr _lockadd
01e2 8d24 test r2
01e4 ee47 jr nz,%0274
01e6 9482 ldl rr2,rr8
01e8 a939 inc r3,#10
01ea 54f40008 ldl rr4,|<<%0>>%08|(fp)
01ee 1d24 ldl @rr2,rr4
01f0 e841 jr %0274
01f2 3582000e ldl rr2,rr8(#%000e)
01f6 5df20004 ldl |<<%0>>%04|(fp),rr2
01fa 50f20008 cpl rr2,|<<%0>>%08|(fp)
01fe ee2b jr nz,%0256
0200 e839 jr %0274
0202 4df40010 test |<<%0>>%10|(fp)
0206 e608 jr z,%0218
0208 3582000e ldl rr2,rr8(#%000e)
020c 5df20004 ldl |<<%0>>%04|(fp),rr2
0210 50f20008 cpl rr2,|<<%0>>%08|(fp)
0214 ee20 jr nz,%0256
0216 e82e jr %0274
0218 3582000a ldl rr2,rr8(#%000a)
021c 50f20004 cpl rr2,|<<%0>>%04|(fp)
0220 e916 jr ge,%024e
0222 9482 ldl rr2,rr8
0224 a93d inc r3,#14
0226 54f40004 ldl rr4,|<<%0>>%04|(fp)
022a 1d24 ldl @rr2,rr4
022c e814 jr %0256
022e 9482 ldl rr2,rr8
0230 a939 inc r3,#10
0232 54f40004 ldl rr4,|<<%0>>%04|(fp)
0236 e8db jr %01ee
0238 3582000e ldl rr2,rr8(#%000e)
023c 50f20004 cpl rr2,|<<%0>>%04|(fp)
0240 e602 jr z,%0246
0242 948a ldl rr10,rr8
0244 e808 jr %0256
0246 3582000a ldl rr2,rr8(#%000a)
024a 5df20004 ldl |<<%0>>%04|(fp),rr2
024e 1482 ldl rr2,@rr8
0250 1da2 ldl @rr10,rr2
0252 9486 ldl rr6,rr8
0254 de4f calr _lockfree
0256 14a8 ldl rr8,@rr10
0258 9c88 testl rr8
025a 5e0e80000088 jp nz,<<%0>>%0088
0260 54f20008 ldl rr2,|<<%0>>%08|(fp)
0264 5df20000 ldl |<<%0>>%00|(fp),rr2
0268 94a6 ldl rr6,rr10
026a 61f50010 ld r5,|<<%0>>%10|(fp)
026e 54f20004 ldl rr2,|<<%0>>%04|(fp)
0272 de41 calr _lockadd
0274 5cf1080580000012 ldm r8,<<%0>>%0012(fp),#6
027c 010f001e add fp,#%001e
0280 9e08 ret
}
_unlk::
{
0282 030f001c sub fp,#%001c
0286 5cf9080580000010 ldm <<%0>>%0010(fp),r8,#6
028e 540280000024 ldl rr2,<<%0>>%0024
0294 5df2000c ldl |<<%0>>%0c|(fp),rr2
0298 140400000004 ldl rr4,#%00000004
029e 81f5 add r5,fp
02a0 140200000008 ldl rr2,#%00000008
02a6 81f3 add r3,fp
02a8 54f6000c ldl rr6,|<<%0>>%0c|(fp)
02ac de25 calr _lkfront
02ae 942c ldl rr12,rr2
02b0 9c28 testl rr2
02b2 e668 jr z,%0384
02b4 0103004a add r3,#%004a
02b8 942a ldl rr10,rr2
02ba e861 jr %037e
02bc 31820004 ld r2,rr8(#%0004)
02c0 a724 bit r2,#4
02c2 e607 jr z,%02d2
02c4 9482 ldl rr2,rr8
02c6 a933 inc r3,#4
02c8 2324 res @rr4,#4
02ca 9486 ldl rr6,rr8
02cc 5f0080000000 call _lkdata ! beachte lock.nm - ?????????????????????????? _wakeup?!
02d2 3582000a ldl rr2,rr8(#%000a)
02d6 50f20004 cpl rr2,|<<%0>>%04|(fp)
02da e918 jr ge,%030c
02dc 9482 ldl rr2,rr8
02de a93d inc r3,#14
02e0 54f40008 ldl rr4,|<<%0>>%08|(fp)
02e4 1024 cpl rr4,@rr2
02e6 e912 jr ge,%030c
02e8 3582000e ldl rr2,rr8(#%000e)
02ec 5df20000 ldl |<<%0>>%00|(fp),rr2
02f0 31850004 ld r5,rr8(#%0004)
02f4 9486 ldl rr6,rr8
02f6 54f20008 ldl rr2,|<<%0>>%08|(fp)
02fa de85 calr _lockadd
02fc 8d24 test r2
02fe ee42 jr nz,%0384
0300 9482 ldl rr2,rr8
0302 a93d inc r3,#14
0304 54f40004 ldl rr4,|<<%0>>%04|(fp)
0308 1d24 ldl @rr2,rr4
030a e83c jr %0384
030c 9482 ldl rr2,rr8
030e a939 inc r3,#10
0310 54f40004 ldl rr4,|<<%0>>%04|(fp)
0314 1024 cpl rr4,@rr2
0316 ea0c jr gt,%0330
0318 9482 ldl rr2,rr8
031a a93d inc r3,#14
031c 54f60008 ldl rr6,|<<%0>>%08|(fp)
0320 1026 cpl rr6,@rr2
0322 e906 jr ge,%0330
0324 9482 ldl rr2,rr8
0326 a939 inc r3,#10
0328 54f00008 ldl rr0,|<<%0>>%08|(fp)
032c 1d20 ldl @rr2,rr0
032e e82a jr %0384
0330 9482 ldl rr2,rr8
0332 a93d inc r3,#14
0334 54f40004 ldl rr4,|<<%0>>%04|(fp)
0338 1d24 ldl @rr2,rr4
033a 948a ldl rr10,rr8
033c e820 jr %037e
033e 35820006 ldl rr2,rr8(#%0006)
0342 500280000020 cpl rr2,<<%0>>%0020
0348 eef8 jr nz,%033a
034a 9482 ldl rr2,rr8
034c a939 inc r3,#10
034e 54f40008 ldl rr4,|<<%0>>%08|(fp)
0352 1024 cpl rr4,@rr2
0354 e217 jr le,%0384
0356 3582000e ldl rr2,rr8(#%000e)
035a 50f20004 cpl rr2,|<<%0>>%04|(fp)
035e e2ed jr le,%033a
0360 9482 ldl rr2,rr8
0362 a939 inc r3,#10
0364 54f40004 ldl rr4,|<<%0>>%04|(fp)
0368 1024 cpl rr4,@rr2
036a eaa8 jr gt,%02bc
036c 3582000e ldl rr2,rr8(#%000e)
0370 50f20008 cpl rr2,|<<%0>>%08|(fp)
0374 eaa3 jr gt,%02bc
0376 1482 ldl rr2,@rr8
0378 1da2 ldl @rr10,rr2
037a 9486 ldl rr6,rr8
037c dee3 calr _lockfree
037e 14a8 ldl rr8,@rr10
0380 9c88 testl rr8
0382 eedd jr nz,%033e
0384 5cf1080580000010 ldm r8,<<%0>>%0010(fp),#6
038c 010f001c add fp,#%001c
0390 9e08 ret
}
_locked::
{
0392 030f001e sub fp,#%001e
0396 5cf9080580000012 ldm <<%0>>%0012(fp),r8,#6
039e 6ff7000a ld |<<%0>>%0a|(fp),r7
03a2 54f880000022 ldl rr8,<<%0>>%0022(fp)
03a8 942a ldl rr10,rr2
03aa 944c ldl rr12,rr4
03ac 35c2004a ldl rr2,rr12(#%004a)
03b0 5df2000c ldl |<<%0>>%0c|(fp),rr2
03b4 e83e jr %0432
03b6 54f2000c ldl rr2,|<<%0>>%0c|(fp)
03ba 1424 ldl rr4,@rr2
03bc 5df4000c ldl |<<%0>>%0c|(fp),rr4
03c0 e838 jr %0432
03c2 a939 inc r3,#10
03c4 1028 cpl rr8,@rr2
03c6 e239 jr le,%043a
03c8 54f2000c ldl rr2,|<<%0>>%0c|(fp)
03cc 35240006 ldl rr4,rr2(#%0006)
03d0 500480000020 cpl rr4,<<%0>>%0020
03d6 e6ef jr z,%03b6
03d8 a93d inc r3,#14
03da 102a cpl rr10,@rr2
03dc e9ec jr ge,%03b6
03de 54f2000c ldl rr2,|<<%0>>%0c|(fp)
03e2 a933 inc r3,#4
03e4 61f4000a ld r4,|<<%0>>%0a|(fp)
03e8 07040100 and r4,#%0100
03ec 0724 and r4,@rr2
03ee eee3 jr nz,%03b6
03f0 67f7000a bit |<<%0>>%0a|(fp),#7
03f4 e606 jr z,%0402
03f6 4c05800000150d0d ldb <<%0>>%0015,#%15
03fe bd21 ldk r2,#1
0400 e81d jr %043c
0402 54f6000c ldl rr6,|<<%0>>%0c|(fp)
0406 dfdf calr _deadlock
0408 8d24 test r2
040a eef9 jr nz,%03fe
040c 54f2000c ldl rr2,|<<%0>>%0c|(fp)
0410 a933 inc r3,#4
0412 2524 set @rr4,#4
0414 54f6000c ldl rr6,|<<%0>>%0c|(fp)
0418 21050028 ld r5,#%0028
041c 5f0080000000 call _lkdata ! beachte lock.nm - ?????????????????????????? _sleep?!
0422 35c2004a ldl rr2,rr12(#%004a)
0426 5df2000c ldl |<<%0>>%0c|(fp),rr2
042a 4c0480000015 testb <<%0>>%0015
0430 eee6 jr nz,%03fe
0432 54f2000c ldl rr2,|<<%0>>%0c|(fp)
0436 9c28 testl rr2
0438 eec4 jr nz,%03c2
043a 8322 sub r2,r2
043c 5cf1080580000012 ldm r8,<<%0>>%0012(fp),#6
0444 010f001e add fp,#%001e
0448 9e08 ret
}
_deadlock::
! U _Nflock!
{
044a 030f0012 sub fp,#%0012
044e 5cf90a038000000a ldm <<%0>>%000a(fp),r10,#4
0456 946c ldl rr12,rr6
0458 e821 jr %049c
045a 35c20006 ldl rr2,rr12(#%0006)
045e 35240016 ldl rr4,rr2(#%0016)
0462 944a ldl rr10,rr4
0464 100400000000 cpl rr4,#%00000000
046a e71d jr c,%04a6
046c 610380000000 ld r3,<<%0>>%0000
0472 19020012 mult rr2,#%0012
0476 140400000000 ldl rr4,#%00000000
047c 8135 add r5,r3
047e 904a cpl rr10,rr4
0480 ef12 jr nc,%04a6
0482 35a20006 ldl rr2,rr10(#%0006)
0486 500280000020 cpl rr2,<<%0>>%0020
048c ee06 jr nz,%049a
048e 4c05800000152323 ldb <<%0>>%0015,#%15
0496 bd21 ldk r2,#1
0498 e807 jr %04a8
049a 94ac ldl rr12,rr10
049c 35c20006 ldl rr2,rr12(#%0006)
04a0 0c210101 cpb @rr2,#%01
04a4 e6da jr z,%045a
04a6 8322 sub r2,r2
04a8 5cf10a038000000a ldm r10,<<%0>>%000a(fp),#4
04b0 010f0012 add fp,#%0012
04b4 9e08 ret
}
_unlock::
{
04b6 030f001c sub fp,#%001c
04ba 5cf9080580000010 ldm <<%0>>%0010(fp),r8,#6
04c2 946c ldl rr12,rr6
04c4 35c2004a ldl rr2,rr12(#%004a)
04c8 9c28 testl rr2
04ca e636 jr z,%0538
04cc 9462 ldl rr2,rr6
04ce 0103004a add r3,#%004a
04d2 9428 ldl rr8,rr2
04d4 4df8000e clr |<<%0>>%0e|(fp)
04d8 4df8000c clr |<<%0>>%0c|(fp)
04dc 61f2000c ld r2,|<<%0>>%0c|(fp)
04e0 b3290002 sla r2,#2
04e4 542480000068 ldl rr4,<<%0>>%0068(r2)
04ea 9c48 testl rr4
04ec e60c jr z,%0506
04ee 61f2000c ld r2,|<<%0>>%0c|(fp)
04f2 b3290002 sla r2,#2
04f6 542480000068 ldl rr4,<<%0>>%0068(r2)
04fc a951 inc r5,#2
04fe 104c cpl rr12,@rr4
0500 ee02 jr nz,%0506
0502 69f0000e inc |<<%0>>%0e|(fp),#1
0506 69f0000c inc |<<%0>>%0c|(fp),#1
050a 4df1000c0014 cp |<<%0>>%0c|(fp),#%0014
0510 e1e5 jr lt,%04dc
0512 4df4000e test |<<%0>>%0e|(fp)
0516 e60d jr z,%0532
0518 e80f jr %0538
051a 14a2 ldl rr2,@rr10
051c 1d82 ldl @rr8,rr2
051e 94a6 ldl rr6,rr10
0520 dfb5 calr _lockfree
0522 e807 jr %0532
0524 35a20006 ldl rr2,rr10(#%0006)
0528 500280000020 cpl rr2,<<%0>>%0020
052e e6f5 jr z,%051a
0530 94a8 ldl rr8,rr10
0532 148a ldl rr10,@rr8
0534 9ca8 testl rr10
0536 eef6 jr nz,%0524
0538 5cf1080580000010 ldm r8,<<%0>>%0010(fp),#6
0540 010f001c add fp,#%001c
0544 9e08 ret
}
_lockalloc::
{
0546 abfb dec fp,#12
0548 5cf90a0380000004 ldm <<%0>>%0004(fp),r10,#4
0550 140c00000000 ldl rr12,#%00000000
0556 35c20006 ldl rr2,rr12(#%0006)
055a 9c28 testl rr2
055c ee19 jr nz,%0590
055e 94c2 ldl rr2,rr12
0560 a935 inc r3,#6
0562 140400000000 ldl rr4,#%00000000
0568 1d24 ldl @rr2,rr4
056a 140a00000012 ldl rr10,#%00000012
0570 e804 jr %057a
0572 94a6 ldl rr6,rr10
0574 dfdf calr _lockfree
0576 010b0012 add r11,#%0012
057a 610380000000 ld r3,<<%0>>%0000
0580 19020012 mult rr2,#%0012
0584 140400000000 ldl rr4,#%00000000
058a 8135 add r5,r3
058c 904a cpl rr10,rr4
058e e7f1 jr c,%0572
0590 14ca ldl rr10,@rr12
0592 9ca8 testl rr10
0594 ee06 jr nz,%05a2
0596 4c05800000152323 ldb <<%0>>%0015,#%15
059e 9222 subl rr2,rr2
05a0 e805 jr %05ac
05a2 14a2 ldl rr2,@rr10
05a4 1dc2 ldl @rr12,rr2
05a6 9222 subl rr2,rr2
05a8 1da2 ldl @rr10,rr2
05aa 94a2 ldl rr2,rr10
05ac 5cf10a0380000004 ldm r10,<<%0>>%0004(fp),#4
05b4 a9fb inc fp,#12
05b6 9e08 ret
}
_lockfree::
{
05b8 abfb dec fp,#12
05ba 5cf90a0380000004 ldm <<%0>>%0004(fp),r10,#4
05c2 946c ldl rr12,rr6
05c4 140a00000000 ldl rr10,#%00000000
05ca 31c20004 ld r2,rr12(#%0004)
05ce a724 bit r2,#4
05d0 e607 jr z,%05e0
05d2 9462 ldl rr2,rr6
05d4 a933 inc r3,#4
05d6 2324 res @rr4,#4
05d8 94c6 ldl rr6,rr12
05da 5f0080000000 call _lkdata ! beachte lock.nm - ?????????????????????????? _wakeup?!
05e0 14a2 ldl rr2,@rr10
05e2 1dc2 ldl @rr12,rr2
05e4 1dac ldl @rr10,rr12
05e6 5cf10a0380000004 ldm r10,<<%0>>%0004(fp),#4
05ee a9fb inc fp,#12
05f0 9e08 ret
}
_lockadd::
{
05f2 030f001e sub fp,#%001e
05f6 5cf9080580000012 ldm <<%0>>%0012(fp),r8,#6
05fe 9428 ldl rr8,rr2
0600 a15b ld r11,r5
0602 946c ldl rr12,rr6
0604 d060 calr _lockalloc
0606 5df2000c ldl |<<%0>>%0c|(fp),rr2
060a 9c28 testl rr2
060c ee06 jr nz,%061a
060e 4c05800000152323 ldb <<%0>>%0015,#%15
0616 bd21 ldk r2,#1
0618 e81e jr %0656
061a 54f2000c ldl rr2,|<<%0>>%0c|(fp)
061e 14c4 ldl rr4,@rr12
0620 1d24 ldl @rr2,rr4
0622 54f4000c ldl rr4,|<<%0>>%0c|(fp)
0626 1dc4 ldl @rr12,rr4
0628 54f2000c ldl rr2,|<<%0>>%0c|(fp)
062c a935 inc r3,#6
062e 540480000020 ldl rr4,<<%0>>%0020
0634 1d24 ldl @rr2,rr4
0636 54f2000c ldl rr2,|<<%0>>%0c|(fp)
063a a939 inc r3,#10
063c 1d28 ldl @rr2,rr8
063e 54f2000c ldl rr2,|<<%0>>%0c|(fp)
0642 a93d inc r3,#14
0644 54f480000022 ldl rr4,<<%0>>%0022(fp)
064a 1d24 ldl @rr2,rr4
064c 54f2000c ldl rr2,|<<%0>>%0c|(fp)
0650 a933 inc r3,#4
0652 2f2b ld @rr2,r11
0654 8322 sub r2,r2
0656 5cf1080580000012 ldm r8,<<%0>>%0012(fp),#6
065e 010f001e add fp,#%001e
0662 9e08 ret
}
_lkfront::
{
0664 030f0030 sub fp,#%0030
0668 5cf9080580000024 ldm <<%0>>%0024(fp),r8,#6
0670 9428 ldl rr8,rr2
0672 944a ldl rr10,rr4
0674 946c ldl rr12,rr6
0676 21c7 ld r7,@rr12
0678 5f0080000000 call _lkdata ! beachte lock.nm - ?????????????????????????? _getf?!
067e 5df20016 ldl |<<%0>>%16|(fp),rr2
0682 9c28 testl rr2
0684 ee1f jr nz,%06c4
0686 e84f jr %0726
0688 14060100009a ldl rr6,#%0100009a
068e 5f0080000000 call _lkdata ! beachte lock.nm - ?????????????????????????? _printf?!
0694 e848 jr %0726
0696 54f6001a ldl rr6,|<<%0>>%1a|(fp)
069a 21050080 ld r5,#%0080
069e 5f0080000000 call _lkdata ! beachte lock.nm - ?????????????????????????? _access?!
06a4 8d24 test r2
06a6 e61e jr z,%06e4
06a8 4c05800000150d0d ldb <<%0>>%0015,#%15
06b0 e83a jr %0726
06b2 31240006 ld r4,rr2(#%0006)
06b6 a74c bit r4,#12
06b8 e6f7 jr z,%06a8
06ba 4c05800000151d1d ldb <<%0>>%0015,#%15
06c2 e831 jr %0726
06c4 54f20016 ldl rr2,|<<%0>>%16|(fp)
06c8 35240002 ldl rr4,rr2(#%0002)
06cc 5df4001a ldl |<<%0>>%1a|(fp),rr4
06d0 9c48 testl rr4
06d2 e6da jr z,%0688
06d4 54f20016 ldl rr2,|<<%0>>%16|(fp)
06d8 202c ldb rl4,@rr2
06da b140 extsb r4
06dc 07040002 and r4,#%0002
06e0 8d44 test r4
06e2 e6d9 jr z,%0696
06e4 4df5001e7000 ld |<<%0>>%1e|(fp),#%7000
06ea 54f2001a ldl rr2,|<<%0>>%1a|(fp)
06ee 31240006 ld r4,rr2(#%0006)
06f2 0704f000 and r4,#%f000
06f6 47f4001e and r4,|<<%0>>%1e|(fp)
06fa eedb jr nz,%06b2
06fc 35c60004 ldl rr6,rr12(#%0004)
0700 14040000000c ldl rr4,#%0000000c
0706 81f5 add r5,fp
0708 bd3a ldk r3,#10
070a 5f0080000000 call _lkdata ! beachte lock.nm - ?????????????????????????? _copyin?!
0710 8d24 test r2
0712 e60b jr z,%072a
0714 4c05800000150e0e ldb <<%0>>%0015,#%15
071c e804 jr %0726
071e 4c05800000151616 ldb <<%0>>%0015,#%15
0726 9222 subl rr2,rr2
0728 e842 jr %07ae
072a 31c20002 ld r2,rr12(#%0002)
072e 0b020000 cp r2,#%0000
0732 e1f5 jr lt,%071e
0734 0b020007 cp r2,#%0007
0738 eaf2 jr gt,%071e
073a a721 bit r2,#1
073c e619 jr z,%0770
073e 4df100140001 cp |<<%0>>%14|(fp),#%0001
0744 ee05 jr nz,%0750
0746 54f20016 ldl rr2,|<<%0>>%16|(fp)
074a 35240006 ldl rr4,rr2(#%0006)
074e e808 jr %0760
0750 4df100140002 cp |<<%0>>%14|(fp),#%0002
0756 ee08 jr nz,%0768
0758 54f2001a ldl rr2,|<<%0>>%1a|(fp)
075c 3524000e ldl rr4,rr2(#%000e)
0760 56f40010 addl rr4,|<<%0>>%10|(fp)
0764 5df40010 ldl |<<%0>>%10|(fp),rr4
0768 54f20010 ldl rr2,|<<%0>>%10|(fp)
076c 1da2 ldl @rr10,rr2
076e e805 jr %077a
0770 54f20016 ldl rr2,|<<%0>>%16|(fp)
0774 35240006 ldl rr4,rr2(#%0006)
0778 1da4 ldl @rr10,rr4
077a 14a2 ldl rr2,@rr10
077c 100200000000 cpl rr2,#%00000000
0782 e1cd jr lt,%071e
0784 54f2000c ldl rr2,|<<%0>>%0c|(fp)
0788 9c28 testl rr2
078a e604 jr z,%0794
078c 14a2 ldl rr2,@rr10
078e 56f2000c addl rr2,|<<%0>>%0c|(fp)
0792 e803 jr %079a
0794 140240000000 ldl rr2,#%40000000
079a 1d82 ldl @rr8,rr2
079c 14a2 ldl rr2,@rr10
079e 1082 cpl rr2,@rr8
07a0 e9be jr ge,%071e
07a2 14a2 ldl rr2,@rr10
07a4 5d0280000028 ldl <<%0>>%0028,rr2
07aa 54f2001a ldl rr2,|<<%0>>%1a|(fp)
07ae 5cf1080580000024 ldm r8,<<%0>>%0024(fp),#6
07b6 010f0030 add fp,#%0030
07ba 9e08 ret
}

View File

@ -26,8 +26,8 @@ char lockwstr[] = "@[$]lock.c Rev : 4.1 08/27/83 11:55:14";
#include <sys/proc.h>
#include <sys/s.out.h>
#include <sys/user.h>
#include <sys/map.h>
#include <sys/lockblk.h>
#include <sys/callo.h>
long lkfront();

154
WEGA/src/uts/sys/lock.dump Normal file
View File

@ -0,0 +1,154 @@
File lock.obj
Image size: 2160
Bss size: 0
Entry point: 0x0
Segment 0
Text size: 1980
Data size: 0
Bss size: 0
Text+Data......
0000: 030f 001e 5cf9 0805 8000 0012 5402 8000
0010: 0024 5df2 000c 1404 0000 0004 81f5 1402
0020: 0000 0008 81f3 54f6 000c dce4 942c 9c28
0030: 5e06 8000 0274 54f2 0008 5df2 0000 54f4
0040: 000c 3147 0002 a772 e603 2107 0080 e801
0050: 8377 94c4 54f2 0004 de64 8d24 5e0e 8000
0060: 0274 94c2 0103 004a 942a 54f2 000c 3124
0070: 0002 a740 e602 8344 e802 2104 0100 6ff4
0080: 0010 5e08 8000 0256 9482 a939 54f4 0008
0090: 1024 5e01 8000 0260 3582 0006 5002 8000
00a0: 0020 5e0e 8000 0242 3584 000a 50f4 0004
00b0: ea02 bd31 e801 8333 3584 000e 50f4 0004
00c0: ea02 bd42 e801 8344 8143 3584 000a 50f4
00d0: 0008 ea02 bd44 e801 8344 8143 3584 000e
00e0: 50f4 0008 ea02 bd48 e801 8344 8143 3184
00f0: 0004 0704 0100 4bf4 0010 ee03 2104 0010
0100: e801 8344 8143 a132 ab23 0b02 001b 5e0b
0110: 8000 0256 b322 5424 8100 002a 1e48 4df4
0120: 0010 e607 3584 000a 5df4 0000 5e08 8000
0130: 0268 54f2 0008 5df2 0000 94a6 61f5 0010
0140: 54f2 0004 ddaa 8d24 e64e 4df4 0010 5e0e
0150: 8000 0274 3582 000a 50f2 0004 e939 54f2
0160: 0004 5df2 0000 3582 000a 2105 0100 94a6
0170: ddc0 8d24 e61d 4df4 0010 e669 3582 000a
0180: 5df2 0000 94a6 61f5 0010 54f2 0004 ddcf
0190: 8d24 ee37 5402 8000 0000 9c28 ee2a 1484
01a0: 1da4 14a6 ddf7 4c05 8000 0015 2323 e862
01b0: 54f2 0008 5df2 0000 14a6 8355 54f2 0004
01c0: dde8 8d24 e610 1482 1da2 14a6 de0b e852
01d0: 54f2 0008 5df2 0000 3582 000a 8355 94a6
01e0: ddf8 8d24 ee47 9482 a939 54f4 0008 1d24
01f0: e841 3582 000e 5df2 0004 50f2 0008 ee2b
0200: e839 4df4 0010 e608 3582 000e 5df2 0004
0210: 50f2 0008 ee20 e82e 3582 000a 50f2 0004
0220: e916 9482 a93d 54f4 0004 1d24 e814 9482
0230: a939 54f4 0004 e8db 3582 000e 50f2 0004
0240: e602 948a e808 3582 000a 5df2 0004 1482
0250: 1da2 9486 de4f 14a8 9c88 5e0e 8000 0088
0260: 54f2 0008 5df2 0000 94a6 61f5 0010 54f2
0270: 0004 de41 5cf1 0805 8000 0012 010f 001e
0280: 9e08 030f 001c 5cf9 0805 8000 0010 5402
0290: 8000 0024 5df2 000c 1404 0000 0004 81f5
02a0: 1402 0000 0008 81f3 54f6 000c de25 942c
02b0: 9c28 e668 0103 004a 942a e861 3182 0004
02c0: a724 e607 9482 a933 2324 9486 5f00 8000
02d0: 0000 3582 000a 50f2 0004 e918 9482 a93d
02e0: 54f4 0008 1024 e912 3582 000e 5df2 0000
02f0: 3185 0004 9486 54f2 0008 de85 8d24 ee42
0300: 9482 a93d 54f4 0004 1d24 e83c 9482 a939
0310: 54f4 0004 1024 ea0c 9482 a93d 54f6 0008
0320: 1026 e906 9482 a939 54f0 0008 1d20 e82a
0330: 9482 a93d 54f4 0004 1d24 948a e820 3582
0340: 0006 5002 8000 0020 eef8 9482 a939 54f4
0350: 0008 1024 e217 3582 000e 50f2 0004 e2ed
0360: 9482 a939 54f4 0004 1024 eaa8 3582 000e
0370: 50f2 0008 eaa3 1482 1da2 9486 dee3 14a8
0380: 9c88 eedd 5cf1 0805 8000 0010 010f 001c
0390: 9e08 030f 001e 5cf9 0805 8000 0012 6ff7
03a0: 000a 54f8 8000 0022 942a 944c 35c2 004a
03b0: 5df2 000c e83e 54f2 000c 1424 5df4 000c
03c0: e838 a939 1028 e239 54f2 000c 3524 0006
03d0: 5004 8000 0020 e6ef a93d 102a e9ec 54f2
03e0: 000c a933 61f4 000a 0704 0100 0724 eee3
03f0: 67f7 000a e606 4c05 8000 0015 0d0d bd21
0400: e81d 54f6 000c dfdf 8d24 eef9 54f2 000c
0410: a933 2524 54f6 000c 2105 0028 5f00 8000
0420: 0000 35c2 004a 5df2 000c 4c04 8000 0015
0430: eee6 54f2 000c 9c28 eec4 8322 5cf1 0805
0440: 8000 0012 010f 001e 9e08 030f 0012 5cf9
0450: 0a03 8000 000a 946c e821 35c2 0006 3524
0460: 0016 944a 1004 0000 0000 e71d 6103 8000
0470: 0000 1902 0012 1404 0000 0000 8135 904a
0480: ef12 35a2 0006 5002 8000 0020 ee06 4c05
0490: 8000 0015 2323 bd21 e807 94ac 35c2 0006
04a0: 0c21 0101 e6da 8322 5cf1 0a03 8000 000a
04b0: 010f 0012 9e08 030f 001c 5cf9 0805 8000
04c0: 0010 946c 35c2 004a 9c28 e636 9462 0103
04d0: 004a 9428 4df8 000e 4df8 000c 61f2 000c
04e0: b329 0002 5424 8000 0068 9c48 e60c 61f2
04f0: 000c b329 0002 5424 8000 0068 a951 104c
0500: ee02 69f0 000e 69f0 000c 4df1 000c 0014
0510: e1e5 4df4 000e e60d e80f 14a2 1d82 94a6
0520: dfb5 e807 35a2 0006 5002 8000 0020 e6f5
0530: 94a8 148a 9ca8 eef6 5cf1 0805 8000 0010
0540: 010f 001c 9e08 abfb 5cf9 0a03 8000 0004
0550: 140c 0000 0000 35c2 0006 9c28 ee19 94c2
0560: a935 1404 0000 0000 1d24 140a 0000 0012
0570: e804 94a6 dfdf 010b 0012 6103 8000 0000
0580: 1902 0012 1404 0000 0000 8135 904a e7f1
0590: 14ca 9ca8 ee06 4c05 8000 0015 2323 9222
05a0: e805 14a2 1dc2 9222 1da2 94a2 5cf1 0a03
05b0: 8000 0004 a9fb 9e08 abfb 5cf9 0a03 8000
05c0: 0004 946c 140a 0000 0000 31c2 0004 a724
05d0: e607 9462 a933 2324 94c6 5f00 8000 0000
05e0: 14a2 1dc2 1dac 5cf1 0a03 8000 0004 a9fb
05f0: 9e08 030f 001e 5cf9 0805 8000 0012 9428
0600: a15b 946c d060 5df2 000c 9c28 ee06 4c05
0610: 8000 0015 2323 bd21 e81e 54f2 000c 14c4
0620: 1d24 54f4 000c 1dc4 54f2 000c a935 5404
0630: 8000 0020 1d24 54f2 000c a939 1d28 54f2
0640: 000c a93d 54f4 8000 0022 1d24 54f2 000c
0650: a933 2f2b 8322 5cf1 0805 8000 0012 010f
0660: 001e 9e08 030f 0030 5cf9 0805 8000 0024
0670: 9428 944a 946c 21c7 5f00 8000 0000 5df2
0680: 0016 9c28 ee1f e84f 1406 0100 009a 5f00
0690: 8000 0000 e848 54f6 001a 2105 0080 5f00
06a0: 8000 0000 8d24 e61e 4c05 8000 0015 0d0d
06b0: e83a 3124 0006 a74c e6f7 4c05 8000 0015
06c0: 1d1d e831 54f2 0016 3524 0002 5df4 001a
06d0: 9c48 e6da 54f2 0016 202c b140 0704 0002
06e0: 8d44 e6d9 4df5 001e 7000 54f2 001a 3124
06f0: 0006 0704 f000 47f4 001e eedb 35c6 0004
0700: 1404 0000 000c 81f5 bd3a 5f00 8000 0000
0710: 8d24 e60b 4c05 8000 0015 0e0e e804 4c05
0720: 8000 0015 1616 9222 e842 31c2 0002 0b02
0730: 0000 e1f5 0b02 0007 eaf2 a721 e619 4df1
0740: 0014 0001 ee05 54f2 0016 3524 0006 e808
0750: 4df1 0014 0002 ee08 54f2 001a 3524 000e
0760: 56f4 0010 5df4 0010 54f2 0010 1da2 e805
0770: 54f2 0016 3524 0006 1da4 14a2 1002 0000
0780: 0000 e1cd 54f2 000c 9c28 e604 14a2 56f2
0790: 000c e803 1402 4000 0000 1d82 14a2 1082
07a0: e9be 14a2 5d02 8000 0028 54f2 001a 5cf1
07b0: 0805 8000 0024 010f 0030 9e08
Segment 1
Text size: 0
Data size: 180
Bss size: 0
Text+Data......
0000: 405b 245d 6c6f 636b 2e63 0909 5265 7620
0010: 3a20 342e 3120 0930 382f 3237 2f38 3320
0020: 3131 3a35 353a 3134 0000 0000 011e 0000
0030: 014a 0000 0256 0000 0256 0000 0256 0000
0040: 0256 0000 0256 0000 0256 0000 0176 0000
0050: 0202 0000 0256 0000 0242 0000 0256 0000
0060: 0256 0000 0256 0000 0256 0000 022e 0000
0070: 0274 0000 0256 0000 0256 0000 0256 0000
0080: 0256 0000 0256 0000 0256 0000 024e 0000
0090: 0246 0000 0256 0000 0238 5041 4e49 4320
00a0: 6970 206e 756c 6c20 696e 206c 6b66 726f
00b0: 6e74 0a00

63
WEGA/src/uts/sys/lock.nm Normal file
View File

@ -0,0 +1,63 @@
01000000 D _lockwstr
U _buffer1
U _buffer2
U _buffer3
U _buffer4
U _buffer5
U _canonb
0004 C _rootdir
0004 C _runq
0002 C _lbolt
0004 C _lifetime
0004 C _time
0002 C _nblkdev
0002 C _nchrdev
0002 C _mpid
0001 C _runin
0001 C _runout
0001 C _runrun
0001 C _curpri
0002 C _maxmem
0002 C _umemory
0004 C _swplo
0002 C _nswap
0002 C _updlock
0004 C _rablock
0080 C _msgbuf
0002 C _rootdev
0002 C _swapdev
0002 C _pipedev
0004 C _serial
0002 C _numterm
0002 C _manboot
0002 C _blkacty
0002 C _cputype
0070 C _sysinfo
0006 C _syswait
0002 C _dk_busy
0080 C _dk_time
000c C _dk_numb
000c C _dk_wds
0004 C _tk_nin
0004 C _tk_nout
00c8 C _callout
0000 T _lkdata
U _stkseg
U _u
U _locklist
0282 T _unlk
U _wakeup
0392 T _locked
U _sleep
044a T _deadlock
U _Nflock
04b6 T _unlock
0546 T _lockalloc
U _proc
05b8 T _lockfree
05f2 T _lockadd
0664 T _lkfront
U _getf
U _printf
U _access
U _copyin

BIN
WEGA/src/uts/sys/lock.obj Normal file

Binary file not shown.

305
WEGA/src/uts/sys/lock.s Normal file
View File

@ -0,0 +1,305 @@
.seg
.psec data
.data
fp := r15;
sp := rr14;
_lockwstr::
.byte %40
.byte %5b
.byte %24
.byte %5d
.byte %6c
.byte %6f
.byte %63
.byte %6b
.byte %2e
.byte %63
.byte %9
.byte %9
.byte %52
.byte %65
.byte %76
.byte %20
.byte %3a
.byte %20
.byte %34
.byte %2e
.byte %31
.byte %20
.byte %9
.byte %30
.byte %38
.byte %2f
.byte %32
.byte %37
.byte %2f
.byte %38
.byte %33
.byte %20
.byte %31
.byte %31
.byte %3a
.byte %35
.byte %35
.byte %3a
.byte %31
.byte %34
.byte %0
.byte 0
.comm 0, _buffer1;
.comm 0, _buffer2;
.comm 0, _buffer3;
.comm 0, _buffer4;
.comm 0, _buffer5;
.comm 0, _canonb;
.comm 4, _rootdir;
.comm 4, _runq;
.comm 2, _lbolt;
.comm 4, _lifetime;
.comm 4, _time;
.comm 2, _nblkdev;
.comm 2, _nchrdev;
.comm 2, _mpid;
.comm 1, _runin;
.comm 1, _runout;
.comm 1, _runrun;
.comm 1, _curpri;
.comm 2, _maxmem;
.comm 2, _umemory;
.comm 4, _swplo;
.comm 2, _nswap;
.comm 2, _updlock;
.comm 4, _rablock;
.comm 128, _msgbuf;
.comm 2, _rootdev;
.comm 2, _swapdev;
.comm 2, _pipedev;
.comm 4, _serial;
.comm 2, _numterm;
.comm 2, _manboot;
.comm 2, _blkacty;
.comm 2, _cputype;
.comm 112, _sysinfo;
.comm 6, _syswait;
.comm 2, _dk_busy;
.comm 128, _dk_time;
.comm 12, _dk_numb;
.comm 12, _dk_wds;
.comm 4, _tk_nin;
.comm 4, _tk_nout;
.comm 200, _callout;
/*~~lockfree:*/
.psec
.code
_lockfree::
{
dec fp,#~L2
ldm _stkseg+4(fp),r10,#4
ldl rr12,rr6
ldl rr10,#0
ld r2,r12(#4)
bit r2,#4
jr z,L10
ldl rr2,rr6
inc r3,#4
res @rr2,#4
ldl rr6,rr12
call _wakeup
L10:
ldl rr2,@rr10
ldl @r12,rr2
ldl @r10,rr12
ldm r10,_stkseg+4(fp),#4
inc fp,#~L2
ret
~L1 := 0
~L2 := 12
} /* _lockfree */
.psec data
.data
/*~~lockadd:*/
.psec
.code
_lockadd::
{
sub fp,#~L2
ldm _stkseg+18(fp),r8,#6
ldl rr8,rr2
ld r11,r5
ldl rr12,rr6
calr _lockalloc
ldl |_stkseg+~L1+12|(fp),rr2
testl rr2
jr nz,L20
ldb _stkseg+~L1+21,#21
ldk r2,#1
jr L30
L20:
ldl rr2,|_stkseg+~L1+12|(fp)
ldl rr4,@rr12
ldl @rr2,rr4
ldl rr4,|_stkseg+~L1+12|(fp)
ldl @rr12,rr4
ldl rr2,|_stkseg+~L1+12|(fp)
inc r3,#6
ldl rr4,_u+32
ldl @rr2,rr4
ldl rr2,|_stkseg+~L1+12|(fp)
inc r3,#10
ldl @rr2,rr8
ldl rr2,|_stkseg+~L1+12|(fp)
inc r3,#14
ldl rr4,_stkseg+~L1+34(fp)
ldl @rr2,rr4
ldl rr2,|_stkseg+~L1+12|(fp)
inc r3,#4
ld @rr2,r11
sub r2,r2
L30:
ldm r8,_stkseg+18(fp),#6
add fp,#~L2
ret
~L1 := 0
~L2 := 30
} /* _lockfree */
.psec data
.data
/*~~lockadd:*/
.psec
.code
_lkfront::
{
sub fp,#~L2
ldm _stkseg+36(fp),r8,#6
ldl rr8,rr2
ldl rr10,rr4
ldl rr12,rr6
ld r7,@rr12
call _getf
ldl |_stkseg+~L1+22|(fp),rr2
testl rr2
jr nz,L40
jr L50
L70:
ldl rr6,#%0100009a
call _printf
jr L50
L90:
ldl rr6,|_stkseg+~L1+22|(fp)
ld r5,#%0080
call _access
test r2
jr z,L60
L80:
ldb _u+21,#%0d
jr L50
L100:
ld r4,rr2(#%0006)
bit r4,#12
jr z,L80
ldb _u+21,#%0d
jr L50
L40:
ldl rr2,|_stkseg+~L1+22|(fp)
ldl rr4,rr2(#%0002)
ldl |_stkseg+~L1+26|(fp),rr4
testl rr4
jr z,L70
ldl rr2,|_stkseg+~L1+22|(fp)
ldb rl4,@rr2
extsb r4
and r4,#%0002
test r4
jr z,L90
L60:
ld |_stkseg+~L1+30|(fp),#%7000
ldl rr2,|_stkseg+~L1+26|(fp)
ld r4,rr2(#%0006)
and r4,#%f000
and r4,|_stkseg+~L1+30|(fp)
jr nz,L100
ldl rr6,rr12(#%0004)
ldl rr4,#%0000000c
add r5,fp
ldk r3,#10
call _copyin
test r2
jr z,L110
ldb _u+21,#%0e
jr L50
L120:
ldb _u+21,#%16
L50:
subl rr2,rr2
jr L200
L110:
ld r2,rr12(#%0002)
cp r2,#%0000
jr lt,L120
cp r2,#%0007
jr gt,L120
bit r2,#1
jr z,L130
cp |_stkseg+~L1+20|(fp),#%0001
jr nz,L140
ldl rr2,|_stkseg+~L1+22|(fp)
ldl rr4,rr2(#%0006)
jr L150
L140:
cp |_stkseg+~L1+20|(fp),#%0002
jr nz,L160
ldl rr2,|_stkseg+~L1+26|(fp)
ldl rr4,rr2(#%000e)
L150:
addl rr4,|_stkseg+~L1+16|(fp)
ldl |_stkseg+~L1+16|(fp),rr4
L160:
ldl rr2,|_stkseg+~L1+16|(fp)
ldl @rr10,rr2
jr L170
ldl rr2,|_stkseg+~L1+22|(fp)
L130:
ldl rr4,rr2(#%0006)
ldl @rr10,rr4
L170:
ldl rr2,@rr10
cpl rr2,#%00000000
jr lt,L180
ldl rr2,|_stkseg+~L1+12|(fp)
testl rr2
jr z,L180
ldl rr2,@rr10
addl rr2,|_stkseg+~L1+12|(fp)
jr L190
L180:
ldl rr2,#%40000000
L190:
ldl @rr8,rr2
ldl rr2,@rr10
cpl rr2,@rr8
jr ge,L120
ldl rr2,@rr10
ldl _u+40,rr2
ldl rr2,|_stkseg+~L1+22|(fp)
L200:
ldm r8,_stkseg+~L1+36(fp),#6
add fp,#~L2
ret
~L1 := 0
~L2 := 44
} /* _lockfree */
.psec data
.data

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -54,7 +54,6 @@ register mode;
{
register struct file *fp;
register struct inode *ip;
long j;
register struct a {
int fdes;
char *cbuf;
@ -70,19 +69,20 @@ register mode;
u.u_error = EBADF;
return;
}
u.u_base.l = (caddr_t)(((long)uap->cbuf) & 0x7F00FFFF); /* FIXME: this is not 100% compatible (sys2.s v1.1 Line 151-154) */
u.u_base.l = (caddr_t)(((long)uap->cbuf) & 0x7F00FFFF);
u.u_count = uap->count;
u.u_segflg = 0;
u.u_fmode = fp->f_flag;
ip = fp->f_inode;
type = ip->i_mode&IFMT;
if (type==IFREG || type==IFDIR) {
u.u_offset = fp->f_offset; /* FIXME: uses different temp. reg. (sys2.s v1.1 line 172-173 */
if(ip->i_locklist) { /* FIXME: uses different temp. reg. (sys2.s v1.1 line 174-175 */
j = u.u_offset + u.u_count; /* FIXME: j should be +0 but is +2 and why is it defined at all? */
if(locked(mode == FREAD?0x100:0,ip,u.u_offset)) /* probably it should be some variable locked() usess */
return; /* (sys2.s v1.1 line 147-150) */
}
u.u_offset = fp->f_offset;
if(ip->i_locklist &&
locked(mode == FREAD?0x100:0,ip,
u.u_offset,u.u_offset + u.u_count))
return;
plock(ip);
if ((u.u_fmode&FAPPEND) && (mode == FWRITE))
fp->f_offset = ip->i_size;
@ -142,11 +142,10 @@ creat()
*/
copen(mode, arg)
register mode;
int arg; /*FIXME: this has to be stack +4 (sys2.s v1.1 line 332 */
int arg;
{
register struct inode *ip;
register struct file *fp;
long j;
int i;
if ((mode&(FREAD|FWRITE)) == 0) {
@ -179,9 +178,8 @@ int arg; /*FIXME: this has to be stack +4 (sys2.s v1.1 line 332 */
}
}
if(ip->i_locklist) {
j=0x40000000; /* FIXME: j should be +0 but is +4 and why is it defined at all? */
if(locked(0,ip,0)){ /* probably it should be some variable locked() usess */
iput(ip); /* (sys2.s v1.1 line 407) */
if(locked(0,ip,(long)(0L), (long)(1L<<30))){
iput(ip);
return;
}
}
@ -284,7 +282,8 @@ link()
register struct a {
char *target;
char *linkname;
} *uap; /* FIXME: some var definitions are missing (sys2.c v1.1 line 593, 653, 657)*/
} *uap;
long i;
uap = (struct a *)u.u_ap;
ip = namei(uchar, 0);
@ -302,8 +301,8 @@ link()
*/
prele(ip);
u.u_dirp.l = (caddr_t)(((long)uap->linkname) & 0x7F00FFFF); /* FIXME: this is not 100% compatible (sys2.c v1.1 line 611-613) */
u.u_dirp.l = (caddr_t)(((long)uap->linkname) & 0x7F00FFFF);
xp = namei(uchar, 1);
if (xp != NULL) {
u.u_error = EEXIST;

View File

@ -1,784 +0,0 @@
.seg
.psec data
.data
fp := r15;
sp := rr14;
_sys2wstr::
.byte %40
.byte %5b
.byte %24
.byte %5d
.byte %73
.byte %79
.byte %73
.byte %32
.byte %2e
.byte %63
.byte %9
.byte %9
.byte %52
.byte %65
.byte %76
.byte %20
.byte %3a
.byte %20
.byte %34
.byte %2e
.byte %31
.byte %20
.byte %9
.byte %30
.byte %38
.byte %2f
.byte %32
.byte %37
.byte %2f
.byte %38
.byte %33
.byte %20
.byte %31
.byte %31
.byte %3a
.byte %35
.byte %39
.byte %3a
.byte %30
.byte %39
.byte %0
.byte 0
.comm 0, _buffer1;
.comm 0, _buffer2;
.comm 0, _buffer3;
.comm 0, _buffer4;
.comm 0, _buffer5;
.comm 0, _canonb;
.comm 4, _rootdir;
.comm 4, _runq;
.comm 2, _lbolt;
.comm 4, _lifetime;
.comm 4, _time;
.comm 2, _nblkdev;
.comm 2, _nchrdev;
.comm 2, _mpid;
.comm 1, _runin;
.comm 1, _runout;
.comm 1, _runrun;
.comm 1, _curpri;
.comm 2, _maxmem;
.comm 2, _umemory;
.comm 4, _swplo;
.comm 2, _nswap;
.comm 2, _updlock;
.comm 4, _rablock;
.comm 128, _msgbuf;
.comm 2, _rootdev;
.comm 2, _swapdev;
.comm 2, _pipedev;
.comm 4, _serial;
.comm 2, _numterm;
.comm 2, _manboot;
.comm 2, _blkacty;
.comm 2, _cputype;
.comm 112, _sysinfo;
.comm 6, _syswait;
.comm 2, _dk_busy;
.comm 128, _dk_time;
.comm 12, _dk_numb;
.comm 12, _dk_wds;
.comm 4, _tk_nin;
.comm 4, _tk_nout;
/*~~read:*/
.psec
.code
_read::
{
ldk r7,#1
callr _rdwr
ret
~L1 := 0
~L2 := 0
} /* _read */
.psec data
.data
/*~~write:*/
.psec
.code
_write::
{
ldk r7,#2
callr _rdwr
ret
~L1 := 0
~L2 := 0
} /* _write */
.psec data
.data
/*~~rdwr:*/
.psec
.code
_rdwr::
{
sub fp,#~L2
ldm _stkseg+12(fp),r8,#6
ld r13,r7
ldl rr2,_u+36
ldl |_stkseg+~L1+6|(fp),rr2
ld r7,@rr2
callr _getf
ldl rr10,rr2
testl rr2
jpr eq,L10006
ldb rl2,@rr10
extsb r2
and r2,r13
test r2
jpr ne,L96
ldb _u+21,#9
jpr L10006
L96:
ldl rr2,|_stkseg+~L1+6|(fp)
ldl rr4,rr2(#2)
and r4,#32512
ldl _u+44,rr4
ld r4,rr2(#6)
ld _u+48,r4
clrb _u+20
ldb rl4,@rr10
extsb r4
ld _u+54,r4
ldl rr4,rr10(#2)
ldl rr8,rr4
ld r4,rr8(#6)
and r4,#61440
ld |_stkseg+~L1+10|(fp),r4
cp r4,#32768
jpr eq,L10009
cp r4,#16384
jpr ne,L97
L10009:
ldl rr2,rr10(#6)
ldl _u+50,rr2
ldl rr2,rr8(#74)
testl rr2
jpr eq,L98
ldk r2,#0
ld r3,_u+48
addl rr2,_u+50
ldl |_stkseg+~L1+2|(fp),rr2
cp r13,#1
jpr ne,L10010
ld r7,#256
jpr L10011
L10010:
sub r7,r7
L10011:
ldl rr4,rr8
ldl rr2,_u+50
callr _locked
test r2
jpr ne,L10006
L98:
ldl rr6,rr8
callr _plock
bit _u+54,#3
jpr eq,L103
cp r13,#2
jpr ne,L103
ldl rr2,rr8(#14)
ldl rr4,rr10
inc r5,#6
ldl @rr4,rr2
jpr L103
L97:
cp |_stkseg+~L1+10|(fp),#4096
jpr ne,L103
ldl rr6,rr8
callr _plock
ldl rr2,rr10
inc r3,#6
subl rr4,rr4
ldl @rr2,rr4
L103:
ldl rr2,rr10(#6)
ldl _u+50,rr2
cp r13,#1
jpr ne,L105
ldl rr6,rr8
callr _readi
jpr L107
L105:
ldl rr6,rr8
callr _writei
L107:
cp |_stkseg+~L1+10|(fp),#32768
jpr eq,L10012
cp |_stkseg+~L1+10|(fp),#16384
jpr eq,L10012
cp |_stkseg+~L1+10|(fp),#4096
jpr ne,L109
L10012:
ldl rr6,rr8
callr _prele
L109:
ldl rr2,|_stkseg+~L1+6|(fp)
ld r4,rr2(#6)
sub r4,_u+48
ldk r6,#0
ld r7,r4
ldl rr4,rr10
inc r5,#6
addl rr6,@rr4
ldl @rr4,rr6
ldl rr2,|_stkseg+~L1+6|(fp)
ld r4,rr2(#6)
sub r4,_u+48
ld _u+40,r4
ld r5,r4
exts rr4
addl rr4,_u+1236
ldl _u+1236,rr4
cp r13,#1
jpr ne,L111
ld r5,_u+40
exts rr4
addl rr4,_sysinfo+80
ldl _sysinfo+80,rr4
jpr L10006
L111:
ld r3,_u+40
exts rr2
addl rr2,_sysinfo+84
ldl _sysinfo+84,rr2
L10006:
ldm r8,_stkseg+12(fp),#6
add fp,#~L2
ret
~L1 := 0
~L2 := 24
} /* _rdwr */
.psec data
.data
/*~~open:*/
.psec
.code
_open::
{
dec fp,#~L2
ldm _stkseg+0(fp),r12,#2
ldl rr12,_u+36
ld r7,rr12(#4)
inc r7,#1
ld r6,rr12(#6)
callr _copen
ldm r12,_stkseg+0(fp),#2
inc fp,#~L2
ret
~L1 := 0
~L2 := 4
} /* _open */
.psec data
.data
/*~~creat:*/
.psec
.code
_creat::
{
dec fp,#~L2
ldm _stkseg+0(fp),r12,#2
ldl rr12,_u+36
ld r6,rr12(#4)
ld r7,#770
callr _copen
ldm r12,_stkseg+0(fp),#2
inc fp,#~L2
ret
~L1 := 0
~L2 := 4
} /* _creat */
.psec data
.data
/*~~copen:*/
.psec
.code
_copen::
{
sub fp,#~L2
ldm _stkseg+10(fp),r8,#6
ld |_stkseg+~L1+0|(fp),r6
ld r13,r7
and r7,#3
test r7
jpr ne,L119
ldb _u+21,#22
jpr L10019
L119:
bit r13,#8
jpr eq,L120
ldl rr6,#_uchar
ldk r5,#1
callr _namei
ldl rr10,rr2
testl rr2
jpr ne,L121
testb _u+21
jpr ne,L10019
ld r7,|_stkseg+~L1|(fp)
and r7,#3583
callr _maknode
ldl rr10,rr2
testl rr2
jpr eq,L10019
res r13,#9
L133:
bit r13,#8
jpr ne,L135
bit r13,#0
jpr eq,L136
ldl rr6,rr10
ld r5,#256
callr _access
L136:
ld r2,r13
and r2,#514
jpr eq,L135
ldl rr6,rr10
ld r5,#128
callr _access
ld r2,rr10(#6)
and r2,#61440
cp r2,#16384
jpr ne,L135
ldb _u+21,#21
L135:
testb _u+21
jpr ne,L20001
callr _falloc
ldl rr8,rr2
testl rr2
jpr ne,L140
jpr L20001
L121:
bit r13,#10
jpr eq,L125
ldb _u+21,#17
jpr L20001
L125:
ldl rr6,#_u+222
callr _save
test r2
jpr eq,L128
callr _setscr
ldl rr6,rr10
callr _iput
testb _u+21
jpr ne,L10019
ldb _u+21,#4
jpr L10019
L128:
ldl rr2,rr10(#74)
testl rr2
jpr eq,L131
ldl rr2,#1073741824
ldl |_stkseg+~L1+4|(fp),rr2
sub r7,r7
ldl rr4,rr10
sub r3,r3
callr _locked
test r2
jpr ne,L20001
L131:
res r13,#8
jpr L133
L120:
ldl rr6,#_uchar
sub r5,r5
callr _namei
ldl rr10,rr2
testl rr2
jpr eq,L10019
jpr L133
L140:
bit r13,#9
jpr eq,L141
ldl rr6,rr10
callr _itrunc
L141:
ldl rr6,rr10
callr _prele
ld r2,r13
and r2,#255
ldb @rr8,rl2
ldl rr2,rr8
inc r3,#2
ldl @rr2,rr10
ld r2,_u+40
ld |_stkseg+~L1+8|(fp),r2
ldl rr6,#_u+222
callr _save
test r2
jpr eq,L143
callr _setscr
testb _u+21
jpr ne,L144
ldb _u+21,#4
L144:
ld r2,|_stkseg+~L1+8|(fp)
sla r2,#2
ldl rr4,#_u+104
add r5,r2
subl rr2,rr2
ldl @rr4,rr2
ldl rr6,rr8
callr _closef
jpr L10019
L143:
ldl rr6,rr10
ld r5,r13
callr _openi
testb _u+21
jpr eq,L10019
ld r2,|_stkseg+~L1+8|(fp)
sla r2,#2
ldl rr4,#_u+104
add r5,r2
subl rr2,rr2
ldl @rr4,rr2
ldl rr2,rr8
inc r3,#1
ldl rr2,rr8
inc r3,#1
decb @rr2,#1
L20001:
ldl rr6,rr10
callr _iput
L10019:
ldm r8,_stkseg+10(fp),#6
add fp,#~L2
ret
~L1 := 0
~L2 := 22
} /* _copen */
.psec data
.data
/*~~close:*/
.psec
.code
_close::
{
dec fp,#~L2
ldm _stkseg+0(fp),r10,#4
ldl rr10,_u+36
ld r7,@rr10
callr _getf
ldl rr12,rr2
testl rr2
jpr eq,L10023
ld r2,@rr10
sla r2,#2
ldl rr4,#_u+104
add r5,r2
subl rr2,rr2
ldl @rr4,rr2
ldl rr6,rr12
callr _closef
L10023:
ldm r10,_stkseg+0(fp),#4
inc fp,#~L2
ret
~L1 := 0
~L2 := 8
} /* _close */
.psec data
.data
/*~~seek:*/
.psec
.code
_seek::
{
dec fp,#~L2
ldm _stkseg+0(fp),r8,#6
ldl rr8,_u+36
ld r7,@rr8
callr _getf
ldl rr12,rr2
testl rr2
jpr eq,L10026
ldl rr2,rr12(#2)
ldl rr10,rr2
ld r2,rr10(#6)
and r2,#61440
cp r2,#4096
jpr ne,L155
ldb _u+21,#29
jpr L10026
L155:
ld r2,rr8(#6)
cp r2,#1
jpr ne,L156
ldl rr2,rr12(#6)
ldl rr4,rr8
inc r5,#2
addl rr2,@rr4
ldl @rr4,rr2
jpr L157
L156:
ld r2,rr8(#6)
cp r2,#2
jpr ne,L157
ldl rr2,rr12(#2)
ldl rr4,rr2(#14)
ldl rr2,rr8
inc r3,#2
addl rr4,@rr2
ldl @rr2,rr4
L157:
ldl rr2,rr8(#2)
ldl rr4,rr12
inc r5,#6
ldl @rr4,rr2
ldl rr2,rr8(#2)
ldl _u+40,rr2
L10026:
ldm r8,_stkseg+0(fp),#6
inc fp,#~L2
ret
~L1 := 0
~L2 := 12
} /* _seek */
.psec data
.data
/*~~link:*/
.psec
.code
_link::
{
dec fp,#~L2
ldm _stkseg+0(fp),r8,#6
ldl rr8,_u+36
ldl rr6,#_uchar
sub r5,r5
callr _namei
ldl rr12,rr2
testl rr2
jpr eq,L10029
ld r2,rr12(#6)
and r2,#61440
cp r2,#16384
jpr ne,L163
callr _suser
test r2
jpr eq,L164
L163:
ldl rr6,rr12
callr _prele
ldl rr2,rr8(#4)
and r2,#32512
ldl _u+78,rr2
ldl rr6,#_uchar
ldk r5,#1
callr _namei
ldl rr10,rr2
testl rr2
jpr eq,L165
ldb _u+21,#17
ldl rr6,rr2
callr _iput
jpr L164
L165:
testb _u+21
jpr ne,L164
ldl rr2,rr12
inc r3,#2
ldl rr4,_u+98
ld r6,rr4(#2)
cp r6,@rr2
jpr eq,L167
ldl rr6,rr4
callr _iput
ldb _u+21,#18
jpr L164
L167:
ldl rr6,rr12
callr _wdir
testb _u+21
jpr ne,L164
ldl rr2,rr12
inc r3,#8
ldl rr2,rr12
inc r3,#8
inc @rr2,#1
setb @rr12,#6
L164:
ldl rr6,rr12
callr _iput
L10029:
ldm r8,_stkseg+0(fp),#6
inc fp,#~L2
ret
~L1 := 0
~L2 := 12
} /* _link */
.psec data
.data
/*~~mknod:*/
.psec
.code
_mknod::
{
dec fp,#~L2
ldm _stkseg+0(fp),r10,#4
ldl rr10,_u+36
ld r2,rr10(#4)
and r2,#61440
cp r2,#4096
jpr eq,L172
callr _suser
test r2
jpr eq,L10032
L172:
ldl rr6,#_uchar
ldk r5,#1
callr _namei
ldl rr12,rr2
testl rr2
jpr eq,L173
ldb _u+21,#17
jpr L174
L173:
testb _u+21
jpr ne,L10032
ld r7,rr10(#4)
callr _maknode
ldl rr12,rr2
testl rr2
jpr eq,L10032
ld r3,rr12(#6)
and r3,#61440
ld r2,r3
jpr L178
L180:
ld r3,rr10(#6)
ld r5,r3
exts rr4
ldl rr6,rr12
add r7,#18
ldl @rr6,rr4
setb @rr12,#6
jpr L174
L178:
cp r2,#8192
jpr eq,L180
cp r2,#24576
jpr eq,L180
L174:
ldl rr6,rr12
callr _iput
L10032:
ldm r10,_stkseg+0(fp),#4
inc fp,#~L2
ret
~L1 := 0
~L2 := 8
} /* _mknod */
.psec data
.data
/*~~saccess:*/
.psec
.code
_saccess::
{
dec fp,#~L2
ldm _stkseg+0(fp),r8,#6
ldl rr8,_u+36
ld r13,_u+24
ld r12,_u+26
ld r2,_u+28
ld _u+24,r2
ld r3,_u+30
ld _u+26,r3
ldl rr6,#_uchar
sub r5,r5
callr _namei
ldl rr10,rr2
testl rr2
jpr eq,L183
ld r2,rr8(#4)
bit r2,#2
jpr eq,L184
ldl rr6,rr10
ld r5,#256
callr _access
L184:
ld r2,rr8(#4)
bit r2,#1
jpr eq,L185
ldl rr6,rr10
ld r5,#128
callr _access
L185:
ld r2,rr8(#4)
bit r2,#0
jpr eq,L186
ldl rr6,rr10
ld r5,#64
callr _access
L186:
ldl rr6,rr10
callr _iput
L183:
ld _u+24,r13
ld _u+26,r12
ldm r8,_stkseg+0(fp),#6
inc fp,#~L2
ret
~L1 := 0
~L2 := 12
} /* _saccess */
.psec data
.data

View File

@ -1,846 +0,0 @@
.seg
.psec data
.data
fp := r15;
sp := rr14;
_sys3wstr::
.byte %40
.byte %5b
.byte %24
.byte %5d
.byte %73
.byte %79
.byte %73
.byte %33
.byte %2e
.byte %63
.byte %9
.byte %9
.byte %52
.byte %65
.byte %76
.byte %20
.byte %3a
.byte %20
.byte %34
.byte %2e
.byte %31
.byte %20
.byte %9
.byte %30
.byte %38
.byte %2f
.byte %32
.byte %37
.byte %2f
.byte %38
.byte %33
.byte %20
.byte %31
.byte %31
.byte %3a
.byte %35
.byte %39
.byte %3a
.byte %32
.byte %38
.byte %0
.byte 0
.comm 0, _buffer1;
.comm 0, _buffer2;
.comm 0, _buffer3;
.comm 0, _buffer4;
.comm 0, _buffer5;
.comm 0, _canonb;
.comm 4, _rootdir;
.comm 4, _runq;
.comm 2, _lbolt;
.comm 4, _lifetime;
.comm 4, _time;
.comm 2, _nblkdev;
.comm 2, _nchrdev;
.comm 2, _mpid;
.comm 1, _runin;
.comm 1, _runout;
.comm 1, _runrun;
.comm 1, _curpri;
.comm 2, _maxmem;
.comm 2, _umemory;
.comm 4, _swplo;
.comm 2, _nswap;
.comm 2, _updlock;
.comm 4, _rablock;
.comm 128, _msgbuf;
.comm 2, _rootdev;
.comm 2, _swapdev;
.comm 2, _pipedev;
.comm 4, _serial;
.comm 2, _numterm;
.comm 2, _manboot;
.comm 2, _blkacty;
.comm 2, _cputype;
.comm 112, _sysinfo;
.comm 6, _syswait;
.comm 2, _dk_busy;
.comm 128, _dk_time;
.comm 12, _dk_numb;
.comm 12, _dk_wds;
.comm 4, _tk_nin;
.comm 4, _tk_nout;
.comm 0, _mount;
/*~~fstat:*/
.psec
.code
_fstat::
{
dec fp,#~L2
ldm _stkseg+0(fp),r10,#4
ldl rr10,_u+36
ld r7,@rr10
callr _getf
ldl rr12,rr2
testl rr2
jpr eq,L10000
ldl rr6,rr12(#2)
ldl rr4,rr10(#2)
ldb rl2,@rr12
extsb r2
bit r2,#2
jpr eq,L10003
ldl rr2,rr12(#6)
jpr L10004
L10003:
subl rr2,rr2
L10004:
callr _stat1
L10000:
ldm r10,_stkseg+0(fp),#4
inc fp,#~L2
ret
~L1 := 0
~L2 := 8
} /* _fstat */
.psec data
.data
/*~~stat:*/
.psec
.code
_stat::
{
dec fp,#~L2
ldm _stkseg+0(fp),r10,#4
ldl rr10,_u+36
ldl rr6,#_uchar
sub r5,r5
callr _namei
ldl rr12,rr2
testl rr2
jpr eq,L10005
ldl rr4,rr10(#4)
ldl rr6,rr2
subl rr2,rr2
callr _stat1
ldl rr6,rr12
callr _iput
L10005:
ldm r10,_stkseg+0(fp),#4
inc fp,#~L2
ret
~L1 := 0
~L2 := 8
} /* _stat */
.psec data
.data
/*~~stat1:*/
.psec
.code
_stat1::
{
sub fp,#~L2
ldm _stkseg+42(fp),r8,#6
ldm |_stkseg+~L1+0|(fp),r2,#4
ldl rr12,rr6
ldl rr4,#_time
ldl rr2,rr4
callr _iupdat
ld r2,rr12(#2)
ld |_stkseg+~L1+12|(fp),r2
ld r2,rr12(#4)
ld |_stkseg+~L1+14|(fp),r2
ld r2,rr12(#6)
ld |_stkseg+~L1+16|(fp),r2
ld r2,rr12(#8)
ld |_stkseg+~L1+18|(fp),r2
ld r2,rr12(#10)
ld |_stkseg+~L1+20|(fp),r2
ld r2,rr12(#12)
ld |_stkseg+~L1+22|(fp),r2
ldl rr2,rr12(#18)
ld |_stkseg+~L1+24|(fp),r3
ldl rr2,rr12(#14)
subl rr2,|_stkseg+~L1|(fp)
ldl |_stkseg+~L1+26|(fp),rr2
ld r7,rr12(#2)
ld r4,rr12(#4)
inc r4,#15
srl r4,#3
ldk r2,#0
ld r3,r4
ldl rr4,rr2
callr _bread
ldl rr8,rr2
ldl rr2,rr8(#22)
ldl rr10,rr2
ld r2,rr12(#4)
inc r2,#15
and r2,#7
sla r2,#6
add r2,r11
ld r11,r2
ldl rr2,rr10(#52)
ldl |_stkseg+~L1+30|(fp),rr2
ldl rr2,rr10(#56)
ldl |_stkseg+~L1+34|(fp),rr2
ldl rr2,rr10(#60)
ldl |_stkseg+~L1+38|(fp),rr2
ldl rr6,rr8
callr _brelse
ldl rr6,#_stkseg+~L1+12
add r7,fp
ldl rr4,|_stkseg+~L1+4|(fp)
ld r3,#30
callr _copyout
cp r2,#0
jpr ge,L10008
ldb _u+21,#14
L10008:
ldm r8,_stkseg+42(fp),#6
add fp,#~L2
ret
~L1 := 0
~L2 := 54
} /* _stat1 */
.psec data
.data
/*~~dup:*/
.psec
.code
_dup::
{
sub fp,#~L2
ldm _stkseg+6(fp),r8,#6
ldl rr10,_u+36
ld r2,@rr10
and r2,#-64
ld r8,r2
ld r2,@rr10
and r2,#63
ld @rr10,r2
ld r7,@rr10
callr _getf
ldl rr12,rr2
testl rr2
jpr eq,L10011
ld r2,r8
and r2,#64
test r2
jpr ne,L107
sub r7,r7
callr _ufalloc
ld r9,r2
cp r2,#0
jpr ge,L110
jpr L10011
L107:
ld r2,rr10(#2)
ld r9,r2
cp r2,#0
jpr lt,L10014
cp r2,#20
jpr lt,L111
L10014:
ldb _u+21,#9
jpr L10011
L111:
ld _u+40,r9
L110:
cp r9,@rr10
jpr eq,L10011
ld r2,r9
sla r2,#2
ldl rr4,_u+104(r2)
testl rr4
jpr eq,L113
ld r2,r9
sla r2,#2
ldl rr6,_u+104(r2)
callr _closef
L113:
ld r2,r9
sla r2,#2
ldl rr4,#_u+104
add r5,r2
ldl @rr4,rr12
ldl rr2,rr12
inc r3,#1
ldl rr2,rr12
inc r3,#1
incb @rr2,#1
L10011:
ldm r8,_stkseg+6(fp),#6
add fp,#~L2
ret
~L1 := 0
~L2 := 18
} /* _dup */
.psec data
.data
.even
/*~~fcntl:*/
.psec
.code
_fcntl::
{
.psec data
.data
.even
L128:
.long L120
.long L123
.long L124
.long L125
.long L126
.psec
.code
dec fp,#~L2
ldm _stkseg+0(fp),r9,#5
ldl rr10,_u+36
ld r7,@rr10
callr _getf
ldl rr12,rr2
testl rr2
jpr eq,L10015
ld r3,rr10(#2)
ld r2,r3
cp r3,#4
jpr ugt,L127
rl r2,#2
ldl rr4,L128(r2)
jp @rr4
L120:
ld r3,rr10(#4)
ld r9,r3
cp r3,#0
jpr lt,L127
cp r3,#20
jpr gt,L127
ld r7,r3
callr _ufalloc
ld r9,r2
cp r2,#0
jpr lt,L10015
sla r2,#2
ldl rr4,#_u+104
add r5,r2
ldl @rr4,rr12
ldl rr2,rr12
inc r3,#1
ldl rr2,rr12
inc r3,#1
incb @rr2,#1
jpr L10015
L123:
ld r2,@rr10
ldb rl3,_u+184(r2)
extsb r3
ld _u+40,r3
jpr L10015
L124:
ld r2,rr10(#4)
ld r3,@rr10
ldl rr4,#_u+184
add r5,r3
ldb @rr4,rl2
jpr L10015
L125:
ldb rl2,@rr12
extsb r2
dec r2,#1
ld _u+40,r2
jpr L10015
L126:
ldb rl2,@rr12
andb rl2,#3
ldb @rr12,rl2
ld r2,rr10(#4)
inc r2,#1
and r2,#-4
orb rl2,@rr12
ldb @rr12,rl2
jpr L10015
L127:
ldb _u+21,#22
L10015:
ldm r9,_stkseg+0(fp),#5
inc fp,#~L2
ret
~L1 := 0
~L2 := 10
} /* _fcntl */
.psec data
.data
/*~~smount:*/
.psec
.code
_smount::
{
sub fp,#~L2
ldm _stkseg+20(fp),r8,#6
ldl rr2,_u+36
ldl |_stkseg+~L1+12|(fp),rr2
callr _getmdev
ld r13,r2
testb _u+21
jpr ne,L10019
ldl rr2,|_stkseg+~L1+12|(fp)
ldl rr4,rr2(#4)
and r4,#32512
ldl _u+78,rr4
ldl rr6,#_uchar
sub r5,r5
callr _namei
ldl rr10,rr2
testl rr2
jpr eq,L10019
ldb rl2,rr10(#1)
cpb rl2,#1
jpr ne,L134
ld r2,rr10(#6)
and r2,#8192
test r2
jpr ne,L134
subl rr2,rr2
ldl |_stkseg+~L1|(fp),rr2
ldl rr8,#_mount
jpr L138
L20001:
ldl rr2,rr8(#8)
testl rr2
jpr eq,L139
ldl rr2,rr8
inc r3,#2
cp r13,@rr2
jpr ne,L136
jpr L134
L139:
ldl rr2,|_stkseg+~L1|(fp)
testl rr2
jpr ne,L136
ldl |_stkseg+~L1|(fp),rr8
L136:
inc r9,#12
L138:
ld r3,_Nmount
mult rr2,#12
ldl rr4,#_mount
add r5,r3
cpl rr8,rr4
jpr ult,L20001
ldl rr8,|_stkseg+~L1|(fp)
testl rr8
jpr eq,L134
ld r2,r13
ldb rl2,rh2
extsb r2
ld r5,r2
mult rr4,#12
ldl rr2,_bdevsw(r5)
ldl |_stkseg+~L1+16|(fp),rr2
ldl rr4,|_stkseg+~L1+12|(fp)
ld r6,rr4(#8)
test r6
jpr ne,L10022
ldk r6,#1
jpr L10023
L10022:
ldk r6,#0
L10023:
ld r7,r13
ldl rr2,|_stkseg+~L1+16|(fp)
call @rr2
testb _u+21
jpr ne,L134
ld r7,r13
ldl rr4,#1
callr _bread
ldl |_stkseg+~L1+8|(fp),rr2
testb _u+21
jpr eq,L145
ldl rr6,rr2
callr _brelse
jpr L146
L145:
ldl rr2,rr8
inc r3,#4
ldl @rr2,rr10
ldl rr2,rr8
inc r3,#2
ld @rr2,r13
callr _geteblk
ldl rr4,rr8
inc r5,#8
ldl @rr4,rr2
ldl rr6,|_stkseg+~L1+8|(fp)
ldl rr2,rr6(#22)
ldl rr6,rr2
ldl rr4,rr8(#8)
ldl rr2,rr4(#22)
ldl rr4,rr2
ld r3,#512
callr _bcopy
ldl rr2,rr8(#8)
ldl rr4,rr2(#22)
ldl |_stkseg+~L1+4|(fp),rr4
ld @rr8,#1
ldl rr2,|_stkseg+~L1+4|(fp)
add r3,#411
clrb @rr2
ldl rr2,|_stkseg+~L1+4|(fp)
add r3,#410
clrb @rr2
ldl rr2,|_stkseg+~L1+12|(fp)
ld r4,rr2(#8)
and r4,#1
ldl rr6,|_stkseg+~L1+4|(fp)
add r7,#413
ldb @rr6,rl4
ldl rr6,|_stkseg+~L1+8|(fp)
callr _brelse
setb @rr10,#3
ldl rr6,rr10
callr _prele
jpr L10019
L134:
ldb _u+21,#16
L146:
ldl rr6,rr10
callr _iput
L10019:
ldm r8,_stkseg+20(fp),#6
add fp,#~L2
ret
~L1 := 0
~L2 := 32
} /* _smount */
.psec data
.data
/*~~sumount:*/
.psec
.code
_sumount::
{
sub fp,#~L2
ldm _stkseg+8(fp),r8,#6
callr _getmdev
ld r13,r2
testb _u+21
jpr ne,L10024
ld r7,r2
callr _xumount
callr _update
ldl rr8,#_mount
jpr L156
L20003:
ldl rr2,rr8(#8)
testl rr2
jpr eq,L154
ldl rr2,rr8
inc r3,#2
cp r13,@rr2
jpr eq,L158
L154:
inc r9,#12
L156:
ld r3,_Nmount
mult rr2,#12
ldl rr4,#_mount
add r5,r3
cpl rr8,rr4
jpr ult,L20003
ldb _u+21,#22
jpr L10024
L158:
ldl rr10,#_inode
jpr L161
L20005:
ld r2,rr10(#4)
test r2
jpr eq,L159
ldl rr2,rr10
inc r3,#2
cp r13,@rr2
jpr ne,L159
ldb _u+21,#16
jpr L10024
L159:
add r11,#82
L161:
ld r3,_Ninode
mult rr2,#82
ldl rr4,#_inode
add r5,r3
cpl rr10,rr4
jpr ult,L20005
ld r2,r13
ldb rl2,rh2
extsb r2
ld r5,r2
mult rr4,#12
ldl rr2,_bdevsw+4(r5)
ldl |_stkseg+~L1+4|(fp),rr2
ld r7,r13
sub r6,r6
call @rr2
ld r7,r13
callr _binval
ldl rr2,rr8(#4)
ldl rr10,rr2
resb @rr10,#3
ldl rr6,rr10
callr _plock
ldl rr6,rr10
callr _iput
ldl rr2,rr8(#8)
ldl |_stkseg+~L1|(fp),rr2
ldl rr2,rr8
inc r3,#8
subl rr4,rr4
ldl @rr2,rr4
ldl rr6,|_stkseg+~L1|(fp)
callr _brelse
clr @rr8
L10024:
ldm r8,_stkseg+8(fp),#6
add fp,#~L2
ret
~L1 := 0
~L2 := 20
} /* _sumount */
.psec data
.data
/*~~getmdev:*/
.psec
.code
_getmdev::
{
dec fp,#~L2
ldm _stkseg+2(fp),r10,#4
ldl rr6,#_uchar
sub r5,r5
callr _namei
ldl rr10,rr2
testl rr2
jpr ne,L166
ld r2,#-1
jpr L10027
L166:
ld r2,rr10(#6)
and r2,#61440
cp r2,#24576
jpr eq,L167
ldb _u+21,#15
L167:
ldl rr2,rr10(#18)
ld r13,r3
ld r2,r3
ldb rl2,rh2
extsb r2
cp r2,_nblkdev
jpr lt,L168
ldb _u+21,#6
L168:
ldl rr6,rr10
callr _iput
ld r2,r13
L10027:
ldm r10,_stkseg+2(fp),#4
inc fp,#~L2
ret
~L1 := 0
~L2 := 10
} /* _getmdev */
.psec data
.data
/*~~ioctl:*/
.psec
.code
_ioctl::
{
sub fp,#~L2
ldm _stkseg+10(fp),r8,#6
ldl rr8,_u+36
ld r7,@rr8
callr _getf
ldl rr12,rr2
testl rr2
jpr eq,L10030
ldl rr2,rr12(#2)
ldl rr10,rr2
ld r2,rr10(#6)
and r2,#61440
cp r2,#8192
jpr eq,L172
ldb _u+21,#25
jpr L10030
L172:
clr _u+40
ldl rr2,rr10(#18)
ld |_stkseg+~L1|(fp),r3
ld r2,r3
ldb rl2,rh2
extsb r2
ld r5,r2
mult rr4,#28
ldl rr2,_cdevsw+16(r5)
ldl |_stkseg+~L1+2|(fp),rr2
ld r6,rr8(#2)
ldl rr4,rr8(#4)
ld r7,|_stkseg+~L1|(fp)
and r7,#255
ldb rl3,@rr12
extsb r3
ldl _stkseg+~L1+6(fp),rr8
ldl rr8,_stkseg+~L1+2(fp)
call @rr8
ldl rr8,_stkseg+~L1+6(fp)
L10030:
ldm r8,_stkseg+10(fp),#6
add fp,#~L2
ret
~L1 := 0
~L2 := 22
} /* _ioctl */
.psec data
.data
/*~~stty:*/
.psec
.code
_stty::
{
ld _u+206,#29705
ld r2,_u+208
ld _u+210,r2
ld _u+208,#16128
callr _ioctl
ret
~L1 := 0
~L2 := 0
} /* _stty */
.psec data
.data
/*~~gtty:*/
.psec
.code
_gtty::
{
ld _u+206,#29704
ld r2,_u+208
ld _u+210,r2
ld _u+208,#16128
callr _ioctl
ret
~L1 := 0
~L2 := 0
} /* _gtty */
.psec data
.data
/*~~mdmctl:*/
.psec
.code
_mdmctl::
{
dec fp,#~L2
ldm _stkseg+8(fp),r12,#2
ldl rr12,_u+36
ld r2,rr12(#6)
cp r2,#0
jpr lt,L10042
cp r2,_nchrdev
jpr lt,L179
L10042:
ldb _u+21,#19
jpr L10039
L179:
clr _u+40
ld r2,rr12(#6)
ld r5,r2
mult rr4,#28
ldl rr2,_cdevsw+16(r5)
ldl |_stkseg+~L1|(fp),rr2
ldl rr4,rr12(#2)
ld r3,rr12(#6)
sub r7,r7
ld r6,@rr12
ldl _stkseg+~L1+4(fp),rr8
ldl rr8,_stkseg+~L1+0(fp)
call @rr8
ldl rr8,_stkseg+~L1+4(fp)
L10039:
ldm r12,_stkseg+8(fp),#2
inc fp,#~L2
ret
~L1 := 0
~L2 := 12
} /* _mdmctl */
.psec data
.data

View File

@ -1,779 +0,0 @@
.seg
.psec data
.data
fp := r15;
sp := rr14;
_uregwstr::
.byte %40
.byte %5b
.byte %24
.byte %5d
.byte %75
.byte %72
.byte %65
.byte %67
.byte %2e
.byte %63
.byte %9
.byte %9
.byte %52
.byte %65
.byte %76
.byte %20
.byte %3a
.byte %20
.byte %34
.byte %2e
.byte %31
.byte %20
.byte %9
.byte %30
.byte %38
.byte %2f
.byte %32
.byte %37
.byte %2f
.byte %38
.byte %33
.byte %20
.byte %31
.byte %32
.byte %3a
.byte %30
.byte %31
.byte %3a
.byte %30
.byte %35
.byte %0
.byte 0
.comm 0, _buffer1;
.comm 0, _buffer2;
.comm 0, _buffer3;
.comm 0, _buffer4;
.comm 0, _buffer5;
.comm 0, _canonb;
.comm 4, _rootdir;
.comm 4, _runq;
.comm 2, _lbolt;
.comm 4, _lifetime;
.comm 4, _time;
.comm 2, _nblkdev;
.comm 2, _nchrdev;
.comm 2, _mpid;
.comm 1, _runin;
.comm 1, _runout;
.comm 1, _runrun;
.comm 1, _curpri;
.comm 2, _maxmem;
.comm 2, _umemory;
.comm 4, _swplo;
.comm 2, _nswap;
.comm 2, _updlock;
.comm 4, _rablock;
.comm 128, _msgbuf;
.comm 2, _rootdev;
.comm 2, _swapdev;
.comm 2, _pipedev;
.comm 4, _serial;
.comm 2, _numterm;
.comm 2, _manboot;
.comm 2, _blkacty;
.comm 2, _cputype;
.comm 112, _sysinfo;
.comm 6, _syswait;
.comm 2, _dk_busy;
.comm 128, _dk_time;
.comm 12, _dk_numb;
.comm 12, _dk_wds;
.comm 4, _tk_nin;
.comm 4, _tk_nout;
L98:
.byte %73,%75,%72,%65,%67,%3a,%20,%75
.byte %73,%65,%72,%20,%69,%73,%20,%73
.byte %65,%67,%6d,%65,%6e,%74,%65,%64
.byte %a,%0
.even
/*~~sureg:*/
.psec
.code
_sureg::
{
dec fp,#~L2
ldm _stkseg+0(fp),r10,#4
testb _u+544
jpr ne,L10003
ld r7,#65473
callr _inb
bit r2,#2
jpr eq,L96
L10003:
ldl rr6,#L98
callr _panic
L96:
ldl rr2,_u+32
ld r4,rr2(#18)
inc r4,#10
ld _u+802,r4
ldk r2,#0
ldb rl2,_u+804
add r2,r4
inc r2,#1
ldk r3,#0
ldb rl3,_u+1060
sub r2,r3
ld _u+1058,r2
ldl rr2,_u+32
ldl rr4,rr2(#26)
ldl rr10,rr4
testl rr4
jpr eq,L99
ld r4,rr10(#2)
ld _u+546,r4
ldl rr12,#_u+546
jpr L100
L99:
ldl rr12,#_u+802
L100:
ld r7,_mmut
ld r6,#63
ldl rr4,rr12
callr _loadsd
ld r7,_mmud
ld r6,#63
ldl rr4,#_u+802
callr _loadsd
ld r7,_mmus
ld r6,#63
ldl rr4,#_u+1058
callr _loadsd
ldk r2,#0
ldb rl2,_u+804
inc r2,#1
ld _u+102,r2
ld r7,#65489
ld r6,r2
callr _outb
ldm r10,_stkseg+0(fp),#4
inc fp,#~L2
ret
~L1 := 0
~L2 := 8
} /* _sureg */
.psec data
.data
/*~~estabur:*/
.psec
.code
_estabur::
{
dec fp,#~L2
ldm _stkseg+10(fp),r11,#3
ld |_stkseg+~L1+0|(fp),r4
ld r11,r5
ld r12,r6
ld r13,r7
cp r7,#256
jpr ugt,L10007
ld r5,r6
add r5,r11
cp r5,#255
jpr ugt,L10007
ld r5,r7
add r5,r12
add r5,r11
inc r5,#10
cp r5,_maxmem
jpr ule,L105
L10007:
ldb _u+21,#12
ld r2,#-1
jpr L10004
L105:
test r13
jpr ne,L10009
sub r2,r2
jpr L10010
L10009:
ld r2,r13
dec r2,#1
L10010:
ldb _u+548,rl2
test r12
jpr ne,L10011
sub r2,r2
jpr L10012
L10011:
ld r2,r12
dec r2,#1
L10012:
ldb _u+804,rl2
test r11
jpr ne,L10013
sub r2,r2
jpr L10014
L10013:
ld r2,r11
neg r2
add r2,#256
L10014:
ldb _u+1060,rl2
test r13
jpr ne,L10015
ld r3,#20
jpr L10016
L10015:
ld r3,|_stkseg+~L1|(fp)
L10016:
ldb _u+549,rl3
test r12
jpr ne,L10017
ld r2,#20
jpr L10018
L10017:
sub r2,r2
L10018:
ldb _u+805,rl2
test r11
jpr ne,L10019
ld r2,#20
jpr L10020
L10019:
ld r2,#32
L10020:
ldb _u+1061,rl2
callr _sureg
sub r2,r2
L10004:
ldm r11,_stkseg+10(fp),#3
inc fp,#~L2
ret
~L1 := 0
~L2 := 16
} /* _estabur */
.psec data
.data
/*~~sestabur:*/
.psec
.code
_sestabur::
{
sub fp,#~L2
ldm _stkseg+12(fp),r11,#2
ld |_stkseg+~L1+4|(fp),r6
ld r11,r4
ld r12,r5
ld r1,r7
cp r7,#256
jpr ule,L108
ldb _u+21,#12
jpr L20000
L20003:
ldb _u+21,#8
L20000:
ld r2,#-1
jpr L10021
L108:
ldb rl2,|_stkseg+~L1+5|(fp)
extsb r2
and r2,#127
ldb |_stkseg+~L1+9|(fp),rl2
cp r12,#128
jpr ugt,L20003
ldb rl2,rl2
extsb r2
cp r2,_u+1390
jpr ne,L110
test r1
jpr ne,L10024
sub r2,r2
jpr L10025
L10024:
ld r2,r1
neg r2
add r2,#256
L10025:
ldb _u+1060,rl2
test r1
jpr ne,L10026
ld r3,#20
jpr L10027
L10026:
ld r3,#32
L10027:
ldb _u+1061,rl3
jpr L112
L110:
ld r2,r12
sla r2,#2
ldl rr4,#_u+552
add r5,r2
test r1
jpr ne,L10028
sub r2,r2
jpr L10029
L10028:
ld r2,r1
dec r2,#1
L10029:
ldb @rr4,rl2
ldb rl2,|_stkseg+~L1+5|(fp)
extsb r2
bit r2,#7
jpr eq,L111
ld r2,r12
sla r2,#2
ldl rr4,#_u+553
add r5,r2
test r1
jpr ne,L10030
L20001:
ld r2,#20
jpr L10033
L10030:
ld r2,r11
jpr L10033
L111:
ld r2,r12
sla r2,#2
ldl rr4,#_u+553
add r5,r2
test r1
jpr eq,L20001
sub r2,r2
L10033:
ldb @rr4,rl2
L112:
sub r2,r2
L10021:
ldm r11,_stkseg+12(fp),#2
add fp,#~L2
ret
~L1 := 0
~L2 := 18
} /* _sestabur */
.psec data
.data
/*~~segureg:*/
.psec
.code
_segureg::
{
dec fp,#~L2
ldm _stkseg+4(fp),r8,#6
ldl rr2,_u+32
ld r4,rr2(#18)
inc r4,#10
ld r12,r4
ldl rr2,_u+32
ldl rr4,rr2(#26)
ldl rr8,rr4
testl rr4
jpr eq,L115
ld r4,rr8(#2)
ld r13,r4
jpr L116
L115:
ldk r13,#0
L116:
clrb |_stkseg+~L1+1|(fp)
jpr L119
L20006:
ldb rl3,|_stkseg+~L1+1|(fp)
extsb r3
ldb rl4,_u+1062(r3)
extsb r4
and r4,#127
ld r11,r4
ldb rl3,|_stkseg+~L1+1|(fp)
extsb r3
sla r3,#2
ldb rl4,_u+553(r3)
subb rh4,rh4
and r4,#20
ldb |_stkseg+~L1+3|(fp),rl4
ldb rl3,|_stkseg+~L1+1|(fp)
extsb r3
ldb rl4,_u+1062(r3)
extsb r4
bit r4,#7
jpr eq,L120
ldb rl3,|_stkseg+~L1+1|(fp)
extsb r3
sla r3,#2
ldl rr4,#_u+550
add r5,r3
ld @rr4,r13
ldb rl3,|_stkseg+~L1+1|(fp)
extsb r3
sla r3,#2
ldb rl4,_u+552(r3)
testb rl4
jpr ne,L10037
testb |_stkseg+~L1+3|(fp)
jpr ne,L122
L10037:
ldb rl2,|_stkseg+~L1+1|(fp)
extsb r2
sla r2,#2
ldb rl3,_u+552(r2)
subb rh3,rh3
inc r3,#1
add r13,r3
jpr L122
L120:
ldb rl2,|_stkseg+~L1+1|(fp)
extsb r2
sla r2,#2
ldl rr4,#_u+550
add r5,r2
ld @rr4,r12
ldb rl2,|_stkseg+~L1+1|(fp)
extsb r2
sla r2,#2
ldb rl3,_u+552(r2)
testb rl3
jpr ne,L10038
testb |_stkseg+~L1+3|(fp)
jpr ne,L122
L10038:
ldb rl2,|_stkseg+~L1+1|(fp)
extsb r2
sla r2,#2
ldb rl3,_u+552(r2)
subb rh3,rh3
inc r3,#1
add r12,r3
L122:
cp r11,#64
jpr uge,L124
ldb rl2,|_stkseg+~L1+1|(fp)
extsb r2
sla r2,#2
ldl rr4,#_u+550
add r5,r2
ld r6,r11
ld r7,_mmud
jpr L20004
L124:
ldb rl2,|_stkseg+~L1+1|(fp)
extsb r2
sla r2,#2
ldl rr4,#_u+550
add r5,r2
ld r6,r11
ld r7,_mmus
L20004:
callr _loadsd
incb |_stkseg+~L1+1|(fp),#1
L119:
ldb rl2,|_stkseg+~L1+1|(fp)
cpb rl2,_u+1190
jpr lt,L20006
ldk r2,#0
ldb rl2,_u+1060
ld r3,r12
sub r3,r2
ld _u+1058,r3
cp _u+1390,#64
jpr ge,L10039
ld r7,_mmud
jpr L10040
L10039:
ld r7,_mmus
L10040:
ld r6,#127
ldl rr4,#_u+1058
callr _loadsd
ldm r8,_stkseg+4(fp),#6
inc fp,#~L2
ret
~L1 := 0
~L2 := 16
} /* _segureg */
.psec data
.data
/*~~ldsdr:*/
.psec
.code
_ldsdr::
{
dec fp,#~L2
ldm _stkseg+8(fp),r11,#3
ldm |_stkseg+~L1+0|(fp),r4,#4
ld r2,|_stkseg+~L1+6|(fp)
and r2,#127
ld |_stkseg+~L1+6|(fp),r2
cp r2,_u+1390
jpr eq,L128
ldk r11,#0
jpr L131
L20008:
ldb rl2,_u+1062(r11)
extsb r2
and r2,#127
cp r2,|_stkseg+~L1+6|(fp)
jpr eq,L130
inc r11,#1
L131:
ldb rl2,_u+1190
extsb r2
cp r11,r2
jpr lt,L20008
L130:
ldb rl2,_u+1190
extsb r2
cp r11,r2
jpr ne,L133
ldb _u+21,#36
jpr L10041
L133:
ld r2,r11
sla r2,#2
ldl rr4,#_u+550
add r5,r2
ldl rr12,rr4
jpr L134
L128:
ldl rr12,#_u+1058
L134:
cp |_stkseg+~L1+6|(fp),#64
jpr ge,L10044
ld r7,_mmud
jpr L10045
L10044:
ld r7,_mmus
L10045:
ld r6,|_stkseg+~L1+6|(fp)
ldl rr4,rr12
callr _getsd
cp |_stkseg+~L1+4|(fp),#65535
jpr eq,L136
ld r2,|_stkseg+~L1+4|(fp)
ld @rr12,r2
L136:
cp |_stkseg+~L1+2|(fp),#65535
jpr eq,L137
ldl rr2,rr12
inc r3,#2
ld r4,|_stkseg+~L1+6|(fp)
cp r4,_u+1390
jpr ne,L10046
ld r5,#256
sub r5,|_stkseg+~L1+2|(fp)
jpr L10047
L10046:
ld r5,|_stkseg+~L1+2|(fp)
dec r5,#1
L10047:
ldb @rr2,rl5
L137:
cp |_stkseg+~L1|(fp),#65535
jpr eq,L138
ldl rr2,rr12
inc r3,#3
ldb rl4,|_stkseg+~L1+1|(fp)
ldb @rr2,rl4
L138:
cp |_stkseg+~L1+6|(fp),#64
jpr ge,L10048
ld r7,_mmud
jpr L10049
L10048:
ld r7,_mmus
L10049:
ld r6,|_stkseg+~L1+6|(fp)
ldl rr4,rr12
callr _loadsd
L10041:
ldm r11,_stkseg+8(fp),#3
inc fp,#~L2
ret
~L1 := 0
~L2 := 14
} /* _ldsdr */
.psec data
.data
L144:
.byte %63,%6f,%64,%65,%3a,%20,%25,%78
.byte %20,%25,%78,%20,%25,%78,%a,%0
.even
L145:
.byte %64,%61,%74,%61,%3a,%20,%25,%78
.byte %20,%25,%78,%20,%25,%78,%a,%0
.even
L152:
.byte %73,%65,%67,%2f,%73,%6c,%6f,%74
.byte %20,%25,%78,%2f,%25,%78,%3a,%20
.byte %25,%78,%20,%25,%78,%20,%25,%78
.byte %a,%0
.even
L153:
.byte %73,%74,%61,%6b,%3a,%20,%25,%78
.byte %20,%25,%78,%20,%25,%78,%a,%0
.even
L154:
.byte %4d,%41,%50,%55,%3a,%20,%25,%78
.byte %20,%25,%78,%20,%25,%78,%a,%0
.even
L155:
.byte %44,%4d,%41,%31,%3a,%20,%25,%78
.byte %20,%25,%78,%20,%25,%78,%a,%0
.even
L156:
.byte %44,%4d,%41,%32,%3a,%20,%25,%78
.byte %20,%25,%78,%20,%25,%78,%a,%0
.even
/*~~prmmu:*/
.psec
.code
_prmmu::
{
dec fp,#~L2
ldk r7,#10
callr _putchar
testb _u+544
jpr ne,L142
ldl rr4,#_stkseg+~L1+4
add r5,fp
ld r6,#63
ld r7,_mmut
callr _getsd
ldl rr6,#L144
ld r5,|_stkseg+~L1+4|(fp)
ldb rl4,|_stkseg+~L1+6|(fp)
ldb rh4,#0
ldb rl3,|_stkseg+~L1+7|(fp)
ldb rh3,#0
callr _printf
ldl rr4,#_stkseg+~L1+4
add r5,fp
ld r6,#63
ld r7,_mmud
callr _getsd
ldl rr6,#L145
ld r5,|_stkseg+~L1+4|(fp)
ldb rl4,|_stkseg+~L1+6|(fp)
ldb rh4,#0
ldb rl3,|_stkseg+~L1+7|(fp)
ldb rh3,#0
callr _printf
jpr L146
L142:
clr |_stkseg+~L1+2|(fp)
jpr L149
L20011:
ld r2,|_stkseg+~L1+2|(fp)
ldb rl3,_u+1062(r2)
extsb r3
ld |_stkseg+~L1|(fp),r3
cp r3,#64
jpr ge,L150
ldl rr4,#_stkseg+~L1+4
add r5,fp
ld r6,r3
ld r7,_mmud
jpr L20009
L150:
ldl rr4,#_stkseg+~L1+4
add r5,fp
ld r6,|_stkseg+~L1|(fp)
ld r7,_mmus
L20009:
callr _getsd
ldb rl2,|_stkseg+~L1+7|(fp)
ldb rh2,#0
ld |_stkseg|(fp),r2
ldl rr6,#L152
ld r5,|_stkseg+~L1|(fp)
ld r4,|_stkseg+~L1+2|(fp)
ld r3,|_stkseg+~L1+4|(fp)
ldb rl2,|_stkseg+~L1+6|(fp)
callr _printf
inc |_stkseg+~L1+2|(fp),#1
L149:
ldb rl2,_u+1190
extsb r2
cp r2,|_stkseg+~L1+2|(fp)
jpr gt,L20011
L146:
ldl rr4,#_stkseg+~L1+4
add r5,fp
ld r6,#63
ld r7,_mmus
callr _getsd
ldl rr6,#L153
ld r5,|_stkseg+~L1+4|(fp)
ldb rl4,|_stkseg+~L1+6|(fp)
ldb rh4,#0
ldb rl3,|_stkseg+~L1+7|(fp)
ldb rh3,#0
callr _printf
ldl rr4,#_stkseg+~L1+4
add r5,fp
ld r6,#59
ld r7,_mmut
callr _getsd
ldl rr6,#L154
ld r5,|_stkseg+~L1+4|(fp)
ldb rl4,|_stkseg+~L1+6|(fp)
ldb rh4,#0
ldb rl3,|_stkseg+~L1+7|(fp)
ldb rh3,#0
callr _printf
ldl rr4,#_stkseg+~L1+4
add r5,fp
ld r6,#60
ld r7,_mmut
callr _getsd
ldl rr6,#L155
ld r5,|_stkseg+~L1+4|(fp)
ldb rl4,|_stkseg+~L1+6|(fp)
ldb rh4,#0
ldb rl3,|_stkseg+~L1+7|(fp)
ldb rh3,#0
callr _printf
ldl rr4,#_stkseg+~L1+4
add r5,fp
ld r6,#61
ld r7,_mmut
callr _getsd
ldl rr6,#L156
ld r5,|_stkseg+~L1+4|(fp)
ldb rl4,|_stkseg+~L1+6|(fp)
ldb rh4,#0
ldb rl3,|_stkseg+~L1+7|(fp)
ldb rh3,#0
callr _printf
inc fp,#~L2
ret
~L1 := 2
~L2 := 10
} /* _prmmu */
.psec data
.data

View File

@ -1,193 +0,0 @@
#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <pwd.h>
struct stat stbuf;
int status;
char *tzname[2];
char *cbp;
int dmsize[];
long timbuf;
extern int *localtime();
long time();
struct {
int hi;
int lo;
};
gtime()
{
register int i;
register int y, t;
int d, h, m, s;
long nt;
tzset();
t = gpair();
if(t<1 || t>12)
return(1);
d = gpair();
if(d<1 || d>31)
return(1);
h = gpair();
if(h == 24) {
h = 0;
d++;
}
m = gpair();
if(m<0 || m>59)
return(1);
s = gpair();
if(s<0 || s>59)
return(1);
y = gpair();
if (y<0) {
time(&nt);
y = localtime(&nt)[5];
}
if (*cbp == 'p')
h += 12;
if (h<0 || h>23)
return(1);
timbuf = 0;
y += 1900;
for(i=1970; i<y; i++)
timbuf += dysize(i);
/* Leap year */
if (dysize(y)==366 && t >= 3)
timbuf += 1;
while(--t)
timbuf += dmsize[t-1];
timbuf += (d-1);
timbuf *= 24;
timbuf += h;
timbuf *= 60;
timbuf += m;
timbuf *= 60;
timbuf += s;
return(0);
}
gpair()
{
register int c, d;
register char *cp;
cp = cbp;
if(*cp == 0)
return(-1);
c = (*cp++ - '0') * 10;
if (c<0 || c>100)
return(-1);
if(*cp == 0)
return(-1);
if ((d = *cp++ - '0') < 0 || d > 9)
return(-1);
cbp = cp;
return (c+d);
}
main(argc, argv)
char *argv[];
{
register c;
extern long timezone;
struct utimbuf {
long actime;
long modtime;
} times;
int mflg=1, aflg=1, cflg=0, nflg=0, errflg=0, optc, fd;
extern char *optarg;
extern int optind;
while ((optc=getopt(argc, argv, "amc")) != EOF)
switch(optc) {
case 'm':
mflg++;
aflg--;
break;
case 'a':
aflg++;
mflg--;
break;
case 'c':
cflg++;
break;
case '?':
errflg++;
}
if(((argc-optind) < 1) || errflg) {
fprintf(stderr, "usage: touch [-amc] [date] file ...\n");
exit(2);
}
status = 0;
if(!isnumber(argv[optind]))
if((aflg <= 0) || (mflg <= 0))
timbuf = time((long *) 0);
else
nflg++;
else {
cbp = (char *)argv[optind++];
if(gtime()) {
fprintf(stderr, "date: bad conversion\n");
exit(2);
}
timbuf += timezone;
if (localtime(&timbuf)[8])
timbuf += -1*60*60;
}
for(c=optind; c<argc; c++) {
if(stat(argv[c], &stbuf)) {
if(cflg) {
status++;
continue;
}
else if ((fd = creat (argv[c], 0666)) < 0) {
fprintf(stderr, "touch: %s cannot create\n", argv[c]);
status++;
continue;
}
else {
close(fd);
if(stat(argv[c], &stbuf)) {
fprintf(stderr,"touch: %s cannot stat\n",argv[c]);
status++;
continue;
}
}
}
times.actime = times.modtime = timbuf;
if (mflg <= 0)
times.modtime = stbuf.st_mtime;
if (aflg <= 0)
times.actime = stbuf.st_atime;
if(utime(argv[c], nflg ? NULL : &times)) {
fprintf(stderr,"touch: cannot change times on %s\n",argv[c]);
status++;
continue;
}
}
exit(status);
}
isnumber(s)
char *s;
{
register c;
while(c = *s++)
if(!isdigit(c))
return(0);
return(1);
}