URL
https://opencores.org/ocsvn/zipcpu/zipcpu/trunk
Subversion Repositories zipcpu
Compare Revisions
- This comparison shows the changes necessary to convert path
/zipcpu
- from Rev 39 to Rev 40
- ↔ Reverse comparison
Rev 39 → Rev 40
/trunk/bench/asm/wdt.S
35,29 → 35,32
; R12 Peripheral base |
; R11 Address of our one memory variable |
; |
#include "sys.i" |
start: |
CLR R12 ; Get the address of our peripheral base |
LDIHI $c000h,R12 |
MOV $1+PC,R11 ; Get a memory address for a variable |
BRA $1 |
LDI 0xc0000000,R12 ; Get the address of our peripheral base |
MOV $1(PC),R11 ; Get a memory address for a variable |
BRA skip_test_variable |
test_variable: |
.DAT 0 |
skip_test_variable: |
LDI $-1,R0 ; Start the watchdog timer |
STO R0,$1(R12) |
STO R0,sys.bus.wdt(R12) |
LSR $1,R0 ; R0 now = 0x7fffffff |
STO R0,sys.bus.tma(R12) |
LSR $1,R0 ; R0 now = 0x3fffffff |
STO R0,sys.bus.tmb(R12) |
LSR $1,R0 |
STO R0,$4(R12) |
LSR $1,R0 |
STO R0,$5(R12) |
LSR $1,R0 |
STO R0,$6(R12) |
STO R0,sys.bus.tmc(R12) |
; |
CLR R0 |
loop: |
wdt_test_loop: |
ADD $1,R0 |
LOD (R11),R1 |
CMP R0,R1 |
STO.LT R0,(R11) |
TST R0 |
BLT $2 |
BRA $-7 |
TST -1,R0 |
BLT wdt_test_program_is_broken |
BRA wdt_test_loop |
|
wdt_test_program_is_broken: |
HALT |