URL
https://opencores.org/ocsvn/t48/t48/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 194 |
Rev 289 |
;; *******************************************************************
|
;; *******************************************************************
|
;; $Id: test.asm,v 1.1 2005-10-31 10:05:13 arniml Exp $
|
;; $Id: test.asm,v 1.1 2005-10-31 10:05:13 arniml Exp $
|
;;
|
;;
|
;; Test interrupt on code in Program Memory Bank 1.
|
;; Test interrupt on code in Program Memory Bank 1.
|
;; => Bug report "Problem with INT and JMP"
|
;; => Bug report "Problem with INT and JMP"
|
;; *******************************************************************
|
;; *******************************************************************
|
|
|
INCLUDE "cpu.inc"
|
INCLUDE "cpu.inc"
|
INCLUDE "pass_fail.inc"
|
INCLUDE "pass_fail.inc"
|
|
|
test_byte: equ 020h
|
test_byte: equ 020h
|
|
|
ORG 0
|
ORG 0
|
|
|
;; Start of test
|
;; Start of test
|
jmp start
|
jmp start
|
|
|
;; interrupt hits djnz instruction with opcode 0EAh
|
;; interrupt hits djnz instruction with opcode 0EAh
|
;; bus conflict results on interrupt vector address 002h
|
;; bus conflict results on interrupt vector address 002h
|
;; -> retr instruction placed here, so test finds FAIL
|
;; -> retr instruction placed here, so test finds FAIL
|
retr
|
retr
|
|
|
ORG 3
|
ORG 3
|
;; interrupt executed
|
;; interrupt executed
|
mov r0, #test_byte
|
mov r0, #test_byte
|
mov a, #0ffh
|
mov a, #0ffh
|
mov @r0, a
|
mov @r0, a
|
retr
|
retr
|
|
|
start:
|
start:
|
;; enable interrupt
|
;; enable interrupt
|
en i
|
en i
|
|
|
;; clear test byte
|
;; clear test byte
|
mov r1, #test_byte
|
mov r1, #test_byte
|
clr a
|
clr a
|
mov @r1, a
|
mov @r1, a
|
|
|
call program_memory_bank_1
|
call program_memory_bank_1
|
sel mb0
|
sel mb0
|
|
|
;; check if interrupt was successful
|
;; check if interrupt was successful
|
mov a, @r1
|
mov a, @r1
|
jz fail
|
jz fail
|
|
|
|
|
pass: PASS
|
pass: PASS
|
|
|
fail: FAIL
|
fail: FAIL
|
|
|
|
|
|
|
ORG 0800H
|
ORG 0800H
|
program_memory_bank_1:
|
program_memory_bank_1:
|
;; spend some time and wait for interrupt
|
;; spend some time and wait for interrupt
|
mov r2, #020h
|
mov r2, #020h
|
djnz r2, $
|
djnz r2, $
|
|
|
ret
|
ret
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.