From fd5b0ee5334977256ae1ef0f1802ac67a7248897 Mon Sep 17 00:00:00 2001 From: Nikita Orlov Date: Fri, 2 Apr 2021 22:37:27 +0300 Subject: MOVE in progress --- src/Instructions.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Instructions.hs') diff --git a/src/Instructions.hs b/src/Instructions.hs index 3ffbfc2..c3e9763 100644 --- a/src/Instructions.hs +++ b/src/Instructions.hs @@ -62,7 +62,12 @@ doMOVEA :: Int -> Int -> Int -> Int -> Emulator () doMOVEA _ _ _ _ = error "MOVEA" doMOVE :: Int -> Int -> Int -> Int -> Int -> Emulator () -doMOVE _ _ _ _ _ = error "MOVE" +doMOVE 1 dst_reg dst_mode src_mode src_reg = do + incPC + src <- getOp src_mode src_reg 1 + src_value <- fst src + dst <- getOp dst_mode dst_reg 1 + (snd dst) src_value doSRMOVE :: Int -> Int -> Emulator () doSRMOVE _ _ = error "SRMOVE" -- cgit v1.2.3