10 ;-----------------------------------------------------
11 ; CPU and BANKING types
19 AVRCLK equ 18432 ;[KHz]
23 ;-----------------------------------------------------
24 ;FOSC equ AVRCLK/2 ;Oscillator frequency [KHz]
25 ;PHI equ FOSC*2 ;CPU frequency (clock doubler enabled)
27 ;----------------------------------------------------------------------
28 ; Baudrate Generator for x16 clock mode:
29 ; TC = (f PHI / (32 * baudrate)) - 2
31 ; PHI [MHz]: 9.216 18.432
33 ; ----------------------
41 ;-----------------------------------------------------
42 ; Programmable Reload Timer (PRT)
44 PRT_PRE equ 20 ;PRT prescaler
46 ;-----------------------------------------------------
49 COMMON_SIZE equ 16*1024 ;Common Area size in bytes
50 ;must be multiple of 4K
52 if (COMMON_SIZE mod 1000h)
53 .printx COMMON_SIZE not multiple of 4K!
57 CSK equ COMMON_SIZE/1000h ;
58 CA equ 10h - CSK ;common area start
59 BA equ 0 ;banked area start
62 SYS$CBAR equ CA*16 + CA ;CBAR in system mode
63 USR$CBAR equ CA*16 + BA ;CBAR in user mode (CP/M)
66 BANKS equ 18 ;max nr. of banks
68 ;-----------------------------------------------------
70 CREFSH equ 0 ;Refresh rate register (disable refresh)
71 CWAITIO equ 3 shl IWI0 ;Max I/O Wait States, 0 Memory Wait States
72 PHI_X2 equ 0 ;set to M_X2CM to enable the clock doubler
77 PHI equ AVRCLK/5 ;CPU frequency [KHz]
78 BAUDCLCK equ AVRCLK/10 ;Baudrate clock [KHz]
92 ; Init Serial I/O for console input and output (SIO-A)
94 ; Baudrate clock: 1843200 Hz (Bus connector pin A17)
96 ; Baudrate Divider SIO CTC
97 ; ---------------------------------
116 CWAITROM equ 2 shl MWI0
121 DDTZRSTVEC equ 030h ;DDTZ Restart vector (breakpoints)
123 INIDONE equ 03Fh ;CP/M skip hw init, if this address
124 INIDONEVAL equ 080h ; is set to this value.
126 mtx.fifo_len equ 64 ;Message transfer fifos
127 mtx.fifo_id equ 0 ; This *must* have #0
131 ci.fifo_len equ 32 ;AVRCON Character I/O via AVR
136 s1.rx_len equ 128 ;Serial 1 (ASCI1) buffers
145 ;-----------------------------------------------------
146 ; Definition of (logical) top 2 memory pages
148 sysram_start equ 0FE00h
153 ivtab equ 0ffc0h ;int vector table
154 iv2tab equ ivtab + 2*9
158 ;-----------------------------------------------------
167 mkbuf macro id,name,size
168 if ((size AND (size-1)) NE 0) OR (size GT 256)
169 .printx Error: buffer ^size must be power of 2 and in range 0..256!
170 name&.mask equ ;wrong size error
176 name&.mask equ low (size-1)
185 ;-----------------------------------------------------
193 ??ps.len defl $ - ??ps.a
198 ;-----------------------------------------------------