X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/845cbdbdd011f875219542dc5916f390cd952514..a8b4c9642aee2d7b901e4a7cd19b170a40a361eb:/z180/config.inc diff --git a/z180/config.inc b/z180/config.inc index 034febe..d10b113 100644 --- a/z180/config.inc +++ b/z180/config.inc @@ -46,24 +46,36 @@ PRT_PRE equ 20 ;PRT prescaler ;----------------------------------------------------- ; MMU -COMMON_SIZE equ 16*1024 ;Common Area size in bytes +COMMON_SIZE equ 4*1024 ;Common Area size in bytes ;must be multiple of 4K - if (COMMON_SIZE mod 1000h) .printx COMMON_SIZE not multiple of 4K! end ;stop assembly endif +CMN_SIZE equ COMMON_SIZE/1000h ;4K units +BNK_SIZE equ 64/4 - CMN_SIZE ;bank size (4K units) +BANKS equ (512/4 - CMN_SIZE)/BNK_SIZE ;max nr. of banks + +; Logical address space, CBAR values -CSK equ COMMON_SIZE/1000h ; -CA equ 10h - CSK ;common area start -BA equ 0 ;banked area start +CA equ 10h - CMN_SIZE ;common area start (64K - common size) +BA equ 0 ;banked area start + + if 0 SYS$CBR equ 0 SYS$CBAR equ CA*16 + CA ;CBAR in system mode USR$CBAR equ CA*16 + BA ;CBAR in user mode (CP/M) + endif + if 1 + +SYS$CBR equ BNK_SIZE +SYS$CBAR equ CA*16 + CA ;CBAR in system mode +USR$CBAR equ CA*16 + BA ;CBAR in user mode (CP/M) + + endif -BANKS equ 18 ;max nr. of banks ;----------------------------------------------------- @@ -123,9 +135,9 @@ DDTZRSTVEC equ 030h ;DDTZ Restart vector (breakpoints) INIDONE equ 03Fh ;CP/M skip hw init, if this address INIDONEVAL equ 080h ; is set to this value. -mtx.fifo_len equ 32 ;Message transfer fifos +mtx.fifo_len equ 64 ;Message transfer fifos mtx.fifo_id equ 0 ; This *must* have #0 -mrx.fifo_len equ 32 +mrx.fifo_len equ 64 mrx.fifo_id equ 1 ci.fifo_len equ 32 ;AVRCON Character I/O via AVR @@ -170,7 +182,8 @@ mkbuf macro id,name,size name&.mask equ ;wrong size error else db id - ds 3 + db size-1 + ds 2 name:: ds size name&.mask equ low (size-1) if size ne 0