218/317
7 - Debugger and PROM Programmer Tutorial for ST72251
ld X, {Ad4}
; MSB address Task
push X
; Written at top of stack
ld A, S
ld ImStack3, A
; Remember position of stack pointer
ld A, #org2
; Top of stack for task 2
ld S, A
ld X, {Ad3}
; LSB address Task
push X
ld X, {Ad2}
; MSB address Task
push X
; Written at top of stack
ld A, S
ld ImStack2, A
; Remember position of stack pointer
ld A, #org1
; Top of stack for task 1
ld S, A
ld X, {Ad1}
; LSB address Task
push X
ld X, AddrTasks
; MSB address Task
push X
; Written at top of stack
ld A, S
ld ImStack1, A
; Remember position of stack pointer
clr Permut
; Set task counter to first
ret
; Jump to first task
; Yield
; =====
Yield:
ld A, #watch
; Loading the watchdog
ld wdgr, A
ld X, Permut
; To select the element where to save
ld A, S
; The stack pointer of the current task
ld (ImStack1,X), A
ld A, X
inc A
; Increment number of task
and A, #3
; If last, go to first
ld Permut, A
ld X, A
ld A, (ImStack1,X)
; Get next stack pointer
ld S, A
ret
END
Содержание ST7 Series
Страница 1: ...ST7 8 BIT MCU FAMILY USER GUIDE JANUARY 1999 1 ...
Страница 238: ...238 317 8 C Language and the C Compiler 08 Burn bmp Then use the EPROMer programmer software as described in Chapter 7 ...
Страница 289: ...289 317 10 Second Application a Sailing Computer 10 befor Bs Rw Vw VMG AlphaR AlphaV Before the wind ...