177/317
6 - STMicroelectronics Programming Tools
;*
declarations are in the include file REG72251.INC that
;*
must be included in the source files that use them.
;*************************************************************
BYTES
; the following addresses are 8-bit long
;*************************************************************
segment byte at 0-71 'periph'
;*************************************************************
;*************************************************************
;
I/O Ports registers
;*************************************************************
.pcdr
DS.B 1
; port C data register
.pcddr
DS.B 1
; port C data direction register
.pcor
DS.B 1
; port C option register
DS.B 1
; empty byte
.pbdr
DS.B 1
; port B data register
.pbddr
DS.B 1
; port B data direction register
.pbor
DS.B 1
; port B option register
DS.B 1
; empty byte
(to be continued)
When you get to the point of inserting
EXTERN
declarations in the source files, you have two
choices:
You may add only the external declarations you need;
You may include the
REGISTER.INC
file, and get the whole set of external declarations at once,
since adding useless externals does no harm. This method is obviously quicker and easier.
Here is an excerpt from the
REGISTER.INC
file:
;
;*************************************************************
;*
ST72251 registers
;*
This file contains the EXTERN declarations for all
;*
the peripheral registers and the EQUates for the bit
;*
positions within the registers. It must be included
;*
in source files that use the peripherals.
;*************************************************************
BYTES
; the following addresses are 8-bit long
;*************************************************************
;
I/O Ports registers
;*************************************************************