I’ve run into trouble with b?branch not working as expected by the nVidia Option Rom Fcode.

What Openbios does now for b?branch is:

From fcode.fs:
===
\ b?branch ( continue? -- )
\   Conditional branch FCode. Followed by FCode-offset.

: b?branch
 fcode-offset 0< if \ if we jump backwards, we can forsee where it goes
   ['] do?branch ,
   resolve-dest
   execute-tmp-comp
 else
   setup-tmp-comp ['] do?branch ,
   here 0
   0 ,
 then-
 ; immediate
===

I fond some code from SLOF that may work a little better:

: b?branch ( flag -- )
   ?compile-mode IF
      read-fcode-offset ?negative IF
         dest-on-top postpone until
      ELSE
         postpone if
      THEN
   ELSE
      ( flag ) IF
         fcode-offset jump-n-ip       \ Skip over offset value
      ELSE
         read-fcode-offset
         ?jump-direction jump-n-ip
      THEN
   THEN
; immediate

Unfortunately it’s not just a simple copy and paste, I get errors when trying to compile Openbios with this code.

When you have time, could you help me step though it and figure out where it is failing, and how to fix it, I’m just not very good at C and could really use some help from someone that understands what the code is trying to do, and what I need to port over from SLOF to get it to compile.

Thanks,
James