Created
May 18, 2023 11:46
-
-
Save karaketir16/158fefba3df9403669c40309828bc283 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.syntax unified | |
.thumb_func | |
.global main | |
main: | |
init: bl stdio_init_all | |
loop: | |
ldr r0, DELAY_TIME_MS // Set the delay period | |
bl sleep_ms // Delay for the specified time | |
ldr r0, =TEXT0 // Set the printf string | |
bl printf | |
b loop // Loop forever | |
/* | |
Use four-bytes to store the delay time so that we can load | |
into r0 a 32-bit value, rather than move in an 8-bit value | |
*/ | |
.align 4 | |
DELAY_TIME_MS: .word 500 | |
TEXT0: .asciz "Hello World\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment