URL
https://opencores.org/ocsvn/eco32/eco32/trunk
[/] [eco32/] [trunk/] [simtest/] [rom/] [rom05.s] - Diff between revs 9 and 25
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 9 |
Rev 25 |
;
|
;
|
; rom05.s -- Hello, world! (on terminal 1 instead of terminal 0)
|
; rom05.s -- Hello, world! (on terminal 1 instead of terminal 0)
|
;
|
;
|
|
|
; $8 I/O base address
|
; $8 I/O base address
|
; $9 temporary value
|
; $9 temporary value
|
; $10 character
|
; $10 character
|
; $11 pointer to string
|
; $11 pointer to string
|
; $31 return address
|
; $31 return address
|
|
|
.set tba,0xF0300010
|
.set tba,0xF0301000
|
|
|
add $8,$0,tba
|
add $8,$0,tba
|
add $11,$0,hello
|
add $11,$0,hello
|
loop:
|
loop:
|
ldbu $10,$11,0
|
ldbu $10,$11,0
|
stop:
|
stop:
|
beq $10,$0,stop
|
beq $10,$0,stop
|
jal out
|
jal out
|
add $11,$11,1
|
add $11,$11,1
|
j loop
|
j loop
|
|
|
out:
|
out:
|
ldw $9,$8,8
|
ldw $9,$8,8
|
and $9,$9,1
|
and $9,$9,1
|
beq $9,$0,out
|
beq $9,$0,out
|
stw $10,$8,12
|
stw $10,$8,12
|
jr $31
|
jr $31
|
|
|
hello:
|
hello:
|
.byte "Hello, world!", 0x0D, 0x0A, 0
|
.byte "Hello, world!", 0x0D, 0x0A, 0
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.