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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [stdalone/] [hello/] [hello.s] - Diff between revs 18 and 94

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

Rev 18 Rev 94
Line 1... Line 1...
;
;
; hello.s -- Hello, world!
; hello.s -- Hello, world!
;
;
 
 
        .set    tba,0xF0300000          ; terminal base address
        .set    tba,0xF0300000          ; terminal base address
        .set    tos,0xC0010000          ; top of stack
        .set    tos,0xC0020000          ; top of stack
 
 
        ; get some addresses listed in the load map
        ; get some addresses listed in the load map
        .export reset
 
        .export start
        .export start
 
        .export main
        .export out
        .export out
        .export hello
        .export hello
 
 
        ; minimal execution environment
        ; minimal execution environment
reset:
start:
        add     $29,$0,tos               ; setup stack
        add     $29,$0,tos               ; setup stack
        jal     start                   ; do useful work
        jal     main                    ; do useful work
reset1:
start1:
        j       reset1                  ; halt by looping
        j       start1                  ; halt by looping
 
 
        ; main program
        ; main program
start:
main:
        sub     $29,$29,8               ; create stack frame
        sub     $29,$29,8               ; create stack frame
        stw     $31,$29,0                ; save return register
        stw     $31,$29,0                ; save return register
        stw     $16,$29,4               ; save register variable
        stw     $16,$29,4               ; save register variable
        add     $16,$0,hello             ; pointer to string
        add     $16,$0,hello             ; pointer to string
loop:
loop:

powered by: WebSVN 2.1.0

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