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 4*1024 ;Common Area size in bytes
50 ;must be multiple of 4K
51 if (COMMON_SIZE mod 1000h)
52 .printx COMMON_SIZE not multiple of 4K!
55 CMN_SIZE equ COMMON_SIZE/1000h ;4K units
56 BNK_SIZE equ 64/4 - CMN_SIZE ;bank size (4K units)
57 BANKS equ (512/4 - CMN_SIZE)/BNK_SIZE ;max nr. of banks
59 ; Logical address space, CBAR values
61 CA equ 10h - CMN_SIZE ;common area start (64K - common size)
62 BA equ 0 ;banked area start
67 SYS$CBAR equ CA*16 + CA ;CBAR in system mode
68 USR$CBAR equ CA*16 + BA ;CBAR in user mode (CP/M)
74 SYS$CBAR equ CA*16 + CA ;CBAR in system mode
75 USR$CBAR equ CA*16 + BA ;CBAR in user mode (CP/M)
80 ;-----------------------------------------------------
82 CREFSH equ 0 ;Refresh rate register (disable refresh)
83 CWAITIO equ 3 shl IWI0 ;Max I/O Wait States, 0 Memory Wait States
84 PHI_X2 equ 0 ;set to M_X2CM to enable the clock doubler
89 PHI equ AVRCLK/5 ;CPU frequency [KHz]
90 BAUDCLCK equ AVRCLK/10 ;Baudrate clock [KHz]
104 ; Init Serial I/O for console input and output (SIO-A)
106 ; Baudrate clock: 1843200 Hz (Bus connector pin A17)
108 ; Baudrate Divider SIO CTC
109 ; ---------------------------------
128 CWAITROM equ 2 shl MWI0
133 DDTZRSTVEC equ 030h ;DDTZ Restart vector (breakpoints)
135 INIDONE equ 03Fh ;CP/M skip hw init, if this address
136 INIDONEVAL equ 080h ; is set to this value.
138 mtx.fifo_len equ 64 ;Message transfer fifos
139 mtx.fifo_id equ 0 ; This *must* have #0
143 ci.fifo_len equ 32 ;AVRCON (USB0) Character I/O via AVR
148 s0.rx_len equ 128 ;Serial 0 (ASCI0) buffers
153 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 ;-----------------------------------------------------