Icon HelpCircleForumIcon Link

⌘K

Icon HelpCircleForumIcon Link
Nightly /
Forc Parse Bytecode

Icon LinkParse

Usage: forc parse-bytecode [OPTIONS] <FILE_PATH>

Arguments:

<FILE_PATH>

Options:

-v, --verbose...

Use verbose output

-s, --silent

Silence all output

-L, --log-level <LOG_LEVEL>

Set the log level

-h, --help

Print help

-V, --version

Print version

EXAMPLES:

Icon LinkParse bytecode

forc parse-bytecode

Icon LinkEXAMPLE

We can try this command with the initial project created using forc init, with the counter template:

forc new --template counter counter
cd counter
forc build -o obj
counter$ forc parse-bytecode obj

  half-word   byte   op                   raw           notes
          0   0      JI(4)                90 00 00 04   conditionally jumps to byte 16
          1   4      NOOP                 47 00 00 00
          2   8      Undefined            00 00 00 00   data section offset lo (0)
          3   12     Undefined            00 00 00 c8   data section offset hi (200)
          4   16     LW(63, 12, 1)        5d fc c0 01
          5   20     ADD(63, 63, 12)      10 ff f3 00
         ...
         ...
         ...
         60   240    Undefined            00 00 00 00
         61   244    Undefined            fa f9 0d d3
         62   248    Undefined            00 00 00 00
         63   252    Undefined            00 00 00 c8