anchor.diff:  	\ instruction.
   : JAL> ( -- lc : "word" )
   	['] jalreloc (>) LC WORD+ ;
  +
  +	\ Performs a single relocation for an SB-format instruction.
  +: fixup-bxx ( a -- )
  +	2 CELLS + @ >R
  +	R@ SB@
  +	LC R@ WORD+ - +
  +	R> SB! ;
  +
  +	\ Creates a relocation record for an SB-format instruction.
  +: bxxreloc ( a -- )
  +	DUP HERE >R
  +	CELL+ @ ,
  +	['] fixup-bxx ,
  +	LC ,
  +	gp0 @ ,
  +	R> SWAP CELL+ ! ;
  +
  +	\ PC-relative forward reference prefix for Bxx and other SB-format
  +	\ instructions.  Leaves LC+4 on the stack for consumption by the Bxx
  +	\ instruction.
  +: B> ( -- lc : "word" )
  +	['] bxxreloc (>) LC WORD+ ;
   
   	\ Apply a single fix-up.
   : fixup ( fx -- )
  
positive.code: 	LC R@ WORD+ - +
  	R> UJ! ;
  
  : jalreloc ( a -- )
  	DUP HERE >R
  	CELL+ @ ,
  
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 ;
  