3 ms·
Once you know the pattern, it's super-easy to 'assemble' PDP-11 programs in your head. For example, for a double-operand instruction like 'MOV', the lower 12 bi
by zh3 2y ago
Once you know the pattern, it's super-easy to 'assemble' PDP-11 programs in your head. For example, for a double-operand instruction like 'MOV', the lower 12 bits are 4 groups of 3 bits specifying addressing modes and registers. Thus. MOV R2,R3 is 010203 (01=MOV, 0=direct source, 2=R2, 0=direct destination, 3=R3). More advanced example, this gets used to load data by utilising the PC (R7) which autoincrements each time, so a common MOV like MOV '#12345,@100' is 012737 12345 100 (MOV what the PC points too - #12345 - into the memory location the PC now points to @100 - noting the PC will be advanced 3 times in total so it ends up pointing to the next instruction).
On PDP-11's with ODT (a minimal memory/register inspection/modification tool) this made it easy to enter short programs (like bootstraps) from memory - it was less a case of remembering the octal than it was remembering the code and doing mental translation to octal on the fly (systems without ODT, same process but you got to use the front panel rather than a terminal).
- fasa99 2y agoI didn't understand any of that. But what I got out of it was, this hardcore mf doesn't code in assembly, he codes in binary.