1000: .ASCIZ /HELLO WORLD!/
After assembling and linking it turns out that:
1000: 042510 ;H=110, E=105
1002: 046114 ;L=114, L=114
1004: 020117 ;O=117, <SPC>=040
1006: 047527 ;W=127, O=117
1010: 046122 ;R=122, L=114
1012: 020504 ;D=104, !=041
1014: 000000
Why is the octal ASCII code and the content of the
addresses
different?
Because the "content of the addresses" is printing a whole word in
octal, which places the boundary between the two bytes somewhere other
than on a (textual) boundary between two octal digits. The difference
is purely textual.
Convert to binary and it becoems obvious:
1000: 042510 ;H=110, E=105
0 4 2 5 1 0
0 100 010 101 001 000
low ** *** ***--> 01001000 = 01 001 000 = octal 110
high * *** *** *------------> 01000101 = 01 000 101 = octal 105
You could convert it to hex and it wouldn't look so strange:
200: 4548 ;H=48, E=45
but the PDPs conventionally use octal. It makes a lot more sense for
the older PDPs which had word sizes that were multiples of three bits
(PDP-8, PDP-10, probably others); even for the PDP-11, it makes more
sense for looking at machine code, given how the instruction word
breaks down.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse(a)rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B