Professional Documents
Culture Documents
Uebung 04
Uebung 04
Aufgabe 1:
Apply the GNU assembler on the Nvidia Jetson system (10.154.35.132 respectively
iwi-lkit-jetsonagx-01.hs-karlsruhe.de) to the code below to create a simple image of x-mas tree in
“ASCII graphics” to be displayed on the console.
.extern printf // .extern indicates that this label won't be found in the
// current source file and that is must be declared as a
// 'global' elsewhere
main:
stp x29, x30, [sp, #-0x10]! // allocate 16 bytes on the stack and then
// store frame pointer and link register
ldr x0, =string1 // initialize argument for printf
// (start of string1)
bl printf // call printf
ldp x29, x30, [sp], #0x10 // restore frame pointer and link register
// from stack and increment stack pointer
ret // return to caller: unconditional branch to
// link register