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

Subversion Repositories zipcpu

[/] [zipcpu/] [trunk/] [sw/] [zasm/] [test.S] - Diff between revs 13 and 16

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

Rev 13 Rev 16
Line 32... Line 32...
;               http://www.gnu.org/licenses/gpl.html
;               http://www.gnu.org/licenses/gpl.html
;
;
;
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;
 
#include "sys.i"
        sys.bus         equ     0xc0000000
        sys.bus         equ     0xc0000000
        sys.breaken     equ     0x080
        sys.breaken     equ     0x080
        sys.step        equ     0x040
        sys.step        equ     0x040
        sys.gie         equ     0x020
        sys.gie         equ     0x020
        sys.sleep       equ     0x010
        sys.sleep       equ     0x010
Line 379... Line 380...
 
 
        busy
        busy
 
 
// And, in case we miss a halt ...
// And, in case we miss a halt ...
        halt
        halt
 
 
 
// Now, let's test whether or not we can handle a subroutine
 
reverse_bit_order:
 
        PUSH(R1,SP)
 
        PUSH(R2,SP)
 
        LDI     32,R1
 
        CLR     R2
 
        LSL     1,R2
 
        LSR     1,R0
 
        OR.C    1,R2
 
        SUB     1,R1
 
        BNZ     reverse_bit_order_loop
 
        MOV     R2,R0
 
        POP(R2,SP)
 
        POP(R1,SP)
 
        RET
 
        fill    512,0
 
stack:
 
        word    0

powered by: WebSVN 2.1.0

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