From de9611319c3e996df8c401434eeb74fc0ddc306d Mon Sep 17 00:00:00 2001 From: "tim.newsham" Date: Thu, 1 May 2008 18:13:21 +0000 Subject: [PATCH] - 1ed a.out format slightly different. --- tools/dumpaout.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/dumpaout.py b/tools/dumpaout.py index d4fbad7..abb9b0a 100755 --- a/tools/dumpaout.py +++ b/tools/dumpaout.py @@ -3,6 +3,8 @@ import sys from struct import pack, unpack +v7 = 0 + class AOut(object) : def __init__(self, bin) : self.mag, self.txt, self.sym, self.rel, self.dat, self.z = \ @@ -27,10 +29,12 @@ def dump(fn, addr) : vals = unpack("<%dH" % (a.txt/2), a.txtd) - # it appears the a.out header isnt used for the kernel. - # dropping the first 16 bytes causes the tables in u0.s to - # line up with the addresses they were assigned... - vals = vals[8:] + if v7 : + # it appears the a.out header isnt used for the kernel. + # dropping the first 16 bytes causes the tables in u0.s to + # line up with the addresses they were assigned... + vals = vals[8:] + for n,v in enumerate(vals) : print 'dep cpu %o %06o' % (addr+n*2, v) print 'go 400'