#
# 68k_test_2
#
# second test file for the 68k core testing program
#
# tests call/return/RTE group
#

# $Id: 68k_test_2,v 1.7 2000/04/22 22:52:33 nyef Exp $

#
# NOTE: Someone plays fast and loose with flags...
#

#
# BSR/JSR/JMP/RTS/RTE group
#

# test JMP (An)
start jmp (An), take 1
set mem 0x002000 = 0x4ed0
set reg a0 = 0x00004000
set pc 0x002000
set cycles 8
run
check pc 0x004000
check cycles 0
done

# test JSR (An)
start jsr (An), take 1
set mem 0x002000 = 0x4e90
set reg a0 = 0x00004000
set reg a7 = 0x00800000
set mem 0x7ffffe = 0x0000
set mem 0x7ffffc = 0x0000
set pc 0x002000
set cycles 16
run
check pc 0x004000
check reg a7 = 0x007ffffc
check mem 0x7ffffe = 0x2002
check mem 0x7ffffc = 0x0000
check cycles 0
done

# test RTS
start rts, take 1
set mem 0x002000 = 0x4e75
set reg a7 = 0x007ffffc
set mem 0x7ffffc = 0x0000
set mem 0x7ffffe = 0x4000
set pc 0x002000
set cycles 16
run
check pc 0x004000
check cycles 0 
done

# test RTE
# FIXME: test RTE behavior in user mode
start rte, take 1
set mem 0x002000 = 0x4e73
set reg a7 = 0x007ffffa
set mem 0x7ffffa = 0x201f
set mem 0x7ffffc = 0x0000
set mem 0x7ffffe = 0x4000
set flags 0x2000
set pc 0x002000
set cycles 20
run
check pc 0x004000
check flags 0x201f
check reg a7 = 0x00800000
check cycles 0
done

#
# $Log: 68k_test_2,v $
# Revision 1.7  2000/04/22 22:52:33  nyef
# removed conditional branch tests
#
# Revision 1.6  2000/03/04 22:44:52  nyef
# added tests for BHI and BLS instructions
#
# Revision 1.5  1999/12/18 23:45:19  nyef
# added tests for BCS and BCC
#
# Revision 1.4  1999/12/18 22:53:28  nyef
# fixed cycle count for JSR (An)
#
# Revision 1.3  1999/12/18 15:50:31  nyef
# added tests for BEQ and BPL
#
# Revision 1.2  1999/12/17 02:48:07  nyef
# added tests for the BMI instruction
#
# Revision 1.1  1999/12/16 04:54:15  nyef
# Initial revision
#
#
