URL
https://opencores.org/ocsvn/openmsp430/openmsp430/trunk
Subversion Repositories openmsp430
[/] [openmsp430/] [trunk/] [core/] [sim/] [rtl_sim/] [src/] [c-jump_jl.s43] - Rev 58
Go to most recent revision | Compare with Previous | Blame | View Log
/*===========================================================================*//* Copyright (C) 2001 Authors *//* *//* This source file may be used and distributed without restriction provided *//* that this copyright statement is not removed from the file and that any *//* derivative work contains the original copyright notice and the associated *//* disclaimer. *//* *//* This source file is free software; you can redistribute it and/or modify *//* it under the terms of the GNU Lesser General Public License as published *//* by the Free Software Foundation; either version 2.1 of the License, or *//* (at your option) any later version. *//* *//* This source is distributed in the hope that it will be useful, but WITHOUT*//* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *//* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public *//* License for more details. *//* *//* You should have received a copy of the GNU Lesser General Public License *//* along with this source; if not, write to the Free Software Foundation, *//* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *//* *//*===========================================================================*//* CONDITIONAL JUMP: JL INSTRUCTION *//*---------------------------------------------------------------------------*//* Test the JL instruction. *//* *//* Author(s): *//* - Olivier Girard, olgirard@gmail.com *//* *//*---------------------------------------------------------------------------*//* $Rev: 19 $ *//* $LastChangedBy: olivier.girard $ *//* $LastChangedDate: 2009-08-04 23:47:15 +0200 (Tue, 04 Aug 2009) $ *//*===========================================================================*/.global mainmain:/* -------------- TEST JUMP FORWARD AND BACKWARD ------------------- */mov #0x0100, r2mov #0x1234, r4jl test_jl_fwrd1mov #0x0000, r4mov #0x0000, r4mov #0x0000, r4test_jl_bckwrd:mov #0x9abc, r6jl test_jl_fwrd2mov #0x0000, r4mov #0x0000, r4mov #0x0000, r4mov #0x0000, r5mov #0x0000, r5mov #0x0000, r5mov #0x0000, r6mov #0x0000, r6mov #0x0000, r6test_jl_fwrd1:mov #0x5678, r5jl test_jl_bckwrdmov #0x0000, r4mov #0x0000, r4mov #0x0000, r4mov #0x0000, r5mov #0x0000, r5mov #0x0000, r5test_jl_fwrd2:mov #0x1000, r15/* -------------- TEST JUMP FOR ALL FLAG CONFIGURATIONS ------------ */mov #0x0000, r2 ;# {V,N,Z,C} = 4'b0000mov #0x1234, r4jl test_jl_0mov #0x0000, r4test_jl_0:mov #0x2000, r15mov #0x0001, r2 ;# {V,N,Z,C} = 4'b0001mov #0x1234, r4jl test_jl_1mov #0x0000, r4test_jl_1:mov #0x2001, r15mov #0x0002, r2 ;# {V,N,Z,C} = 4'b0010mov #0x1234, r4jl test_jl_2mov #0x0000, r4test_jl_2:mov #0x2002, r15mov #0x0003, r2 ;# {V,N,Z,C} = 4'b0011mov #0x1234, r4jl test_jl_3mov #0x0000, r4test_jl_3:mov #0x2003, r15mov #0x0004, r2 ;# {V,N,Z,C} = 4'b0100mov #0x1234, r4jl test_jl_4mov #0x0000, r4test_jl_4:mov #0x2004, r15mov #0x0005, r2 ;# {V,N,Z,C} = 4'b0101mov #0x1234, r4jl test_jl_5mov #0x0000, r4test_jl_5:mov #0x2005, r15mov #0x0006, r2 ;# {V,N,Z,C} = 4'b0110mov #0x1234, r4jl test_jl_6mov #0x0000, r4test_jl_6:mov #0x2006, r15mov #0x0007, r2 ;# {V,N,Z,C} = 4'b0111mov #0x1234, r4jl test_jl_7mov #0x0000, r4test_jl_7:mov #0x2007, r15mov #0x0100, r2 ;# {V,N,Z,C} = 4'b1000mov #0x1234, r4jl test_jl_8mov #0x0000, r4test_jl_8:mov #0x2008, r15mov #0x0101, r2 ;# {V,N,Z,C} = 4'b1001mov #0x1234, r4jl test_jl_9mov #0x0000, r4test_jl_9:mov #0x2009, r15mov #0x0102, r2 ;# {V,N,Z,C} = 4'b1010mov #0x1234, r4jl test_jl_Amov #0x0000, r4test_jl_A:mov #0x200A, r15mov #0x0103, r2 ;# {V,N,Z,C} = 4'b1011mov #0x1234, r4jl test_jl_Bmov #0x0000, r4test_jl_B:mov #0x200B, r15mov #0x0104, r2 ;# {V,N,Z,C} = 4'b1100mov #0x1234, r4jl test_jl_Cmov #0x0000, r4test_jl_C:mov #0x200C, r15mov #0x0105, r2 ;# {V,N,Z,C} = 4'b1101mov #0x1234, r4jl test_jl_Dmov #0x0000, r4test_jl_D:mov #0x200D, r15mov #0x0106, r2 ;# {V,N,Z,C} = 4'b1110mov #0x1234, r4jl test_jl_Emov #0x0000, r4test_jl_E:mov #0x200E, r15mov #0x0107, r2 ;# {V,N,Z,C} = 4'b1111mov #0x1234, r4jl test_jl_Fmov #0x0000, r4test_jl_F:mov #0x200F, r15/* ---------------------- END OF TEST --------------- */mov #0x5000, r15end_of_test:nopbr #0xffff/* ---------------------- INTERRUPT VECTORS --------------- */.section .vectors, "a".word end_of_test ; Interrupt 0 (lowest priority) <unused>.word end_of_test ; Interrupt 1 <unused>.word end_of_test ; Interrupt 2 <unused>.word end_of_test ; Interrupt 3 <unused>.word end_of_test ; Interrupt 4 <unused>.word end_of_test ; Interrupt 5 <unused>.word end_of_test ; Interrupt 6 <unused>.word end_of_test ; Interrupt 7 <unused>.word end_of_test ; Interrupt 8 <unused>.word end_of_test ; Interrupt 9 <unused>.word end_of_test ; Interrupt 10 Watchdog timer.word end_of_test ; Interrupt 11 <unused>.word end_of_test ; Interrupt 12 <unused>.word end_of_test ; Interrupt 13 <unused>.word end_of_test ; Interrupt 14 NMI.word main ; Interrupt 15 (highest priority) RESET
Go to most recent revision | Compare with Previous | Blame | View Log
