From a3e6fcfea2a618eae036a6c882b1e272589b7860 Mon Sep 17 00:00:00 2001 From: Nikita Orlov Date: Fri, 2 Apr 2021 21:20:01 +0300 Subject: Instructions in progress --- src/Instructions.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Instructions.hs') diff --git a/src/Instructions.hs b/src/Instructions.hs index 9c2e2cb..1292efc 100644 --- a/src/Instructions.hs +++ b/src/Instructions.hs @@ -62,7 +62,8 @@ doMOVEA :: Int -> Int -> Int -> Int -> Emulator () doMOVEA _ _ _ _ = return () doMOVE :: Int -> Int -> Int -> Int -> Int -> Emulator () -doMOVE _ _ _ _ _ = return () +doMOVE 3 dst_reg dst_mode src_mode src_reg = do + incPC doSRMOVE :: Int -> Int -> Emulator () doSRMOVE _ _ = return () @@ -132,9 +133,8 @@ doRESET :: Emulator () doRESET = return () doNOP :: Emulator () -doNOP = with pc $ \pc -> do - pcval <- readIORef pc - writeIORef pc (pcval + 2) +doNOP = do + incPC doSTOP :: Emulator () doSTOP = return () -- cgit v1.2.3