Skip to content
This repository was archived by the owner on Mar 16, 2020. It is now read-only.

Instructions

scr4bble edited this page Dec 7, 2014 · 9 revisions

CALL TapeIndex, locals_count

  • TapeIndex: -1 = length(s : string) : integer
  • TapeIndex: -2 = copy(s : string; i : integer; n : integer) : string
  • TapeIndex: -3 = find(s : string; search : string) : integer
  • TapeIndex: -4 = sort(s : string) : string
  • StackAppend(BP) (posunie sa o jedno dole)
  • BasePointer := StackPointer (index)
  • StackAppendInstructionPointer
  • StackPointer += locals_count (cyklom sa appendne locals_count neinicializovane premenne)

RETURN arg_count

  • SP := BP;
  • BP := [BP];
  • IP := [BP + 1];
  • SP -= i->dst.int_ // int_ == arg_count

OP dst, src1, src2

OP = {ADD, SUB, MUL, DIV, LESS, GREATER, LESS_OR_EQUAL, GREATER_OR_EQUAL, EQUAL, NOT_EQUAL}

  • dst is index (relative or absolute), store by function StackDataVectorAtSet()
  • src1/src2 - values or indexes (see flags)
  • dst = src1 + src2;
  • SP := SP + (flag sp_inc);

Clone this wiki locally