OpenCores
URL https://opencores.org/ocsvn/zipcpu/zipcpu/trunk

Subversion Repositories zipcpu

[/] [zipcpu/] [trunk/] [sw/] [zasm/] [test.S] - Diff between revs 69 and 103

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 69 Rev 103
Line 74... Line 74...
        sys.bus.utask   equ     0x00c
        sys.bus.utask   equ     0x00c
        sys.bus.upstl   equ     0x00d
        sys.bus.upstl   equ     0x00d
        sys.bus.uastl   equ     0x00e
        sys.bus.uastl   equ     0x00e
        sys.bus.ustl    equ     0x00f
        sys.bus.ustl    equ     0x00f
#define DO_TEST_ASSEMBLER
#define DO_TEST_ASSEMBLER
 
#define LJMP_TEST
#define BREAK_TEST
#define BREAK_TEST
#define OVERFLOW_TEST
#define OVERFLOW_TEST
#define CARRY_TEST
#define CARRY_TEST
#define LOOP_TEST
#define LOOP_TEST
#define SHIFT_TEST
#define SHIFT_TEST
Line 237... Line 238...
 
 
#ifdef  NOONE // Testing comments after ifdef
#ifdef  NOONE // Testing comments after ifdef
#else   ; After else
#else   ; After else
#endif /* and after endif */
#endif /* and after endif */
 
 
 
#ifdef  LJMP_TEST
 
        CLR     R0
 
        CLR     R1
 
        LJMP
 
        .dat    __here__+0x0100000+4
 
        ADD     1,R0
 
        ADD     1,R0
 
        ADD     1,R0
 
        ADD     1,R0
 
        ADD     1,R0
 
        ADD     1,R0
 
        CMP     3,R0
 
        BNZ     test_failure
 
        LOD.Z   __here__+2(PC),PC
 
        BRA     test_failure
 
        .dat    __here__+0x0100000+2
 
        ADD     1,R0
 
        ADD     1,R0
 
        ADD     1,R0
 
        CMP     5,R0
 
        BNZ     test_failure
 
// And our last early branching test
 
        LDI     0x0100000+__here__+4,PC
 
        ADD     1,R0
 
        ADD     1,R0
 
        ADD     1,R0
 
        SUB     1,R0
 
        CMP     4,R0
 
        BNZ     test_failure
 
#endif
 
 
#ifdef  BREAK_TEST
#ifdef  BREAK_TEST
breaktest:
breaktest:
        bra     breaksupervisor
        bra     breaksupervisor
breakuser:
breakuser:
        clr     r0
        clr     r0
Line 462... Line 494...
        bnz     test_failure
        bnz     test_failure
        ldi     -1,r0   ; Second test: anything greater than zero should set
        ldi     -1,r0   ; Second test: anything greater than zero should set
        lsr     0,r0    ; the carry flag
        lsr     0,r0    ; the carry flag
        bc      test_failure
        bc      test_failure
        lsr     1,r0
        lsr     1,r0
        tst     sys.ccc,cc      ; FAILS HERE!!!  @0x010007c
        tst     sys.ccc,cc
        bz      test_failure
        bz      test_failure
        lsr     31,r0
        lsr     31,r0
        tst     sys.ccc,cc
        tst     sys.ccc,cc
        bz      test_failure
        bz      test_failure
        lsr     1,r0
        lsr     1,r0
Line 628... Line 660...
        WORD    0
        WORD    0
end_bcmemtest:
end_bcmemtest:
#endif
#endif
// Return success / Test the trap interrupt
// Return success / Test the trap interrupt
        clr     r11
        clr     r11
        trap    r11
        trap    r11     // FAILS HERE FAILS FAILS FAILS !!!!!!!!!!!
        noop
        noop
        noop
        noop
 
 
        busy
        busy
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.