Permalink
Browse files

finetuning memory layout

  • Loading branch information...
1 parent 6b6ea16 commit b6c7080dcf2a8b4dbef37477223a5070ca44593c orlof committed Jan 6, 2013
Showing with 12 additions and 10 deletions.
  1. +11 −9 defs.dasm16
  2. +1 −1 memory.dasm16
View
20 defs.dasm16
@@ -1,20 +1,22 @@
;----------------------------------------------------------------
; MEMORY LAYOUT
;----------------------------------------------------------------
-#define MEM_CODE_SIZE 0x6000
-#define MEM_HEAP_SIZE 0x8000
-#define MEM_SCREEN_BUFFER_SIZE 0x480
-#define MEM_FLOPPY_BUFFER_SIZE 0x200
+#define MEM_CODE_SIZE 0x3000
+#define MEM_FLOPPY_SIZE 0x200
+#define MEM_SCREEN_SIZE 0x480
+#define MEM_STACK_SIZE 0x3000
#define MEM_HEAP_START MEM_CODE_SIZE
-#define MEM_HEAP_END MEM_HEAP_START + MEM_HEAP_SIZE
+#define MEM_HEAP_END MEM_FLOPPY_START
-#define MEM_SCREEN_START MEM_HEAP_END
-#define MEM_SCREEN_END MEM_SCREEN_START + MEM_SCREEN_BUFFER_SIZE
+#define MEM_FLOPPY_START MEM_FLOPPY_END - MEM_FLOPPY_SIZE
+#define MEM_FLOPPY_END MEM_SCREEN_START
-#define MEM_FLOPPY_START MEM_SCREEN_END
-#define MEM_FLOPPY_END MEM_FLOPPY_START + MEM_FLOPPY_BUFFER_SIZE
+#define MEM_SCREEN_START MEM_SCREEN_END - MEM_SCREEN_SIZE
+#define MEM_SCREEN_END MEM_STACK_START
+#define MEM_STACK_START MEM_STACK_END - MEM_STACK_SIZE
+#define MEM_STACK_END 0x10000
;----------------------------------------------------------------
; PARAMETERS
View
2 memory.dasm16
@@ -1,5 +1,5 @@
;----------------------------------------------------------------
-; struct handle *realloc(struct handle *handle, uint16 size)
+; void realloc(struct handle *handle, uint16 size)
; return pointer to allocated handle or zero if error
;----------------------------------------------------------------
:realloc

0 comments on commit b6c7080

Please sign in to comment.