Updated Am2900Machine and -Definition; Added MachineContext
[Mograsim.git] / net.mograsim.machine / src / net / mograsim / machine / Memory.java
index 58798c3..77c0d48 100644 (file)
@@ -19,7 +19,7 @@ public interface Memory<T>
        public default long size()
        {
                MemoryDefinition def = getDefinition();
-               return Long.max(0, def.getMaximalAddress() - def.getMinimalAddress());
+               return Long.max(0, def.getMaximalAddress() - def.getMinimalAddress() + 1);
        }
        
        /**