now fetching from ram correctly as ram is 32 bit word not byte indexed
This commit is contained in:
parent
3f50fe32f8
commit
63a73d3f71
3 changed files with 9 additions and 1 deletions
|
@ -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' }
|
||||
|
|
Reference in a new issue