ocmbytecode
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
ocmbytecode [2023/04/14 08:42] – [Opcodes 50..5F] nopsled | ocmbytecode [2023/04/23 14:51] – [Opcodes 20..2F] nopsled | ||
---|---|---|---|
Line 236: | Line 236: | ||
===== Opcodes 20..2F ===== | ===== Opcodes 20..2F ===== | ||
- | === Opcode 0x20 (32): Compare Small Ints for equal === | + | === Opcode 0x20 (32): Compare Small Ints for equal (cmp) === |
stack input: smallint a (next to top); smallint b (top of stack) | stack input: smallint a (next to top); smallint b (top of stack) | ||
stack output: smallint containing 1 if a == b, 0 otherwise | stack output: smallint containing 1 if a == b, 0 otherwise | ||
- | === Opcode 0x21 (33): Test for Small Int Zero === | + | === Opcode 0x21 (33): Test for Small Int Zero (iszerow) |
stack input: object of any type (maybe only smallint intended) | stack input: object of any type (maybe only smallint intended) | ||
stack output: 1 if object has type smallint and is zero | stack output: 1 if object has type smallint and is zero | ||
- | === Opcode 0x22 (34): Add DWORDs === | + | === Opcode 0x22 (34): Add DWORDs |
stack input: small/big int a (next to top); small/big int b (top of stack) | stack input: small/big int a (next to top); small/big int b (top of stack) | ||
Line 253: | Line 253: | ||
note: DWORD instructions only use the 32 least significant bits in bigint input operands, and samllint operands are treated as unsigned for unknown reasons. All arithmetic is unsigned. As bigints are in sign/ | note: DWORD instructions only use the 32 least significant bits in bigint input operands, and samllint operands are treated as unsigned for unknown reasons. All arithmetic is unsigned. As bigints are in sign/ | ||
- | === Opcode 0x23 (35): Subtract DWORDs === | + | === Opcode 0x23 (35): Subtract DWORDs |
stack input: small/big int a (next to top); small/big int b (top of stack) | stack input: small/big int a (next to top); small/big int b (top of stack) | ||
Line 260: | Line 260: | ||
note: See Opcode 22 for important notes on DWORD instructions. | note: See Opcode 22 for important notes on DWORD instructions. | ||
- | === Opcode 0x24 (36): Multiply DWORDs === | + | === Opcode 0x24 (36): Multiply DWORDs |
stack input: small/big int a (next to top); small/big int b (top of stack) | stack input: small/big int a (next to top); small/big int b (top of stack) | ||
Line 267: | Line 267: | ||
note: See Opcode 22 for important notes on DWORD instructions. | note: See Opcode 22 for important notes on DWORD instructions. | ||
- | === Opcode 0x25 (37): Divide DWORDs === | + | === Opcode 0x25 (37): Divide DWORDs |
stack input: small/big int a (next to top); small/big int b (top of stack) | stack input: small/big int a (next to top); small/big int b (top of stack) | ||
Line 274: | Line 274: | ||
note: See Opcode 22 for important notes on DWORD instructions. | note: See Opcode 22 for important notes on DWORD instructions. | ||
- | === Opcode 0x26 (38): Division and Modulus of DWORDs === | + | === Opcode 0x26 (38): Division and Modulus of DWORDs |
stack input: small/big int a (next to top); small/big int b (top of stack) | stack input: small/big int a (next to top); small/big int b (top of stack) | ||
Line 281: | Line 281: | ||
note: See Opcode 22 for important notes on DWORD instructions. | note: See Opcode 22 for important notes on DWORD instructions. | ||
- | === Opcode 0x27 (39): Modulus of DWORDs === | + | === Opcode 0x27 (39): Modulus of DWORDs |
stack input: small/big int a (next to top); small/big int b (top of stack) | stack input: small/big int a (next to top); small/big int b (top of stack) | ||
Line 288: | Line 288: | ||
note: See Opcode 22 for important notes on DWORD instructions. | note: See Opcode 22 for important notes on DWORD instructions. | ||
- | === Opcode 0x28 (40): Xor DWORDs === | + | === Opcode 0x28 (40): Xor DWORDs |
stack input: small/big int a (next to top); small/big int b (top of stack) | stack input: small/big int a (next to top); small/big int b (top of stack) | ||
Line 295: | Line 295: | ||
note: See Opcode 22 for important notes on DWORD instructions. | note: See Opcode 22 for important notes on DWORD instructions. | ||
- | === Opcode 0x29 (41): And DWORDs === | + | === Opcode 0x29 (41): And DWORDs |
stack input: small/big int a (next to top); small/big int b (top of stack) | stack input: small/big int a (next to top); small/big int b (top of stack) | ||
Line 302: | Line 302: | ||
note: See Opcode 22 for important notes on DWORD instructions. | note: See Opcode 22 for important notes on DWORD instructions. | ||
- | === Opcode 0x2A (42): Or DWORDs === | + | === Opcode 0x2A (42): Or DWORDs |
stack input: small/big int a (next to top); small/big int b (top of stack) | stack input: small/big int a (next to top); small/big int b (top of stack) | ||
Line 309: | Line 309: | ||
note: See Opcode 22 for important notes on DWORD instructions. | note: See Opcode 22 for important notes on DWORD instructions. | ||
- | === Opcode 0x2B (43): Bitwise Not DWORD === | + | === Opcode 0x2B (43): Bitwise Not DWORD (not) === |
stack input: small/big int a (top of stack) | stack input: small/big int a (top of stack) | ||
Line 316: | Line 316: | ||
note: See Opcode 22 for important notes on DWORD instructions. | note: See Opcode 22 for important notes on DWORD instructions. | ||
- | === Opcode 0x2C (44): Shift Left DWORD === | + | === Opcode 0x2C (44): Shift Left DWORD (shl) === |
stack input: small/big int a (next to top); small/big int count (top of stack) | stack input: small/big int a (next to top); small/big int count (top of stack) | ||
Line 323: | Line 323: | ||
note: See Opcode 0x22 for important notes on DWORD instructions. | note: See Opcode 0x22 for important notes on DWORD instructions. | ||
- | === Opcode 0x2D (45): Shift Right DWORD === | + | === Opcode 0x2D (45): Shift Right DWORD (shr) === |
stack input: small/big int a (next to top); small/big int count (top of stack) | stack input: small/big int a (next to top); small/big int count (top of stack) | ||
Line 330: | Line 330: | ||
note: See Opcode 22 for important notes on DWORD instructions. | note: See Opcode 22 for important notes on DWORD instructions. | ||
- | === Opcode 0x2E (46): Compare DWORDs for Less === | + | === Opcode 0x2E (46): Compare DWORDs for Less (cmp) === |
stack input: small/big int a (next to top); small/big int b (top of stack) | stack input: small/big int a (next to top); small/big int b (top of stack) | ||
Line 337: | Line 337: | ||
note: See Opcode 22 for important notes on DWORD instructions. | note: See Opcode 22 for important notes on DWORD instructions. | ||
- | === Opcode 0x2F (47): Compare DWORDs for Greater === | + | === Opcode 0x2F (47): Compare DWORDs for Greater |
stack input: small/big int a (next to top); small/big int b (top of stack) | stack input: small/big int a (next to top); small/big int b (top of stack) | ||
ocmbytecode.txt · Last modified: 2023/04/23 15:05 by nopsled