URL
https://opencores.org/ocsvn/t48/t48/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 12 |
Rev 34 |
Line 1... |
Line 1... |
;; *******************************************************************
|
;; *******************************************************************
|
;; $Id: test.asm,v 1.1.1.1 2004-03-25 22:29:17 arniml Exp $
|
;; $Id: test.asm,v 1.2 2004-03-29 20:09:47 arniml Exp $
|
;;
|
;;
|
;; Test CALL addr with simple program.
|
;; Test CALL addr with simple program.
|
;; *******************************************************************
|
;; *******************************************************************
|
|
|
INCLUDE "cpu.inc"
|
INCLUDE "cpu.inc"
|
Line 18... |
Line 18... |
jmp fail
|
jmp fail
|
|
|
ORG 039FH
|
ORG 039FH
|
|
|
goon1: mov a, psw
|
goon1: mov a, psw
|
|
anl a, #~040H ; mask AC, tested separately with DA
|
add a, #~009H + 1
|
add a, #~009H + 1
|
jnz fail
|
jnz fail
|
|
|
call2: call goon2
|
call2: call goon2
|
|
|
jmp fail
|
jmp fail
|
|
|
goon2: clr c
|
goon2: clr c
|
mov a, psw
|
mov a, psw
|
|
anl a, #~040H ; mask AC, tested separately with DA
|
add a, #~00AH + 1
|
add a, #~00AH + 1
|
jnz fail
|
jnz fail
|
|
|
;; check stack contents
|
;; check stack contents
|
mov r0, #008H
|
mov r0, #008H
|
Line 38... |
Line 40... |
add a, #(~(call1+2 & 0FFH) + 1) & 0FFH
|
add a, #(~(call1+2 & 0FFH) + 1) & 0FFH
|
jnz fail
|
jnz fail
|
|
|
inc r0
|
inc r0
|
mov a, @r0
|
mov a, @r0
|
|
anl a, #~040H ; mask AC, tested separately with DA
|
add a, #(~((call1+2) >> 8) + 1) & 0FFH
|
add a, #(~((call1+2) >> 8) + 1) & 0FFH
|
jnz fail
|
jnz fail
|
|
|
inc r0
|
inc r0
|
mov a, @r0
|
mov a, @r0
|
add a, #(~(call2+2 & 0FFH) + 1) & 0FFH
|
add a, #(~(call2+2 & 0FFH) + 1) & 0FFH
|
jnz fail
|
jnz fail
|
|
|
inc r0
|
inc r0
|
mov a, @r0
|
mov a, @r0
|
|
anl a, #~040H ; mask AC, tested separately with DA
|
add a, #(~((call2+2) >> 8 | 080H) + 1) & 0FFH
|
add a, #(~((call2+2) >> 8 | 080H) + 1) & 0FFH
|
jnz fail
|
jnz fail
|
|
|
pass: PASS
|
pass: PASS
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.