diff options
Diffstat (limited to 'src/Machine.hs')
-rw-r--r-- | src/Machine.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Machine.hs b/src/Machine.hs index 947d43a..eebbe91 100644 --- a/src/Machine.hs +++ b/src/Machine.hs @@ -169,6 +169,7 @@ writeA _ _ = return $ error "Incorrect Address register write" -- PC Register Access readPC = with pc $ \pc -> do + pc <- readIORef pc return pc writePC r = with pc $ \pc -> do @@ -182,6 +183,11 @@ incPC = with pc $ \pc -> do ------------------------------------------------------------------------------- -- Status Register Access +readSR = with sr $ \sr -> do + sr <- readIORef sr + return sr + + isTracing :: Emulator Bool isTracing = with sr $ \sr -> do sr <- readIORef sr |