now fetching from ram correctly as ram is 32 bit word not byte indexed

This commit is contained in:
Yehowshua Immanuel 2025-03-07 21:41:46 -05:00
parent 3f50fe32f8
commit 63a73d3f71
3 changed files with 9 additions and 1 deletions

View file

@ -46,6 +46,7 @@ simulationLoop n machine = do
fetchResult <- fetchInstruction machinePeripherals currPc
let decodeResult = decode fetchResult
putStrLn |> show decodeResult P.++ debugInsn fetchResult
putStrLn $ "PC: " P.++ show currPc
let pc' = currPc + 4
cpu' = (cpu machine) { pc = pc' }
machine' = machine { cpu = cpu' }