PDP11/45 machine code question.

Jim Beacon jim at g1jbg.co.uk
Sun Feb 20 18:59:03 CST 2005


Hi,

this is simple if you know....

I was looking at a listing for a light chaser for the PDP 11, and the last instruction is branch back 4, (BR -4). The hex for this is given as 000775

I understand that this is a bit type instruction, where the op code is the base code plus 2*offset. If the base code is 000400, how do I calculate the offset to make it go back ? Is bit 7 a sign bit?

full program is
location    contents    opcode
001000    012700        mov #1,r0
001002    000001        
001004    006100        rol r0
001006    000005        reset
001010    000775        br -4


Thanks

Jim.

Please see our website the " Vintage Communication Pages" at WWW.G1JBG.CO.UK



More information about the cctalk mailing list