Sorry, I typed that in haste without testing. I don’t have a 2.11 system to try it on. However, reading the source code, I did that wrong. The args go on the stack, not in line with the code. mov $6, -(sp) mov a, -(sp) mov $1,-(sp) sys 4 > On Apr 29, 2020, at 12:08 AM, Jacob Ritorto wrote: > > Shoot, celebrated too soon. I rearranged it per your tutelage, Ron, and it's still giving an Illegal Instruction error! > From the adb output it looks like it's balking at the "14" instruction at location 24, which, based on the BSD updates you mentioned, I thought should've been taken as an arg, not an instruction, right? > > I assume this worked for you on some BSD, right? > If so, is it a bug in the recent 2.11BSD patch release, perhaps? Anyone able to help me understand? > > > vi hello.s > "hello.s" 8 lines, 52 characters > sys 4 > 1 > a > 6 > sys 1 > 0 > a: > > "hello.s" 7 lines, 78 characters > > as !$ > as hello.s > > ./a.out > Illegal instruction (core dumped) > > od a.out > 0000000 000407 000022 000000 000000 000010 000000 000000 000000 > 0000020 104404 000001 000014 000006 104401 000000 062510 066154 > 0000040 005157 000000 000000 000002 000000 000000 000000 000000 > 0000060 000000 000000 000000 000004 000002 000014 000000 000006 > 0000100 000141 > 0000102 > > adb > adb> :s > stopped at 0: sys write > adb> :s > a.out: running > stopped at 04: 014 > adb> :s > a.out: running > Illegal instruction > stopped at 06: rtt > adb> :s > a.out: running > Illegal instruction - core dumped > process terminated > adb> > > > On Tue, Apr 28, 2020 at 10:26 PM Noel Chiappa > wrote: > > From: Jacob Ritorto > > > I wonder if the differences are written up somewhere. I did try to look > > for more documentation but came up short. > > Sounds like a perfect topic for a CHWiki page. :-) E.g. this one: > > http://gunkies.org/wiki/Unix_V6_internals > > which I did as a bit of an addendum to Lions, to explain rsav, qsav and ssav, and > similar topics. > > > I noticed in the comparison of your two binary files that the instructions > looked the same, but the a.out headers had a difference, but I didn't remember > the fields in the a.out header enough to know what the differences meant. > > I thought I remembered doing an a.out page there, but apparently not. I > thought about doing one now, but decided it wasn't worth it; I just needed to > spin up my V6 system and do 'man a.out'! :-) > > Noel >