From 92b192ed1e8685bab4113e6c418cceb8584b4a86 Mon Sep 17 00:00:00 2001 From: "tim.newsham" Date: Tue, 6 May 2008 23:09:07 +0000 Subject: [PATCH] - Fixed tools/as to use the v2 assembler instead of the v7 assembler, which also required some tweaks to tools/fixaout.py - update init patch to use v2 assembler and also added my patch to use tty8. --- patches/initorig.patch | 31 +++++++++++++++++++++++++++---- patches/notes.txt | 4 +++- tools/as | 4 +++- tools/fixaout.py | 18 ++++-------------- 4 files changed, 37 insertions(+), 20 deletions(-) diff --git a/patches/initorig.patch b/patches/initorig.patch index 6290359..1b13150 100644 --- a/patches/initorig.patch +++ b/patches/initorig.patch @@ -1,9 +1,32 @@ -diff -u rebuilt/init.s build/init.s ---- rebuilt/init.s 2008-05-04 13:04:51.000000000 -1000 -+++ build/init.s 2008-05-04 13:05:35.000000000 -1000 +--- rebuilt/init.s 2008-05-06 12:01:03.000000000 -1000 ++++ build/init.s 2008-05-06 12:52:17.000000000 -1000 @@ -1,4 +1,5 @@ / init -- process control initialization -+. = . + 40014 ++.. = 40014 mount = 21. +@@ -155,14 +156,15 @@ + gettyp: getty + 0 + itab: +- '0; .. +- '1; .. +- '2; .. +- '3; .. +- '4; .. +- '5; .. +- '6; .. +- '7; .. ++ '8; .. ++ /'0; .. ++ /'1; .. ++ /'2; .. ++ /'3; .. ++ /'4; .. ++ /'5; .. ++ /'6; .. ++ /'7; .. + 0 + + offset: .=.+2 diff --git a/patches/notes.txt b/patches/notes.txt index c353d4f..637f8b8 100644 --- a/patches/notes.txt +++ b/patches/notes.txt @@ -22,8 +22,10 @@ vec0407.patch if we had a proper 0405 assembler. initorig.patch - Fix a deficiency in tools/as -- requires ". = . + 40014" at the + Fix a deficiency in tools/as -- requires ".. = 40014" at the start of each program. + Also make tty8 (console) the only tty in the init tab. The other + tty's are causing panics right now. ecore.patch Increase the amount of memory user programs have, so that the last1120 diff --git a/tools/as b/tools/as index e927b77..eabac63 100755 --- a/tools/as +++ b/tools/as @@ -23,7 +23,9 @@ # $ cp b.out mymount # -. tools/assemv7.cfg +. tools/assemv2.cfg +APOUT_ROOT=fs/root export APOUT_ROOT $APOUT $APOUT_ROOT/bin/as "$@" && tools/fixaout.py + diff --git a/tools/fixaout.py b/tools/fixaout.py index fefd841..46804ea 100755 --- a/tools/fixaout.py +++ b/tools/fixaout.py @@ -1,7 +1,7 @@ #!/usr/bin/env python """ Convert an 0407 binary into an 0405 binary, under the assumption -that the code starts at 040014 (by ". = . + 40014"). +that the code starts at 040014 (by ".. = 40014"). See tools/as. """ @@ -25,17 +25,7 @@ def write(fn, d) : f.write(d) f.close() -orig = 040000 -d = words(read('a.out')) -hdr = d[:8] -d = d[8 + orig/2 :] - -d[0] = 0405 -d[1] = hdr[1] - orig -d[2] = 0 -d[3] = 0 -d[4] = hdr[4] -d[5] = 0 -d = d[:d[1] / 2] - +d1 = words(read('a.out')) +hdr = d1[:8] +d = [0405, hdr[1], 0, 0, hdr[4], 0] + d1[8:] write("b.out", unwords(d))