Thread View: comp.bugs.sys5
1 messages
1 total messages
Started by jmc
Tue, 10 Feb 1987 21:17
.comm - bug or feature?
Author: jmc
Date: Tue, 10 Feb 1987 21:17
Date: Tue, 10 Feb 1987 21:17
26 lines
1394 bytes
1394 bytes
In porting UNIX V.3 onto a new chipset I discovered a curiosity in the 3b2 assembler/loader. .comm x,4 (instruction refering to x) has "4" in the displacement not 0 - the same as the "value" field, which distinguishes ".comm" from an undefined external. The loader subtracts the value field whatever it means from the relocated position. Everything ends up in the right place, unless you are naive enough (like me of course) to write your own assembler which puts "0" in the displacement. Then the undoctored loader ends up subtracting 4 from the address with unfortunate effects if you are trying to debug a sparkling new kernel! I cannot believe it is logically correct to treat the value field in this way although the two bug(?)s compensate. Note that an ordinary undefined goes in as 0. Any Comments? John Collins, Xi Software Ltd, ..... xisl!jmc
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads