7 ;-----------------------------------------------------
8 ; CPU and BANKING types
16 AVRCLK equ 18432 ;[KHz]
20 ;-----------------------------------------------------
21 FOSC equ AVRCLK/2 ;Oscillator frequency [KHz]
22 PHI equ FOSC*2 ;CPU frequency (clock doubler enabled)
24 ;-----------------------------------------------------
25 ; Programmable Reload Timer (PRT)
27 PRT_PRE equ 20 ;PRT prescaler
29 ; Reload value for 10 ms Int. (0.1KHz):
30 ; tc10ms = phi/prescale/0.1KHz = phi / (prescale/10)
32 PRT_TC10MS equ PHI / (PRT_PRE/10)
34 ;-----------------------------------------------------
37 COMMON_SIZE equ 4*1024 ;Common Area size in bytes
38 ;must be multiple of 4K
40 if (COMMON_SIZE mod 1000h)
41 .printx COMMON_SIZE not multiple of 4K!
45 CSK equ COMMON_SIZE/1000h ;
46 CA equ 10h - CSK ;common area start
47 BA equ 0 ;banked area start
50 SYS$CBAR equ CA<<4 + CA ;CBAR in system mode
51 USR$CBAR equ CA<<4 + BA ;CBAR in user mode (CP/M)
54 BANKS equ 18 ;max nr. of banks
56 ;-----------------------------------------------------
58 CREFSH equ 0 ;Refresh rate register (disable refresh)
59 CWAITIO equ 3 shl IWI0 ;Max I/O Wait States, 0 Memory Wait States
64 PHI equ AVRCLK/5 ;CPU frequency [KHz]
65 BAUDCLCK equ AVRCLK/10 ;Baudrate clock [KHz]
79 ; Init Serial I/O for console input and output (SIO-A)
81 ; Baudrate clock: 1843200 Hz (Bus connector pin A17)
83 ; Baudrate Divider SIO CTC
84 ; ---------------------------------
103 CWAITROM equ 2 shl MWI0
108 DRSTNUM equ 30h ;DDTZ Restart vector (breakpoints)
117 s1.rx_len equ 256 ;Serial 1 (ASCI1) buffers
124 ;-----------------------------------------------------
125 ; Definition of (logical) top 2 memory pages
127 sysram_start equ 0FE00h
132 ivtab equ 0ffc0h ;int vector table
133 iv2tab equ ivtab + 2*9
137 ;-----------------------------------------------------
146 mkbuf macro name,size
147 if ((size & (size-1)) ne 0) or (size gt 256)
148 .printx Error: buffer ^size must be power of 2 and in range 0..256!
149 name&.mask equ ;wrong size error
153 name&.mask equ low (size-1)
161 ;-----------------------------------------------------
169 ??ps.len defl $ - ??ps.a