File: push1jmpend.cc

package info (click to toggle)
icmake 13.05.01-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,132 kB
  • sloc: cpp: 11,595; fortran: 883; makefile: 853; sh: 546; pascal: 342
file content (13 lines) | stat: -rw-r--r-- 436 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
//#define XERR
#include "cpu.ih"

// This function serves the evaluation of logical expressions. It is
// executed when an op_push_1_jmp_end opcode is found in the
// bim file. A variable of type Int{1} is pushed on the stack.
// After this, the next opcode (which is by definition 'push 0') is skipped.

void CPU::push1jmpEnd()
{
    d_stack.push( new Int{ 1 } );
    d_hdr.seekg(1, ios::cur);   // skip the next opcode (= 'push 0')
}