1
0
mirror of https://github.com/DoctorWkt/unix-jun72.git synced 2026-04-10 14:58:54 +00:00

- more fixes for sh.

This commit is contained in:
tim.newsham
2008-05-08 04:49:45 +00:00
parent 68fb9c92aa
commit 5c7be9ff81
6 changed files with 9 additions and 8 deletions

View File

@@ -289,6 +289,7 @@ e11-04
e11-06
- comment after "rts pc" uses "ro" instead of "r0", left as is.
- towards enf of page "add r01,r0" what is this supposed to be?
I think this is "add r1,r0" based on surrounding code. trying that.
---------------------
e12-01
- "rko5" in comments left as is (vs "rk05")

View File

@@ -20,7 +20,7 @@
sys open; 0:..; 0 / open it
bec 1f / branch if no error
jsr r5,error / error in file name
<Input not found\n\0>: .even
<Input not found\n\0>; .even
sys exit
1:
clr at / clear prompt character, if reading non-tty

View File

@@ -7,7 +7,7 @@
clr r1 / set r1 to zero to dkip wait
rts pc / and return
2:
jsr r5,chcom: qloqin / is command login?
jsr r5,chcom; glogin / is command login?
br 2f / not loqin, go to fork
sys exec; parbuf; parp / exec login
sys exec; binpb; parp / or /bin/login

View File

@@ -15,7 +15,7 @@
bes 2f / branch if it doesn't
mov $shell,parp-2 / does exist, not executable
mov $binpb,parp / so it must be
svs exec; shell; parp-2 / a command file, get it with
sys exec; shell; parp-2 / a command file, get it with
/ sh /bin/x (if x name of file)
2:
jsr r5,error / a return for exec is the diagnostic
@@ -29,7 +29,7 @@
delim:
cmp r0,$'\n / is character a newline
beq 1f
cmp r0,S'& / is it &
cmp r0,$'& / is it &
beq 1f / yes
cmp r0,$'; / is it ;
beq 1f / yes

View File

@@ -32,8 +32,8 @@
3:
jsr pc,getc / get digit after $
sub $'0,r0 / strip off zone bits
cmp r0,$9, / compare with digit 9
clos 1f / less than or equal 9
cmp r0,$9. / compare with digit 9
blos 1f / less than or equal 9
mov $9.,r0 / if larger than 9, force 9
1:
mov shellarg,r1 / get pointer to stack for
@@ -42,7 +42,7 @@
cmp r0,(r1) / is it less than # of args in this call
bge getc / no, ignore it. so this $n is not replaced
asl r0 / yes, multiply by 2 (to skip words)
add r01,r0 / form pointer to arg pointer (-2)
add r1,r0 / form pointer to arg pointer (-2)
mov 2(r0),param / move arg pointer to param
br getc / go to get substitution arg for $n
getbuf:

View File

@@ -36,7 +36,7 @@ binpb:
parbuf: .=.+1000.
.even
param: .=.+2
glflaq: .=.+2
glflag: .=.+2
infile: .=.+2
outfile:.=.+2
.=.+2 / room for glob