From 780042035cb7fabfbf803a3a01954bd3ca994b0d Mon Sep 17 00:00:00 2001 From: Laborratte5 Date: Sat, 20 Jul 2024 22:47:36 +0200 Subject: [PATCH] fix: Encode constants using little endian --- app/Assembler.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Assembler.hs b/app/Assembler.hs index fe4aa1c..31309e7 100644 --- a/app/Assembler.hs +++ b/app/Assembler.hs @@ -24,7 +24,7 @@ version1 = P.execPut $ B.putWord8 1 toBinary :: Command -> P.Put toBinary (Const i) = do P.putWord8 0x0001 - P.putInt32be ((fromIntegral i)::Int32) + P.putInt32le ((fromIntegral i)::Int32) toBinary Add = P.putWord8 0x0004 toBinary Sub = P.putWord8 0x0005 toBinary Mult = P.putWord8 0x0006