Skip to main content
Ctrl+K

Fadhil Journal documentation

  • ARM arch
  • Backend
  • Bare Metal
  • Cryptography
  • Database
    • Dockerfile
    • Gallery
    • Math
    • Netfilter
    • Other
    • PHP
    • Rust
    • Server
    • Sysprog
  • ARM arch
  • Backend
  • Bare Metal
  • Cryptography
  • Database
  • Dockerfile
  • Gallery
  • Math
  • Netfilter
  • Other
  • PHP
  • Rust
  • Server
  • Sysprog

Section Navigation

  • ARM AArch32 ABI Convention
  • Branch exchange (BX)
  • ARM M0+ registers
  • ARM MRS instruction
  • Difference Between Thumb-1 (T16) and Normal ARM
  • ASM gnu-as direction collection
  • Calling a main function
  • Thumb, Thumb-2, ARM, AArch64 introduction
  • ARM arch
  • Branch exchange (BX)

Branch exchange (BX)#

consider this simple code

int main() {
        /* nop */
        return 10;
}

produces this:

../_images/8679d31db2d22a5b165c92d842214ff3d0ff3ba1b69436d093cf0b7a04125e545167bd788a2acd38cc6c210ad9477096c426cc04aa3fa264e3f6a3ef.png

It’s almost always returning from a function, like ret in some other ISAs like AArch64.

nice read:

  • BX instruction (ARM Developer Documentation)

  • B and BL instructions (ARM Instruction Reference)

previous

ARM AArch32 ABI Convention

next

ARM M0+ registers

Edit on GitHub

This Page

  • Show Source

© Copyright 2025, Fadhil Riyanto.

Created using Sphinx 7.3.7.

About me
Contact

Built with the PyData Sphinx Theme 0.16.1.