aboutsummaryrefslogtreecommitdiff
path: root/src/Commands.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Commands.hs')
-rw-r--r--src/Commands.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Commands.hs b/src/Commands.hs
index 32fc17f..e12cfdf 100644
--- a/src/Commands.hs
+++ b/src/Commands.hs
@@ -110,7 +110,12 @@ doTRAP :: Int -> Emulator ()
doTRAP _ = return ()
doLINK :: Int -> Emulator ()
-doLINK _ = return ()
+doLINK a = do
+ incPC
+ addr <- readA a
+ sp <- readA 7
+ writeA 7 (sp-4)
+ setLong (sp-4) addr
doUNLK :: Int -> Emulator ()
doUNLK a = do