Print memory dump again
This commit is contained in:
parent
ef06f7b309
commit
af70c1a02c
3 changed files with 63 additions and 7 deletions
|
|
@ -7,6 +7,9 @@ module Mima.State
|
|||
MimaMemory
|
||||
, readAt
|
||||
, writeAt
|
||||
-- ** Querying
|
||||
, addressRange
|
||||
, sparseAddressRange
|
||||
-- ** Converting
|
||||
, wordsToMemory
|
||||
, memoryToWords
|
||||
|
|
@ -36,6 +39,9 @@ addressRange (MimaMemory m) =
|
|||
Nothing -> []
|
||||
Just maxAddr -> [minBound..maxAddr]
|
||||
|
||||
sparseAddressRange :: MimaMemory -> [MimaAddress]
|
||||
sparseAddressRange (MimaMemory m) = Map.keys m
|
||||
|
||||
wordsToMemory :: [MimaWord] -> MimaMemory
|
||||
wordsToMemory = MimaMemory
|
||||
. Map.filter (/= zeroBits)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue