From: Brett Gordon Date: Mon, 21 Sep 2015 06:46:50 +0000 (-0400) Subject: coco3: implement map_for_swap, swap_map(). X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f4629e0f00601c1db56e762edc24105569c710b3;p=FUZIX.git coco3: implement map_for_swap, swap_map(). --- diff --git a/Kernel/platform-coco3/coco3.s b/Kernel/platform-coco3/coco3.s index 9672c4ea..6adf714c 100644 --- a/Kernel/platform-coco3/coco3.s +++ b/Kernel/platform-coco3/coco3.s @@ -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 + diff --git a/Kernel/platform-coco3/config.h b/Kernel/platform-coco3/config.h index 2cf176b1..83501f3b 100644 --- a/Kernel/platform-coco3/config.h +++ b/Kernel/platform-coco3/config.h @@ -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