Skip to content

Commit

Permalink
Added dummy float stack operations
Browse files Browse the repository at this point in the history
  • Loading branch information
uholeschak committed Dec 11, 2024
1 parent b57b91f commit 4d306e3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions EdiabasLib/EdiabasLib/EdOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1976,6 +1976,16 @@ private static void OpPpop(EdiabasNet ediabas, OpCode oc, Operand arg0, Operand
ediabas._flags.UpdateFlags(value, arg0.GetDataLen());
}

// plugin pop float
private static void OpPpopflt(EdiabasNet ediabas, OpCode oc, Operand arg0, Operand arg1)
{
ediabas.LogFormat(EdLogLevel.Info, "OpPpopflt: Ignoring");

EdFloatType value = 0;
arg0.SetRawData(value);
ediabas._flags.Overflow = false;
}

// plugin pop string
private static void OpPpopy(EdiabasNet ediabas, OpCode oc, Operand arg0, Operand arg1)
{
Expand All @@ -1990,6 +2000,12 @@ private static void OpPpush(EdiabasNet ediabas, OpCode oc, Operand arg0, Operand
ediabas.LogFormat(EdLogLevel.Info, "OpPpush: Ignoring");
}

// plugin push float
private static void OpPpushflt(EdiabasNet ediabas, OpCode oc, Operand arg0, Operand arg1)
{
ediabas.LogFormat(EdLogLevel.Info, "OpPpushflt: Ignoring");
}

// plugin push string
private static void OpPpushy(EdiabasNet ediabas, OpCode oc, Operand arg0, Operand arg1)
{
Expand Down
4 changes: 2 additions & 2 deletions EdiabasLib/EdiabasLib/EdiabasNet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2039,8 +2039,8 @@ public byte Opcode
new OpCode(0xA2, "plinkv", OpPlinkv),
new OpCode(0xA3, "ppush", OpPpush),
new OpCode(0xA4, "ppop", OpPpop),
new OpCode(0xA5, "ppushflt", null),
new OpCode(0xA6, "ppopflt", null),
new OpCode(0xA5, "ppushflt", OpPpushflt),
new OpCode(0xA6, "ppopflt", OpPpopflt),
new OpCode(0xA7, "ppushy", OpPpushy),
new OpCode(0xA8, "ppopy", OpPpopy),
new OpCode(0xA9, "pjtsr", OpPjtsr),
Expand Down

0 comments on commit 4d306e3

Please sign in to comment.