coco3: implement map_for_swap, swap_map().
authorBrett Gordon <beretta42@gmail.com>
Mon, 21 Sep 2015 06:46:50 +0000 (02:46 -0400)
committerBrett Gordon <beretta42@gmail.com>
Mon, 21 Sep 2015 06:46:50 +0000 (02:46 -0400)
Kernel/platform-coco3/coco3.s
Kernel/platform-coco3/config.h

index 9672c4e..6adf714 100644 (file)
@@ -322,3 +322,12 @@ scrPos     .dw     0xb400          ; debugging screen buffer position
 
 
 
+;;; Maps the memory for swap transfers
+;;;   takes: A = swap token ( a page no. )
+;;;   returns: nothing
+map_for_swap
+       sta     0xffa8
+       inca
+       sta     0xffa9
+       rts
+
index 2cf176b..83501f3 100644 (file)
@@ -25,7 +25,7 @@
 #define UDATA_BLOCKS   0       /* We swap the uarea in the data */
 #define UDATA_SWAPSIZE 0
 #define MAX_SWAPS      32
-#define swap_map(x)  ((uint8_t *)(x))
+#define swap_map(x)  ((uint8_t *)(x & 0x3fff ))
 
 /* The Drivewire block dev rawmode=1 doesn't work just now
    with the bank16k.c memory layout (yet), so we have to