set argptr; increment argc by four

This commit is contained in:
Phil Budne
2016-03-06 01:36:52 -05:00
parent 6fbc8c3a05
commit 668e4c9cff
+9 -6
View File
@@ -28,6 +28,8 @@ newcom:
dzm argv0 " clear out argv0 for chdir comparison dzm argv0 " clear out argv0 for chdir comparison
dzm argv0+1 dzm argv0+1
dzm argv0+2 dzm argv0+2
lac argcptr
dac argptr
lac iopt " reset output pointer lac iopt " reset output pointer
dac opt dac opt
dac nextarg dac nextarg
@@ -106,7 +108,9 @@ eoname:
sza sza
jmp 1f " last name was a redirect file, skip increment jmp 1f " last name was a redirect file, skip increment
isz argc " increment argc lac argc " increment argc
tad d4
dac argc
lac nextarg lac nextarg
tad d4 " advance nextarg tad d4 " advance nextarg
dac nextarg dac nextarg
@@ -242,19 +246,16 @@ error: " here for error in child: filename pointer in AC
lac d1; sys write; qmsp; 1 lac d1; sys write; qmsp; 1
lac d1; sys write; 1: 0; 4 lac d1; sys write; 1: 0; 4
lac d1; sys write; nl; 1 lac d1; sys write; nl; 1
" XXX smes to parent???
lac d2; sys close lac d2; sys close
sys exit sys exit
" end code from init.s " end code from init.s
" ================ " ================
" here in parent, child pid in AC
parent: parent:
dac pid " sys smes " hangs until child exits
1: sys rmes
sad pid
jmp newline jmp newline
jmp 1b
" chdir command: " chdir command:
changedir: changedir:
@@ -389,6 +390,8 @@ outfilep: outfile
outfile: .=.+4 " buffer for output redirect file name outfile: .=.+4 " buffer for output redirect file name
infile: .=.+4 " buffer for input redirect file name infile: .=.+4 " buffer for input redirect file name
argcptr: argc
" leave room for maxargs items of 4 words each " leave room for maxargs items of 4 words each
maxargs=8 maxargs=8