5 ;-----------------------------------------------------
6 ; CPU and BANKING types
14 AVRCLK equ 18432 ;[KHz]
18 ;-----------------------------------------------------
19 FOSC equ AVRCLK/2 ;Oscillator frequency [KHz]
20 PHI equ FOSC*2 ;CPU frequency (clock doubler enabled)
22 ;-----------------------------------------------------
23 ; Programmable Reload Timer (PRT)
25 PRT_PRE equ 20 ;PRT prescaler
27 ; Reload value for 10 ms Int. (0.1KHz):
28 ; tc10ms = phi/prescale/0.1KHz = phi / (prescale/10)
30 PRT_TC10MS equ PHI / (PRT_PRE/10)
32 ;-----------------------------------------------------
35 COMMON_SIZE equ 4*1024 ;Common Area size in bytes
36 ;must be multiple of 4K
38 if (COMMON_SIZE mod 1000h)
39 .printx COMMON_SIZE not multiple of 4K!
43 CSK equ COMMON_SIZE/1000h ;
44 CA equ 10h - CSK ;common area start
45 BA equ 0 ;banked area start
48 SYS$CBAR equ CA<<4 + CA ;CBAR in system mode
49 USR$CBAR equ CA<<4 + BA ;CBAR in user mode (CP/M)
52 BANKS equ 18 ;max nr. of banks
54 ;-----------------------------------------------------
56 CREFSH equ 0 ;Refresh rate register (disable refresh)
57 CWAITIO equ 3 shl IWI0 ;Max I/O Wait States, 0 Memory Wait States
62 PHI equ AVRCLK/5 ;CPU frequency [KHz]
63 BAUDCLCK equ AVRCLK/10 ;Baudrate clock [KHz]
77 ; Init Serial I/O for console input and output (SIO-A)
79 ; Baudrate clock: 1843200 Hz (Bus connector pin A17)
81 ; Baudrate Divider SIO CTC
82 ; ---------------------------------
101 CWAITROM equ 2 shl MWI0
106 DRSTNUM equ 30h ;DDTZ Restart vector (breakpoints)
115 s1.rx_len equ 256 ;Serial 1 (ASCI1) buffers
122 ;-----------------------------------------------------
123 ; Definition of (logical) top 2 memory pages
125 sysram_start equ 0FE00h
130 ivtab equ 0ffc0h ;int vector table
131 iv2tab equ ivtab + 2*9
135 ;-----------------------------------------------------
144 mkbuf macro name,size
145 if ((size & (size-1)) ne 0) or (size gt 256)
146 .printx Error: buffer ^size must be power of 2 and in range 0..256!
147 name&.mask equ ;wrong size error
151 name&.mask equ low (size-1)
159 ;-----------------------------------------------------
167 ??ps.len defl $ - ??ps.a