User Tools

Site Tools


ocmbytecode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ocmbytecode [2023/04/23 14:59] – [Opcodes 60..6F] nopsledocmbytecode [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 precision integers =====+===== Large integers (tag 1): arbitary precision integers =====
 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.
  
-<code> +=== Opcode 0xC2 (194): Extracts a subblob of a given (length) beginning at position (index) from blob (blob.part) === 
-dd 0 (0xc2) ; DATA XREFinitproc:loc_4166r+If the length is -1, the subblob is taken until the end of the blob.
  
-dd offset BCX_00_Subblob ; DATA XREFinitproc+42r+stack inputstring; index; length 
  
- ; string index length -> substring+stack output: substring
  
-Marcus: If length == -1, take until end of blob.+ 
 +<code>
  
 dd 1 (0xc3) dd 1 (0xc3)
ocmbytecode.1682261976.txt.gz · Last modified: 2023/04/23 14:59 by nopsled

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki