Start hiding members

This commit is contained in:
Ian Gulliver
2021-11-15 20:49:54 -10:00
parent 6b1da92a3a
commit c52d6f5f9f
3 changed files with 50 additions and 50 deletions

View File

@@ -80,70 +80,70 @@ func (state *State) DivideSigned(instr *Instruction) {
func (state *State) IsEqual(instr *Instruction) {
in1 := state.ReadUnsigned(&instr.Operand1)
in2 := state.ReadUnsigned(&instr.Operand2)
state.ComparisonResult = (in1 == in2)
state.comparisonResult = (in1 == in2)
}
func (state *State) IsLessThanUnsigned(instr *Instruction) {
in1 := state.ReadUnsigned(&instr.Operand1)
in2 := state.ReadUnsigned(&instr.Operand2)
state.ComparisonResult = (in1 < in2)
state.comparisonResult = (in1 < in2)
}
func (state *State) IsLessThanSigned(instr *Instruction) {
in1 := state.ReadSigned(&instr.Operand1)
in2 := state.ReadSigned(&instr.Operand2)
state.ComparisonResult = (in1 < in2)
state.comparisonResult = (in1 < in2)
}
func (state *State) IsGreaterThanUnsigned(instr *Instruction) {
in1 := state.ReadUnsigned(&instr.Operand1)
in2 := state.ReadUnsigned(&instr.Operand2)
state.ComparisonResult = (in1 > in2)
state.comparisonResult = (in1 > in2)
}
func (state *State) IsGreaterThanSigned(instr *Instruction) {
in1 := state.ReadSigned(&instr.Operand1)
in2 := state.ReadSigned(&instr.Operand2)
state.ComparisonResult = (in1 > in2)
state.comparisonResult = (in1 > in2)
}
func (state *State) IsLessThanOrEqualUnsigned(instr *Instruction) {
in1 := state.ReadUnsigned(&instr.Operand1)
in2 := state.ReadUnsigned(&instr.Operand2)
state.ComparisonResult = (in1 <= in2)
state.comparisonResult = (in1 <= in2)
}
func (state *State) IsLessThanOrEqualSigned(instr *Instruction) {
in1 := state.ReadSigned(&instr.Operand1)
in2 := state.ReadSigned(&instr.Operand2)
state.ComparisonResult = (in1 <= in2)
state.comparisonResult = (in1 <= in2)
}
func (state *State) IsGreaterThanOrEqualUnsigned(instr *Instruction) {
in1 := state.ReadUnsigned(&instr.Operand1)
in2 := state.ReadUnsigned(&instr.Operand2)
state.ComparisonResult = (in1 >= in2)
state.comparisonResult = (in1 >= in2)
}
func (state *State) IsGreaterThanOrEqualSigned(instr *Instruction) {
in1 := state.ReadSigned(&instr.Operand1)
in2 := state.ReadSigned(&instr.Operand2)
state.ComparisonResult = (in1 >= in2)
state.comparisonResult = (in1 >= in2)
}
func (state *State) Jump(instr *Instruction) {
in := state.ReadSigned(&instr.Operand1)
state.InstructionIndex += in - 1
state.instructionIndex += in - 1
}
func (state *State) JumpIfTrue(instr *Instruction) {
if state.ComparisonResult == true {
if state.comparisonResult == true {
state.Jump(instr)
}
}
func (state *State) JumpIfFalse(instr *Instruction) {
if state.ComparisonResult == false {
if state.comparisonResult == false {
state.Jump(instr)
}
}