egg

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e84608e370c1f962e4141c2f269c210906021adb
parent 2d03019f245869a1777203dcffaa1ebc61c69972
Author: Gabriel G. de Brito <gabrielgbrito@icloud.com>
Date:   Wed,  2 Apr 2025 08:31:48 -0300

Fixed sign handling in REDUX-V add and sub instructions

Diffstat:
Mmain.go | 2+-
Mreduxv/reduxv.go | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/main.go b/main.go @@ -16,7 +16,7 @@ import ( "github.com/gboncoffee/egg/sagui" ) -const VERSION = "3.3.2" +const VERSION = "3.3.3" // Put new architetures here... (main.go:/switch architeture) func listArchs() { diff --git a/reduxv/reduxv.go b/reduxv/reduxv.go @@ -164,9 +164,9 @@ func (m *ReduxV) NextInstruction() (*machine.Call, error) { case 0xb: m.SetRegister(uint64(ra), rav^rbv) case 0xc: - m.SetRegister(uint64(ra), rav+rbv) + m.SetRegister(uint64(ra), uint64(uint8(int8(rav)+int8(rbv)))) case 0xd: - m.SetRegister(uint64(ra), rav-rbv) + m.SetRegister(uint64(ra), uint64(uint8(int8(rav)-int8(rbv)))) case 0xe: m.SetRegister(uint64(ra), (rav<<rbv)&0xff) case 0xf: