TrustedUser
2,147
edits
m (Text replacement - "</source>" to "</syntaxhighlight>") |
|||
(5 intermediate revisions by 3 users not shown) | |||
Line 31: | Line 31: | ||
;IP | ;IP | ||
:The instruction pointer. | :The instruction pointer. Points to the currently executing instruction. In ScummVM this is called the "Program Counter" or PC, which is the more general term. | ||
Vars | |||
;Vars | |||
:An array of four values, each pointing to the current variables of each mentioned type | |||
;Object | |||
:Points to the currently executing object. | |||
;SP | ;SP | ||
:The current stack pointer. Note that the stack in the original SCI interpreter is used | :The current stack pointer. Note that the stack in the original SCI interpreter is used bottom-up instead of the more usual top-down. | ||
bottom-up instead of the more usual top-down. | |||
The PMachine, apart from the actual instruction pointer, keeps a record of which object is currently executing. | The PMachine, apart from the actual instruction pointer, keeps a record of which object is currently executing. | ||
==The instruction set== | ==The instruction set== | ||
Line 56: | Line 59: | ||
Certain instructions (in particular, branching ones) take relative addresses as a parameter. The actual address is calculated based on the instruction after the branching instruction itself. In this example, the <tt>bnt</tt> instruction, if the branch is made, jumps over the <tt>ldi</tt> instruction. | Certain instructions (in particular, branching ones) take relative addresses as a parameter. The actual address is calculated based on the instruction after the branching instruction itself. In this example, the <tt>bnt</tt> instruction, if the branch is made, jumps over the <tt>ldi</tt> instruction. | ||
< | <syntaxhighlight lang="asm"> | ||
eq? | eq? | ||
bnt +2 | bnt +2 | ||
ldi byte 2 | ldi byte 2 | ||
push | push | ||
</ | </syntaxhighlight> | ||
Relative addresses are signed values. | Relative addresses are signed values. | ||
Line 71: | Line 74: | ||
In every call instruction, a value is included which determines the size of the parameter list, as an offset into the stack. This value discounts the list size pushed by the SCI code. For instance, consider this example from real SCI code: | In every call instruction, a value is included which determines the size of the parameter list, as an offset into the stack. This value discounts the list size pushed by the SCI code. For instance, consider this example from real SCI code: | ||
< | <syntaxhighlight lang="asm"> | ||
pushi 3 ; three parameters passed | pushi 3 ; three parameters passed | ||
pushi 4 ; the screen flag | pushi 4 ; the screen flag | ||
Line 77: | Line 80: | ||
pTos y ; push the y property | pTos y ; push the y property | ||
callk OnControl, 6 | callk OnControl, 6 | ||
</ | </syntaxhighlight> | ||
Notice that, although the <tt>callk</tt> line specifies 6 bytes of parameters, the kernel routine has access to the list size (which is at offset 8)! | Notice that, although the <tt>callk</tt> line specifies 6 bytes of parameters, the kernel routine has access to the list size (which is at offset 8)! | ||
Line 95: | Line 98: | ||
< | <syntaxhighlight lang="C"> | ||
pop(): sp -= 2; return *sp; | pop(): sp -= 2; return *sp; | ||
push(x): *sp = x; sp += 2; return x; | push(x): *sp = x; sp += 2; return x; | ||
</ | </syntaxhighlight> | ||
The following rules apply to opcodes: | The following rules apply to opcodes: | ||
Line 113: | Line 116: | ||
;<nowiki>op 0x01: bnot (1 byte)</nowiki> | ;<nowiki>op 0x01: bnot (1 byte)</nowiki> | ||
:Binary not | :Binary not | ||
< | <syntaxhighlight lang="C"> | ||
acc ^= 0xffff; | acc ^= 0xffff; | ||
</ | </syntaxhighlight> | ||
Line 121: | Line 124: | ||
;<nowiki>op 0x03: add (1 byte)</nowiki> | ;<nowiki>op 0x03: add (1 byte)</nowiki> | ||
:Addition: | :Addition: | ||
< | <syntaxhighlight lang="C"> | ||
acc += pop(); | acc += pop(); | ||
</ | </syntaxhighlight> | ||
Line 129: | Line 132: | ||
;<nowiki>op 0x05: sub (1 byte)</nowiki> | ;<nowiki>op 0x05: sub (1 byte)</nowiki> | ||
:Subtraction: | :Subtraction: | ||
< | <syntaxhighlight lang="C"> | ||
acc = pop() - acc; | acc = pop() - acc; | ||
</ | </syntaxhighlight> | ||
Line 137: | Line 140: | ||
;<nowiki>op 0x07: mul (1 byte)</nowiki> | ;<nowiki>op 0x07: mul (1 byte)</nowiki> | ||
:Multiplication: | :Multiplication: | ||
< | <syntaxhighlight lang="C"> | ||
acc *= pop(); | acc *= pop(); | ||
</ | </syntaxhighlight> | ||
Line 145: | Line 148: | ||
;<nowiki>op 0x09: div (1 byte)</nowiki> | ;<nowiki>op 0x09: div (1 byte)</nowiki> | ||
:Division: | :Division: | ||
< | <syntaxhighlight lang="C"> | ||
acc = pop() / acc; | acc = pop() / acc; | ||
</ | </syntaxhighlight> | ||
Division by zero is caught => acc = 0. | Division by zero is caught => acc = 0. | ||
Line 154: | Line 157: | ||
;<nowiki>op 0x0b: mod (1 byte)</nowiki> | ;<nowiki>op 0x0b: mod (1 byte)</nowiki> | ||
:Modulo: | :Modulo: | ||
< | <syntaxhighlight lang="C"> | ||
acc = pop() % acc; | acc = pop() % acc; | ||
</ | </syntaxhighlight> | ||
Modulo by zero is caught => acc = 0. | Modulo by zero is caught => acc = 0. | ||
Line 163: | Line 166: | ||
;<nowiki>op 0x0d: shr (1 byte)</nowiki> | ;<nowiki>op 0x0d: shr (1 byte)</nowiki> | ||
:Shift Right logical: | :Shift Right logical: | ||
< | <syntaxhighlight lang="C"> | ||
acc = pop() >> acc; | acc = pop() >> acc; | ||
</ | </syntaxhighlight> | ||
Line 171: | Line 174: | ||
;<nowiki>op 0x0f: shl (1 byte)</nowiki> | ;<nowiki>op 0x0f: shl (1 byte)</nowiki> | ||
:Shift Left logical: | :Shift Left logical: | ||
< | <syntaxhighlight lang="C"> | ||
acc = pop() << acc; | acc = pop() << acc; | ||
</ | </syntaxhighlight> | ||
Line 179: | Line 182: | ||
;<nowiki>op 0x11: xor (1 byte)</nowiki> | ;<nowiki>op 0x11: xor (1 byte)</nowiki> | ||
:Exclusive or: | :Exclusive or: | ||
< | <syntaxhighlight lang="C"> | ||
acc ^= pop(); | acc ^= pop(); | ||
</ | </syntaxhighlight> | ||
Line 187: | Line 190: | ||
;<nowiki>op 0x13: and (1 byte)</nowiki> | ;<nowiki>op 0x13: and (1 byte)</nowiki> | ||
:Logical and: | :Logical and: | ||
< | <syntaxhighlight lang="C"> | ||
acc &= pop(); | acc &= pop(); | ||
</ | </syntaxhighlight> | ||
Line 195: | Line 198: | ||
;<nowiki>op 0x15: or (1 byte)</nowiki> | ;<nowiki>op 0x15: or (1 byte)</nowiki> | ||
:Logical or: | :Logical or: | ||
< | <syntaxhighlight lang="C"> | ||
acc |= pop(); | acc |= pop(); | ||
</ | </syntaxhighlight> | ||
Line 203: | Line 206: | ||
;<nowiki>op 0x17: neg (1 byte)</nowiki> | ;<nowiki>op 0x17: neg (1 byte)</nowiki> | ||
:Sign negation: | :Sign negation: | ||
< | <syntaxhighlight lang="C"> | ||
acc = -acc; | acc = -acc; | ||
</ | </syntaxhighlight> | ||
Line 211: | Line 214: | ||
;<nowiki>op 0x19: not (1 byte)</nowiki> | ;<nowiki>op 0x19: not (1 byte)</nowiki> | ||
:Boolean not: | :Boolean not: | ||
< | <syntaxhighlight lang="C"> | ||
acc = !acc; | acc = !acc; | ||
</ | </syntaxhighlight> | ||
Line 219: | Line 222: | ||
;<nowiki>op 0x1b: eq? (1 byte)</nowiki> | ;<nowiki>op 0x1b: eq? (1 byte)</nowiki> | ||
:Equals?: | :Equals?: | ||
< | <syntaxhighlight lang="C"> | ||
prev = acc; | prev = acc; | ||
acc = (acc == pop()); | acc = (acc == pop()); | ||
</ | </syntaxhighlight> | ||
Line 228: | Line 231: | ||
;<nowiki>op 0x1d: ne? (1 byte)</nowiki> | ;<nowiki>op 0x1d: ne? (1 byte)</nowiki> | ||
:Is not equal to? | :Is not equal to? | ||
< | <syntaxhighlight lang="C"> | ||
prev = acc; | prev = acc; | ||
acc = !(acc == pop()); | acc = !(acc == pop()); | ||
</ | </syntaxhighlight> | ||
Line 237: | Line 240: | ||
;<nowiki>op 0x1f: gt? (1 byte)</nowiki> | ;<nowiki>op 0x1f: gt? (1 byte)</nowiki> | ||
:Greater than? | :Greater than? | ||
< | <syntaxhighlight lang="C"> | ||
prev = acc; | prev = acc; | ||
acc = (pop() > acc); | acc = (pop() > acc); | ||
</ | </syntaxhighlight> | ||
Line 246: | Line 249: | ||
;<nowiki>op 0x21: ge? (1 byte)</nowiki> | ;<nowiki>op 0x21: ge? (1 byte)</nowiki> | ||
:Greater than or equal to? | :Greater than or equal to? | ||
< | <syntaxhighlight lang="C"> | ||
prev = acc; | prev = acc; | ||
acc = (pop() >= acc); | acc = (pop() >= acc); | ||
</ | </syntaxhighlight> | ||
Line 255: | Line 258: | ||
;<nowiki>op 0x23: lt? (1 byte)</nowiki> | ;<nowiki>op 0x23: lt? (1 byte)</nowiki> | ||
:Less than? | :Less than? | ||
< | <syntaxhighlight lang="C"> | ||
prev = acc; | prev = acc; | ||
acc = (pop() < acc); | acc = (pop() < acc); | ||
</ | </syntaxhighlight> | ||
Line 264: | Line 267: | ||
;<nowiki>op 0x25: le? (1 byte)</nowiki> | ;<nowiki>op 0x25: le? (1 byte)</nowiki> | ||
:Less than or equal to? | :Less than or equal to? | ||
< | <syntaxhighlight lang="C"> | ||
prev = acc; | prev = acc; | ||
acc = (pop() <= acc); | acc = (pop() <= acc); | ||
</ | </syntaxhighlight> | ||
Line 273: | Line 276: | ||
;<nowiki>op 0x27: ugt? (1 byte)</nowiki> | ;<nowiki>op 0x27: ugt? (1 byte)</nowiki> | ||
:Unsigned: Greater than? | :Unsigned: Greater than? | ||
< | <syntaxhighlight lang="C"> | ||
acc = (pop() > acc); | acc = (pop() > acc); | ||
</ | </syntaxhighlight> | ||
Line 281: | Line 284: | ||
;<nowiki>op 0x29: uge? (1 byte)</nowiki> | ;<nowiki>op 0x29: uge? (1 byte)</nowiki> | ||
:Unsigned: Greather than or equal to? | :Unsigned: Greather than or equal to? | ||
< | <syntaxhighlight lang="C"> | ||
acc = (pop() >= acc); | acc = (pop() >= acc); | ||
</ | </syntaxhighlight> | ||
Line 289: | Line 292: | ||
;<nowiki>op 0x2b: ult? (1 byte)</nowiki> | ;<nowiki>op 0x2b: ult? (1 byte)</nowiki> | ||
:Unsigned: Less than? | :Unsigned: Less than? | ||
< | <syntaxhighlight lang="C"> | ||
acc = (pop() < acc); | acc = (pop() < acc); | ||
</ | </syntaxhighlight> | ||
Line 297: | Line 300: | ||
;<nowiki>op 0x2d: ule? (1 byte)</nowiki> | ;<nowiki>op 0x2d: ule? (1 byte)</nowiki> | ||
:Unsigned: Less than or equal to? | :Unsigned: Less than or equal to? | ||
< | <syntaxhighlight lang="C"> | ||
acc = (pop() >= acc); | acc = (pop() >= acc); | ||
</ | </syntaxhighlight> | ||
Line 305: | Line 308: | ||
;<nowiki>op 0x2f: bt B relpos (2 bytes)</nowiki> | ;<nowiki>op 0x2f: bt B relpos (2 bytes)</nowiki> | ||
:Branch relative if true | :Branch relative if true | ||
< | <syntaxhighlight lang="C"> | ||
if (acc) pc += relpos; | if (acc) pc += relpos; | ||
</ | </syntaxhighlight> | ||
Line 313: | Line 316: | ||
;<nowiki>op 0x31: bnt B relpos (2 bytes)</nowiki> | ;<nowiki>op 0x31: bnt B relpos (2 bytes)</nowiki> | ||
:Branch relative if not true | :Branch relative if not true | ||
< | <syntaxhighlight lang="C"> | ||
if (!acc) pc += relpos; | if (!acc) pc += relpos; | ||
</ | </syntaxhighlight> | ||
Line 321: | Line 324: | ||
;<nowiki>op 0x33: jmp B relpos (2 bytes)</nowiki> | ;<nowiki>op 0x33: jmp B relpos (2 bytes)</nowiki> | ||
:Jump | :Jump | ||
< | <syntaxhighlight lang="C"> | ||
pc += relpos; | pc += relpos; | ||
</ | </syntaxhighlight> | ||
Line 329: | Line 332: | ||
;<nowiki>op 0x35: ldi B data (2 bytes)</nowiki> | ;<nowiki>op 0x35: ldi B data (2 bytes)</nowiki> | ||
:Load data immediate | :Load data immediate | ||
< | <syntaxhighlight lang="C"> | ||
acc = data; | acc = data; | ||
</ | </syntaxhighlight> | ||
:Sign extension is done for 0x35 if required. | :Sign extension is done for 0x35 if required. | ||
Line 338: | Line 341: | ||
;<nowiki>op 0x37: push (1 byte)</nowiki> | ;<nowiki>op 0x37: push (1 byte)</nowiki> | ||
:Push to stack | :Push to stack | ||
< | <syntaxhighlight lang="C"> | ||
push(acc) | push(acc) | ||
</ | </syntaxhighlight> | ||
Line 346: | Line 349: | ||
;<nowiki>op 0x39: pushi B data (2 bytes)</nowiki> | ;<nowiki>op 0x39: pushi B data (2 bytes)</nowiki> | ||
:Push immediate | :Push immediate | ||
< | <syntaxhighlight lang="C"> | ||
push(data) | push(data) | ||
</ | </syntaxhighlight> | ||
:Sign extension for 0x39 is performed where required. | :Sign extension for 0x39 is performed where required. | ||
Line 355: | Line 358: | ||
;<nowiki>op 0x3b: toss (1 byte)</nowiki> | ;<nowiki>op 0x3b: toss (1 byte)</nowiki> | ||
:TOS subtract | :TOS subtract | ||
< | <syntaxhighlight lang="C"> | ||
pop(); | pop(); | ||
</ | </syntaxhighlight> | ||
:For confirmation: Yes, this simply tosses the TOS value away. | :For confirmation: Yes, this simply tosses the TOS value away. | ||
Line 364: | Line 367: | ||
;<nowiki>op 0x3d: dup (1 byte)</nowiki> | ;<nowiki>op 0x3d: dup (1 byte)</nowiki> | ||
:Duplicate TOS element | :Duplicate TOS element | ||
< | <syntaxhighlight lang="C"> | ||
push(*TOS); | push(*TOS); | ||
</ | </syntaxhighlight> | ||
;<nowiki>op 0x3e: link W size (3 bytes)</nowiki> | ;<nowiki>op 0x3e: link W size (3 bytes)</nowiki> | ||
;<nowiki>op 0x3f: link B size (2 bytes)</nowiki> | ;<nowiki>op 0x3f: link B size (2 bytes)</nowiki> | ||
< | <syntaxhighlight lang="C"> | ||
sp += (size * 2); | sp += (size * 2); | ||
</ | </syntaxhighlight> | ||
Line 380: | Line 383: | ||
:Call inside script. | :Call inside script. | ||
:(See description below) | :(See description below) | ||
< | <syntaxhighlight lang="C"> | ||
sp -= (framesize + 2 + &rest_modifier); | sp -= (framesize + 2 + &rest_modifier); | ||
&rest_modifier = 0; | &rest_modifier = 0; | ||
</ | </syntaxhighlight> | ||
:This calls a script subroutine at the relative position relpos, setting up the <tt>ParmVar</tt> pointer first. <tt>ParmVar points</tt> to sp-<tt>''framesize''</tt> (but see also the <tt>&rest</tt> operation). The number of parameters is stored at word offset <tt>-1</tt> relative to <tt>ParmVar</tt>. | :This calls a script subroutine at the relative position relpos, setting up the <tt>ParmVar</tt> pointer first. <tt>ParmVar points</tt> to sp-<tt>''framesize''</tt> (but see also the <tt>&rest</tt> operation). The number of parameters is stored at word offset <tt>-1</tt> relative to <tt>ParmVar</tt>. | ||
Line 391: | Line 394: | ||
;<nowiki>op 0x43: callk B kfunct, B kparams (3 bytes)</nowiki> | ;<nowiki>op 0x43: callk B kfunct, B kparams (3 bytes)</nowiki> | ||
:Call kernel function (see the [[SCI/Specifications/SCI virtual machine/Kernel functions|Kernel functions]] section) | :Call kernel function (see the [[SCI/Specifications/SCI virtual machine/Kernel functions|Kernel functions]] section) | ||
< | <syntaxhighlight lang="C"> | ||
sp -= (kparams + 2 + &rest_modifier); | sp -= (kparams + 2 + &rest_modifier); | ||
&rest_modifier = 0; | &rest_modifier = 0; | ||
(call kernel function kfunct) | (call kernel function kfunct) | ||
</ | </syntaxhighlight> | ||
Line 402: | Line 405: | ||
:Call base script | :Call base script | ||
:(See description below) | :(See description below) | ||
< | <syntaxhighlight lang="C"> | ||
sp -= (framesize + 2 + &rest_modifier); | sp -= (framesize + 2 + &rest_modifier); | ||
&rest_modifier = 0; | &rest_modifier = 0; | ||
</ | </syntaxhighlight> | ||
:This operation starts a new execution loop at the beginning of script 0, public method <tt>dispindex</tt> (Each script comes with a dispatcher list (type 7) that identifies public methods). Parameters are handled as in the call operation. | :This operation starts a new execution loop at the beginning of script 0, public method <tt>dispindex</tt> (Each script comes with a dispatcher list (type 7) that identifies public methods). Parameters are handled as in the call operation. | ||
Line 413: | Line 416: | ||
:Call external script | :Call external script | ||
:(See description below) | :(See description below) | ||
< | <syntaxhighlight lang="C"> | ||
sp -= (framesize + 2 + &rest_modifier); | sp -= (framesize + 2 + &rest_modifier); | ||
&rest_modifier = 0; | &rest_modifier = 0; | ||
</ | </syntaxhighlight> | ||
:This operation performs a function call (implicitly placing the current program counter on the execution stack) to an ``external'' procedure of a script. More precisely, exported procedure <tt>dispindex</tt> of script <tt>script</tt> is invoked, where <tt>dispindex</tt> is an offset into the script's Exports list (i.e., <tt>dispindex = ''n'' * 2</tt> references the ''n''th exported procedure). | :This operation performs a function call (implicitly placing the current program counter on the execution stack) to an ``external'' procedure of a script. More precisely, exported procedure <tt>dispindex</tt> of script <tt>script</tt> is invoked, where <tt>dispindex</tt> is an offset into the script's Exports list (i.e., <tt>dispindex = ''n'' * 2</tt> references the ''n''th exported procedure). | ||
:The ``Exports list'' is defined in the script's type 7 object (cf. section [[SCI/Specifications/SCI_virtual_machine/Introduction#Script_resources|Script resources). It is an error to invoke a script which does not exist or which does not provide an Exports list, or to use a dispatch index which does not point into an even address within the Exports list. | :The ``Exports list'' is defined in the script's type 7 object (cf. section [[SCI/Specifications/SCI_virtual_machine/Introduction#Script_resources|Script resources]]). It is an error to invoke a script which does not exist or which does not provide an Exports list, or to use a dispatch index which does not point into an even address within the Exports list. | ||
Line 431: | Line 434: | ||
:Send looks up the supplied selector(s) in the object pointed to by the accumulator. If the selector is a variable selector, it is read (to the accumulator) if it was sent for with zero parameters. If a parameter was supplied, this selector is set to that parameter. Method selectors are called with the specified parameters. | :Send looks up the supplied selector(s) in the object pointed to by the accumulator. If the selector is a variable selector, it is read (to the accumulator) if it was sent for with zero parameters. If a parameter was supplied, this selector is set to that parameter. Method selectors are called with the specified parameters. | ||
:The selector(s) and parameters are retreived from the stack frame. Send first looks up the selector ID at the bottom of the frame, then retreives the number of parameters, and, eventually, the parameters themselves. This algorithm is iterated until all of the stack frame has been "used up". Example: | :The selector(s) and parameters are retreived from the stack frame. Send first looks up the selector ID at the bottom of the frame, then retreives the number of parameters, and, eventually, the parameters themselves. This algorithm is iterated until all of the stack frame has been "used up". Example: | ||
< | <syntaxhighlight lang="asm"> | ||
; This is an example for usage of the SCI send operation | ; This is an example for usage of the SCI send operation | ||
pushi x ; push the selector ID of x | pushi x ; push the selector ID of x | ||
Line 443: | Line 446: | ||
push0 ; This will read foo and return the value in acc. | push0 ; This will read foo and return the value in acc. | ||
send 12 ; This operation does three quite different things. | send 12 ; This operation does three quite different things. | ||
</ | </syntaxhighlight> | ||
Line 501: | Line 504: | ||
::set if the accumulator is to be used as additional index | ::set if the accumulator is to be used as additional index | ||
:::Because it is so hard to explain, I have made a transcription of it here: | :::Because it is so hard to explain, I have made a transcription of it here: | ||
< | <syntaxhighlight lang="C"> | ||
short *vars[4]; | short *vars[4]; | ||
Line 510: | Line 513: | ||
return &((vars[(vt >> 1) & 3])[vt & 0x10 ? vi+acc : vi]); | return &((vars[(vt >> 1) & 3])[vt & 0x10 ? vi+acc : vi]); | ||
} | } | ||
</ | </syntaxhighlight> | ||
Line 516: | Line 519: | ||
;<nowiki>op 0x5d: selfID (1 bytes)</nowiki> | ;<nowiki>op 0x5d: selfID (1 bytes)</nowiki> | ||
:Get 'self' identity: SCI uses heap pointers to identify objects, so this operation sets the accumulator to the address of the current object. | :Get 'self' identity: SCI uses heap pointers to identify objects, so this operation sets the accumulator to the address of the current object. | ||
< | <syntaxhighlight lang="C">acc = object</syntaxhighlight> | ||
Line 527: | Line 530: | ||
;<nowiki>op 0x61: pprev (1 bytes)</nowiki> | ;<nowiki>op 0x61: pprev (1 bytes)</nowiki> | ||
:Push prev: Pushes the value of the prev register, set by the last comparison bytecode (eq?, lt?, etc.), on the stack. | :Push prev: Pushes the value of the prev register, set by the last comparison bytecode (eq?, lt?, etc.), on the stack. | ||
< | <syntaxhighlight lang="C">push(prev)</syntaxhighlight> | ||
Line 573: | Line 576: | ||
;<nowiki>op 0x73: lofsa B offset (2 bytes)</nowiki> | ;<nowiki>op 0x73: lofsa B offset (2 bytes)</nowiki> | ||
:Load Offset to Accumulator: | :Load Offset to Accumulator: | ||
< | <syntaxhighlight lang="C">acc = pc + offset</syntaxhighlight> | ||
:Adds a value to the post-operation pc and stores the result in the accumulator. | :Adds a value to the post-operation pc and stores the result in the accumulator. | ||
Line 580: | Line 583: | ||
;<nowiki>op 0x75: lofss B offset (2 bytes)</nowiki> | ;<nowiki>op 0x75: lofss B offset (2 bytes)</nowiki> | ||
:Load Offset to Stack: | :Load Offset to Stack: | ||
< | <syntaxhighlight lang="C">push(pc + offset)</syntaxhighlight> | ||
:Adds a value to the post-operation pc and pushes the result on the stack. | :Adds a value to the post-operation pc and pushes the result on the stack. | ||
Line 587: | Line 590: | ||
;<nowiki>op 0x77: push0 (1 bytes)</nowiki> | ;<nowiki>op 0x77: push0 (1 bytes)</nowiki> | ||
:Push 0: | :Push 0: | ||
< | <syntaxhighlight lang="C">push(0)</syntaxhighlight> | ||
Line 593: | Line 596: | ||
;<nowiki>op 0x79: push1 (1 bytes)</nowiki> | ;<nowiki>op 0x79: push1 (1 bytes)</nowiki> | ||
:Push 1: | :Push 1: | ||
< | <syntaxhighlight lang="C">push(1)</syntaxhighlight> | ||
Line 599: | Line 602: | ||
;<nowiki>op 0x7b: push2 (1 bytes)</nowiki> | ;<nowiki>op 0x7b: push2 (1 bytes)</nowiki> | ||
:Push 2: | :Push 2: | ||
< | <syntaxhighlight lang="C">push(2)</syntaxhighlight> | ||
Line 605: | Line 608: | ||
;<nowiki>op 0x7d: pushSelf (1 bytes)</nowiki> | ;<nowiki>op 0x7d: pushSelf (1 bytes)</nowiki> | ||
:Push self: | :Push self: | ||
< | <syntaxhighlight lang="C">push(object)</syntaxhighlight> | ||