From f4d5b4febbffab80cb06bd18564d4c326756fad7 Mon Sep 17 00:00:00 2001 From: Leo C Date: Wed, 2 Jul 2014 14:33:22 +0200 Subject: Rename dir Z180 --> z180 --- z180/config.inc | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 z180/config.inc (limited to 'z180/config.inc') diff --git a/z180/config.inc b/z180/config.inc new file mode 100644 index 0000000..b03761c --- /dev/null +++ b/z180/config.inc @@ -0,0 +1,105 @@ + + +FOSC equ 18432 ;Oscillator frequency [KHz] +PHI equ FOSC/2 ;CPU frequency + +;----------------------------------------------------- +; Programmable Reload Timer (PRT) + +PRT_PRE equ 20 ;PRT prescaler + +; Reload value for 10 ms Int. (0.1KHz): +; tc10ms = phi/prescale/0.1KHz = phi / (prescale/10) + +PRT_TC10MS equ PHI / (PRT_PRE/10) + +;----------------------------------------------------- +; MMU + +SYS$CBAR equ 0C8h +USR$CBAR equ 0F0h + + +BANKS equ 18 ;max nr. of banks + +;----------------------------------------------------- + +CREFSH equ 0 ;Refresh rate register (disable refresh) +CWAITIO equ 3 shl IWI0 ;Max I/O Wait States, 0 Memory Wait States + + +ROMSYS equ 0 + + if ROMSYS +c$rom equ 0a5h +ROM_EN equ 0C0h +ROM_DIS equ ROMEN+1 +CWAITROM equ 2 shl MWI0 + endif + + +DRSTNUM equ 30h ;DDTZ Restart vector (breakpoints) + + +msg_fb_len equ 256 +rx.buf_len equ 20h +tx.buf_len equ 80h +rx.buf_len equ 20h +tx.buf_len equ 80h + + +s1.rx_len equ 256 ;Serial 1 (ASCI1) buffers +s1.tx_len equ 256 ; + +PMSG equ 80h + +;----------------------------------------------------- +; Definition of (locical) top 2 memory pages + +sysram_start equ 0FE00h +stacksize equ 80 + +isvsw_loc equ 0FEE0h + +ivtab equ 0ffc0h ;int vector table +iv2tab equ ivtab + 2*9 + + + +;----------------------------------------------------- + + +o.mask equ -3 +o.in_idx equ -2 +o.out_idx equ -1 + + .lall + +mkbuf macro name,size + if ((size & (size-1)) ne 0) or (size gt 256) + .printx Error: buffer ^size must be power of 2 and in range 0..256! + name&.mask equ ;wrong size error + else + ds 3 + name:: ds size + name&.mask equ low (size-1) + if size ne 0 + name&.end equ $-1 + name&.len equ size + endif + endif +endm + +;----------------------------------------------------- + +inidat macro + cseg +??ps.a defl $ + endm + +inidate macro +??ps.len defl $ - ??ps.a + dseg + ds ??ps.len + endm + -- cgit v1.2.3