Really stupid PDP assembler question
> Ok. I must be an idiot.
> I for the life of me cannot figure out why is it when I say:
>
> 1000: .ASCIZ /HELLO WORLD!/
>
> After assembling and linking it turns out that:
>
> 1000: 042510 ;H=110, E=105
Remember the PDP11 puts the low byte first. So :
H = 110 (octal) = 01 001 000 binary
E = 105 (octal) = 01 000 101 binary
Put those together with the H in the low byte to make a word
0 100 010 101 001 000 binary
or 042510 octal. That's what your assembler is giving. Remember a byte is
not a complete number of octal digits (8 is not divisible by 3) so when
you pack bytes into words the octal numbers change.
-tony
Received on Fri Jun 25 2004 - 17:26:09 BST
This archive was generated by hypermail 2.3.0
: Fri Oct 10 2014 - 23:37:00 BST