Really stupid PDP assembler question
>>>>> "wai-sun" == wai-sun chia <squidster_at_techie.com> writes:
wai-sun> *WARNING: NEWBIE ALERT* Ok. I must be an idiot. I for the
wai-sun> life of me cannot figure out why is it when I say:
wai-sun> 1000: .ASCIZ /HELLO WORLD!/
wai-sun> After assembling and linking it turns out that:
wai-sun> 1000: 042510 ;H=110, E=105 ...
wai-sun> Why is the octal ASCII code and the content of the addresses
wai-sun> different?
They aren't.
Remember that bytes are 8 bits and octal gives you 3 bits per digit.
So (unlike hex) the boundary between the two bytes is "in the middle"
of the fourth digit.
The word is (0105 << 8) + 0110 which 042510 as you showed, and
similarly for the other words.
paul
Received on Fri Jun 25 2004 - 17:02:45 BST
This archive was generated by hypermail 2.3.0
: Fri Oct 10 2014 - 23:37:00 BST