Shared Program Code
C-6
Example C–2. Header File With I/O Register Declarations (init.h)
* File: init.h *
* Include file with I/O register declarations *
.mmregs
; Include reserved words
.bss
dmem,10
; Undefined variables space
.def
ini_d, start,codtx
; Directive for symbol address
; generation in the current module
; –optional
ini_d:
.usect ”new”,10
; Example of undefined variable space
; with the segment’s name as ”new”
.data
; Example of including dummy constants
; –optional
.word
055aah
.word
0aa55h
* On–chip register equates
* CLKOUT
clk1
.set
0ffe8h
* INTERRUPT CONTROL
icr
.set
0ffech
* SYNC PORT
sdtr
.set
0fff0h
sspcr
.set
0fff1h
* UART
adtr
.set
0fff4h
aspcr
.set
0fff5h
iosr
.set
0fff6h
brd
.set
0fff7h
* TIMER
tcr
.set
0fff8h
prd
.set
0fff9h
tim
.set
0fffah
* WAIT STATES
wsgr
.set
0fffch
* Variables
rxbuf
.set
0300h
size
.set
00020h
del
.set
0010h