From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:Adobe Director (RIFX)" |
|---|
| claim | "In Lingo bytecode (Director 4 and later, Lscr code store) the opcode byte fixes the operand size: opcodes below 0x40 have no operand, 0x40-0x7F have a 1-byte operand and 0x80 and above have a 2-byte operand; the 0x8x opcodes mirror the 0x4x ones with a word operand (0x41 intpush byte / 0x81 word, 0x45 namepush / 0x85)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:Adobe Director (RIFX)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "disassembling Lscr code" |
|---|
| effect | "lets a linear scan stay in sync even for unknown opcodes; examples: 0x01 and 0x02 return, 0x04 mul, 0x05 add, 0x06 sub, 0x41 push int, 0x55 jump if zero, 0x57 call by name" |
|---|
| function | "LingoCompiler::compileLingoV4" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "lingoV4 opcode table (0x01.. with operand patterns B/b byte, W/w word) and the fallback branch for unimplemented opcodes: <0x40 one byte, <0x80 two bytes, else three bytes. The table beyond line 125 was not read in full." |
|---|
| repo | "https://github.com/scummvm/scummvm" |
|---|
| commit | "3f4203f8833f12615b0df5fa27f19d3c30d3e5d8" |
|---|
| path | "engines/director/lingo/lingo-bytecode.cpp" |
|---|
| lines | "40-125, 1615-1640" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Lingo bytecode instruction length" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T08:48:23.426Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T09:34:04.328Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read scummvm engines/director/lingo/lingo-bytecode.cpp at 3f4203f: lingoV4 table lines 40-125 (0x01-0x1F no operand, 0x41-0x67 one-byte operands 'b'/'B', 0x81-0x96 mirror with 'w'/'W' big-endian 16-bit; 0x44/0x84 constant pushes handled separately at ~1467) and the fallback for unimplemented opcodes at ~1616-1640 (<0x40 one byte, <0x80 two bytes, else three bytes). The table beyond 0x96 was not read." |
|---|
|
|
|---|