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 ; Reload value for 10 ms Int. (0.1KHz):
47 ; tc10ms = phi/prescale/0.1KHz = phi / (prescale/10)
49 PRT_TC10MS equ PHI / (PRT_PRE/10)
51 ;-----------------------------------------------------
54 COMMON_SIZE equ 16*1024 ;Common Area size in bytes
55 ;must be multiple of 4K
57 if (COMMON_SIZE mod 1000h)
58 .printx COMMON_SIZE not multiple of 4K!
62 CSK equ COMMON_SIZE/1000h ;
63 CA equ 10h - CSK ;common area start
64 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)
71 BANKS equ 18 ;max nr. of banks
73 ;-----------------------------------------------------
75 CREFSH equ 0 ;Refresh rate register (disable refresh)
76 CWAITIO equ 3 shl IWI0 ;Max I/O Wait States, 0 Memory Wait States
77 PHI_X2 equ 0 ;set to M_X2CM to enable the clock doubler
82 PHI equ AVRCLK/5 ;CPU frequency [KHz]
83 BAUDCLCK equ AVRCLK/10 ;Baudrate clock [KHz]
97 ; Init Serial I/O for console input and output (SIO-A)
99 ; Baudrate clock: 1843200 Hz (Bus connector pin A17)
101 ; Baudrate Divider SIO CTC
102 ; ---------------------------------
121 CWAITROM equ 2 shl MWI0
126 DDTZRSTVEC equ 030h ;DDTZ Restart vector (breakpoints)
128 INIDONE equ 03Fh ;CP/M skip hw init, if this address
129 INIDONEVAL equ 080h ; is set to this value.
131 mtx.fifo_len equ 32 ;Message transfer fifos
132 mtx.fifo_id equ 0 ; This *must* have #0
136 ci.fifo_len equ 32 ;AVRCON Character I/O via AVR
141 s1.rx_len equ 128 ;Serial 1 (ASCI1) buffers
150 ;-----------------------------------------------------
151 ; Definition of (logical) top 2 memory pages
153 sysram_start equ 0FE00h
158 ivtab equ 0ffc0h ;int vector table
159 iv2tab equ ivtab + 2*9
163 ;-----------------------------------------------------
172 mkbuf macro id,name,size
173 if ((size AND (size-1)) NE 0) OR (size GT 256)
174 .printx Error: buffer ^size must be power of 2 and in range 0..256!
175 name&.mask equ ;wrong size error
180 name&.mask equ low (size-1)
189 ;-----------------------------------------------------
197 ??ps.len defl $ - ??ps.a
202 ;-----------------------------------------------------