anchor.diff:  	LC R@ WORD+ - +
   	R> UJ! ;
   
  +	\ Creates a relocation record for a UJ-format instruction.
   : jalreloc ( a -- )
   	DUP HERE >R
   	CELL+ @ ,
  
positive.code: \ image memory.
  : UJ! ( displacement addr -- )
  	>R 0 S>UJ R@ IW@ $FFF AND OR R> IW! ;
  
  \ R, I, S, SB, U, and UJ, function like B, H, W, and D, above.  However, they
  \ place actual CPU instructions, and as such take additional parameters.
  
negative.code: 	OVER $80000000 AND 11 RSHIFT OR
  	NIP DUP $00100000 AND NEGATE OR ;
  
  \ As with S>UJ, but for Bxx conditional branches.
  : S>SB ( displacement 0 -- n )
  	OVER $01E AND 7 LSHIFT OR	( bits 4..1 )
  	OVER $800 AND 4 RSHIFT OR	( bits 4..1,11 )
  	OVER $7E0 AND 20 LSHIFT OR	( bits 10..5, 4..1, 11 )
  	SWAP $1000 AND 19 LSHIFT OR ;	( bits 12, 10..5, 4..1, 11 )
  
  \ As with UJ>S, but for Bxx conditional branches.
  : SB>S ( n 0 -- displacement )
  	OVER 7 RSHIFT $01E AND OR
  	OVER 4 LSHIFT $800 AND OR
  	OVER 20 RSHIFT $7E0 AND OR
  	SWAP 19 RSHIFT $1000 AND OR
  	DUP $1000 AND NEGATE OR ;
  
  \ Recover the displacement from a UJ-format instruction in image memory.
  : UJ@ ( addr -- displacement )
  	IW@ 0 UJ>S ;
  