diff --git a/WEGA/src/uts/Makefile b/WEGA/src/uts/Makefile index 70ae3d1..8f1a9f7 100644 --- a/WEGA/src/uts/Makefile +++ b/WEGA/src/uts/Makefile @@ -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 $@ \ No newline at end of file diff --git a/WEGA/src/uts/README.md b/WEGA/src/uts/README.md new file mode 100644 index 0000000..93f586a --- /dev/null +++ b/WEGA/src/uts/README.md @@ -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 +``` \ No newline at end of file diff --git a/WEGA/src/uts/conf/Makefile b/WEGA/src/uts/conf/Makefile index 55dda43..8bb42c0 100644 --- a/WEGA/src/uts/conf/Makefile +++ b/WEGA/src/uts/conf/Makefile @@ -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) diff --git a/WEGA/src/uts/conf/u.obj b/WEGA/src/uts/conf/u.obj new file mode 100644 index 0000000..a92f7a1 Binary files /dev/null and b/WEGA/src/uts/conf/u.obj differ diff --git a/WEGA/src/uts/conf/u.s b/WEGA/src/uts/conf/u.s index ad2626f..b80b345 100644 --- a/WEGA/src/uts/conf/u.s +++ b/WEGA/src/uts/conf/u.s @@ -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 diff --git a/WEGA/src/uts/conf_times b/WEGA/src/uts/conf_times deleted file mode 100644 index 218217b..0000000 --- a/WEGA/src/uts/conf_times +++ /dev/null @@ -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 diff --git a/WEGA/src/uts/dev/Makefile b/WEGA/src/uts/dev/Makefile index 414519f..6c35566 100644 --- a/WEGA/src/uts/dev/Makefile +++ b/WEGA/src/uts/dev/Makefile @@ -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 diff --git a/WEGA/src/uts/dev/tt0.s b/WEGA/src/uts/dev/tt0.s deleted file mode 100644 index 6980d66..0000000 --- a/WEGA/src/uts/dev/tt0.s +++ /dev/null @@ -1,1136 +0,0 @@ -.seg -.psec data -.data - - -fp := r15; -sp := rr14; -_tt0wstr:: -.byte %40 -.byte %5b -.byte %24 -.byte %5d -.byte %74 -.byte %74 -.byte %30 -.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 %32 -.byte %39 -.byte %2f -.byte %38 -.byte %33 -.byte %20 -.byte %30 -.byte %31 -.byte %3a -.byte %30 -.byte %32 -.byte %3a -.byte %35 -.byte %38 -.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; -L138: -.byte %28,%69,%6e,%74,%72,%29,%0 -.even -L146: -.byte %28,%71,%75,%69,%74,%29,%a,%0 -.even -L162: -.byte %58,%58,%58,%0 -.even -L169: -.byte %28,%65,%6f,%66,%29,%a,%0 -.even -/*~~ttin:*/ - -.psec -.code - -_ttin:: -{ - sub fp,#~L2 - ldm _stkseg+18(fp),r8,#6 - ldm |_stkseg+~L1+0|(fp),r3,#3 - ldl rr12,rr6 - ld r2,rr12(#38) - ld r10,r2 - ld r2,r3 - test r3 - jpr eq,L94 - cp r3,#1 - jpr eq,L124 - ldl rr6,|_stkseg+~L1+2|(fp) - ldl rr4,rr12 - callr _putcb - ld r3,|_stkseg+~L1|(fp) - exts rr2 - addl rr2,_sysinfo+100 - ldl _sysinfo+100,rr2 - ldl rr2,|_stkseg+~L1+2|(fp) - inc r3,#6 - ldl rr4,|_stkseg+~L1+2|(fp) - ldb rl6,rr4(#4) - extsb r6 - add r3,r6 -L20004: - ldl rr8,rr2 - cp @rr12,#180 - jpr gt,L20006 -L128: - ld r2,rr12(#44) - ld r10,r2 - ldl rr2,rr12(#46) - and r2,#4 - ldk r3,#0 - testl rr2 - jpr ne,L131 - ld r2,r10 - test r10 - jpr ne,L132 -L131: - bit r10,#1 - jpr ne,L176 - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - and r5,#61439 - ldl @rr2,rr4 - ldb rl2,rr12(#60) - subb rh2,rh2 - cp r2,@rr12 - jpr ugt,L177 - ldl rr2,rr12 - add r3,#53 - ldb @rr2,#1 - jpr L176 -L20006: - bit r10,#12 - jpr eq,L129 - ldl rr2,rr12(#46) - ldk r2,#0 - and r3,#8 - testl rr2 - jpr ne,L129 - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+14|(fp),rr2 - ldl rr6,rr12 - ldk r5,#4 - call @rr2 -L129: - cp @rr12,#256 - jpr le,L128 - ldl rr6,rr12 - ldk r5,#1 - jpr L20036 -L20038: - bit r10,#0 - jpr ne,L10000 - bit r10,#1 - jpr eq,L102 - ld r7,rr12(#50) - ldk r6,#2 - callr _signal - ldl rr6,rr12 - ldk r5,#3 -L20036: - callr _ttyflush - jpr L10000 -L94: - inc |_stkseg+~L1|(fp),#1 - ld r11,|_stkseg+~L1+4|(fp) - bit r11,#12 - jpr eq,L95 - bit r10,#4 - jpr ne,L95 - res r11,#12 -L95: - ld r3,r11 - and r3,#28672 - jpr eq,L96 - ld r3,r11 - and r3,#255 - test r3 - jpr eq,L20038 - bit r10,#2 - jpr ne,L10000 -L102: - bit r10,#3 - jpr eq,L104 - ldl rr6,rr12 - ldl rr4,#255 - ldk r3,#1 - callr _ttin - ldl rr6,rr12 - subl rr4,rr4 - ldk r3,#1 - callr _ttin - jpr L105 -L104: - ldk r11,#0 -L105: - set r11,#8 - jpr L106 -L20003: - and r11,#127 -L106: - bit r10,#10 - jpr eq,L112 - ldl rr2,rr12(#46) - ldk r2,#0 - and r3,#256 - testl rr2 - jpr eq,L113 - cp r11,#17 - jpr eq,L10003 - bit r10,#11 - jpr eq,L115 -L10003: - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+14|(fp),rr2 - ldl rr6,rr12 - ldk r5,#3 - jpr L20001 -L96: - bit r10,#5 - jpr ne,L20003 - and r11,#255 - cp r11,#255 - jpr ne,L106 - bit r10,#3 - jpr eq,L106 - ld r7,#255 - ldl rr4,rr12 - callr _putc - test r2 - jpr eq,L106 - jpr L10000 -L113: - cp r11,#19 - jpr ne,L115 - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+14|(fp),rr2 - ldl rr6,rr12 - ldk r5,#2 -L20001: - ldl rr2,|_stkseg+~L1+14|(fp) - call @rr2 -L115: - cp r11,#17 - jpr eq,L10000 - cp r11,#19 - jpr eq,L10000 -L112: - cp r11,#10 - jpr ne,L118 - bit r10,#6 - jpr eq,L118 - ldk r11,#13 - jpr L119 -L118: - cp r11,#13 - jpr ne,L119 - bit r10,#7 - jpr ne,L10000 - bit r10,#8 - jpr eq,L119 - ldk r11,#10 -L119: - bit r10,#9 - jpr eq,L123 - cp r11,#65 - jpr lt,L123 - cp r11,#90 - jpr gt,L123 - add r11,#32 -L123: - ld r3,r11 - exts rr2 - ldl |_stkseg+~L1+2|(fp),rr2 -L124: - ldb rl7,|_stkseg+~L1+5|(fp) - extsb r7 - ldl rr4,rr12 - callr _putc - test r2 - jpr ne,L10000 - ldl rr2,_sysinfo+100 - addl rr2,#1 - ldl _sysinfo+100,rr2 - ldl rr2,#_stkseg+~L1+5 - add r3,fp - jpr L20004 -L20010: - ld r7,rr12(#50) - ldk r6,#2 - callr _signal - bit r10,#7 - jpr ne,L136 - ldl rr6,rr12 - ldk r5,#3 - callr _ttyflush -L136: - bit r10,#3 - jpr eq,L132 - bit r10,#13 - jpr eq,L132 - ldl rr2,#L138 - ldl |_stkseg+~L1+10|(fp),rr2 - jpr L141 -L20008: - ldl rr4,|_stkseg+~L1+10|(fp) - inc |_stkseg+~L1+12|(fp),#1 - ldb rl6,@rr4 - ldb rl5,rl6 - extsb r5 - exts rr4 - ldl rr6,rr12 - sub r3,r3 - callr _ttxput -L141: - ldl rr2,|_stkseg+~L1+10|(fp) - testb @rr2 - jpr ne,L20008 - jpr L20035 -L20020: - ldb rl2,rr12(#56) - subb rh2,rh2 - cp r11,r2 - jpr eq,L20010 - ldb rl2,rr12(#57) - subb rh2,rh2 - cp r11,r2 - jpr ne,L134 - ld r7,rr12(#50) - ldk r6,#3 - callr _signal - bit r10,#7 - jpr ne,L144 - ldl rr6,rr12 - ldk r5,#3 - callr _ttyflush -L144: - bit r10,#3 - jpr eq,L132 - bit r10,#13 - jpr eq,L132 - ldl rr2,#L146 - ldl |_stkseg+~L1+10|(fp),rr2 - jpr L149 -L20012: - ldl rr4,|_stkseg+~L1+10|(fp) - inc |_stkseg+~L1+12|(fp),#1 - ldb rl6,@rr4 - ldb rl5,rl6 - extsb r5 - exts rr4 - ldl rr6,rr12 - sub r3,r3 - callr _ttxput -L149: - ldl rr2,|_stkseg+~L1+10|(fp) - testb @rr2 - jpr ne,L20012 - jpr L20035 -L151: - ldb rl2,rr12(#61) - subb rh2,rh2 - cp r11,r2 - jpr ne,L153 -L20025: - ldl rr2,rr12 - add r3,#53 - ldl rr2,rr12 - add r3,#53 - incb @rr2,#1 -L153: - ldl rr2,rr12(#46) - ldk r2,#0 - and r3,#2048 - testl rr2 - jpr ne,L155 - cp r11,#92 - jpr ne,L156 - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - or r5,#2048 - ldl @rr2,rr4 -L156: - ldb rl2,rr12(#58) - subb rh2,rh2 - cp r11,r2 - jpr ne,L157 - bit r10,#4 - jpr eq,L157 - bit r10,#3 - jpr eq,L158 - ldl rr6,rr12 - ldl rr4,#8 - sub r3,r3 - callr _ttxput -L158: - set r10,#3 - ldl rr6,rr12 - ldl rr4,#32 - sub r3,r3 - callr _ttxput - ldk r11,#8 - jpr L150 -L157: - ldb rl2,rr12(#59) - subb rh2,rh2 - cp r11,r2 - jpr ne,L160 - bit r10,#5 - jpr eq,L160 - bit r10,#3 - jpr eq,L161 - bit r10,#13 - jpr eq,L161 - ldl rr2,#L162 - ldl |_stkseg+~L1+10|(fp),rr2 - jpr L165 -L20027: - ldl rr4,|_stkseg+~L1+10|(fp) - inc |_stkseg+~L1+12|(fp),#1 - ldb rl6,@rr4 - ldb rl5,rl6 - extsb r5 - exts rr4 - ldl rr6,rr12 - sub r3,r3 - callr _ttxput -L165: - ldl rr2,|_stkseg+~L1+10|(fp) - testb @rr2 - jpr ne,L20027 - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+14|(fp),rr2 - ldl rr6,rr12 - sub r5,r5 - call @rr2 -L161: - ld r5,r11 - exts rr4 - ldl rr6,rr12 - sub r3,r3 - callr _ttxput - set r10,#3 - ldk r11,#10 - jpr L150 -L160: - ldb rl2,rr12(#60) - subb rh2,rh2 - cp r11,r2 - jpr ne,L150 - bit r10,#3 - jpr eq,L168 - bit r10,#13 - jpr eq,L168 - ldl rr2,#L169 - ldl |_stkseg+~L1+10|(fp),rr2 - jpr L172 -L20029: - ldl rr4,|_stkseg+~L1+10|(fp) - inc |_stkseg+~L1+12|(fp),#1 - ldb rl6,@rr4 - ldb rl5,rl6 - extsb r5 - exts rr4 - ldl rr6,rr12 - sub r3,r3 - callr _ttxput -L172: - ldl rr2,|_stkseg+~L1+10|(fp) - testb @rr2 - jpr ne,L20029 - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+14|(fp),rr2 - ldl rr6,rr12 - sub r5,r5 - call @rr2 -L168: - res r10,#3 - ldl rr2,rr12 - add r3,#53 - ldl rr2,rr12 - add r3,#53 - incb @rr2,#1 - jpr L150 -L155: - cp r11,#92 - jpr ne,L10005 - bit r10,#2 - jpr eq,L150 -L10005: - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - and r5,#63487 - ldl @rr2,rr4 -L150: - bit r10,#3 - jpr eq,L132 - ld r5,r11 - exts rr4 - ldl rr6,rr12 - sub r3,r3 - callr _ttxput -L20035: - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+14|(fp),rr2 - ldl rr6,rr12 - sub r5,r5 - call @rr2 -L132: - ld r2,|_stkseg+~L1|(fp) - dec |_stkseg+~L1|(fp),#1 - test r2 - jpr eq,L131 - ldk r2,#0 - ldb rl2,@rr8 - ld r11,r2 - inc r9,#1 - ld r2,rr12(#44) - ld r10,r2 - bit r2,#0 - jpr ne,L20020 -L134: - bit r10,#1 - jpr eq,L150 - cp r11,#10 - jpr ne,L151 - bit r10,#6 - jpr eq,L20025 - set r10,#3 - jpr L20025 -L177: - ldb rl2,rr12(#61) - testb rl2 - jpr eq,L176 - ldl rr2,rr12(#46) - ldk r2,#0 - and r3,#1024 - testl rr2 - jpr ne,L176 - ldl rr6,rr12 - callr _tttimeo -L176: - ldb rl2,rr12(#53) - testb rl2 - jpr eq,L10000 - ldl rr2,rr12(#46) - ldk r2,#0 - and r3,#128 - testl rr2 - jpr eq,L10000 - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - and r5,#65407 - ldl @rr2,rr4 - ldl rr6,rr12 - callr _wakeup -L10000: - ldm r8,_stkseg+18(fp),#6 - add fp,#~L2 - ret - ~L1 := 0 - ~L2 := 30 - } /* _ttin */ - -.psec data -.data - -L196: -.byte %28,%7b,%29,%7d,%21,%7c,%5e,%7e -.byte %27,%60,%5c,%5c,%0 -.even -.even -/*~~ttxput:*/ - -.psec -.code - -_ttxput:: -{ - .psec data - .data - .even -L243: - .long L204 - .long L202 - .long L206 - .long L209 - .long L216 - .long L228 - .long L230 - .long L240 - .psec - .code - sub fp,#~L2 - ldm _stkseg+22(fp),r8,#6 - ldm |_stkseg+~L1+0|(fp),r3,#3 - ldl rr12,rr6 - ld r2,rr12(#40) - ld r10,r2 - ldl rr6,rr12(#46) - ldk r6,#0 - and r7,#512 - testl rr6 - jpr eq,L185 - res r10,#0 -L185: - test |_stkseg+~L1|(fp) - jpr ne,L186 - ld r2,rr12(#20) - cp r2,#256 - jpr ge,L10006 - inc |_stkseg+~L1|(fp),#1 - bit r10,#0 - jpr ne,L188 - ldl rr2,_sysinfo+108 - addl rr2,#1 - ldl _sysinfo+108,rr2 - ldl rr4,rr12 - add r5,#20 - ldb rl7,|_stkseg+~L1+5|(fp) - extsb r7 - callr _putc - jpr L10006 -L188: - ldl rr2,#_stkseg+~L1+5 - add r3,fp - ldl rr8,rr2 - subl rr2,rr2 - jpr L20039 -L186: - bit r10,#0 - jpr ne,L190 - ld r3,|_stkseg+~L1|(fp) - exts rr2 - addl rr2,_sysinfo+108 - ldl _sysinfo+108,rr2 - ldl rr4,rr12 - add r5,#20 - ldl rr6,|_stkseg+~L1+2|(fp) - callr _putcb - jpr L10006 -L190: - ldl rr2,|_stkseg+~L1+2|(fp) - inc r3,#6 - ldl rr4,|_stkseg+~L1+2|(fp) - ldb rl6,rr4(#4) - extsb r6 - add r3,r6 - ldl rr8,rr2 - ldl rr2,rr4 -L20039: - ldl |_stkseg+~L1+18|(fp),rr2 - jpr L191 -L20041: - cp r11,#128 - jpr ne,L194 - ldl rr4,rr12 - add r5,#20 - ld r7,#128 - callr _putc -L194: - ldl rr2,_sysinfo+108 - addl rr2,#1 - ldl _sysinfo+108,rr2 - ldl rr4,rr12 - add r5,#20 - ld r7,r11 -L20044: - callr _putc - jpr L191 -L20045: - ldk r2,#0 - ldb rl2,@rr8 - ld r11,r2 - inc r9,#1 - cp r11,#128 - jpr ge,L20041 - ld r2,rr12(#44) - bit r2,#2 - jpr eq,L195 - ldl rr2,#L196 - ldl |_stkseg+~L1+10|(fp),rr2 -L197: - ldl rr2,|_stkseg+~L1+10|(fp) - inc |_stkseg+~L1+12|(fp),#1 - testb @rr2 - jpr eq,L198 - ldl rr2,|_stkseg+~L1+10|(fp) - inc |_stkseg+~L1+12|(fp),#1 - ldb rl4,@rr2 - extsb r4 - cp r11,r4 - jpr ne,L197 - ldl rr2,rr12 - add r3,#44 - res @rr2,#2 - ldl rr6,rr12 - ldl rr4,#92 - sub r3,r3 - callr _ttxput - ldl rr2,rr12 - add r3,#44 - set @rr2,#2 - ldl rr2,|_stkseg+~L1+10|(fp) - ldb rl4,rr2(#-2) - extsb r4 - ld r11,r4 -L198: - cp r11,#65 - jpr lt,L195 - cp r11,#90 - jpr gt,L195 - ldl rr2,rr12 - add r3,#44 - res @rr2,#2 - ldl rr6,rr12 - ldl rr4,#92 - sub r3,r3 - callr _ttxput - ldl rr2,rr12 - add r3,#44 - set @rr2,#2 -L195: - bit r10,#1 - jpr eq,L201 - cp r11,#97 - jpr lt,L201 - cp r11,#122 - jpr gt,L201 - add r11,#-32 -L201: - ld |_stkseg+~L1+16|(fp),r11 - ldb rl2,_partab(r11) - extsb r2 - ld |_stkseg+~L1+14|(fp),r2 - ldl rr2,rr12 - add r3,#54 - ldl |_stkseg+~L1+10|(fp),rr2 - ldk r11,#0 - ld r3,|_stkseg+~L1+14|(fp) - and r3,#63 - ld r2,r3 - cp r3,#7 - jpr ugt,L202 - rl r2,#2 - ldl rr4,L243(r2) - jp @rr4 -L204: - ldl rr4,|_stkseg+~L1+10|(fp) - incb @rr4,#1 - jpr L202 -L20043: - ld |_stkseg+~L1+16|(fp),#127 - jpr L247 -L206: - bit r10,#13 - jpr eq,L207 - ldk r11,#2 -L207: - ldl rr4,|_stkseg+~L1+10|(fp) - testb @rr4 - jpr eq,L202 - decb @rr4,#1 - jpr L202 -L209: - bit r10,#5 - jpr ne,L211 - bit r10,#2 - jpr eq,L214 - bit r10,#4 - jpr eq,L10009 - ldl rr4,|_stkseg+~L1+10|(fp) - testb @rr4 - jpr eq,L211 -L10009: - ldl rr4,_sysinfo+108 - addl rr4,#1 - ldl _sysinfo+108,rr4 - ldl rr4,rr12 - add r5,#20 - ldk r7,#13 - callr _putc - jpr L211 -L20051: - ldl rr2,|_stkseg+~L1+10|(fp) - testb @rr2 - jpr eq,L236 - ldb rl7,@rr2 - extsb r7 - sra r7,#4 - inc r7,#3 - ldk r6,#6 - callr _max - ld r11,r2 - jpr L236 -L216: - ldl rr2,|_stkseg+~L1+10|(fp) - ldb rl4,@rr2 - extsb r4 - and r4,#7 - ld r5,r4 - neg r5 - add r5,#8 - ld r11,r5 - ld r4,r5 - addb rl4,@rr2 - ldb @rr2,rl4 - ld r4,r10 - and r4,#6144 - ld |_stkseg+~L1+14|(fp),r4 - test r4 - jpr eq,L20047 - cp r4,#2048 - jpr eq,L20049 - cp r4,#4096 - jpr ne,L222 - ldk r11,#2 - jpr L202 -L20049: - cp r11,#5 - jpr ge,L202 -L20047: - ldk r11,#0 - jpr L202 -L222: - cp |_stkseg+~L1+14|(fp),#6144 - jpr ne,L202 - ld r3,r11 - exts rr2 - addl rr2,_sysinfo+108 - ldl _sysinfo+108,rr2 -L227: - ldl rr4,rr12 - add r5,#20 - ld r7,#32 - callr _putc - djnz r11,L227 - jpr L191 -L228: - bit r10,#14 - jpr ne,L20046 - jpr L202 -L230: - bit r10,#3 - jpr eq,L231 - ld |_stkseg+~L1+16|(fp),#10 -L214: - bit r10,#8 - jpr eq,L202 - ldk r11,#5 - jpr L202 -L231: - bit r10,#4 - jpr eq,L211 - ldl rr2,|_stkseg+~L1+10|(fp) - testb @rr2 - jpr eq,L191 -L211: - ld r2,r10 - and r2,#1536 - ld |_stkseg+~L1+14|(fp),r2 - cp r2,#512 - jpr eq,L20051 - cp r2,#1024 - jpr ne,L237 - ldk r11,#5 - jpr L236 -L237: - cp |_stkseg+~L1+14|(fp),#1536 - jpr ne,L236 - ldk r11,#9 -L236: - ldl rr2,|_stkseg+~L1+10|(fp) - clrb @rr2 - jpr L202 -L240: - bit r10,#15 - jpr eq,L202 -L20046: - ld r11,#127 -L202: - ldl rr2,_sysinfo+108 - addl rr2,#1 - ldl _sysinfo+108,rr2 - ldl rr4,rr12 - add r5,#20 - ld r7,|_stkseg+~L1+16|(fp) - callr _putc - test r11 - jpr eq,L191 - cp r11,#32 - jpr ge,L245 - bit r10,#6 - jpr eq,L245 - bit r10,#7 - jpr ne,L20043 - clr |_stkseg+~L1+16|(fp) -L247: - ldl rr4,rr12 - add r5,#20 - ld r7,|_stkseg+~L1+16|(fp) - callr _putc - cp r11,#3 - jpr le,L191 - ldl rr4,rr12 - add r5,#20 - ld r7,|_stkseg+~L1+16|(fp) - jpr L20044 -L245: - ldl rr4,rr12 - add r5,#20 - ld r7,#128 - callr _putc - ldl rr4,rr12 - add r5,#20 - ld r7,r11 - or r7,#128 - jpr L20044 -L191: - ld r2,|_stkseg+~L1|(fp) - dec |_stkseg+~L1|(fp),#1 - test r2 - jpr ne,L20045 - ldl rr2,|_stkseg+~L1+18|(fp) - testl rr2 - jpr eq,L10006 - ldl rr6,rr2 - callr _putcf -L10006: - ldm r8,_stkseg+22(fp),#6 - add fp,#~L2 - ret - ~L1 := 0 - ~L2 := 34 - } /* _ttxput */ - -.psec data -.data - -/*~~ttout:*/ - -.psec -.code - -_ttout:: -{ - dec fp,#~L2 - ldl rr2,rr6 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 8 - } /* _ttout */ - -.psec data -.data - -/*~~tttimeo:*/ - -.psec -.code - -_tttimeo:: -{ - dec fp,#~L2 - ldm _stkseg+4(fp),r12,#2 - ldl rr12,rr6 - ldl rr2,rr6 - add r3,#46 - ldl rr4,@rr2 - and r5,#64511 - ldl @rr2,rr4 - ld r2,rr12(#44) - bit r2,#1 - jpr ne,L10013 - ldb rl2,rr12(#61) - testb rl2 - jpr eq,L10013 - test @rr12 - jpr ne,L257 - ldb rl2,rr12(#60) - testb rl2 - jpr ne,L10013 -L257: - ldl rr2,rr12(#46) - ldk r2,#0 - and r3,#4096 - testl rr2 - jpr eq,L258 - ldl rr2,rr12 - add r3,#53 - ldb @rr2,#1 - ldl rr2,rr12(#46) - ldk r2,#0 - and r3,#128 - testl rr2 - jpr eq,L10013 - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - and r5,#65407 - ldl @rr2,rr4 - ldl rr6,rr12 - callr _wakeup - jpr L10013 -L258: - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - or r5,#5120 - ldl @rr2,rr4 - ldb rl3,rr12(#61) - subb rh3,rh3 - ld r5,r3 - mult rr4,#6 - ld r3,r5 - ldl rr4,rr12 - ldl rr6,#_tttimeo - callr _timeout -L10013: - ldm r12,_stkseg+4(fp),#2 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 8 - } /* _tttimeo */ - -.psec data -.data - -/*~~ttioctl:*/ - -.psec -.code - -_ttioctl:: -{ - sub fp,#~L2 - ldm _stkseg+14(fp),r12,#2 - ldm |_stkseg+~L1+0|(fp),r2,#4 - ldl rr12,rr6 - ld r4,r5 - cp r5,#17410 - jpr ne,L10016 - ld r5,rr12(#44) - ldk r2,#0 - ld r3,r5 - ld r7,|_stkseg+~L1+2|(fp) - xor r2,|_stkseg+~L1|(fp) - xor r3,r7 - ld |_stkseg+~L1+12|(fp),r3 - bit r3,#1 - jpr eq,L10016 - callr _dvi - ld r2,rr12(#10) - test r2 - jpr eq,L269 - test @rr12 - jpr eq,L270 - ldl rr2,rr12 - inc r3,#10 - ld r4,@rr2 - add r4,@rr12 - ld @rr2,r4 - ldl rr2,rr12(#2) - ldl rr4,rr12(#16) - ldl @rr4,rr2 - ldl rr2,rr12(#6) - ldl rr4,rr12 - inc r5,#16 - ldl @rr4,rr2 -L270: - ldl rr2,rr12 - inc r3,#10 - ldl rr6,rr12 - ldk r4,#5 - ldir @rr6,@rr2,r4 - sub r3,#10 - ldl rr2,#_ttnulq - ldl rr4,rr12 - inc r5,#10 - ldk r6,#5 - ldir @rr4,@rr2,r6 - sub r3,#10 -L269: - ldl rr2,rr12 - add r3,#53 - ld r4,@rr12 - ldb @rr2,rl4 - callr _evi -L10016: - ldm r12,_stkseg+14(fp),#2 - add fp,#~L2 - ret - ~L1 := 0 - ~L2 := 18 - } /* _ttioctl */ - -.psec data -.data - diff --git a/WEGA/src/uts/dev/tty.c b/WEGA/src/uts/dev/tty.c index 85e05cb..2001dfe 100644 --- a/WEGA/src/uts/dev/tty.c +++ b/WEGA/src/uts/dev/tty.c @@ -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; diff --git a/WEGA/src/uts/dev/tty.s b/WEGA/src/uts/dev/tty.s deleted file mode 100644 index bb2feb2..0000000 --- a/WEGA/src/uts/dev/tty.s +++ /dev/null @@ -1,1895 +0,0 @@ -.seg -.psec data -.data - - -fp := r15; -sp := rr14; -_ttywstr:: -.byte %40 -.byte %5b -.byte %24 -.byte %5d -.byte %74 -.byte %74 -.byte %79 -.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 %32 -.byte %2b -.byte %20 -.byte %9 -.byte %30 -.byte %32 -.byte %2f -.byte %30 -.byte %37 -.byte %2f -.byte %38 -.byte %34 -.byte %20 -.byte %31 -.byte %33 -.byte %3a -.byte %35 -.byte %30 -.byte %3a -.byte %35 -.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; -.even -_tthiwat:: -.word %0 -.word %3c -.word %3c -.word %3c -.word %3c -.word %3c -.word %3c -.word %78 -.word %78 -.word %b4 -.word %b4 -.word %f0 -.word %f0 -.word %f0 -.word %64 -.word %64 -.even -_ttlowat:: -.word %0 -.word %14 -.word %14 -.word %14 -.word %14 -.word %14 -.word %14 -.word %28 -.word %28 -.word %3c -.word %3c -.word %50 -.word %50 -.word %50 -.word %32 -.word %32 -_ttcchar:: -.byte %7f -.byte %1c -.byte %8 -.byte %18 -.byte %4 -.byte %0 -.byte %0 -.byte %0 -.even -_noterm: -.word 0 -.comm 10, _ttnulq; -_maptab:: -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %7c -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %60 -.byte %7b -.byte %7d -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %7e -.byte %0 -.byte %0 -.byte %41 -.byte %42 -.byte %43 -.byte %44 -.byte %45 -.byte %46 -.byte %47 -.byte %48 -.byte %49 -.byte %4a -.byte %4b -.byte %4c -.byte %4d -.byte %4e -.byte %4f -.byte %50 -.byte %51 -.byte %52 -.byte %53 -.byte %54 -.byte %55 -.byte %56 -.byte %57 -.byte %58 -.byte %59 -.byte %5a -.byte %0 -.byte %0 -.byte %0 -.byte %0 -.byte %0 -/*~~ttopen:*/ - -.psec -.code - -_ttopen:: -{ - dec fp,#~L2 - ldm _stkseg+4(fp),r10,#4 - ldl rr12,rr6 - ldl rr10,_u+32 - ldl rr2,rr12(#46) - and r2,#2 - ldk r3,#0 - testl rr2 - jpr eq,L96 - ldb _u+21,#13 - jpr L10000 -L96: - ldl rr2,rr10 - inc r3,#12 - ld r4,rr10(#14) - cp r4,@rr2 - jpr ne,L97 - ldl rr2,_u+478 - testl rr2 - jpr ne,L97 - ld r2,rr12(#50) - test r2 - jpr ne,L97 - ldl _u+478,rr12 - ld r2,rr10(#12) - ldl rr4,rr12 - add r5,#50 - ld @rr4,r2 -L97: - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - and r5,#65533 - ldl @rr2,rr4 - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - or r5,#4 - ldl @rr2,rr4 -L10000: - ldm r10,_stkseg+4(fp),#4 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 12 - } /* _ttopen */ - -.psec data -.data - -/*~~ttclose:*/ - -.psec -.code - -_ttclose:: -{ - dec fp,#~L2 - ldm _stkseg+8(fp),r12,#2 - ldl rr12,rr6 - callr _dvi - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+4|(fp),rr2 - ldl rr6,rr12 - ldk r5,#3 - call @rr2 - callr _evi - ldl rr6,rr12 - ldk r5,#1 - callr _ttyflush - ldl rr6,rr12 - callr _ttywait - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - and r5,#65529 - ldl @rr2,rr4 - ldm r12,_stkseg+8(fp),#2 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 12 - } /* _ttclose */ - -.psec data -.data - -.even -.even -L149: -.word 0 -.word 1 -.word 2 -.even -.even -L213: -.word 21505 -.word 21506 -.word 21507 -.word 21508 -.word 21509 -.word 21510 -.word 21511 -.word 21517 -.word 21518 -.word 29698 -.word 29704 -.word 29705 -.word 29706 -.word 29712 -.word 29713 -.word 29714 -.word 65280 -.even -/*~~ttiocom:*/ - -.psec -.code - -_ttiocom:: -{ - .psec data - .data - .even -L138: - .long L133 - .long L134 - .long L135 - .long L136 - .even -L150: - .long L147 - .long L147 - .long L147 - .even -L214: - .long L127 - .long L112 - .long L110 - .long L110 - .long L139 - .long L130 - .long L142 - .long L202 - .long L203 - .long L151 - .long L182 - .long L152 - .long L153 - .long L141 - .long L204 - .long L208 - .long L108 - .psec - .code - sub fp,#~L2 - ldm _stkseg+54(fp),r9,#5 - ldm |_stkseg+~L1+0|(fp),r2,#4 - ldl rr12,rr6 - ld r4,r5 - ldl rr2,#L213 - ld r5,#17 - cpir r4,@rr2,r5,eq - jpr ne,L210 - sll r5,#2 - neg r5 - ldl rr2,L214+64(r5) - jp @rr2 -L108: - ld _u+40,#21504 -L106: - sub r2,r2 - jpr L10006 -L110: - ldl rr6,rr12 - callr _ttywait - cp |_stkseg+~L1+6|(fp),#21508 - jpr ne,L112 - ldl rr6,rr12 - ldk r5,#3 - callr _ttyflush -L112: - ldl rr4,#_stkseg+~L1+14 - add r5,fp - ldl rr6,|_stkseg+~L1|(fp) - ld r3,#18 - callr _copyin - test r2 - jpr ne,L114 - ldb rl2,rr12(#52) - cpb rl2,|_stkseg+~L1+22|(fp) - jpr eq,L115 - cpb |_stkseg+~L1+22|(fp),#0 - jpr lt,L10009 - ldb rl2,|_stkseg+~L1+22|(fp) - extsb r2 - cp r2,_linecnt - jpr lt,L116 -L10009: - ldb _u+21,#22 - jpr L106 -L116: - ldb rl2,rr12(#52) - extsb r2 - ld r5,r2 - mult rr4,#36 - ldl rr2,_linesw+16(r5) - ldl |_stkseg+~L1+44|(fp),rr2 - ld r4,_stkseg+~L2+4(fp) - ld |_stkseg|(fp),r4 - ldl rr6,rr12 - ld r5,#17409 - subl rr2,rr2 - ldl _stkseg+~L1+48(fp),rr8 - ldl rr8,_stkseg+~L1+44(fp) - call @rr8 - ldl rr8,_stkseg+~L1+48(fp) -L115: - ld r2,rr12(#44) - ld r9,r2 - ldk r10,#0 - ld r2,rr12(#42) - and r2,#15 - ld r3,|_stkseg+~L1+18|(fp) - and r3,#15 - cp r2,r3 - jpr eq,L117 - inc r10,#1 -L117: - ld r2,rr12(#42) - and r2,#48 - ld r3,|_stkseg+~L1+18|(fp) - and r3,#48 - cp r2,r3 - jpr eq,L118 - inc r10,#1 -L118: - ld r2,rr12(#42) - xor r2,|_stkseg+~L1+18|(fp) - and r2,#3008 - jpr eq,L119 - inc r10,#1 -L119: - ld r2,rr12(#38) - xor r2,|_stkseg+~L1+14|(fp) - bit r2,#0 - jpr eq,L120 - inc r10,#1 -L120: - ldl rr2,rr12 - add r3,#38 - ld r4,|_stkseg+~L1+14|(fp) - ld @rr2,r4 - ldl rr2,rr12 - add r3,#40 - ld r4,|_stkseg+~L1+16|(fp) - ld @rr2,r4 - ldl rr2,rr12 - add r3,#42 - ld r4,|_stkseg+~L1+18|(fp) - ld @rr2,r4 - ldl rr2,rr12 - add r3,#44 - ld r4,|_stkseg+~L1+20|(fp) - ld @rr2,r4 - ldl rr6,#_stkseg+~L1+23 - add r7,fp - ldl rr4,rr12 - add r5,#56 - ldk r3,#8 - callr _bcopy - ldb rl2,rr12(#52) - cpb rl2,|_stkseg+~L1+22|(fp) - jpr eq,L122 - ldl rr2,rr12 - add r3,#52 - ldb rl4,|_stkseg+~L1+22|(fp) - ldb @rr2,rl4 - ldb rl2,rr12(#52) - extsb r2 - ld r5,r2 - mult rr4,#36 - ldl rr2,_linesw+16(r5) - ldl |_stkseg+~L1+44|(fp),rr2 - ld r4,_stkseg+~L2+4(fp) - ld |_stkseg|(fp),r4 - ldl rr6,rr12 - ld r5,#17408 - subl rr2,rr2 - jpr L20003 -L122: - ldl rr2,rr12 - add r3,#44 - cp r9,@rr2 - jpr eq,L123 - ldb rl2,rr12(#52) - extsb r2 - ld r5,r2 - mult rr4,#36 - ldl rr2,_linesw+16(r5) - ldl |_stkseg+~L1+44|(fp),rr2 - ld r4,_stkseg+~L2+4(fp) - ld |_stkseg|(fp),r4 - ld r3,r9 - exts rr2 - ld r5,#17410 - ldl rr6,rr12 -L20003: - ldl _stkseg+~L1+48(fp),rr8 - ldl rr8,_stkseg+~L1+44(fp) - call @rr8 - ldl rr8,_stkseg+~L1+48(fp) -L123: - test r10 - jpr eq,L106 -L20005: - ldk r2,#1 - jpr L10006 -L127: - ld r2,rr12(#38) - ld |_stkseg+~L1+14|(fp),r2 - ld r2,rr12(#40) - ld |_stkseg+~L1+16|(fp),r2 - ld r2,rr12(#42) - ld |_stkseg+~L1+18|(fp),r2 - ld r2,rr12(#44) - ld |_stkseg+~L1+20|(fp),r2 - ldb rl2,rr12(#52) - ldb |_stkseg+~L1+22|(fp),rl2 - ldl rr6,rr12 - add r7,#56 - ldl rr4,#_stkseg+~L1+23 - add r5,fp - ldk r3,#8 - callr _bcopy - ldl rr6,#_stkseg+~L1+14 - add r7,fp - ldl rr4,|_stkseg+~L1|(fp) - ld r3,#18 - callr _copyout - test r2 - jpr eq,L106 -L114: - ldb _u+21,#14 - jpr L106 -L130: - ld r2,|_stkseg+~L1+2|(fp) - cp r2,#3 - jpr ugt,L10009 - rl r2,#2 - ldl rr4,L138(r2) - jp @rr4 -L133: - ldl rr4,rr12(#34) - ldl |_stkseg+~L1+44|(fp),rr4 - ldl rr6,rr12 - ldk r5,#2 -L20007: - ldl rr2,|_stkseg+~L1+44|(fp) - call @rr2 - jpr L106 -L134: - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+44|(fp),rr2 - ldl rr6,rr12 - ldk r5,#3 - jpr L20007 -L135: - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+44|(fp),rr2 - ldl rr6,rr12 - ldk r5,#4 - jpr L20007 -L136: - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+44|(fp),rr2 - ldl rr6,rr12 - ldk r5,#5 - jpr L20007 -L139: - ldl rr6,rr12 - callr _ttywait - ldl rr2,|_stkseg+~L1|(fp) - testl rr2 - jpr ne,L106 - ldl rr4,rr12(#34) - ldl |_stkseg+~L1+44|(fp),rr4 - ldl rr6,rr12 - ldk r5,#8 - jpr L20007 -L141: - ldl rr6,rr12 - ldk r5,#3 -L20011: - callr _ttyflush - jpr L106 -L142: - ld r2,|_stkseg+~L1+2|(fp) - ldl rr4,#L149 - ld r6,#3 - cpir r2,@rr4,r6,eq - jpr ne,L10009 - sll r6,#2 - neg r6 - ldl rr4,L150+8(r6) - jp @rr4 -L147: - ld r5,|_stkseg+~L1+2|(fp) - inc r5,#1 - and r5,#3 - ldl rr6,rr12 - jpr L20011 -L151: - ldl rr2,rr12 - add r3,#42 - set @rr2,#10 - jpr L106 -L152: - ldl rr6,rr12 - callr _ttywait - ldl rr6,rr12 - ldk r5,#3 - callr _ttyflush -L153: - ldl rr4,#_stkseg+~L1+32 - add r5,fp - ldl rr6,|_stkseg+~L1|(fp) - ldk r3,#6 - callr _copyin - test r2 - jpr ne,L114 - ld r2,rr12(#42) - ld r11,r2 - ld r2,rr12(#38) - ld |_stkseg+~L1+12|(fp),r2 - ldl rr2,rr12 - add r3,#38 - clr @rr2 - ldl rr2,rr12 - add r3,#40 - clr @rr2 - ldl rr2,rr12 - add r3,#44 - clr @rr2 - ldl rr2,rr12 - add r3,#42 - ldb rl4,|_stkseg+~L1+32|(fp) - extsb r4 - and r4,#15 - or r4,#128 - ld @rr2,r4 - ldl rr2,rr12 - add r3,#42 - ld r4,@rr2 - or r4,#2112 - ld @rr2,r4 - ldl rr2,rr12 - add r3,#58 - ldb rl4,|_stkseg+~L1+34|(fp) - ldb @rr2,rl4 - ldl rr2,rr12 - add r3,#59 - ldb rl4,|_stkseg+~L1+35|(fp) - ldb @rr2,rl4 - ld r9,|_stkseg+~L1+36|(fp) - ld r2,r9 - and r2,#3072 - jpr eq,L155 - bit r9,#10 - jpr eq,L156 - ldl rr2,rr12 - add r3,#40 - set @rr2,#11 -L156: - bit r9,#11 - jpr eq,L155 - ldl rr2,rr12 - add r3,#40 - set @rr2,#12 -L155: - bit r9,#2 - jpr eq,L158 - ldl rr2,rr12 - add r3,#38 - set @rr2,#9 - ldl rr2,rr12 - add r3,#40 - set @rr2,#1 - ldl rr2,rr12 - add r3,#44 - set @rr2,#2 -L158: - bit r9,#3 - jpr eq,L159 - ldl rr2,rr12 - add r3,#44 - set @rr2,#3 -L159: - bit r9,#4 - jpr eq,L160 - ldl rr2,rr12 - add r3,#38 - set @rr2,#8 - ldl rr2,rr12 - add r3,#40 - set @rr2,#2 -L160: - bit r9,#12 - jpr eq,L161 - ldl rr2,rr12 - add r3,#40 - set @rr2,#9 -L161: - bit r9,#13 - jpr eq,L162 - ldl rr2,rr12 - add r3,#40 - set @rr2,#10 -L162: - bit r9,#8 - jpr eq,L163 - ldl rr2,rr12 - add r3,#40 - set @rr2,#8 -L163: - bit r9,#9 - jpr eq,L164 - ldl rr2,rr12 - add r3,#40 - set @rr2,#8 -L164: - bit r9,#5 - jpr eq,L165 - ldl rr2,rr12 - add r3,#61 - ldb @rr2,#6 - ldl rr2,rr12 - add r3,#60 - ldb @rr2,#1 - ldl rr2,rr12 - add r3,#38 - ld r4,@rr2 - and r4,#-769 - ld @rr2,r4 - ldl rr2,rr12 - add r3,#42 - ld r4,@rr2 - or r4,#48 - jpr L20004 -L165: - bit r9,#1 - jpr eq,L167 - ldl rr2,rr12 - add r3,#61 - ldb @rr2,#6 - ldl rr2,rr12 - add r3,#60 - ldb @rr2,#1 - ldl rr2,rr12 - add r3,#38 - ld r4,@rr2 - or r4,#1057 - ld @rr2,r4 - ldl rr2,rr12 - add r3,#40 - set @rr2,#0 - ldl rr2,rr12 - add r3,#42 - ld r4,@rr2 - or r4,#1072 - ld @rr2,r4 - ldl rr2,rr12 - add r3,#44 - ld r4,@rr2 - or r4,#113 - jpr L20004 -L167: - ldl rr2,rr12 - add r3,#60 - ldb @rr2,#4 - ldl rr2,rr12 - add r3,#61 - clrb @rr2 - ldl rr2,rr12 - add r3,#38 - ld r4,@rr2 - or r4,#1057 - ld @rr2,r4 - ldl rr2,rr12 - add r3,#40 - set @rr2,#0 - ldl rr2,rr12 - add r3,#42 - ld r4,@rr2 - or r4,#1072 - ld @rr2,r4 - ldl rr2,rr12 - add r3,#44 - ld r4,@rr2 - or r4,#115 -L20004: - ld @rr2,r4 - ldl rr2,rr12 - add r3,#38 - set @rr2,#4 - ldl rr2,rr12 - add r3,#42 - set @rr2,#8 - bit r9,#6 - jpr eq,L169 - bit r9,#7 - jpr eq,L170 - ldl rr2,rr12 - add r3,#38 - res @rr2,#4 - ldl rr2,rr12 - add r3,#42 - res @rr2,#8 - jpr L169 -L170: - ldl rr2,rr12 - add r3,#42 - set @rr2,#9 -L169: - bit r9,#14 - jpr eq,L172 - ldl rr2,rr12 - add r3,#40 - set @rr2,#15 -L172: - bit r9,#15 - jpr eq,L173 - ldl rr2,rr12 - add r3,#40 - set @rr2,#13 -L173: - bit r9,#0 - jpr eq,L174 - ldl rr2,rr12 - add r3,#38 - set @rr2,#12 -L174: - bit |_stkseg+~L1+12|(fp),#13 - jpr eq,L175 - ldl rr2,rr12 - add r3,#38 - set @rr2,#13 -L175: - ldk r10,#0 - ld r2,rr12(#42) - and r2,#15 - ld r3,r11 - and r3,#15 - cp r2,r3 - jpr eq,L176 - inc r10,#1 -L176: - ld r2,rr12(#42) - and r2,#48 - ld r3,r11 - and r3,#48 - cp r2,r3 - jpr eq,L177 - inc r10,#1 -L177: - ld r2,rr12(#42) - xor r2,r11 - and r2,#2496 - jpr eq,L178 - inc r10,#1 -L178: - ld r2,rr12(#38) - xor r2,|_stkseg+~L1+12|(fp) - bit r2,#0 - jpr eq,L179 - inc r10,#1 -L179: - test r10 - jpr ne,L20005 - jpr L106 -L182: - ld r2,rr12(#42) - and r2,#15 - ldb |_stkseg+~L1+32|(fp),rl2 - ldb |_stkseg+~L1+33|(fp),rl2 - ldb rl3,rr12(#58) - ldb |_stkseg+~L1+34|(fp),rl3 - ldb rl3,rr12(#59) - ldb |_stkseg+~L1+35|(fp),rl3 - ldk r9,#0 - ld r3,rr12(#44) - bit r3,#1 - jpr ne,L183 - bit r3,#0 - jpr ne,L183 - set r9,#5 -L183: - ld r2,rr12(#44) - bit r2,#1 - jpr ne,L184 - bit r2,#0 - jpr eq,L184 - set r9,#1 -L184: - ld r2,rr12(#44) - bit r2,#2 - jpr eq,L185 - set r9,#2 -L185: - ld r2,rr12(#44) - bit r2,#3 - jpr eq,L186 - set r9,#3 -L186: - ld r2,rr12(#42) - bit r2,#9 - jpr eq,L187 - set r9,#6 - jpr L188 -L187: - ld r2,rr12(#38) - bit r2,#4 - jpr eq,L189 - set r9,#7 - jpr L188 -L189: - or r9,#192 -L188: - ld r2,rr12(#40) - bit r2,#2 - jpr eq,L191 - set r9,#4 - ld r2,rr12(#40) - bit r2,#9 - jpr eq,L192 - set r9,#12 -L192: - ld r2,rr12(#40) - bit r2,#10 - jpr eq,L194 - set r9,#13 - jpr L194 -L191: - ld r2,rr12(#40) - bit r2,#9 - jpr eq,L195 - set r9,#8 -L195: - ld r2,rr12(#40) - bit r2,#10 - jpr eq,L194 - set r9,#9 -L194: - ld r2,rr12(#40) - and r2,#6144 - cp r2,#6144 - jpr eq,L10010 - ld r2,rr12(#40) - bit r2,#11 - jpr eq,L197 -L10010: - or r9,#3072 -L197: - ld r2,rr12(#40) - bit r2,#15 - jpr eq,L198 - set r9,#14 -L198: - ld r2,rr12(#40) - bit r2,#13 - jpr eq,L199 - set r9,#15 -L199: - ld r2,rr12(#38) - bit r2,#12 - jpr eq,L200 - set r9,#0 -L200: - ld |_stkseg+~L1+36|(fp),r9 - ldl rr6,#_stkseg+~L1+32 - add r7,fp - ldl rr4,|_stkseg+~L1|(fp) - ldk r3,#6 - callr _copyout - test r2 - jpr ne,L114 - jpr L106 -L202: - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - or r4,#2 -L20012: - ldl @rr2,rr4 - jpr L106 -L203: - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - and r4,#65533 - jpr L20012 -L204: - ldl rr4,#_stkseg+~L1+38 - add r5,fp - ldl rr6,|_stkseg+~L1|(fp) - ldk r3,#6 - callr _copyin - test r2 - jpr ne,L114 - ldl rr2,rr12 - add r3,#56 - ldb rl4,|_stkseg+~L1+38|(fp) - ldb @rr2,rl4 - ldl rr2,rr12 - add r3,#57 - ldb rl4,|_stkseg+~L1+39|(fp) - ldb @rr2,rl4 - ld r2,rr12(#44) - bit r2,#1 - jpr eq,L106 - ldl rr2,rr12 - add r3,#60 - ldb rl4,|_stkseg+~L1+42|(fp) - ldb @rr2,rl4 - jpr L106 -L208: - ldb rl2,rr12(#56) - ldb |_stkseg+~L1+38|(fp),rl2 - ldb rl2,rr12(#57) - ldb |_stkseg+~L1+39|(fp),rl2 - ldb rl2,rr12(#60) - ldb |_stkseg+~L1+42|(fp),rl2 - ldb |_stkseg+~L1+40|(fp),#17 - ldb |_stkseg+~L1+41|(fp),#19 - clrb |_stkseg+~L1+43|(fp) - ldl rr6,#_stkseg+~L1+38 - add r7,fp - ldl rr4,|_stkseg+~L1|(fp) - ldk r3,#6 - callr _copyout - test r2 - jpr ne,L114 - jpr L106 -L210: - ld r2,|_stkseg+~L1+6|(fp) - and r2,#65280 - cp r2,#17408 - jpr ne,L10009 - ldb rl2,rr12(#52) - extsb r2 - ld r5,r2 - mult rr4,#36 - ldl rr2,_linesw+16(r5) - ldl |_stkseg+~L1+44|(fp),rr2 - ld r4,_stkseg+~L2+4(fp) - ld |_stkseg|(fp),r4 - ldl rr6,rr12 - ld r5,|_stkseg+~L1+6|(fp) - ldl rr2,|_stkseg+~L1|(fp) - ldl _stkseg+~L1+48(fp),rr8 - ldl rr8,_stkseg+~L1+44(fp) - call @rr8 - ldl rr8,_stkseg+~L1+48(fp) - jpr L106 -L10006: - ldm r9,_stkseg+54(fp),#5 - add fp,#~L2 - ret - ~L1 := 2 - ~L2 := 64 - } /* _ttiocom */ - -.psec data -.data - -/*~~ttinit:*/ - -.psec -.code - -_ttinit:: -{ - dec fp,#~L2 - ldm _stkseg+4(fp),r12,#2 - ldl rr12,rr6 - ldl rr2,rr6 - add r3,#52 - clrb @rr2 - ldl rr2,rr12 - add r3,#38 - ld @rr2,#1313 - ldl rr2,rr12 - add r3,#40 - ld @rr2,#6149 - ldl rr2,rr12 - add r3,#42 - ld @rr2,#1277 - ldl rr2,rr12 - add r3,#44 - ld @rr2,#123 - ldl rr4,rr12 - add r5,#56 - ldl rr6,#_ttcchar - ldk r3,#8 - callr _bcopy - ldm r12,_stkseg+4(fp),#2 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 8 - } /* _ttinit */ - -.psec data -.data - -/*~~ttywait:*/ - -.psec -.code - -_ttywait:: -{ - dec fp,#~L2 - ldm _stkseg+4(fp),r12,#2 - ldl rr12,rr6 - callr _dvi - jpr L218 -L10017: - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - or r5,#8192 - ldl @rr2,rr4 - ldl rr6,rr12 - add r7,#40 - ld r5,#29 - callr _sleep -L218: - ld r2,rr12(#20) - test r2 - jpr ne,L10017 - ldl rr2,rr12(#46) - ldk r2,#0 - and r3,#33 - testl rr2 - jpr ne,L10017 - callr _evi - ldm r12,_stkseg+4(fp),#2 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 8 - } /* _ttywait */ - -.psec data -.data - -/*~~ttyflush:*/ - -.psec -.code - -_ttyflush:: -{ - sub fp,#~L2 - ldm _stkseg+10(fp),r9,#5 - ld |_stkseg+~L1+0|(fp),r5 - ldl rr12,rr6 - bit r5,#1 - jpr ne,L223 - jpr L222 -L20015: - ldl rr6,rr10 - callr _putcf -L223: - ldl rr6,rr12 - add r7,#20 - callr _getcb - ldl rr10,rr2 - testl rr2 - jpr ne,L20015 - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+6|(fp),rr2 - ldl rr6,rr12 - ldk r5,#7 - call @rr2 - ldl rr2,rr12(#46) - ldk r2,#0 - and r3,#64 - testl rr2 - jpr eq,L226 - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - and r5,#65471 - ldl @rr2,rr4 - ldl rr6,rr12 - add r7,#20 - callr _wakeup -L226: - ldl rr2,rr12(#46) - ldk r2,#0 - and r3,#8192 - testl rr2 - jpr eq,L222 - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - and r5,#57343 - ldl @rr2,rr4 - ldl rr6,rr12 - add r7,#40 - callr _wakeup -L222: - bit |_stkseg+~L1|(fp),#0 - jpr ne,L230 - jpr L10018 -L20017: - ldl rr6,rr10 - callr _putcf -L230: - ldl rr6,rr12 - inc r7,#10 - callr _getcb - ldl rr10,rr2 - testl rr2 - jpr ne,L20017 - callr _dvi - ld r9,r2 - jpr L232 -L20019: - ldl rr6,rr10 - callr _putcf -L232: - ldl rr6,rr12 - callr _getcb - ldl rr10,rr2 - testl rr2 - jpr ne,L20019 - ldl rr2,rr12 - add r3,#53 - clrb @rr2 - ld r7,r9 - callr _rvi - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+6|(fp),rr2 - ldl rr6,rr12 - ldk r5,#6 - call @rr2 - ldl rr2,rr12(#46) - ldk r2,#0 - and r3,#128 - testl rr2 - jpr eq,L10018 - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - and r5,#65407 - ldl @rr2,rr4 - ldl rr6,rr12 - callr _wakeup -L10018: - ldm r9,_stkseg+10(fp),#5 - add fp,#~L2 - ret - ~L1 := 0 - ~L2 := 20 - } /* _ttyflush */ - -.psec data -.data - -/*~~canon:*/ - -.psec -.code - -_canon:: -{ - dec fp,#~L2 - ldm _stkseg+4(fp),r8,#6 - ldl rr12,rr6 - callr _dvi - test @rr12 - jpr ne,L239 - ldl rr2,rr12 - add r3,#53 - clrb @rr2 - jpr L239 -L20021: - ldl rr2,rr12(#46) - ldk r2,#0 - and r3,#16 - testl rr2 - jpr ne,L241 -L20025: - callr _evi - jpr L10021 -L241: - ld r2,rr12(#44) - bit r2,#1 - jpr ne,L242 - ldb rl2,rr12(#60) - testb rl2 - jpr ne,L242 - ldb rl2,rr12(#61) - testb rl2 - jpr eq,L240 - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - and r5,#61439 - ldl @rr2,rr4 - ldl rr2,rr12(#46) - ldk r2,#0 - and r3,#1024 - testl rr2 - jpr ne,L242 - ldl rr6,rr12 - callr _tttimeo -L242: - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - or r5,#128 - ldl @rr2,rr4 - ldl rr6,rr12 - ld r5,#28 - callr _sleep -L239: - ldb rl2,rr12(#53) - testb rl2 - jpr eq,L20021 -L240: - ld r2,rr12(#44) - bit r2,#1 - jpr ne,L246 - ldl rr2,rr12 - inc r3,#10 - ldl rr6,rr12 - ldk r4,#5 - ldir @rr2,@rr6,r4 - sub r7,#10 - ldl rr4,#_ttnulq - ldl rr0,rr12 - ldl rr6,rr12 - ldk r2,#5 - ldir @rr6,@rr4,r2 - sub r5,#10 - ldl rr2,rr12 - add r3,#53 - clrb @rr2 - jpr L20025 -L246: - callr _evi - ldl rr10,#_canonb - ldk r8,#0 - ldl rr2,rr12(#46) - and r2,#4 - ld r3,r8 - testl rr2 - jpr eq,L255 -L250: - ldl rr6,rr12 - callr _getc - ld r9,r2 - cp r2,#0 - jpr lt,L254 - ldb rl2,rr12(#60) - subb rh2,rh2 - cp r9,r2 - jpr eq,L254 - ldl rr4,rr12 - inc r5,#10 - ld r7,r9 - callr _putc - ldl rr2,_sysinfo+104 - addl rr2,#1 - ldl _sysinfo+104,rr2 - cp r9,#10 - jpr eq,L254 - ldb rl2,rr12(#61) - subb rh2,rh2 - cp r9,r2 - jpr ne,L250 -L254: - ldl rr2,rr12 - add r3,#53 - ldl rr2,rr12 - add r3,#53 - decb @rr2,#1 - jpr L10021 -L258: - ldb rl2,rr12(#58) - subb rh2,rh2 - cp r9,r2 - jpr ne,L260 - cpl rr10,#_canonb - jpr ule,L255 -L20026: - dec r11,#1 - jpr L255 -L20024: - ldl rr10,#_canonb -L255: - ldl rr6,rr12 - callr _getc - ld r9,r2 - cp r2,#0 - jpr lt,L256 - test r8 - jpr ne,L257 - cp r2,#92 - jpr ne,L258 - jpr L20022 -L260: - ldb rl2,rr12(#59) - subb rh2,rh2 - cp r9,r2 - jpr eq,L20024 - ldb rl2,rr12(#60) - subb rh2,rh2 - cp r9,r2 - jpr ne,L264 -L256: - ld r2,r11 - ld r3,#^o _canonb - sub r2,r3 - ld r9,r2 - ld r5,r2 - exts rr4 - addl rr4,_sysinfo+104 - ldl _sysinfo+104,rr4 - ldl rr10,#_canonb -L275: - ld r2,r9 - dec r9,#1 - test r2 - jpr eq,L254 - ldl rr4,rr12 - inc r5,#10 - ldl rr2,rr10 - inc r11,#1 - ldb rl7,@rr2 - extsb r7 - callr _putc - jpr L275 -L257: - ldk r8,#0 - ldb rl2,rr12(#58) - subb rh2,rh2 - cp r9,r2 - jpr eq,L10026 - ldb rl2,rr12(#59) - subb rh2,rh2 - cp r9,r2 - jpr eq,L10026 - ldb rl2,rr12(#60) - subb rh2,rh2 - cp r9,r2 - jpr ne,L265 -L10026: - dec r11,#1 - jpr L264 -L265: - ld r2,rr12(#44) - bit r2,#2 - jpr eq,L267 - cp r9,#128 - jpr ge,L268 - testb _maptab(r9) - jpr eq,L268 - dec r11,#1 - ldb rl2,_maptab(r9) - extsb r2 - ld r9,r2 - jpr L264 -L268: - cp r9,#92 - jpr ne,L264 - jpr L255 -L267: - cp r9,#92 - jpr ne,L264 -L20022: - inc r8,#1 -L264: - ld r2,r9 - ldb @rr10,rl2 - inc r11,#1 - cp r9,#10 - jpr eq,L256 - ldb rl2,rr12(#61) - subb rh2,rh2 - cp r9,r2 - jpr eq,L256 - ldl rr2,#_canonb - add r3,_Canbsiz - cpl rr10,rr2 - jpr ult,L255 - jpr L20026 -L10021: - ldm r8,_stkseg+4(fp),#6 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 16 - } /* _canon */ - -.psec data -.data - -/*~~ttrstrt:*/ - -.psec -.code - -_ttrstrt:: -{ - dec fp,#~L2 - ldm _stkseg+8(fp),r12,#2 - ldl rr12,rr6 - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+4|(fp),rr2 - ldk r5,#1 - call @rr2 - ldm r12,_stkseg+8(fp),#2 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 12 - } /* _ttrstrt */ - -.psec data -.data - -/*~~ttread:*/ - -.psec -.code - -_ttread:: -{ - sub fp,#~L2 - ldm _stkseg+32(fp),r8,#6 - ldl rr12,rr6 - ldl rr2,rr6 - inc r3,#10 - ldl rr10,rr2 - test @rr10 - jpr ne,L283 - bit _u+54,#2 - jpr ne,L10031 - ldl rr6,rr12 - callr _canon - jpr L283 -L20030: - testb _u+21 - jpr ne,L284 - cp _u+48,#24 - jpr ult,L285 - ldl rr6,rr10 - callr _getcb - ldl |_stkseg+~L1+4|(fp),rr2 - testl rr2 - jpr eq,L284 - ldl rr6,rr2 - ldb rl2,rr6(#5) - extsb r2 - ldb rl3,rr6(#4) - extsb r3 - sub r2,r3 - ld r6,r2 - ld r7,_u+48 - callr _min - ld r9,r2 - ldl rr6,|_stkseg+~L1+4|(fp) - inc r7,#6 - ldl rr2,|_stkseg+~L1+4|(fp) - ldb rl4,rr2(#4) - extsb r4 - add r7,r4 - ldl rr4,_u+44 - ld r3,r9 - callr _copyout - test r2 - jpr eq,L288 - ldb _u+21,#14 -L288: - ldl rr6,|_stkseg+~L1+4|(fp) - callr _putcf - jpr L289 -L285: - ldk r9,#0 - jpr L290 -L20028: - ldl rr6,rr10 - callr _getc - ld r8,r2 - cp r2,#0 - jpr lt,L291 - ldl rr2,#_stkseg+~L1+4 - add r3,fp - add r3,r9 - ld r4,r8 - ldb @rr2,rl4 - inc r9,#1 -L290: - cp r9,_u+48 - jpr ult,L20028 -L291: - test r9 - jpr eq,L284 - ldl rr6,#_stkseg+~L1+4 - add r7,fp - ldl rr4,_u+44 - ld r3,r9 - callr _copyout - test r2 - jpr eq,L289 - ldb _u+21,#14 -L289: - ld r2,_u+46 - add r2,r9 - ld _u+46,r2 - ld r2,_u+48 - sub r2,r9 - ld _u+48,r2 -L283: - test _u+48 - jpr ne,L20030 -L284: - ldl rr2,rr12(#46) - ldk r2,#0 - and r3,#8 - testl rr2 - jpr eq,L10031 - cp @rr12,#60 - jpr ge,L10031 - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+28|(fp),rr2 - ldl rr6,rr12 - ldk r5,#5 - call @rr2 -L10031: - ldm r8,_stkseg+32(fp),#6 - add fp,#~L2 - ret - ~L1 := 0 - ~L2 := 44 - } /* _ttread */ - -.psec data -.data - -/*~~ttwrite:*/ - -.psec -.code - -_ttwrite:: -{ - sub fp,#~L2 - ldm _stkseg+10(fp),r8,#6 - ldl rr12,rr6 - ldl rr2,rr12(#46) - ldk r2,#0 - and r3,#16 - testl rr2 - jpr ne,L299 - jpr L10034 -L20034: - callr _dvi - jpr L301 -L20032: - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+4|(fp),rr2 - ldl rr6,rr12 - sub r5,r5 - call @rr2 - ldl rr2,rr12 - add r3,#46 - ldl rr4,@rr2 - or r5,#64 - ldl @rr2,rr4 - ldl rr6,rr12 - add r7,#20 - ld r5,#29 - callr _sleep -L301: - ld r2,rr12(#42) - and r2,#15 - add r2,r2 - ldl rr4,#_tthiwat - add r5,r2 - ld r2,rr12(#20) - cp r2,@rr4 - jpr gt,L20032 - callr _evi - cp _u+48,#8 - jpr ult,L303 - callr _getcf - ldl rr8,rr2 - testl rr2 - jpr eq,L300 - ldb rl6,rr8(#5) - extsb r6 - ld r7,_u+48 - callr _min - ld r11,r2 - ldl rr4,rr8 - inc r5,#6 - ldl rr6,_u+44 - ld r3,r11 - callr _copyin - test r2 - jpr eq,L305 - ldb _u+21,#14 - ldl rr6,rr8 - callr _putcf - jpr L300 -L305: - ld r2,_u+46 - add r2,r11 - ld _u+46,r2 - ld r2,_u+48 - sub r2,r11 - ld _u+48,r2 - ldl rr2,rr8 - inc r3,#5 - ld r4,r11 - ldb @rr2,rl4 - ldl rr6,rr12 - ldl rr4,rr8 - ld r3,r11 - jpr L20035 -L303: - ldl rr4,#_stkseg+~L1+5 - add r5,fp - ldl rr6,_u+44 - inc _u+46,#1 - callr _fubyte - test r2 - jpr eq,L309 - ldb _u+21,#14 - jpr L300 -L309: - dec _u+48,#1 - ldb rl5,|_stkseg+~L1+5|(fp) - extsb r5 - exts rr4 - ldl rr6,rr12 - sub r3,r3 -L20035: - callr _ttxput -L299: - test _u+48 - jpr ne,L20034 -L300: - callr _dvi - ldl rr2,rr12(#34) - ldl |_stkseg+~L1+6|(fp),rr2 - ldl rr6,rr12 - sub r5,r5 - call @rr2 - callr _evi -L10034: - ldm r8,_stkseg+10(fp),#6 - add fp,#~L2 - ret - ~L1 := 0 - ~L2 := 22 - } /* _ttwrite */ - -.psec data -.data - -/*~~ttchkopen:*/ - -.psec -.code - -_ttchkopen:: -{ - dec fp,#~L2 - ld r2,_noterm - cp r2,_numterms - jpr ge,L312 - inc _noterm,#1 - sub r2,r2 - jpr L10037 -L312: - ldk r2,#1 -L10037: - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 2 - } /* _ttchkopen */ - -.psec data -.data - -/*~~ttchkclose:*/ - -.psec -.code - -_ttchkclose:: -{ - dec _noterm,#1 - ret - ~L1 := 0 - ~L2 := 0 - } /* _ttchkclose */ - -.psec data -.data - diff --git a/WEGA/src/uts/dev_times b/WEGA/src/uts/dev_times deleted file mode 100644 index 7fef12f..0000000 --- a/WEGA/src/uts/dev_times +++ /dev/null @@ -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 diff --git a/WEGA/src/uts/h/Makefile b/WEGA/src/uts/h/Makefile new file mode 100644 index 0000000..b8541eb --- /dev/null +++ b/WEGA/src/uts/h/Makefile @@ -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' diff --git a/WEGA/src/uts/sys/Makefile b/WEGA/src/uts/sys/Makefile new file mode 100644 index 0000000..9ae5ee7 --- /dev/null +++ b/WEGA/src/uts/sys/Makefile @@ -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 diff --git a/WEGA/src/uts/sys/debug.c b/WEGA/src/uts/sys/debug.c index 7fa8a58..dfde203 100644 --- a/WEGA/src/uts/sys/debug.c +++ b/WEGA/src/uts/sys/debug.c @@ -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){ printf("KDB: No more break slots\n"); diff --git a/WEGA/src/uts/sys/debug.s b/WEGA/src/uts/sys/debug.s deleted file mode 100644 index ff836bf..0000000 --- a/WEGA/src/uts/sys/debug.s +++ /dev/null @@ -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 - diff --git a/WEGA/src/uts/sys/lock.adb b/WEGA/src/uts/sys/lock.adb new file mode 100644 index 0000000..937559a --- /dev/null +++ b/WEGA/src/uts/sys/lock.adb @@ -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 diff --git a/WEGA/src/uts/sys/lock.asm b/WEGA/src/uts/sys/lock.asm new file mode 100644 index 0000000..1fe8304 --- /dev/null +++ b/WEGA/src/uts/sys/lock.asm @@ -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 +} diff --git a/WEGA/src/uts/sys/lock.c b/WEGA/src/uts/sys/lock.c index 4c90fa6..de6ed9c 100644 --- a/WEGA/src/uts/sys/lock.c +++ b/WEGA/src/uts/sys/lock.c @@ -26,8 +26,8 @@ char lockwstr[] = "@[$]lock.c Rev : 4.1 08/27/83 11:55:14"; #include #include #include -#include #include +#include long lkfront(); diff --git a/WEGA/src/uts/sys/lock.dump b/WEGA/src/uts/sys/lock.dump new file mode 100644 index 0000000..7aa3db3 --- /dev/null +++ b/WEGA/src/uts/sys/lock.dump @@ -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 diff --git a/WEGA/src/uts/sys/lock.nm b/WEGA/src/uts/sys/lock.nm new file mode 100644 index 0000000..c3ae265 --- /dev/null +++ b/WEGA/src/uts/sys/lock.nm @@ -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 \ No newline at end of file diff --git a/WEGA/src/uts/sys/lock.obj b/WEGA/src/uts/sys/lock.obj new file mode 100644 index 0000000..f66595e Binary files /dev/null and b/WEGA/src/uts/sys/lock.obj differ diff --git a/WEGA/src/uts/sys/lock.s b/WEGA/src/uts/sys/lock.s new file mode 100644 index 0000000..9d3858d --- /dev/null +++ b/WEGA/src/uts/sys/lock.s @@ -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 diff --git a/WEGA/src/uts/sys/sig.s b/WEGA/src/uts/sys/sig.s deleted file mode 100644 index 765693f..0000000 --- a/WEGA/src/uts/sys/sig.s +++ /dev/null @@ -1,1085 +0,0 @@ -.seg -.psec data -.data - - -fp := r15; -sp := rr14; -_sigwstr:: -.byte %40 -.byte %5b -.byte %24 -.byte %5d -.byte %73 -.byte %69 -.byte %67 -.byte %2e -.byte %63 -.byte %9 -.byte %9 -.byte %52 -.byte %65 -.byte %76 -.byte %3a -.byte %20 -.byte %34 -.byte %2e -.byte %32 -.byte %20 -.byte %9 -.byte %30 -.byte %39 -.byte %2f -.byte %32 -.byte %39 -.byte %2f -.byte %38 -.byte %33 -.byte %20 -.byte %30 -.byte %39 -.byte %3a -.byte %34 -.byte %37 -.byte %3a -.byte %34 -.byte %31 -.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 10, _ipc; -/*~~signal:*/ - -.psec -.code - -_signal:: -{ - dec fp,#~L2 - ldm _stkseg+4(fp),r10,#4 - ld |_stkseg+~L1+0|(fp),r6 - ld r13,r7 - test r7 - jpr eq,L10000 - ldl rr10,#_proc - jpr L98 -L20001: - ldl rr2,rr10 - inc r3,#12 - cp r13,@rr2 - jpr ne,L96 - ldl rr6,rr10 - ld r5,|_stkseg+~L1|(fp) - callr _psignal -L96: - add r11,#36 -L98: - ld r3,_Nproc - mult rr2,#36 - ldl rr4,#_proc - add r5,r3 - cpl rr10,rr4 - jpr ult,L20001 -L10000: - ldm r10,_stkseg+4(fp),#4 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 12 - } /* _signal */ - -.psec data -.data - -/*~~psignal:*/ - -.psec -.code - -_psignal:: -{ - dec fp,#~L2 - ldm _stkseg+6(fp),r11,#3 - ld r11,r5 - ldl rr12,rr6 - dec r11,#1 - cp r11,#0 - jpr lt,L10003 - cp r11,#20 - jpr ge,L10003 - ldl rr2,#1 - sdal rr2,r11 - ldl rr4,rr12 - inc r5,#6 - ldl rr6,@rr4 - or r6,r2 - or r7,r3 - ldl @rr4,rr6 - cpb @rr12,#1 - jpr ne,L10003 - ldb rl2,rr12(#2) - cpb rl2,#25 - jpr le,L10003 - cpb rl2,#50 - jpr le,L104 - ldl rr2,rr12 - inc r3,#2 - ldb @rr2,#50 -L104: - ldl rr6,rr12 - callr _setrun -L10003: - ldm r11,_stkseg+6(fp),#3 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 12 - } /* _psignal */ - -.psec data -.data - -/*~~issig:*/ - -.psec -.code - -_issig:: -{ - dec fp,#~L2 - ldm _stkseg+4(fp),r8,#6 - ldl rr10,_u+32 - jpr L108 -L20003: - ldl rr2,_u+330 - ldk r2,#0 - and r3,#1 - testl rr2 - jpr eq,L112 - ldl rr8,#_proc+36 -L115: - ld r3,_Nproc - mult rr2,#36 - ldl rr4,#_proc - add r5,r3 - cpl rr8,rr4 - jpr uge,L120 - ldl rr2,rr8 - inc r3,#16 - ld r4,rr10(#14) - cp r4,@rr2 - jpr ne,L113 - cpb @rr8,#5 - jpr ne,L113 - ldl rr6,rr8 - sub r5,r5 - callr _freeproc -L113: - add r9,#36 - jpr L115 -L112: - ldl rr2,_u+330 - test r3 - jpr ne,L20004 - jpr L120 -L20006: - ldl rr6,rr10 - callr _fsig - ld r13,r2 - cp r2,#18 - jpr eq,L20003 - dec r2,#1 - sla r2,#2 - ldl rr4,_u+262(r2) - ldk r4,#0 - and r5,#1 - testl rr4 - jpr eq,L20004 - ldb rl2,rr10(#1) - extsb r2 - bit r2,#4 - jpr eq,L120 -L20004: - ld r2,r13 - jpr L10007 -L120: - ld r2,r13 - dec r2,#1 - ldl rr4,#1 - sdal rr4,r2 - com r4 - com r5 - ldl rr2,rr10 - inc r3,#6 - ldl rr6,@rr2 - and r6,r4 - and r7,r5 - ldl @rr2,rr6 -L108: - ldl rr2,rr10(#6) - testl rr2 - jpr ne,L20006 - sub r2,r2 -L10007: - ldm r8,_stkseg+4(fp),#6 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 16 - } /* _issig */ - -.psec data -.data - -/*~~stop:*/ - -.psec -.code - -_stop:: -{ - dec fp,#~L2 - ldm _stkseg+2(fp),r10,#4 - jpr L124 -L20010: - ldl rr6,rr12 - callr _wakeup - ldb @rr10,#6 - callr _swtch - ldb rl2,rr10(#1) - extsb r2 - and r2,#16 - test r2 - jpr eq,L10011 - callr _procxmt - test r2 - jpr ne,L10011 -L124: - ldl rr10,_u+32 - ld r2,rr10(#16) - cp r2,#1 - jpr eq,L125 - ldl rr12,#_proc - jpr L128 -L20008: - ldl rr2,rr10 - inc r3,#16 - ld r4,rr12(#14) - cp r4,@rr2 - jpr eq,L20010 - add r13,#36 -L128: - ld r3,_Nproc - mult rr2,#36 - ldl rr4,#_proc - add r5,r3 - cpl rr12,rr4 - jpr ult,L20008 -L125: - ldl rr6,_u+32 - callr _fsig - ld |_stkseg+~L1|(fp),r2 - ld r7,r2 - callr _exit -L10011: - ldm r10,_stkseg+2(fp),#4 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 10 - } /* _stop */ - -.psec data -.data - -.even -/*~~psig:*/ - -.psec -.code - -_psig:: -{ - .psec data - .data - .even -L156: - .long L152 - .long L152 - .long L152 - .long L152 - .long L152 - .long L152 - .long L142 - .long L152 - .long L152 - .long L152 - .psec - .code - dec fp,#~L2 - ldm _stkseg+4(fp),r10,#4 - ldl rr10,_u+32 - ldb rl2,rr10(#1) - extsb r2 - bit r2,#4 - jpr eq,L137 - callr _stop -L137: - ldl rr6,rr10 - callr _fsig - ld r13,r2 - test r2 - jpr eq,L10015 - dec r2,#1 - ldl rr4,#1 - sdal rr4,r2 - com r4 - com r5 - ldl rr2,rr10 - inc r3,#6 - ldl rr6,@rr2 - and r6,r4 - and r7,r5 - ldl @rr2,rr6 - ld r2,r13 - dec r2,#1 - sla r2,#2 - ldl rr4,_u+262(r2) - ldl |_stkseg+~L1|(fp),rr4 - testl rr4 - jpr eq,L139 - clrb _u+21 - cp r13,#4 - jpr eq,L140 - cp r13,#5 - jpr eq,L140 - ld r2,r13 - dec r2,#1 - sla r2,#2 - ldl rr4,#_u+262 - add r5,r2 - subl rr2,rr2 - ldl @rr4,rr2 -L140: - ldl rr6,|_stkseg+~L1|(fp) - ld r5,r13 - callr _sendsig - jpr L10015 -L139: - ld r2,r13 - dec r2,#3 - cp r2,#9 - jpr ugt,L142 - rl r2,#2 - ldl rr4,L156(r2) - jp @rr4 -L152: - callr _core - test r2 - jpr eq,L142 - add r13,#128 -L142: - ld r7,r13 - callr _exit -L10015: - ldm r10,_stkseg+4(fp),#4 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 12 - } /* _psig */ - -.psec data -.data - -/*~~fsig:*/ - -.psec -.code - -_fsig:: -{ - dec fp,#~L2 - ld _stkseg+10(fp),r13 - ldl |_stkseg+~L1+0|(fp),rr6 - ldl rr2,rr6 - ldl rr4,rr2(#6) - ldl |_stkseg+~L1+4|(fp),rr4 - ldk r13,#1 -L20012: - ldl rr2,|_stkseg+~L1+4|(fp) - ldk r2,#0 - and r3,#1 - testl rr2 - jpr eq,L161 - ld r2,r13 - jpr L10018 -L161: - ldl rr2,|_stkseg+~L1+4|(fp) - sral rr2,#1 - ldl |_stkseg+~L1+4|(fp),rr2 - inc r13,#1 - cp r13,#20 - jpr lt,L20012 - sub r2,r2 -L10018: - ld r13,_stkseg+10(fp) - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 12 - } /* _fsig */ - -.psec data -.data - -L165: -.byte %63,%6f,%72,%65,%0 -.even -/*~~core:*/ - -.psec -.code - -_core:: -{ - dec fp,#~L2 - ldm _stkseg+4(fp),r11,#3 - ld r2,_u+24 - cp r2,_u+28 - jpr eq,L164 -L20015: - sub r2,r2 - jpr L10021 -L164: - clrb _u+21 - ldl rr2,#L165 - ldl _u+78,rr2 - ldl rr6,#_schar - ldk r5,#1 - callr _namei - ldl rr12,rr2 - testl rr2 - jpr ne,L166 - testb _u+21 - jpr ne,L20015 - ld r7,#438 - callr _maknode - ldl rr12,rr2 - testl rr2 - jpr eq,L20015 -L166: - ldl rr6,rr12 - ld r5,#128 - callr _access - test r2 - jpr ne,L170 - ld r2,rr12(#6) - and r2,#61440 - cp r2,#32768 - jpr ne,L170 - ldl rr6,rr12 - callr _itrunc - subl rr2,rr2 - ldl _u+50,rr2 - ldl rr2,#_u - ldl _u+44,rr2 - ld _u+48,#2560 - ldb _u+20,#1 - ld r2,_umemory - inc r2,#1 - sra r2,#1 - ld r5,r2 - exts rr4 - ldl _u+1242,rr4 - ldl rr6,rr12 - callr _writei - clrb _u+20 - testb _u+544 - jpr ne,L173 - ldl rr2,_u+32 - ld r4,rr2(#20) - dec r4,#10 - ld r11,r4 - sub r7,r7 - ld r6,r4 - sub r5,r5 - ldk r4,#1 - callr _estabur - ld _u+44,#16128 - clr _u+46 - ld r2,r11 - ldb rh2,rl2 - clrb rl2 - ld _u+48,r2 -L20017: - ldl rr6,rr12 - callr _writei - jpr L180 -L173: - clrb |_stkseg+~L1+1|(fp) - jpr L178 -L20014: - ldb rl3,|_stkseg+~L1+1|(fp) - extsb r3 - ldb rl4,_u+1062(r3) - extsb r4 - bit r4,#7 - jpr ne,L176 - ldb rl2,|_stkseg+~L1+1|(fp) - extsb r2 - ldb rl3,_u+1062(r2) - extsb r3 - and r3,#127 - ldb rh3,rl3 - clrb rl3 - ld _u+44,r3 - clr _u+46 - ldb rl2,|_stkseg+~L1+1|(fp) - extsb r2 - sla r2,#2 - ldb rl3,_u+552(r2) - subb rh3,rh3 - inc r3,#1 - ldb rh3,rl3 - clrb rl3 - ld _u+48,r3 - ldl rr6,rr12 - callr _writei -L176: - incb |_stkseg+~L1+1|(fp),#1 -L178: - ldb rl2,|_stkseg+~L1+1|(fp) - cpb rl2,_u+1190 - jpr lt,L20014 - ld r2,_u+1390 - ldb rh2,rl2 - clrb rl2 - ld _u+44,r2 - ldk r2,#0 - ldb rl2,_u+1060 - ldb rh2,rl2 - clrb rl2 - ld _u+46,r2 - ldk r2,#0 - ldb rl2,_u+1060 - ld r3,r2 - neg r3 - add r3,#256 - ldb rh3,rl3 - clrb rl3 - ld _u+48,r3 - jpr L20017 -L170: - ldb _u+21,#13 -L180: - ldl rr6,rr12 - callr _iput - cpb _u+21,#0 - ldk r2,#0 - tcc eq,r2 - extsb r2 -L10021: - ldm r11,_stkseg+4(fp),#3 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 10 - } /* _core */ - -.psec data -.data - -/*~~grow:*/ - -.psec -.code - -_grow:: -{ - dec fp,#~L2 - ldm _stkseg+4(fp),r8,#6 - ld |_stkseg+~L1+0|(fp),r7 - ld r6,_u+220 - dec r6,#1 - ld r2,r6 - neg r2 - add r2,#256 - ldb rh2,rl2 - clrb rl2 - cp r2,r7 - jpr ugt,L184 -L20024: - sub r2,r2 - jpr L10025 -L184: - ldk r13,#6 - jpr L185 -L20019: - ld r2,_u+220 - inc r2,#10 - add r2,r12 - add r2,_u+218 - cp r2,#256 - jpr ge,L185 - ld r5,_u+220 - add r5,r12 - ld r6,_u+218 - ld r7,_u+216 - ldk r4,#1 - callr _estabur - test r2 - jpr eq,L192 -L185: - ld r2,r13 - dec r2,#1 - ld r13,r2 - test r2 - jpr eq,L20024 - ldk r2,#0 - ld r3,|_stkseg+~L1|(fp) - addl rr2,#255 - sral rr2,#8 - ld r2,r3 - neg r2 - add r2,#256 - sub r2,_u+220 - add r2,r13 - ld r12,r2 - cp r2,#0 - jpr le,L185 - testb _u+544 - jpr eq,L20019 - ld r2,_u+220 - add r2,r12 - cp r2,#256 - jpr gt,L185 - ld r2,_u+220 - add r2,r12 - ld r3,r2 - neg r3 - add r3,#256 - ldb _u+1060,rl3 -L192: - ldl rr8,_u+32 - ld r7,rr8(#20) - add r7,r12 - callr _expand - ld r2,rr8(#18) - ldl rr4,rr8 - add r5,#20 - add r2,@rr4 - ld r10,r2 - ld r11,_u+220 - jpr L197 -L20021: - dec r10,#1 - ld r7,r10 - sub r7,r12 - ld r6,r10 - callr _copyseg - dec r11,#1 -L197: - test r11 - jpr ne,L20021 - ld r11,r12 - jpr L201 -L20023: - dec r10,#1 - ld r7,r10 - callr _clearseg - dec r11,#1 -L201: - test r11 - jpr ne,L20023 - ld r2,_u+220 - add r2,r12 - ld _u+220,r2 - ldk r2,#1 -L10025: - ldm r8,_stkseg+4(fp),#6 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 16 - } /* _grow */ - -.psec data -.data - -/*~~ptrace:*/ - -.psec -.code - -_ptrace:: -{ - dec fp,#~L2 - ldm _stkseg+0(fp),r10,#4 - ldl rr10,_u+36 - cp @rr10,#0 - jpr gt,L205 - ldl rr2,_u+32 - inc r3,#1 - setb @rr2,#4 - jpr L10028 -L205: - ldl rr12,#_proc - jpr L208 -L20026: - cpb @rr12,#6 - jpr ne,L206 - ldl rr2,rr10 - inc r3,#2 - ld r4,rr12(#14) - cp r4,@rr2 - jpr ne,L206 - ldl rr2,_u+32 - inc r3,#14 - ld r4,rr12(#16) - cp r4,@rr2 - jpr eq,L211 -L206: - add r13,#36 -L208: - ld r3,_Nproc - mult rr2,#36 - ldl rr4,#_proc - add r5,r3 - cpl rr12,rr4 - jpr ult,L20026 - ldb _u+21,#3 - jpr L10028 -L211: - test _ipc - jpr eq,L212 - ldl rr6,#_ipc - ld r5,#25 - callr _sleep - jpr L211 -L212: - ld r2,rr12(#14) - ld _ipc,r2 - ld r2,rr10(#8) - ld _ipc+8,r2 - ldl rr2,rr10(#4) - and r2,#32512 - ldl _ipc+4,rr2 - ld r2,@rr10 - ld _ipc+2,r2 - ldl rr4,rr12 - inc r5,#1 - resb @rr4,#5 - ldl rr6,rr12 - callr _setrun - jpr L214 -L20028: - ldl rr6,#_ipc - ld r5,#25 - callr _sleep -L214: - cp _ipc+2,#0 - jpr gt,L20028 - ld r2,_ipc+8 - ld _u+40,r2 - cp _ipc+2,#0 - jpr ge,L216 - ldb _u+21,#5 -L216: - clr _ipc - ldl rr6,#_ipc - callr _wakeup -L10028: - ldm r10,_stkseg+0(fp),#4 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 8 - } /* _ptrace */ - -.psec data -.data - -.even -/*~~procxmt:*/ - -.psec -.code - -_procxmt:: -{ - .psec data - .data - .even -L264: - .long L223 - .long L228 - .long L231 - .long L233 - .long L246 - .long L248 - .long L258 - .long L262 - .long L257 - .psec - .code - sub fp,#~L2 - ldm _stkseg+6(fp),r8,#6 - ldl rr2,_u+32 - inc r3,#14 - ld r4,_ipc - cp r4,@rr2 - jpr eq,L218 -L20031: - sub r2,r2 - jpr L10031 -L218: - ld r13,_ipc+2 - clr _ipc+2 - ldl rr6,#_ipc - callr _wakeup - testb _u+544 - jpr ne,L219 - ld r7,_ipc+6 - callr _nsseg - ld _ipc+4,r2 -L219: - ld r2,r13 - dec r2,#1 - cp r2,#8 - jpr ugt,L227 - rl r2,#2 - ldl rr4,L264(r2) - jp @rr4 -L223: - testb _u+544 - jpr ne,L228 - ld r7,_ipc+6 - ldl rr4,#_ipc+8 - callr _fuiword - test r2 - jpr eq,L20031 - jpr L227 -L228: - ldl rr6,_ipc+4 - ldl rr4,#_ipc+8 - callr _fuword - test r2 - jpr eq,L20031 - jpr L227 -L231: - ld r13,_ipc+6 - cp r13,#0 - jpr lt,L227 - cp r13,#2560 - jpr uge,L227 - ld r2,r13 - sra r2,#1 - add r2,r2 - ld r3,_u(r2) - ld _ipc+8,r3 - jpr L20031 -L233: - ldl rr2,_u+32 - ldl rr4,rr2(#26) - ldl rr8,rr4 - testl rr4 - jpr eq,L234 - ldb rl4,rr8(#10) - cpb rl4,#1 - jpr ne,L227 - ldl rr4,rr8(#6) - ld r6,rr4(#6) - bit r6,#9 - jpr ne,L227 - ldl rr2,rr4 - resb @rr2,#5 -L234: - testb _u+544 - jpr eq,L236 - testb _u+484 - jpr eq,L237 - ldb rl7,_ipc+4 - ldb rh7,#0 - ld r6,#-1 - ld r5,r6 - sub r4,r4 - callr _ldsdr -L237: - ldl rr6,_ipc+4 - ld r5,_ipc+8 - callr _suword - test r2 - jpr ne,L227 - testb _u+484 - jpr eq,L242 - ldb rl7,_ipc+4 - ldb rh7,#0 - ld r6,#-1 - ld r5,r6 - ldk r4,#1 - callr _ldsdr - jpr L242 -L236: - ld r7,_u+216 - ld r6,_u+218 - ld r5,_u+220 - sub r4,r4 - callr _estabur - ld r7,_ipc+6 - ld r6,_ipc+8 - callr _suiword - test r2 - jpr ne,L227 - ld r7,_u+216 - ld r6,_u+218 - ld r5,_u+220 - ldk r4,#1 - callr _estabur -L242: - testl rr8 - jpr eq,L20031 - ldl rr2,rr8 - inc r3,#12 - setb @rr2,#1 - jpr L20031 -L246: - ldl rr6,_ipc+4 - ld r5,_ipc+8 - callr _suword - test r2 - jpr ne,L227 - jpr L20031 -L248: - ld r13,_ipc+6 - ld r2,r13 - sra r2,#1 - add r2,r2 - ldl rr4,#_u - add r5,r2 - ldl rr10,rr4 - ldk r13,#0 -L20030: - ld r2,r13 - add r2,r13 - ldl rr4,_u+362 - add r5,r2 - cpl rr10,rr4 - jpr eq,L253 - inc r13,#1 - cp r13,#15 - jpr lt,L20030 - ldl rr2,_u+362 - add r3,#30 - cpl rr10,rr2 - jpr eq,L253 - ldl rr2,_u+362 - add r3,#38 - cpl rr10,rr2 - jpr eq,L253 - ldl rr2,_u+362 - add r3,#34 - cpl rr10,rr2 - jpr ne,L227 - ldl rr2,_u+362 - ld r4,rr2(#34) - and r4,#65280 - ld r5,_ipc+8 - and r5,#255 - or r5,r4 - ld _ipc+8,r5 -L253: - ld r2,_ipc+8 - ld @rr10,r2 - jpr L20031 -L257: - ldl rr2,_u+362 - add r3,#34 - set @rr2,#0 -L258: - cp _ipc+6,#1 - jpr eq,L259 - testb _u+544 - jpr eq,L260 - ldl rr2,_u+362 - add r3,#36 - ld r4,_ipc+4 - ld @rr2,r4 -L260: - ldl rr2,_u+362 - add r3,#38 - ld r4,_ipc+6 - ld @rr2,r4 -L259: - ldl rr2,_u+32 - inc r3,#6 - subl rr4,rr4 - ldl @rr2,rr4 - test _ipc+8 - jpr eq,L261 - ldl rr6,_u+32 - ld r5,_ipc+8 - callr _psignal -L261: - ldk r2,#1 - jpr L10031 -L262: - ldl rr6,_u+32 - callr _fsig - ld |_stkseg+~L1+4|(fp),r2 - ld r7,r2 - callr _exit -L227: - ld _ipc+2,#-1 - jpr L20031 -L10031: - ldm r8,_stkseg+6(fp),#6 - add fp,#~L2 - ret - ~L1 := 0 - ~L2 := 18 - } /* _procxmt */ - -.psec data -.data - diff --git a/WEGA/src/uts/sys/sys1.s b/WEGA/src/uts/sys/sys1.s deleted file mode 100644 index 8c1a0e7..0000000 --- a/WEGA/src/uts/sys/sys1.s +++ /dev/null @@ -1,1925 +0,0 @@ -.seg -.psec data -.data - - -fp := r15; -sp := rr14; -_sys1wstr:: -.byte %40 -.byte %5b -.byte %24 -.byte %5d -.byte %73 -.byte %79 -.byte %73 -.byte %31 -.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 %9 -.byte %30 -.byte %39 -.byte %2f -.byte %32 -.byte %38 -.byte %2f -.byte %38 -.byte %33 -.byte %20 -.byte %30 -.byte %30 -.byte %3a -.byte %32 -.byte %38 -.byte %3a -.byte %35 -.byte %32 -.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, _coremap; -.comm 200, _swapmap; -/*~~exec:*/ - -.psec -.code - -_exec:: -{ - ldl rr2,_u+36 - inc r3,#8 - subl rr4,rr4 - ldl @rr2,rr4 - callr _exece - ret - ~L1 := 0 - ~L2 := 0 - } /* _exec */ - -.psec data -.data - -L117: -.byte %4f,%75,%74,%20,%6f,%66,%20,%73 -.byte %77,%61,%70,%0 -.even -/*~~exece:*/ - -.psec -.code - -_exece:: -{ - sub fp,#~L2 - ldm _stkseg+24(fp),r8,#6 - ldl rr6,#_uchar - sub r5,r5 - callr _namei - ldl |_stkseg+~L1+20|(fp),rr2 - testl rr2 - jpr eq,L10003 - clr |_stkseg+~L1+6|(fp) - subl rr8,rr8 - ldl rr6,|_stkseg+~L1+20|(fp) - ld r5,#64 - callr _access - test r2 - jpr ne,L111 - ldl rr2,|_stkseg+~L1+20|(fp) - ld r4,rr2(#6) - and r4,#61440 - cp r4,#32768 - jpr ne,L113 - ld r4,rr2(#6) - and r4,#73 - test r4 - jpr ne,L112 -L113: - ldb _u+21,#13 - jpr L111 -L112: - ldk r12,#0 - clr |_stkseg+~L1+4|(fp) - ldk r13,#0 - ldl rr2,_u+36 - ldl |_stkseg+~L1|(fp),rr2 - ldl rr6,#_swapmap - ldk r5,#10 - callr _malloc - ld |_stkseg+~L1+6|(fp),r2 - test r2 - jpr ne,L115 - ldl rr6,#L117 - callr _panic -L115: - testb _u+544 - jpr ne,L10008 - ldl rr2,|_stkseg+~L1|(fp) - ldl rr4,rr2(#4) - ldk r4,#0 - testl rr4 - jpr ne,L121 -L10008: - testb _u+544 - jpr eq,L118 - ldl rr2,|_stkseg+~L1|(fp) - ldl rr4,rr2(#4) - testl rr4 - jpr eq,L118 -L121: - subl rr2,rr2 - ldl |_stkseg+~L1+12|(fp),rr2 - testb _u+544 - jpr ne,L10010 - ldl rr2,|_stkseg+~L1|(fp) - ldl rr4,rr2(#4) - ldk r4,#0 - testl rr4 - jpr ne,L10009 -L10010: - testb _u+544 - jpr eq,L122 - ldl rr2,|_stkseg+~L1|(fp) - ldl rr4,rr2(#4) - testl rr4 - jpr eq,L122 -L10009: - testb _u+544 - jpr eq,L123 - ldl rr6,|_stkseg+~L1|(fp) - ldl rr2,rr6(#4) - ldl rr6,rr2 - ldl rr4,#_stkseg+~L1+12 - add r5,fp - callr _fuword - test r2 - jpr ne,L113 - ldl rr6,|_stkseg+~L1|(fp) - ldl rr2,rr6(#4) - addl rr2,#2 - ldl rr6,rr2 - ldl rr4,#_stkseg+~L1+14 - add r5,fp - callr _fuword - test r2 - jpr ne,L113 - ldl rr2,|_stkseg+~L1|(fp) - inc r3,#4 - ldl rr4,@rr2 - addl rr4,#4 - jpr L20000 -L123: - ldl rr6,|_stkseg+~L1|(fp) - ldl rr2,rr6(#4) - ldl rr6,rr2 - ldl rr4,#_stkseg+~L1+14 - add r5,fp - callr _fuword - test r2 - jpr ne,L113 - ld r7,|_stkseg+~L1+14|(fp) - callr _nsseg - ld |_stkseg+~L1+12|(fp),r2 - ldl rr2,|_stkseg+~L1|(fp) - inc r3,#4 - ldl rr4,@rr2 - addl rr4,#2 -L20000: - ldl @rr2,rr4 -L122: - testb _u+544 - jpr ne,L10013 - ldk r2,#0 - ld r3,|_stkseg+~L1+14|(fp) - testl rr2 - jpr ne,L10013 - ldl rr2,|_stkseg+~L1|(fp) - ldl rr4,rr2(#8) - ldk r4,#0 - testl rr4 - jpr ne,L10012 -L10013: - testb _u+544 - jpr eq,L129 - ldl rr2,|_stkseg+~L1+12|(fp) - testl rr2 - jpr ne,L129 - ldl rr2,|_stkseg+~L1|(fp) - ldl rr4,rr2(#8) - testl rr4 - jpr eq,L129 -L10012: - ldl rr2,|_stkseg+~L1|(fp) - inc r3,#4 - subl rr4,rr4 - ldl @rr2,rr4 - testb _u+544 - jpr eq,L130 - ldl rr6,|_stkseg+~L1|(fp) - ldl rr2,rr6(#8) - ldl rr6,rr2 - ldl rr4,#_stkseg+~L1+12 - add r5,fp - callr _fuword - test r2 - jpr ne,L113 - ldl rr6,|_stkseg+~L1|(fp) - ldl rr2,rr6(#8) - addl rr2,#2 - ldl rr6,rr2 - ldl rr4,#_stkseg+~L1+14 - add r5,fp - callr _fuword - test r2 - jpr ne,L113 - ldl rr2,|_stkseg+~L1+12|(fp) - testl rr2 - jpr eq,L118 - ldl rr2,|_stkseg+~L1|(fp) - inc r3,#8 - ldl rr4,@rr2 - addl rr4,#2 - ldl @rr2,rr4 - jpr L133 -L130: - ldl rr6,|_stkseg+~L1|(fp) - ldl rr2,rr6(#8) - ldl rr6,rr2 - ldl rr4,#_stkseg+~L1+14 - add r5,fp - callr _fuword - test r2 - jpr ne,L113 - ldk r2,#0 - ld r3,|_stkseg+~L1+14|(fp) - testl rr2 - jpr eq,L118 - ld r7,r3 - callr _nsseg - ld |_stkseg+~L1+12|(fp),r2 -L133: - ldl rr2,|_stkseg+~L1|(fp) - inc r3,#8 - ldl rr4,@rr2 - addl rr4,#2 - ldl @rr2,rr4 - inc |_stkseg+~L1+4|(fp),#1 -L129: - testb _u+544 - jpr ne,L10015 - ldk r2,#0 - ld r3,|_stkseg+~L1+14|(fp) - testl rr2 - jpr eq,L118 -L10015: - testb _u+544 - jpr eq,L10016 - ldl rr2,|_stkseg+~L1+12|(fp) - testl rr2 - jpr eq,L118 -L10016: - inc r12,#1 -L139: - cp r13,#5119 - jpr lt,L140 - ldb _u+21,#7 -L140: - ldl rr4,#_stkseg+~L1+11 - add r5,fp - ldl rr6,|_stkseg+~L1+12|(fp) - inc |_stkseg+~L1+14|(fp),#1 - callr _fubyte - test r2 - jpr eq,L142 - ldb _u+21,#14 -L142: - testb _u+21 - jpr ne,L111 - ld r2,r13 - and r2,#511 - test r2 - jpr ne,L144 - testl rr8 - jpr eq,L145 - ldl rr6,rr8 - callr _bawrite -L145: - ld r3,|_stkseg+~L1+6|(fp) - exts rr2 - addl rr2,_swplo - ld r4,r13 - sra r4,#9 - ld r7,r4 - exts rr6 - addl rr2,rr6 - ldl rr4,rr2 - ld r7,_swapdev - callr _getblk - ldl rr8,rr2 - ldl rr2,rr8(#22) - ldl rr10,rr2 -L144: - inc r13,#1 - ldb rl2,|_stkseg+~L1+11|(fp) - ldb @rr10,rl2 - inc r11,#1 - cpb |_stkseg+~L1+11|(fp),#0 - jpr gt,L139 - jpr L121 -L118: - testl rr8 - jpr eq,L148 - ldl rr6,rr8 - callr _bawrite -L148: - subl rr8,rr8 - ld r2,r13 - inc r2,#1 - and r2,#-2 - ld r13,r2 - testb _u+21 - jpr ne,L10017 - ldl rr6,|_stkseg+~L1+20|(fp) - ld r5,r2 - callr _getxfile - test r2 - jpr ne,L10017 - testb _u+21 - jpr eq,L150 -L10017: - ldl rr2,_u+362 - ld r4,rr2(#34) - bit r4,#15 - jpr eq,L10018 - ldk r4,#1 - jpr L10019 -L10018: - sub r4,r4 -L10019: - ldb _u+544,rl4 - callr _setscr - jpr L111 -L150: - ld r2,r13 - neg r2 - dec r2,#2 - ld |_stkseg+~L1+8|(fp),r2 - ld r2,_u+1390 - ldb rh2,rl2 - clrb rl2 - ld |_stkseg+~L1+12|(fp),r2 - testb _u+544 - jpr eq,L152 - ld r2,r12 - add r2,r12 - add r2,r2 - ld r3,|_stkseg+~L1+8|(fp) - sub r3,r2 - dec r3,#12 - jpr L20001 -L152: - ld r2,r12 - add r2,r12 - ld r3,|_stkseg+~L1+8|(fp) - sub r3,r2 - dec r3,#6 -L20001: - ld |_stkseg+~L1+14|(fp),r3 - ldl rr2,_u+362 - add r3,#30 - ld r4,|_stkseg+~L1+14|(fp) - ld @rr2,r4 - ld r5,r12 - sub r5,|_stkseg+~L1+4|(fp) - ldl rr6,|_stkseg+~L1+12|(fp) - callr _suword - test r2 - jpr ne,L113 - ldk r13,#0 - jpr L156 -L20002: - ld r5,_u+1390 - ldb rh5,rl5 - clrb rl5 - ldl rr6,|_stkseg+~L1+12|(fp) - callr _suword - test r2 - jpr ne,L113 - ldl rr6,|_stkseg+~L1+12|(fp) - inc r7,#2 - ld r5,|_stkseg+~L1+8|(fp) - callr _suword - test r2 - jpr ne,L113 - inc |_stkseg+~L1+14|(fp),#2 -L170: - ld r2,r13 - and r2,#511 - test r2 - jpr ne,L172 - testl rr8 - jpr eq,L173 - ldl rr6,rr8 - callr _brelse -L173: - ld r3,|_stkseg+~L1+6|(fp) - exts rr2 - addl rr2,_swplo - ld r4,r13 - sra r4,#9 - ld r7,r4 - exts rr6 - addl rr2,rr6 - ldl rr4,rr2 - ld r7,_swapdev - callr _bread - ldl rr8,rr2 - ldl rr2,rr8(#22) - ldl rr10,rr2 -L172: - ld r2,_u+1390 - ldb rh2,rl2 - clrb rl2 - ld |_stkseg+~L1+16|(fp),r2 - ld r2,|_stkseg+~L1+8|(fp) - ld |_stkseg+~L1+18|(fp),r2 - inc |_stkseg+~L1+8|(fp),#1 - ldl rr4,rr10 - inc r11,#1 - ldb rl3,@rr4 - ldb |_stkseg+~L1+11|(fp),rl3 - ldb rl5,rl3 - extsb r5 - ldl rr6,|_stkseg+~L1+16|(fp) - callr _subyte - test r2 - jpr eq,L176 - jpr L113 -L158: - inc |_stkseg+~L1+14|(fp),#2 - cp r12,|_stkseg+~L1+4|(fp) - jpr ne,L165 - ldl rr6,|_stkseg+~L1+12|(fp) - sub r5,r5 - callr _suword - test r2 - jpr ne,L113 - inc |_stkseg+~L1+14|(fp),#2 -L165: - dec r12,#1 - cp r12,#0 - jpr lt,L157 - ldl rr6,|_stkseg+~L1+12|(fp) - ld r5,|_stkseg+~L1+8|(fp) - callr _suword - test r2 - jpr eq,L170 - jpr L113 -L176: - inc r13,#1 - ldb rl2,|_stkseg+~L1+11|(fp) - extsb r2 - and r2,#255 - jpr ne,L170 -L156: - testb _u+544 - jpr eq,L158 - inc |_stkseg+~L1+14|(fp),#2 - cp r12,|_stkseg+~L1+4|(fp) - jpr ne,L159 - ldl rr6,|_stkseg+~L1+12|(fp) - sub r5,r5 - callr _suword - test r2 - jpr ne,L113 - ldl rr6,|_stkseg+~L1+12|(fp) - inc r7,#2 - sub r5,r5 - callr _suword - test r2 - jpr ne,L113 - inc |_stkseg+~L1+14|(fp),#4 -L159: - dec r12,#1 - cp r12,#0 - jpr ge,L20002 -L157: - ldl rr6,|_stkseg+~L1+12|(fp) - sub r5,r5 - callr _suword - test r2 - jpr ne,L113 - testb _u+544 - jpr eq,L179 - ldl rr6,|_stkseg+~L1+12|(fp) - inc r7,#2 - sub r5,r5 - callr _suword - test r2 - jpr ne,L113 -L179: - ld r2,_u+1390 - ldb rh2,rl2 - clrb rl2 - ld |_stkseg+~L1+16|(fp),r2 - ld r2,|_stkseg+~L1+8|(fp) - ld |_stkseg+~L1+18|(fp),r2 - ldl rr6,|_stkseg+~L1+16|(fp) - sub r5,r5 - callr _suword - test r2 - jpr ne,L113 - callr _setregs -L111: - testl rr8 - jpr eq,L183 - ldl rr6,rr8 - callr _brelse -L183: - test |_stkseg+~L1+6|(fp) - jpr eq,L184 - ldl rr6,#_swapmap - ldk r5,#10 - ld r4,|_stkseg+~L1+6|(fp) - callr _mfree -L184: - ldl rr6,|_stkseg+~L1+20|(fp) - callr _iput -L10003: - ldm r8,_stkseg+24(fp),#6 - add fp,#~L2 - ret - ~L1 := 0 - ~L2 := 36 - } /* _exece */ - -.psec data -.data - -.even -L248: -.word 58885 -.word 58887 -.word 58897 -.even -.even -L260: -.word 59141 -.word 59143 -.word 59153 -.even -/*~~getxfile:*/ - -.psec -.code - -_getxfile:: -{ - .psec data - .data - .even -L249: - .long L191 - .long L199 - .long L198 - .even -L261: - .long L258 - .long L255 - .long L257 - .psec - .code - sub fp,#~L2 - ldm _stkseg+438(fp),r8,#6 - ld r11,r5 - ldl rr12,rr6 - ldl rr2,#_u+488 - ldl _u+44,rr2 - ld _u+48,#56 - subl rr2,rr2 - ldl _u+50,rr2 - ldb _u+20,#1 - callr _readi - clrb _u+20 - testb _u+21 - jpr ne,L20012 - test _u+48 - jpr eq,L190 -L191: - ldb _u+21,#8 - jpr L20012 -L190: - clr |_stkseg+~L1+12|(fp) - clr |_stkseg+~L1+14|(fp) - ld r9,_u+488 - ld r2,r9 - and r2,#256 - test r2 - jpr ne,L192 - subl rr2,rr2 - ldl |_stkseg+~L1+28|(fp),rr2 - subl rr2,rr2 - ldl |_stkseg+~L1+24|(fp),rr2 - subl rr2,rr2 - ldl |_stkseg+~L1+20|(fp),rr2 - clr |_stkseg+~L1+36|(fp) - ld r2,_u+498 - srl r2,#4 - ld |_stkseg+~L1+34|(fp),r2 - bit _u+506,#5 - jpr eq,L193 - ld |_stkseg+~L1+40|(fp),#127 - jpr L194 -L193: - ld |_stkseg+~L1+40|(fp),#63 -L194: - cp |_stkseg+~L1+34|(fp),#128 - jpr gt,L191 - ld r2,r9 - ldl rr4,#L248 - ld r6,#3 - cpir r2,@rr4,r6,eq - jpr ne,L191 - sll r6,#2 - neg r6 - ldl rr4,L249+8(r6) - jp @rr4 -L198: - inc |_stkseg+~L1+12|(fp),#1 -L199: - ld |_stkseg+~L1+32|(fp),#-1 - ldk r10,#0 -L202: - ld r3,|_stkseg+~L1+34|(fp) - inc r3,#1 - ld r5,r3 - exts rr4 - div rr4,#2 - cp r10,r5 - jpr ge,L201 - clr |_stkseg+~L1+172|(fp) -L205: - cp |_stkseg+~L1+172|(fp),#1 - jpr gt,L204 - ld r3,|_stkseg+~L1+172|(fp) - sla r3,#4 - ldb rl4,_u+512(r3) - extsb r4 - ld |_stkseg+~L1+38|(fp),r4 - ld r3,|_stkseg+~L1+172|(fp) - sla r3,#4 - ld r4,_u+516(r3) - ld _stkseg+~L1+430(fp),r4 - ld r3,|_stkseg+~L1+172|(fp) - sla r3,#4 - ld r4,_u+518(r3) - ld _stkseg+~L1+432(fp),r4 - ld r3,|_stkseg+~L1+172|(fp) - sla r3,#4 - ld r4,_u+520(r3) - ld _stkseg+~L1+434(fp),r4 - inc |_stkseg+~L1+36|(fp),#1 - ld r3,|_stkseg+~L1+36|(fp) - cp r3,|_stkseg+~L1+34|(fp) - jpr le,L208 -L204: - ldl rr2,#_u+512 - ldl _u+44,rr2 - ld _u+48,#32 - ldb _u+20,#1 - ldl rr6,rr12 - callr _readi - clrb _u+20 - inc r10,#1 - jpr L202 -L208: - inc |_stkseg+~L1+32|(fp),#1 - ld r3,|_stkseg+~L1+32|(fp) - ldl rr4,#_stkseg+~L1+44 - add r5,fp - add r5,r3 - ldb rl6,|_stkseg+~L1+39|(fp) - ldb @rr4,rl6 - ld r3,|_stkseg+~L1+32|(fp) - add r3,r3 - ldl rr4,#_stkseg+~L1+174 - add r5,fp - add r5,r3 - clr @rr4 - ld r3,|_stkseg+~L1+172|(fp) - sla r3,#4 - ld r4,_u+522(r3) - bit r4,#0 - jpr eq,L209 - ld r3,|_stkseg+~L1+32|(fp) - add r3,r3 - ldl rr6,#_stkseg+~L1+174 - add r7,fp - add r7,r3 - ld r3,_stkseg+~L1+430(fp) - ld @rr6,r3 - test |_stkseg+~L1+12|(fp) - jpr eq,L210 - ld r3,|_stkseg+~L1+32|(fp) - ldl rr6,#_stkseg+~L1+44 - add r7,fp - add r7,r3 - ldb rl5,@rr6 - orb rl5,#-128 - ldb @rr6,rl5 - ldk r6,#0 - ld r7,_stkseg+~L1+430(fp) - addl rr6,|_stkseg+~L1+20|(fp) - ldl |_stkseg+~L1+20|(fp),rr6 - ldk r6,#0 - ld r7,_stkseg+~L1+430(fp) - addl rr6,#255 - sral rr6,#8 - ld r3,|_stkseg+~L1+32|(fp) - ldl rr0,#_stkseg+~L1+44 - add r1,fp - add r1,r3 - ldl rr2,rr0 - ldb rl6,@rr2 - extsb r6 - ld r5,|_stkseg+~L1+32|(fp) - sub r4,r4 - callr _sestabur - test r2 - jpr eq,L203 - jpr L191 -L210: - ld r2,|_stkseg+~L1+32|(fp) - ldl rr4,#_stkseg+~L1+44 - add r5,fp - ldb rl3,rr4(r2) - ldb _u+1191,rl3 - ldk r4,#0 - ld r5,_stkseg+~L1+430(fp) - addl rr4,#255 - sral rr4,#8 - ld _u+1192,r5 - ldk r4,#0 - ld r5,_stkseg+~L1+430(fp) - addl rr4,|_stkseg+~L1+24|(fp) - ldl |_stkseg+~L1+24|(fp),rr4 - test _stkseg+~L1+432(fp) - jpr ne,L209 - test _stkseg+~L1+434(fp) - jpr ne,L209 - ldk r2,#0 - ld r3,_stkseg+~L1+430(fp) - addl rr2,#255 - sral rr2,#8 - ld r7,r3 - ld r6,|_stkseg+~L1+32|(fp) - ldl rr2,#_stkseg+~L1+44 - add r3,fp - ldb rl4,rr2(r6) - ldb rl6,rl4 - extsb r6 - ld r5,|_stkseg+~L1+32|(fp) - ldk r4,#1 - callr _sestabur - test r2 - jpr ne,L191 -L209: - ld r2,|_stkseg+~L1+172|(fp) - sla r2,#4 - ld r3,_u+522(r2) - bit r3,#1 - jpr eq,L215 - ld r2,|_stkseg+~L1+32|(fp) - add r2,r2 - ldl rr4,#_stkseg+~L1+174 - add r5,fp - add r5,r2 - ld r2,@rr4 - add r2,_stkseg+~L1+432(fp) - ld @rr4,r2 - ld r2,|_stkseg+~L1+32|(fp) - add r2,r2 - ldl rr4,#_stkseg+~L1+174 - add r5,fp - ld r3,rr4(r2) - ldk r4,#0 - ld r5,r3 - ld r2,r4 - ld r3,_stkseg+~L1+434(fp) - addl rr4,rr2 - ldl |_stkseg+~L1+16|(fp),rr4 - ld r2,|_stkseg+~L1+18|(fp) - ldk r4,#0 - ld r5,r2 - cpl rr4,|_stkseg+~L1+16|(fp) - jpr eq,L216 -L20013: - ldb _u+21,#12 - jpr L20012 -L216: - ldk r2,#0 - ld r3,_stkseg+~L1+432(fp) - addl rr2,|_stkseg+~L1+24|(fp) - ldl |_stkseg+~L1+24|(fp),rr2 - ldk r2,#0 - ld r3,_stkseg+~L1+434(fp) - addl rr2,|_stkseg+~L1+28|(fp) - ldl |_stkseg+~L1+28|(fp),rr2 - ld r2,|_stkseg+~L1+32|(fp) - add r2,r2 - ldl rr4,#_stkseg+~L1+174 - add r5,fp - ld r7,rr4(r2) - add r7,_stkseg+~L1+434(fp) - ldk r2,#0 - ld r3,r7 - addl rr2,#255 - sral rr2,#8 - ld r7,r3 - ld r6,|_stkseg+~L1+32|(fp) - ldl rr2,#_stkseg+~L1+44 - add r3,fp - ldb rl4,rr2(r6) - ldb rl6,rl4 - extsb r6 - ld r5,|_stkseg+~L1+32|(fp) - ldk r4,#1 - callr _sestabur - test r2 - jpr eq,L203 - jpr L191 -L215: - ld r2,|_stkseg+~L1+172|(fp) - sla r2,#4 - ld r3,_u+522(r2) - bit r3,#2 - jpr eq,L203 - ldk r4,#0 - ld r5,_stkseg+~L1+434(fp) - addl rr4,|_stkseg+~L1+28|(fp) - ldl |_stkseg+~L1+28|(fp),rr4 - ld r7,_stkseg+~L1+434(fp) - add r7,_stkseg+~L1+430(fp) - ldk r4,#0 - ld r5,r7 - addl rr4,#255 - sral rr4,#8 - ld r7,r5 - ld r2,|_stkseg+~L1+32|(fp) - ldl rr4,#_stkseg+~L1+44 - add r5,fp - ldb rl6,rr4(r2) - extsb r6 - ld r5,r2 - ldk r4,#1 - callr _sestabur - test r2 - jpr ne,L191 -L203: - inc |_stkseg+~L1+172|(fp),#1 - jpr L205 -L201: - ldl rr2,|_stkseg+~L1+20|(fp) - testl rr2 - jpr eq,L221 - ldb rl2,@rr12 - extsb r2 - and r2,#32 - test r2 - jpr ne,L221 - ldb rl2,rr12(#1) - cpb rl2,#1 - jpr eq,L221 -L20014: - ldb _u+21,#26 - jpr L20012 -L221: - ldk r2,#0 - ld r3,r11 - addl rr2,#255 - sral rr2,#8 - inc r3,#5 - ld |_stkseg+~L1+8|(fp),r3 - ld r2,|_stkseg+~L1+40|(fp) - ld _u+1390,r2 - ld r7,r3 - ld r6,|_stkseg+~L1+40|(fp) - sub r5,r5 - sub r4,r4 - callr _sestabur - test r2 - jpr ne,L191 - ldl rr2,|_stkseg+~L1+20|(fp) - addl rr2,#255 - sral rr2,#8 - ld |_stkseg+~L1+6|(fp),r3 - ldl rr2,|_stkseg+~L1+24|(fp) - addl rr2,|_stkseg+~L1+28|(fp) - addl rr2,#255 - sral rr2,#8 - ld r8,r3 - ld r2,|_stkseg+~L1+6|(fp) - inc r2,#10 - add r2,r8 - add r2,|_stkseg+~L1+8|(fp) - cp r2,_umemory - jpr ugt,L20013 - ldb _u+544,#1 - callr _setscr - ld r2,_u+498 - add r2,#24 - ld _u+486,r2 - ldb rl2,|_stkseg+~L1+35|(fp) - ldb _u+1190,rl2 - ldk r10,#0 - jpr L226 -L20004: - ldl rr2,#_stkseg+~L1+44 - add r3,fp - ldb rl4,rr2(r10) - ldb _u+1062(r10),rl4 - inc r10,#1 -L226: - cp r10,|_stkseg+~L1+34|(fp) - jpr lt,L20004 - ldb rl2,|_stkseg+~L1+13|(fp) - ldb _u+484,rl2 - clr _u+374 - clrb _u+476 - callr _xfree - ld r2,r8 - inc r2,#10 - add r2,|_stkseg+~L1+8|(fp) - ld r10,r2 - ld r7,r2 - callr _expand - jpr L229 -L20006: - ldl rr2,_u+32 - ld r7,rr2(#18) - add r7,r10 - callr _clearseg -L229: - dec r10,#1 - cp r10,#10 - jpr ge,L20006 - ldl rr2,#_stkseg+~L1+174 - add r3,fp - ldl rr4,|_stkseg+~L1+20|(fp) - ldl rr6,rr12 - callr _xalloc - ldl rr2,|_stkseg+~L1+20|(fp) - testl rr2 - jpr ne,L233 - callr _invsdrs - callr _segureg -L233: - ld r3,_u+486 - exts rr2 - ldl _u+50,rr2 - clr |_stkseg+~L1+32|(fp) - jpr L238 -L20008: - ld r2,|_stkseg+~L1+32|(fp) - ldb rl3,_u+1062(r2) - extsb r3 - bit r3,#7 - jpr eq,L239 - add r2,r2 - ldl rr4,#_stkseg+~L1+174 - add r5,fp - ld r3,rr4(r2) - ldk r4,#0 - ld r5,r3 - addl rr4,_u+50 - ldl _u+50,rr4 - ld r2,|_stkseg+~L1+32|(fp) - sla r2,#2 - ldb rl7,_u+552(r2) - subb rh7,rh7 - inc r7,#1 - ld r6,|_stkseg+~L1+32|(fp) - ldb rl2,_u+1062(r6) - ldb rl6,rl2 - extsb r6 - ld r5,|_stkseg+~L1+32|(fp) - ldk r4,#1 - callr _sestabur - jpr L236 -L239: - ld r2,|_stkseg+~L1+32|(fp) - ldb rl3,_u+1062(r2) - extsb r3 - and r3,#127 - ldb rh3,rl3 - clrb rl3 - ld _u+44,r3 - clr _u+46 - ld r2,|_stkseg+~L1+32|(fp) - add r2,r2 - ldl rr4,#_stkseg+~L1+174 - add r5,fp - ld r3,rr4(r2) - ld _u+48,r3 - ldl rr6,rr12 - callr _readi -L236: - inc |_stkseg+~L1+32|(fp),#1 -L238: - ld r2,|_stkseg+~L1+32|(fp) - cp r2,|_stkseg+~L1+34|(fp) - jpr lt,L20008 - ldl rr2,_u+32 - ldb rl4,rr2(#1) - extsb r4 - and r4,#16 - test r4 - jpr ne,L241 - ld r4,rr12(#6) - bit r4,#11 - jpr eq,L242 - test _u+24 - jpr eq,L242 - ld r2,rr12(#10) - ld _u+24,r2 - ld r2,rr12(#10) - ldl rr4,_u+32 - inc r5,#10 - ld @rr4,r2 -L242: - ld r2,rr12(#6) - bit r2,#10 - jpr eq,L244 - ld r2,rr12(#12) - ld _u+26,r2 - jpr L244 -L241: - ldl rr6,_u+32 - ldk r5,#5 - callr _psignal -L244: - ld r2,|_stkseg+~L1+6|(fp) - ld _u+216,r2 - ld _u+218,r8 - ld r2,|_stkseg+~L1+8|(fp) - ld _u+220,r2 - callr _segureg - jpr L20012 -L192: - ldk r2,#0 - ld r3,_u+516 - ldl |_stkseg+~L1+20|(fp),rr2 - ld r2,_u+498 - ld |_stkseg+~L1+10|(fp),r2 - cp r2,#16 - jpr eq,L10025 - cp r9,#59143 - jpr ne,L250 -L10025: - ldk r2,#0 - ld r3,_u+518 - jpr L20009 -L250: - ldk r2,#0 - ld r3,_u+534 -L20009: - ldl |_stkseg+~L1+24|(fp),rr2 - ldl rr2,_u+494 - ldk r4,#0 - ld r5,r3 - ldl |_stkseg+~L1+28|(fp),rr4 - ld _u+486,#56 - cp |_stkseg+~L1+10|(fp),#16 - jpr ne,L252 - ld r2,_u+486 - sub r2,|_stkseg+~L1+10|(fp) - ld _u+486,r2 -L252: - ld r2,r9 - ldl rr4,#L260 - ld r6,#3 - cpir r2,@rr4,r6,eq - jpr ne,L191 - sll r6,#2 - neg r6 - ldl rr4,L261+8(r6) - jp @rr4 -L255: - ldl rr4,|_stkseg+~L1+24|(fp) - addl rr4,|_stkseg+~L1+20|(fp) - ldl |_stkseg+~L1+16|(fp),rr4 - ldl |_stkseg+~L1+24|(fp),rr4 - ld r3,|_stkseg+~L1+18|(fp) - ld _u+518,r3 - ld r4,|_stkseg+~L1+18|(fp) - ldk r6,#0 - ld r7,r4 - cpl rr6,|_stkseg+~L1+16|(fp) - jpr ne,L20013 - subl rr2,rr2 - ldl |_stkseg+~L1+20|(fp),rr2 - clr _u+516 - jpr L253 -L20016: - ldb rl2,@rr12 - extsb r2 - and r2,#32 - test r2 - jpr ne,L262 - ldb rl2,rr12(#1) - cpb rl2,#1 - jpr eq,L262 - jpr L20014 -L257: - inc |_stkseg+~L1+12|(fp),#1 - jpr L253 -L258: - inc |_stkseg+~L1+14|(fp),#1 -L253: - ldl rr2,|_stkseg+~L1+20|(fp) - testl rr2 - jpr ne,L20016 -L262: - ldl rr2,|_stkseg+~L1+20|(fp) - addl rr2,#255 - sral rr2,#8 - ld |_stkseg+~L1+6|(fp),r3 - ldl rr2,|_stkseg+~L1+24|(fp) - addl rr2,|_stkseg+~L1+28|(fp) - ldl |_stkseg+~L1+16|(fp),rr2 - ld r2,|_stkseg+~L1+18|(fp) - ldk r4,#0 - ld r5,r2 - cpl rr4,|_stkseg+~L1+16|(fp) - jpr ne,L20013 - ldl rr2,|_stkseg+~L1+16|(fp) - addl rr2,#255 - sral rr2,#8 - ld r8,r3 - ld r2,r4 - ld r3,r11 - addl rr2,#255 - sral rr2,#8 - inc r3,#5 - ld |_stkseg+~L1+8|(fp),r3 - clrb _u+544 - callr _setscr - test |_stkseg+~L1+14|(fp) - jpr eq,L264 - testb _u+484 - jpr ne,L265 - ld r2,|_stkseg+~L1+6|(fp) - add r2,#31 - srl r2,#5 - ld r3,_u+216 - add r3,#31 - sra r3,#5 - cp r2,r3 - jpr ne,L20013 -L265: - test r11 - jpr ne,L20013 - ld r8,_u+218 - ld r2,_u+220 - ld |_stkseg+~L1+8|(fp),r2 - ldb rl3,_u+484 - extsb r3 - ld |_stkseg+~L1+12|(fp),r3 - callr _xfree - ldl rr6,rr12 - ldl rr4,|_stkseg+~L1+20|(fp) - callr _xalloc - ldl rr2,_u+502 - and r3,#65534 - ldl rr4,_u+362 - add r5,#38 - ld @rr4,r3 - jpr L268 -L264: - clr _u+374 - callr _xfree - ld r2,r8 - inc r2,#10 - add r2,|_stkseg+~L1+8|(fp) - ld r10,r2 - ld r7,r2 - callr _expand - jpr L269 -L20011: - ldl rr2,_u+32 - ld r7,rr2(#18) - add r7,r10 - callr _clearseg -L269: - dec r10,#1 - cp r10,#10 - jpr ge,L20011 - ldl rr6,rr12 - ldl rr4,|_stkseg+~L1+20|(fp) - callr _xalloc - sub r7,r7 - ld r6,r8 - sub r5,r5 - ldk r4,#1 - callr _estabur - ld _u+44,#16128 - clr _u+46 - ld r2,_u+486 - add r2,|_stkseg+~L1+22|(fp) - ldk r4,#0 - ld r5,r2 - ldl _u+50,rr4 - ld r2,|_stkseg+~L1+26|(fp) - ld _u+48,r2 - ldl rr6,rr12 - callr _readi - ldl rr2,_u+32 - ldb rl4,rr2(#1) - extsb r4 - and r4,#16 - test r4 - jpr ne,L272 - ld r4,rr12(#6) - bit r4,#11 - jpr eq,L273 - test _u+24 - jpr eq,L273 - ld r4,rr12(#10) - ld _u+24,r4 - ld r2,rr12(#10) - ldl rr4,_u+32 - inc r5,#10 - ld @rr4,r2 -L273: - ld r2,rr12(#6) - bit r2,#10 - jpr eq,L268 - ld r2,rr12(#12) - ld _u+26,r2 - jpr L268 -L272: - ldl rr6,_u+32 - ldk r5,#5 - callr _psignal -L268: - ld r2,|_stkseg+~L1+6|(fp) - ld _u+216,r2 - ld _u+218,r8 - ld r2,|_stkseg+~L1+8|(fp) - ld _u+220,r2 - ldb rl3,|_stkseg+~L1+13|(fp) - ldb _u+484,rl3 - ld _u+1390,#127 - ld r7,|_stkseg+~L1+6|(fp) - ld r6,r8 - ld r5,|_stkseg+~L1+8|(fp) - ldk r4,#1 - callr _estabur -L20012: - ld r2,|_stkseg+~L1+14|(fp) - ldm r8,_stkseg+438(fp),#6 - add fp,#~L2 - ret - ~L1 := 0 - ~L2 := 450 - } /* _getxfile */ - -.psec data -.data - -/*~~setregs:*/ - -.psec -.code - -_setregs:: -{ - dec fp,#~L2 - ldm _stkseg+0(fp),r8,#6 - ldl rr12,#_u+262 - jpr L280 -L20018: - ldl rr2,@rr12 - ldk r2,#0 - and r3,#1 - testl rr2 - jpr ne,L278 - subl rr2,rr2 - ldl @rr12,rr2 -L278: - inc r13,#4 -L280: - cpl rr12,#_u+342 - jpr ult,L20018 - ldk r11,#0 -L20020: - ld r2,r11 - add r2,r11 - ldl rr4,_u+362 - add r5,r2 - clr @rr4 - inc r11,#1 - cp r11,#15 - jpr lt,L20020 - testb _u+544 - jpr eq,L285 - ldl rr2,_u+362 - add r3,#28 - ld r4,_u+1390 - ldb rh4,rl4 - clrb rl4 - ld @rr2,r4 -L285: - ldk r11,#0 -L20022: - ld r3,r11 - mult rr2,#10 - ldl rr4,#_u+1246 - add r5,r3 - ld @rr4,#16383 - ld r3,r11 - mult rr2,#10 - ldl rr4,#_u+1246 - add r5,r3 - inc r5,#2 - ld @rr4,#32768 - ld r3,r11 - mult rr2,#10 - ldl rr4,#_u+1246 - add r5,r3 - inc r5,#4 - clr @rr4 - ld r3,r11 - mult rr2,#10 - ldl rr4,#_u+1246 - add r5,r3 - inc r5,#6 - clr @rr4 - ld r3,r11 - mult rr2,#10 - ldl rr4,#_u+1246 - add r5,r3 - inc r5,#8 - clr @rr4 - inc r11,#1 - cp r11,#8 - jpr lt,L20022 - callr _fsetregs - ldl rr2,_u+502 - and r3,#65534 - ldl rr4,_u+362 - add r5,#38 - ld @rr4,r3 - testb _u+544 - jpr ne,L290 - ldl rr2,_u+362 - add r3,#36 - ld @rr2,#16128 - jpr L291 -L290: - ldl rr2,_u+502 - sral rr2,#16 - ldl rr4,_u+362 - add r5,#36 - ld @rr4,r3 -L291: - ldk r11,#0 -L20024: - ldb rl2,_u+184(r11) - extsb r2 - bit r2,#0 - jpr eq,L292 - ld r2,r11 - sla r2,#2 - ldl rr4,_u+104(r2) - ldl rr8,rr4 - ld r2,r11 - sla r2,#2 - ldl rr4,#_u+104 - add r5,r2 - subl rr2,rr2 - ldl @rr4,rr2 - ldl rr6,rr8 - callr _closef - resb _u+184(r11),#0 -L292: - inc r11,#1 - cp r11,#20 - jpr lt,L20024 - resb _u+1208,#0 - ldl rr6,#_u+64 - ldl rr4,#_u+1194 - ldk r3,#14 - callr _bcopy - ldm r8,_stkseg+0(fp),#6 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 12 - } /* _setregs */ - -.psec data -.data - -/*~~rexit:*/ - -.psec -.code - -_rexit:: -{ - dec fp,#~L2 - ldm _stkseg+0(fp),r12,#2 - ldl rr12,_u+36 - ld r7,@rr12 - and r7,#255 - ldb rh7,rl7 - clrb rl7 - callr _exit - ldm r12,_stkseg+0(fp),#2 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 4 - } /* _rexit */ - -.psec data -.data - -/*~~exit:*/ - -.psec -.code - -_exit:: -{ - sub fp,#~L2 - ldm _stkseg+6(fp),r8,#6 - ld |_stkseg+~L1+0|(fp),r7 - ldl rr10,_u+32 - ldl rr2,rr10 - inc r3,#1 - ldb rl6,@rr2 - andb rl6,#-81 - ldb @rr2,rl6 - ldl rr2,rr10 - add r3,#34 - clr @rr2 - ldk r13,#0 -L20026: - ld r2,r13 - sla r2,#2 - ldl rr4,#_u+262 - add r5,r2 - ldl rr2,#1 - ldl @rr4,rr2 - inc r13,#1 - cp r13,#20 - jpr lt,L20026 - ldl rr2,rr10 - inc r3,#12 - ld r4,rr10(#14) - cp r4,@rr2 - jpr ne,L305 - ldl rr2,_u+478 - testl rr2 - jpr eq,L305 - ldl rr4,rr10 - inc r5,#12 - ldl rr2,_u+478 - ld r6,rr2(#50) - cp r6,@rr4 - jpr ne,L305 - add r3,#50 - clr @rr2 - ld r7,rr10(#12) - ldk r6,#1 - callr _signal -L305: - ldl rr2,rr10 - inc r3,#12 - clr @rr2 - ldk r13,#0 -L20028: - ld r2,r13 - sla r2,#2 - ldl rr4,_u+104(r2) - ldl |_stkseg+~L1+2|(fp),rr4 - ld r2,r13 - sla r2,#2 - ldl rr4,#_u+104 - add r5,r2 - subl rr2,rr2 - ldl @rr4,rr2 - ldl rr6,|_stkseg+~L1+2|(fp) - callr _closef - inc r13,#1 - cp r13,#20 - jpr lt,L20028 - ldl rr6,_u+56 - callr _plock - ldl rr6,_u+56 - callr _iput - ldl rr2,_u+60 - testl rr2 - jpr eq,L311 - ldl rr6,rr2 - callr _plock - ldl rr6,_u+60 - callr _iput -L311: - callr _xfree - callr _acct - ld r5,rr10(#20) - ld r4,rr10(#18) - ldl rr6,#_coremap - callr _mfree - ldb @rr10,#5 - ldl rr2,rr10 - add r3,#18 - ld r4,|_stkseg+~L1|(fp) - ld @rr2,r4 - ldl rr2,_u+350 - addl rr2,_u+342 - ldl rr4,rr10 - add r5,#20 - ldl @rr4,rr2 - ldl rr2,_u+354 - addl rr2,_u+346 - ldl rr4,rr10 - add r5,#24 - ldl @rr4,rr2 - ldl rr8,#_proc+36 - jpr L315 -L20030: - ldl rr2,rr8 - inc r3,#16 - ld r4,rr10(#14) - cp r4,@rr2 - jpr ne,L316 - ldl rr2,rr8 - inc r3,#16 - ld @rr2,#1 - cpb @rr8,#5 - jpr ne,L317 - ldl rr6,#_proc+36 - ld r5,#18 - callr _psignal -L317: - cpb @rr8,#6 - jpr ne,L320 - ldl rr6,rr8 - callr _setrun - jpr L320 -L316: - ldl rr2,rr8 - inc r3,#14 - ld r4,rr10(#16) - cp r4,@rr2 - jpr ne,L320 - ldl rr6,rr8 - ld r5,#18 - callr _psignal -L320: - ldl rr2,rr8 - inc r3,#12 - ld r4,rr10(#14) - cp r4,@rr2 - jpr ne,L313 - ldl rr2,rr8 - inc r3,#12 - clr @rr2 -L313: - add r9,#36 -L315: - ld r3,_Nproc - mult rr2,#36 - ldl rr4,#_proc - add r5,r3 - cpl rr8,rr4 - jpr ult,L20030 - callr _swtch - ldm r8,_stkseg+6(fp),#6 - add fp,#~L2 - ret - ~L1 := 0 - ~L2 := 18 - } /* _exit */ - -.psec data -.data - -/*~~wait:*/ - -.psec -.code - -_wait:: -{ - dec fp,#~L2 - ldm _stkseg+4(fp),r10,#4 - ldk r13,#0 -L326: - ldl rr10,#_proc - jpr L329 -L20032: - ldl rr2,_u+32 - inc r3,#14 - ld r4,rr10(#16) - cp r4,@rr2 - jpr ne,L327 - inc r13,#1 - cpb @rr10,#5 - jpr ne,L331 - ldl rr6,rr10 - ldk r5,#1 - callr _freeproc - jpr L10035 -L331: - cpb @rr10,#6 - jpr ne,L327 - ldb rl2,rr10(#1) - extsb r2 - and r2,#32 - test r2 - jpr ne,L327 - ldl rr2,rr10 - inc r3,#1 - setb @rr2,#5 - ld r2,rr10(#14) - ld _u+40,r2 - ldl rr6,rr10 - callr _fsig - ldb rh2,rl2 - clrb rl2 - or r2,#127 - ld _u+42,r2 - jpr L10035 -L327: - add r11,#36 -L329: - ld r3,_Nproc - mult rr2,#36 - ldl rr4,#_proc - add r5,r3 - cpl rr10,rr4 - jpr ult,L20032 - test r13 - jpr eq,L336 - ldl rr6,_u+32 - ld r5,#30 - callr _sleep - jpr L326 -L336: - ldb _u+21,#10 -L10035: - ldm r10,_stkseg+4(fp),#4 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 12 - } /* _wait */ - -.psec data -.data - -/*~~freeproc:*/ - -.psec -.code - -_freeproc:: -{ - dec fp,#~L2 - ldm _stkseg+6(fp),r12,#2 - ld |_stkseg+~L1+0|(fp),r5 - ldl rr12,rr6 - test r5 - jpr eq,L339 - ld r4,rr12(#14) - ld _u+40,r4 - ld r4,rr12(#18) - ld _u+42,r4 -L339: - ldl rr2,rr12(#20) - addl rr2,_u+350 - ldl _u+350,rr2 - ldl rr2,rr12(#24) - addl rr2,_u+354 - ldl _u+354,rr2 - clrb @rr12 - ldl rr2,rr12 - inc r3,#14 - clr @rr2 - ldl rr2,rr12 - inc r3,#16 - clr @rr2 - ldl rr2,rr12 - inc r3,#6 - subl rr4,rr4 - ldl @rr2,rr4 - ldl rr2,rr12 - inc r3,#1 - clrb @rr2 - ldl rr2,rr12 - add r3,#22 - subl rr4,rr4 - ldl @rr2,rr4 - ldm r12,_stkseg+6(fp),#2 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 10 - } /* _freeproc */ - -.psec data -.data - -/*~~fork:*/ - -.psec -.code - -_fork:: -{ - dec fp,#~L2 - ldm _stkseg+4(fp),r8,#6 - testb _u+544 - jpr eq,L342 - ld r2,_u+216 - inc r2,#10 - add r2,_u+218 - add r2,_u+220 - inc r2,#1 - sra r2,#1 - ld r8,r2 - ldl rr6,#_swapmap - ld r5,r2 - callr _malloc - ld r9,r2 - test r2 - jpr ne,L343 -L20037: - ldb _u+21,#12 - jpr L344 -L343: - ldl rr6,#_swapmap - ld r5,r8 - jpr L20034 -L342: - ld r5,_Maxmem - inc r5,#1 - sra r5,#1 - ldl rr6,#_swapmap - callr _malloc - ld r9,r2 - test r2 - jpr eq,L20037 - ld r5,_Maxmem - inc r5,#1 - sra r5,#1 - ldl rr6,#_swapmap -L20034: - ld r4,r9 - callr _mfree - ldk r9,#0 - subl rr10,rr10 - ldl rr12,#_proc - jpr L349 -L20036: - testb @rr12 - jpr ne,L350 - testl rr10 - jpr ne,L350 - ldl rr10,rr12 - jpr L347 -L350: - ld r2,rr12(#10) - cp r2,_u+24 - jpr ne,L347 - testb @rr12 - jpr eq,L347 - inc r9,#1 -L347: - add r13,#36 -L349: - ld r3,_Nproc - mult rr2,#36 - ldl rr4,#_proc - add r5,r3 - cpl rr12,rr4 - jpr ult,L20036 - testl rr10 - jpr eq,L10044 - test _u+24 - jpr eq,L353 - ld r2,_Nproc - dec r2,#1 - ld r5,r2 - mult rr4,#36 - ldl rr2,#_proc - add r3,r5 - cpl rr10,rr2 - jpr eq,L10044 - cp r9,_Maxuprc - jpr le,L353 -L10044: - ldb _u+21,#11 - jpr L344 -L353: - ldl rr12,_u+32 - callr _newproc - test r2 - jpr eq,L355 - ld r2,rr12(#14) - ld _u+40,r2 - ldl rr2,_time - ldl _u+1212,rr2 - ld r4,rr10(#20) - ld r7,r4 - exts rr6 - ldl _u+1220,rr6 - subl rr2,rr2 - ldl _u+1236,rr2 - subl rr2,rr2 - ldl _u+1228,rr2 - subl rr2,rr2 - ldl _u+1224,rr2 - subl rr2,rr2 - ldl _u+354,rr2 - subl rr2,rr2 - ldl _u+346,rr2 - subl rr2,rr2 - ldl _u+350,rr2 - subl rr2,rr2 - ldl _u+342,rr2 - ldb _u+1208,#1 - jpr L10041 -L355: - ld r2,rr10(#14) - ld _u+40,r2 -L344: - ldl rr2,_u+362 - add r3,#38 - inc @rr2,#2 -L10041: - ldm r8,_stkseg+4(fp),#6 - inc fp,#~L2 - ret - ~L1 := 0 - ~L2 := 16 - } /* _fork */ - -.psec data -.data - diff --git a/WEGA/src/uts/sys/sys2.c b/WEGA/src/uts/sys/sys2.c index 4ff5b65..1b1e83c 100644 --- a/WEGA/src/uts/sys/sys2.c +++ b/WEGA/src/uts/sys/sys2.c @@ -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; diff --git a/WEGA/src/uts/sys/sys2.s b/WEGA/src/uts/sys/sys2.s deleted file mode 100644 index 3dfa0dc..0000000 --- a/WEGA/src/uts/sys/sys2.s +++ /dev/null @@ -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 - diff --git a/WEGA/src/uts/sys/sys3.s b/WEGA/src/uts/sys/sys3.s deleted file mode 100644 index 388c548..0000000 --- a/WEGA/src/uts/sys/sys3.s +++ /dev/null @@ -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 - diff --git a/WEGA/src/uts/sys/ureg.s b/WEGA/src/uts/sys/ureg.s deleted file mode 100644 index 6477996..0000000 --- a/WEGA/src/uts/sys/ureg.s +++ /dev/null @@ -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 - diff --git a/WEGA/src/uts/touch.c b/WEGA/src/uts/touch.c deleted file mode 100644 index 9ee03bd..0000000 --- a/WEGA/src/uts/touch.c +++ /dev/null @@ -1,193 +0,0 @@ -#include -#include -#include -#include -#include - -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= 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