Open main menu

Difference between revisions of "SCI/Specifications/SCI virtual machine/The Sierra PMachine"

m
Fixed wiki syntax typos
m (Forgot to remove the "WIP" at the start)
m (Fixed wiki syntax typos)
Line 377: Line 377:


;<nowiki>op 0x40: call W relpos, B framesize (4 bytes)</nowiki>
;<nowiki>op 0x40: call W relpos, B framesize (4 bytes)</nowiki>
;<nowiki>op 0x41: call B relpos, B framesize (3 bytes)</nowiki
;<nowiki>op 0x41: call B relpos, B framesize (3 bytes)</nowiki>
:Call inside script.
:Call inside script.
:(See description below)
:(See description below)
Line 561: Line 561:


;<nowiki>op 0x6e: ipTos W offset (3 bytes)</nowiki>
;<nowiki>op 0x6e: ipTos W offset (3 bytes)</nowiki>
;<nowikiop 0x6f: ipTos B offset (2 bytes)</nowiki>
;<nowiki>op 0x6f: ipTos B offset (2 bytes)</nowiki>
:Increment Property and push to Stack Same as ipToa, but pushes the result on the stack instead.
:Increment Property and push to Stack Same as ipToa, but pushes the result on the stack instead.


Line 608: Line 608:




;<nowiki>op 0x7e</nowiki
;<nowiki>op 0x7e</nowiki>
;<nowiki>op 0x7f</nowiki>
;<nowiki>op 0x7f</nowiki>
:These operations don't exist in SCI.
:These operations don't exist in SCI.
Line 630: Line 630:
:::0: Accumulator
:::0: Accumulator
:::1: Stack
:::1: Stack
:;Bit 4
:;Bit 4
::Whether to use the accumulator as a modifier to the supplied index:
::Whether to use the accumulator as a modifier to the supplied index:
:::0: Don't use accumulator as an additional index
:::0: Don't use accumulator as an additional index
:::1: Use the accumulator as an additional index
:::1: Use the accumulator as an additional index
:;Bits 5,6
:;Bits 5,6
::The type of execution to perform:
::The type of execution to perform:
Line 642: Line 640:
:::2: Increment the variable, then load it into acc or on the stack
:::2: Increment the variable, then load it into acc or on the stack
:::3: Decrement the variable, then load it into acc or on the stack
:::3: Decrement the variable, then load it into acc or on the stack
:;Bit 7
:;Bit 7
::Always 1 (identifier for these opcodes)  
::Always 1 (identifier for these opcodes)  
::Example: "sagi 2" would Store the Accumulator in the Global variable indexed with 2 plus the current accumulator value (this rarely makes sense, obviously). "+sp 6" would increment the parameter at offset 6 (the third parameter, not counting the argument counter), and push it on the stack.
::Example: "sagi 2" would Store the Accumulator in the Global variable indexed with 2 plus the current accumulator value (this rarely makes sense, obviously). "+sp 6" would increment the parameter at offset 6 (the third parameter, not counting the argument counter), and push it on the stack.
236

edits