Table of Contents

Class VmState

Namespace
Pl0.Vm
Assembly
Pl0.Vm.dll

Snapshot of the current VM state.

public sealed record VmState : IEquatable<VmState>
Inheritance
VmState
Implements
Inherited Members

Constructors

VmState(int, int, int, int[], Instruction?)

Snapshot of the current VM state.

public VmState(int P, int B, int T, int[] Stack, Instruction? CurrentInstruction)

Parameters

P int

Program counter.

B int

Base pointer.

T int

Top-of-stack pointer.

Stack int[]

Stack snapshot.

CurrentInstruction Instruction?

Instruction at the current program counter.

Properties

B

Base pointer.

public int B { get; init; }

Property Value

int

CurrentInstruction

Instruction at the current program counter.

public Instruction? CurrentInstruction { get; init; }

Property Value

Instruction?

P

Program counter.

public int P { get; init; }

Property Value

int

Stack

Stack snapshot.

public int[] Stack { get; init; }

Property Value

int[]

T

Top-of-stack pointer.

public int T { get; init; }

Property Value

int