The Assembly You Need

Although this course is not about learning assembly language, you still need to write some assembly in bare metal programming.

Here, we provide pieces of assembly code you possibly need. After copy and paste, you still need to look up the manual to understand how this codes work.

Lab 0

// enter busy loop
_start:
  wfe
  b _start

Lab 1

// set stack pointer and branch to main function.
2:
      ldr x0, = _stack_top
      mov sp, x0
      bl main
1:
      b 1b