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*16 + CA ;CBAR in system mode
51 USR$CBAR equ CA*16 + 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
60 PHI_X2 equ 0 ;set to M_X2CM to enable the clock doubler
65 PHI equ AVRCLK/5 ;CPU frequency [KHz]
66 BAUDCLCK equ AVRCLK/10 ;Baudrate clock [KHz]
80 ; Init Serial I/O for console input and output (SIO-A)
82 ; Baudrate clock: 1843200 Hz (Bus connector pin A17)
84 ; Baudrate Divider SIO CTC
85 ; ---------------------------------
104 CWAITROM equ 2 shl MWI0
109 DRSTNUM equ 30h ;DDTZ Restart vector (breakpoints)
112 mtx.fifo_len equ 32 ;Message transfer fifos
113 mtx.fifo_id equ 0 ; This *must* have #0
117 ci.fifo_len equ 32 ;AVRCON Character I/O via AVR
122 s1.rx_len equ 128 ;Serial 1 (ASCI1) buffers
131 ;-----------------------------------------------------
132 ; Definition of (logical) top 2 memory pages
134 sysram_start equ 0FE00h
139 ivtab equ 0ffc0h ;int vector table
140 iv2tab equ ivtab + 2*9
144 ;-----------------------------------------------------
153 mkbuf macro id,name,size
154 if ((size AND (size-1)) NE 0) OR (size GT 256)
155 .printx Error: buffer ^size must be power of 2 and in range 0..256!
156 name&.mask equ ;wrong size error
161 name&.mask equ low (size-1)
170 ;-----------------------------------------------------
178 ??ps.len defl $ - ??ps.a