EasyManua.ls Logo

ST ST7 - Page 175

ST ST7
317 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
175/317
6 - STMicroelectronics Programming Tools
DC.W 0
DC.W 0
DC.W 0
DC.W 0 ; skip 7 vectors
DC.W 0
DC.W 0
DC.W 0
DC.W 0
DC.W 0
DC.W 0
DC.W reset ; reset vector ($FFFE)
END
The main program calls the following subroutine that has been written in a separate file on pur-
pose, though it would be easier to write it in the main source file:
ST7/
;=============================================================
;= timer 0.5 second =
;=============================================================
; This subroutine generates a 500ms timing by looping.
PUBLIC Delay500
#include "Register.inc"
; definition of the constants
; ===========================
BYTES ; The following constants are defined as 1 byte values
watch EQU $FF
DELAY1 EQU 10
DELAY2 EQU 100
DELAY3 EQU 140
; definition of the variables (in page 0)
; ==================================
segment 'ram0'
Time: ds.b 3 ; reserve memory space in RAM for
; a page zero variable named Time,
; that is 3 byte long.
segment 'rom'
WORDS
; Timing routine for 500ms
; =====================================

Table of Contents

Related product manuals