subgeniuskitty
Member
I recently purchased a PDP-11/23+ and am working on learning about it and restoring it. I found the following snippet of code on this forum and attempted to disassemble it as shown. Both from reading the code and from the output when run on my PDP-11, the code outputs incrementing values from 0 -> 255 to the console SLU. This manifests as repeatedly printing the ASCII character set, including non-print characters.
My question: At address 1010, what does the code 100376 do?
Since there aren't any skipped characters in the output, I would expect it to loop back to address 1006 if N=0 in the PSW, or continue to address 1012 if N=1. In other words, I would expect it to see if the SLU is ready for another character. However, I don't see any PDP-11 instruction that corresponds to that opcode.
My question: At address 1010, what does the code 100376 do?
Since there aren't any skipped characters in the output, I would expect it to loop back to address 1006 if N=0 in the PSW, or continue to address 1012 if N=1. In other words, I would expect it to see if the SLU is ready for another character. However, I don't see any PDP-11 instruction that corresponds to that opcode.
Code:
@1000/005000 # CLR R0
@1002/12701 # MOV (R7)+ R1
@1004/177564 # SLU TCSR register address (moved to R1 in previous instruction)
@1006/105711 # TSTB (R1) (PSW will contain N=1 if SLU is transmit ready)
@1010/100376 # ???
@1012/110061 # MOVB R0 X(R1) (Prints character currently stored in R0)
@1014/2 # X = 2 (since TBUF = TCSR + 2)
@1016/005200 # INC R0 (Increments R0 to next character. Output rolls over when lower byte = 255)
@1020/000137 # JMP @(R7)+
@1022/001006 # Address for previous instruction's jump. PC=1010 after jump due to autoincrement.