Skip to content
Adam Clements edited this page Oct 15, 2016 · 7 revisions

Welcome to the Imprint wiki!

Imprint is a stack based language, instructions operate on the stack and add/remove one or more items from the stack.

Each stack item (and program memory item) may represent either an integer (signed) a vector or a colour between 0x000000 and 0xffffff (RGB)

Lines can be labelled with label-name: and referenced with label-name. At compile time, the memory address

Basic instructions

  • NoOp Does nothing - padding
  • Push Pushes one piece of data onto the stack, e.g. Push 10, Push 0xff55ff or Push (10,-10)
  • Pop Removes one item from the top of the stack
  • PushFrom Pops a single memory address, and pushes the contents of that memory address onto the stack
  • PopTo Pops a memory address from the stack and then pops the next item from the stack into that location in memory
  • PeekTo As above but doesn't remove the item from the stack
  • Clone Peeks the top item in the stack and pushes another copy onto the top of the stack
  • Swap Swaps the top two items on the stack

Jump commands

Jump JumpNe JumpEq JumpLt JumpGt JumpZero

Or And

Add Sub Random

VecAdd VecSub VecComp VecDecomp

GetPos MoveTo ShootAt

Clone this wiki locally