PDP11/45 machine code question.

From: Jim Beacon <jim_at_g1jbg.co.uk>
Date: Sun Feb 20 18:59:03 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
Received on Sun Feb 20 2005 - 18:59:03 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:37:39 BST