ocmbytecode
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| ocmbytecode [2023/04/23 14:59] – [Opcodes 60..6F] nopsled | ocmbytecode [2025/09/21 18:55] (current) – nopsled | ||
|---|---|---|---|
| Line 59: | Line 59: | ||
| ===== Small numbers (tag 0): signed 16 bit numbers ===== | ===== Small numbers (tag 0): signed 16 bit numbers ===== | ||
| - | ===== Large integers (tag 1): arbitraty | + | ===== Large integers (tag 1): arbitary |
| Serialization format: Length followed by two's complement little endian representation. The length is according to ASN.1 lengths: Length is directly encoded as one byte for lengths 0..127. A length encoding starting with 128 is invalid (would mean unspecified). If the first byte of the length is above 128, subtract 128 and take that many bytes. They make up a big-endian unsigned integer. | Serialization format: Length followed by two's complement little endian representation. The length is according to ASN.1 lengths: Length is directly encoded as one byte for lengths 0..127. A length encoding starting with 128 is invalid (would mean unspecified). If the first byte of the length is above 128, subtract 128 and take that many bytes. They make up a big-endian unsigned integer. | ||
| ===== Binary blobs (tag 2) ===== | ===== Binary blobs (tag 2) ===== | ||
| Line 1245: | Line 1245: | ||
| This list shows an overview over the opcodes C2..E0 (from compat, a module inside init.ocm). The numbers are **relative** opcode numbers, i.e. the opcode minus the base opcode of C2. | This list shows an overview over the opcodes C2..E0 (from compat, a module inside init.ocm). The numbers are **relative** opcode numbers, i.e. the opcode minus the base opcode of C2. | ||
| - | < | + | === Opcode 0xC2 (194): Extracts a subblob of a given (length) beginning at position (index) from blob (blob.part) === |
| - | dd 0 (0xc2) ; DATA XREF: initproc: | + | If the length is -1, the subblob is taken until the end of the blob. |
| - | dd offset BCX_00_Subblob ; DATA XREF: initproc+42r | + | stack input: string; index; length |
| - | ; string index length -> substring | + | stack output: |
| - | Marcus: If length == -1, take until end of blob. | + | |
| + | < | ||
| dd 1 (0xc3) | dd 1 (0xc3) | ||
ocmbytecode.1682261976.txt.gz · Last modified: 2023/04/23 14:59 by nopsled
