Pdp11:BR - ikarishinjieva/unixV6-code-analyze-chs GitHub Wiki
instruction
===Instruction===BR
===Code===000400 + 偏移[offset]
===Operation===PC ← PC + ( 2 * offset )
===Coden===无影响
===Codez===无影响
===Codev===无影响
===Codec===无影响
===Description===进行无条件程序控制转移,偏移范围 -128 ~ 127
程序控制转移后新PC地址 = 指令执行时的PC地址 + (2 * 偏移) [New]
指令执行时的PC地址 = BR指令地址 + 2 [Updated]
===Example===设BR指令地址为500
程序控制转移后新PC地址 | 偏移代码 | 偏移量 |
---|---|---|
474 | 375 [11]( -3的补码形式 ) | -3 |
476 | 376 | -2 |
500 | 377 | -1 |
502 | 000 | 0 |
504 | 001 | +1 |
506 | 002 | +2 |