ZXS: RAM: Add examples
authorLucian Mogosanu <lucian.mogosanu@gmail.com>
Sat, 13 Dec 2014 16:56:32 +0000 (18:56 +0200)
committerLucian Mogosanu <lucian.mogosanu@gmail.com>
Sat, 13 Dec 2014 16:56:32 +0000 (18:56 +0200)
src/ZXS/RAM.hs

index 9a755d5..aaf994c 100644 (file)
@@ -37,5 +37,11 @@ ramModifyWord ram addr f = do
   w <- ramGetWord ram addr
   ramSetWord ram addr $ f w
 
+-- defining this as "RAM" memory, although we're not writing to it
+-- while the CPU is running; most probably we'll need to redefine this
+-- into its own module
 romMem :: IO RAM
 romMem = newListArray (0x0000, 0x3fff) $ repeat 0
+
+mainMem :: IO RAM
+mainMem = newListArray (0x5ccb, 0xff57) $ repeat 0