blob: b03761c444ec71574cb6967ece9cb5011d764373 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
FOSC equ 18432 ;Oscillator frequency [KHz]
PHI equ FOSC/2 ;CPU frequency
;-----------------------------------------------------
; Programmable Reload Timer (PRT)
PRT_PRE equ 20 ;PRT prescaler
; Reload value for 10 ms Int. (0.1KHz):
; tc10ms = phi/prescale/0.1KHz = phi / (prescale/10)
PRT_TC10MS equ PHI / (PRT_PRE/10)
;-----------------------------------------------------
; MMU
SYS$CBAR equ 0C8h
USR$CBAR equ 0F0h
BANKS equ 18 ;max nr. of banks
;-----------------------------------------------------
CREFSH equ 0 ;Refresh rate register (disable refresh)
CWAITIO equ 3 shl IWI0 ;Max I/O Wait States, 0 Memory Wait States
ROMSYS equ 0
if ROMSYS
c$rom equ 0a5h
ROM_EN equ 0C0h
ROM_DIS equ ROMEN+1
CWAITROM equ 2 shl MWI0
endif
DRSTNUM equ 30h ;DDTZ Restart vector (breakpoints)
msg_fb_len equ 256
rx.buf_len equ 20h
tx.buf_len equ 80h
rx.buf_len equ 20h
tx.buf_len equ 80h
s1.rx_len equ 256 ;Serial 1 (ASCI1) buffers
s1.tx_len equ 256 ;
PMSG equ 80h
;-----------------------------------------------------
; Definition of (locical) top 2 memory pages
sysram_start equ 0FE00h
stacksize equ 80
isvsw_loc equ 0FEE0h
ivtab equ 0ffc0h ;int vector table
iv2tab equ ivtab + 2*9
;-----------------------------------------------------
o.mask equ -3
o.in_idx equ -2
o.out_idx equ -1
.lall
mkbuf macro name,size
if ((size & (size-1)) ne 0) or (size gt 256)
.printx Error: buffer ^size must be power of 2 and in range 0..256!
name&.mask equ ;wrong size error
else
ds 3
name:: ds size
name&.mask equ low (size-1)
if size ne 0
name&.end equ $-1
name&.len equ size
endif
endif
endm
;-----------------------------------------------------
inidat macro
cseg
??ps.a defl $
endm
inidate macro
??ps.len defl $ - ??ps.a
dseg
ds ??ps.len
endm
|