diff --git a/build/Makefile b/build/Makefile index c183a75..80168c7 100644 --- a/build/Makefile +++ b/build/Makefile @@ -138,7 +138,7 @@ root usr protofs : init sh @$(TREECOPY) ../fs/new/etc root @$(TREECOPY) ../fs/usr . @cp init root/etc/init - @cp sh root/bin/xsh + @cp sh root/bin/sh @touch protofs # build filesystem images diff --git a/notes/notes.txt b/notes/notes.txt index d06837a..e212149 100644 --- a/notes/notes.txt +++ b/notes/notes.txt @@ -267,6 +267,11 @@ e11-01 - changed "cdpb B(r5),$'-" to "cmpb 8(r5),$'-" which seems like what the code is trying to do. Left the "calleZd" and "loginx~" typos in the comments as is. + - I compared this against the s2 binary for /bin/sh and the + code sequence looks similar. This instruction is + "cmpb @2(R5),#55" which properly does what the comments say. + It reads argv[0][0] and compares with '-'. Edited this + code to be in agreement. - uncommented string after "jsr r5, error" line since other calls to error are followed by literal strings. e11-02 diff --git a/pages/e11-01 b/pages/e11-01 index 711b774..f3c2a2f 100644 --- a/pages/e11-01 +++ b/pages/e11-01 @@ -1,7 +1,7 @@ / sh -- command interpreter mov sp,r5 mov r5,shellarg / save orig sp in shellarg - cmpb 8(r5),$'- / was this sh calleZd by init or loginx~ + cmpb *2(r5),$'- / was this sh calleZd by init or loginx~ bne 2f / no sys intr; 0 / yes, turn off interrupts sys quit; 0