8

PDP-11 is said to be word addressable, which means every data access returns 16-bit data. Suppose I give a read request for address 100 in memory. Will it return 8 bits (LSB) from address 100 and 8bits (MSB) from address 101? As PDP-11 has 16 address bits does it have only 32K memory locations (16 bits each) or 64K memory locations (8 bits each)?

  • Is said by whom? Each byte has its own unique address, therefore it is byte-addressable. – Leo B. May 22 '17 at 16:15
8

The PDP-11 could address 64kb of memory.

It handled data as words, each word being addressed at an even memory location.
So it depends on what your "data read instruction" is.

If you issue a MOV instruction to move data from memory to a register, it would return a 16 bit word. A word instruction could only address even memory addresses.

If you issue a MOVB instruction to move just a byte, the register would be sign-extended into the upper 8 bits of the word. A byte instruction could address odd or even memory addresses.

Many instructions exist with a form that operates on words and a form that operates on bytes. The byte form of the instruction would have the B suffix. If the most significant bit of the opcode was 1, then it operated on bytes.

There is a quick reference guide to the PDP-11 instruction set here from Toronto University.

Remember that the PDP-11 is known as middle-endian. In that each word is little-endian - the low addressed byte is the LSB. That word must be aligned on an even memory address. When doing 32-bit arithmetic, which the PDP-11 could do, the word on the lower address word was the MSW - big-endian.

  • 1
    Thanks Chenmuka for the explanation. Just to be clear, So If I only consider word(in this case 16 bits) addressing mode and if I try to read from a memory location say 100, will I be getting 8 bits(LSB) from a address location 100 and the other 8 bits(MSB) from address location 101. – user5093 May 22 '17 at 12:11
  • @user5093: Yes. – Chenmunka May 22 '17 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.