39 lines
539 B
ArmAsm
39 lines
539 B
ArmAsm
|
.text
|
||
|
.global _start
|
||
|
.type _start, @function
|
||
|
|
||
|
_start:
|
||
|
# Initialize global pointer
|
||
|
.option push
|
||
|
.option norelax
|
||
|
la gp, __global_pointer$
|
||
|
.option pop
|
||
|
|
||
|
li sp, 0x80020000
|
||
|
|
||
|
# Clear the bss segment
|
||
|
la a0, __bss_start
|
||
|
la a1, __BSS_END__
|
||
|
|
||
|
clear_bss:
|
||
|
|
||
|
|
||
|
nop //!
|
||
|
|
||
|
call main
|
||
|
|
||
|
nop //!
|
||
|
|
||
|
# abort execution here
|
||
|
ebreak
|
||
|
|
||
|
.section .rodata
|
||
|
alfabet:
|
||
|
.string "abcdefghijklmnopqrstuwxyz"
|
||
|
slowo:
|
||
|
|
||
|
.section .data
|
||
|
wynik:
|
||
|
.string "mpabi"
|
||
|
.space 26 # rezerwuje 26 bajtów dla wyniku, zainicjowane na 0
|