8 ;-----------------------------------------------------
9 ; CPU and BANKING types
17 AVRCLK equ 18432 ;[KHz]
21 ;-----------------------------------------------------
22 ;FOSC equ AVRCLK/2 ;Oscillator frequency [KHz]
23 ;PHI equ FOSC*2 ;CPU frequency (clock doubler enabled)
25 ;----------------------------------------------------------------------
26 ; Baudrate Generator for x16 clock mode:
27 ; TC = (f PHI / (32 * baudrate)) - 2
29 ; PHI [MHz]: 9.216 18.432
31 ; ----------------------
39 ;-----------------------------------------------------
40 ; Programmable Reload Timer (PRT)
42 PRT_PRE equ 20 ;PRT prescaler
44 ;-----------------------------------------------------
47 COMMON_SIZE equ 4*1024 ;Common Area size in bytes
48 ;must be multiple of 4K
49 if (COMMON_SIZE mod 1000h)
50 .printx COMMON_SIZE not multiple of 4K!
53 CMN_SIZE equ COMMON_SIZE/1000h ;4K units
54 BNK_SIZE equ 64/4 - CMN_SIZE ;bank size (4K units)
55 BANKS equ (512/4 - CMN_SIZE)/BNK_SIZE ;max nr. of banks
57 ; Logical address space, CBAR values
59 CA equ 10h - CMN_SIZE ;common area start (64K - common size)
60 BA equ 0 ;banked area start
65 SYS$CBAR equ CA*16 + CA ;CBAR in system mode
66 USR$CBAR equ CA*16 + BA ;CBAR in user mode (CP/M)
72 SYS$CBAR equ CA*16 + CA ;CBAR in system mode
73 USR$CBAR equ CA*16 + BA ;CBAR in user mode (CP/M)
78 ;-----------------------------------------------------
80 CREFSH equ 0 ;Refresh rate register (disable refresh)
81 CWAITIO equ 3 shl IWI0 ;Max I/O Wait States, 0 Memory Wait States
82 PHI_X2 equ 0 ;set to M_X2CM to enable the clock doubler
87 PHI equ AVRCLK/5 ;CPU frequency [KHz]
88 BAUDCLCK equ AVRCLK/10 ;Baudrate clock [KHz]
102 ; Init Serial I/O for console input and output (SIO-A)
104 ; Baudrate clock: 1843200 Hz (Bus connector pin A17)
106 ; Baudrate Divider SIO CTC
107 ; ---------------------------------
126 CWAITROM equ 2 shl MWI0
131 DDTZRSTVEC equ 030h ;DDTZ Restart vector (breakpoints)
133 INIDONE equ 03Fh ;CP/M skip hw init, if this address
134 INIDONEVAL equ 080h ; is set to this value.
136 mtx.fifo_len equ 64 ;Message transfer fifos
137 mtx.fifo_id equ 0 ; This *must* have #0
141 ci.fifo_len equ 32 ;AVRCON (USB0) Character I/O via AVR
146 s0.rx_len equ 128 ;Serial 0 (ASCI0) buffers
151 s1.rx_len equ 128 ;Serial 1 (ASCI1) buffers
162 ;-----------------------------------------------------
163 ; Definition of (logical) top 2 memory pages
165 sysram_start equ 0FE00h
170 ivtab equ 0ffc0h ;int vector table
171 iv2tab equ ivtab + 2*9
175 ;-----------------------------------------------------
184 mkbuf macro id,name,size
185 if ((size AND (size-1)) NE 0) OR (size GT 256)
186 .printx Error: buffer ^size must be power of 2 and in range 0..256!
187 name&.mask equ ;wrong size error
193 name&.mask equ low (size-1)
202 ;-----------------------------------------------------
210 ??ps.len defl $ - ??ps.a
215 ;-----------------------------------------------------