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 revisionBoth sides next revision
ocmbytecode [2023/04/23 14:52] – [Opcodes 30..3F] nopsledocmbytecode [2023/04/23 14:55] – [Opcodes 40..4F] nopsled
Line 455: Line 455:
 note: in contrast to Opcode 21 "Test for Small Int Zero", this opcode has undefined behaviour of the operand is not a small integer. note: in contrast to Opcode 21 "Test for Small Int Zero", this opcode has undefined behaviour of the operand is not a small integer.
  
-=== Opcode 0x47 (71): Duplicate second-to-top ===+=== Opcode 0x47 (71): Duplicate second-to-top (index.1) ===
 effect: pushes a copy of the second-to-top (the third value if you call top-of-stack the first one) to the standard stack. effect: pushes a copy of the second-to-top (the third value if you call top-of-stack the first one) to the standard stack.
  
 PostScript equivalent: "2 index" PostScript equivalent: "2 index"
  
-=== Opcode 0x48 (72): Duplicate third-to-top ===+=== Opcode 0x48 (72): Duplicate third-to-top (index.2) ===
 effect: pushes a copy of the third-to-top (the fourth value if you call top-of-stack the first one) to the standard stack. effect: pushes a copy of the third-to-top (the fourth value if you call top-of-stack the first one) to the standard stack.
  
 PostScript equivalent: "3 index" PostScript equivalent: "3 index"
  
-=== Opcode 0x49 (73): Duplicate fourth-to-top ===+=== Opcode 0x49 (73): Duplicate fourth-to-top (index.3) ===
 effect: pushes a copy of the fourth-to-top (the 5th value if you call top-of-stack the first one) to the standard stack. effect: pushes a copy of the fourth-to-top (the 5th value if you call top-of-stack the first one) to the standard stack.
  
 PostScript equivalent: "4 index" PostScript equivalent: "4 index"
  
-=== Opcode 0x4A (74): Duplicate 5th-to-top ===+=== Opcode 0x4A (74): Duplicate 5th-to-top (index.4) ===
 effect: pushes a copy of the 5th-to-top (the 6th value if you call top-of-stack the first one) to the standard stack. effect: pushes a copy of the 5th-to-top (the 6th value if you call top-of-stack the first one) to the standard stack.
  
 PostScript equivalent: "5 index" PostScript equivalent: "5 index"
  
-=== Opcode 0x4B (75): Move Top-3 to top ===+=== Opcode 0x4B (75): Move Top-3 to top (rollin.5) ===
 effect: The value at Top-3 gets moved to top of stack, top of stack becomes top-1 and so on. effect: The value at Top-3 gets moved to top of stack, top of stack becomes top-1 and so on.
  
 PostScript equivalent: "4 -1 roll" PostScript equivalent: "4 -1 roll"
  
-=== Opcode 0x4C (76): Move Top-4 to top ===+=== Opcode 0x4C (76): Move Top-4 to top (rollin.4) ===
 effect: The value at Top-4 gets moved to top of stack, top of stack becomes top-1 and so on. effect: The value at Top-4 gets moved to top of stack, top of stack becomes top-1 and so on.
  
 PostScript equivalent: "5 -1 roll" PostScript equivalent: "5 -1 roll"
  
-=== Opcode 0x4D (77): Move Top-5 to top ===+=== Opcode 0x4D (77): Move Top-5 to top (rollin.3) ===
 effect: The value at Top-5 gets moved to top of stack, top of stack becomes top-1 and so on. effect: The value at Top-5 gets moved to top of stack, top of stack becomes top-1 and so on.
  
 PostScript equivalent: "6 -1 roll" PostScript equivalent: "6 -1 roll"
  
-=== Opcode 0x4E (78): Increment Small Int ===+=== Opcode 0x4E (78): Increment Small Int (inc.w) ===
 stack input: smallint a stack input: smallint a
  
 stack ouput: smallint (a+1) stack ouput: smallint (a+1)
  
-=== Opcode 0x4F (79): Decrement Small Int ===+=== Opcode 0x4F (79): Decrement Small Int (dec.w) ===
 stack input: smallint a stack input: smallint a
  
ocmbytecode.txt · Last modified: 2023/04/23 15:05 by nopsled

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki