I am new (1 week to PDP 11, writing my own emulator for fun) using CAPS11 as my starting point. I am confused by this from the very first bit of bootup code

000110: 012703 000130    mov   #130,r3   ; C.X.
000114: 005002           clr   r2        ; ..
000116: 012701 000200    mov   #200,r1   ; A...
000122: 112710 000005    movb  #5,(r0)   ; H...
000126: 004713           call  (r3)      ; K.

(output from pdpdasm, J post)

At 126 there is 004713, which is JSR PC,(R3). I am sure it means JSR to 0130 (since R3 got loaded with 0130 a few lines above and 0130 seems to have the next code to execute) by why is it address mode 1 and not 0. Addr mode 1 means the address of the target of the instruction is where R3 points. So then it should fetch the contents of R3 and go get the address from there, ie the new PC value should be whatever is contained where R3 points. Which clearly not the intent of this code.

I mean if JSR PC,(R3) means jump to 0130 what would what would JSR PC,R3 mean?

EDIT: I think I found the answer :-)

PDP-11 JMP and JSR - how was the target specified?

JSR PC,R3 is illegal - OK. Is it just jump and jsr instructions where mode 0 is illegal?



Browse other questions tagged .