mirror of
https://github.com/Polprzewodnikowy/SummerCart64.git
synced 2024-11-26 23:54:15 +01:00
52 lines
738 B
ArmAsm
52 lines
738 B
ArmAsm
.section .text
|
|
.global start
|
|
.global main
|
|
|
|
start:
|
|
/* print "START\n" */
|
|
lui a0,0x10000000>>12
|
|
addi a1,zero,'S'
|
|
addi a2,zero,'T'
|
|
addi a3,zero,'A'
|
|
addi a4,zero,'R'
|
|
addi a5,zero,'\n'
|
|
sw a1,0(a0)
|
|
sw a2,0(a0)
|
|
sw a3,0(a0)
|
|
sw a4,0(a0)
|
|
sw a2,0(a0)
|
|
sw a5,0(a0)
|
|
|
|
/* execute some insns for "make timing" */
|
|
lui a0,0
|
|
auipc a0,0
|
|
slli a0,a0,0
|
|
slli a0,a0,31
|
|
addi a1,zero,0
|
|
sll a0,a0,a1
|
|
addi a1,zero,31
|
|
sll a0,a0,a1
|
|
|
|
/* set stack pointer */
|
|
lui sp,(64*1024)>>12
|
|
|
|
/* jump to main C code */
|
|
jal ra,main
|
|
|
|
/* print "DONE\n" */
|
|
lui a0,0x10000000>>12
|
|
addi a1,zero,'D'
|
|
addi a2,zero,'O'
|
|
addi a3,zero,'N'
|
|
addi a4,zero,'E'
|
|
addi a5,zero,'\n'
|
|
sw a1,0(a0)
|
|
sw a2,0(a0)
|
|
sw a3,0(a0)
|
|
sw a4,0(a0)
|
|
sw a5,0(a0)
|
|
|
|
/* trap */
|
|
ebreak
|
|
|