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 16*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 DDTZRSTVEC equ 030h ;DDTZ Restart vector (breakpoints)
111 INIDONE equ 03Fh ;CP/M skip hw init, if this address
112 INIDONEVAL equ 080h ; is set to this value.
114 mtx.fifo_len equ 32 ;Message transfer fifos
115 mtx.fifo_id equ 0 ; This *must* have #0
119 ci.fifo_len equ 32 ;AVRCON Character I/O via AVR
124 s1.rx_len equ 128 ;Serial 1 (ASCI1) buffers
133 ;-----------------------------------------------------
134 ; Definition of (logical) top 2 memory pages
136 sysram_start equ 0FE00h
141 ivtab equ 0ffc0h ;int vector table
142 iv2tab equ ivtab + 2*9
146 ;-----------------------------------------------------
155 mkbuf macro id,name,size
156 if ((size AND (size-1)) NE 0) OR (size GT 256)
157 .printx Error: buffer ^size must be power of 2 and in range 0..256!
158 name&.mask equ ;wrong size error
163 name&.mask equ low (size-1)
172 ;-----------------------------------------------------
180 ??ps.len defl $ - ??ps.a