Stack Management & Subroutine Architecture

Strict adherence to AAPCS calling conventions. This subroutine securely manages the stack frame, pushing r0-r7 and the Link Register (lr) to preserve the processor state before executing the Bubble Sort algorithm, and popping the Program Counter (pc) to safely return execution to the main script.

Bitwise Arithmetic Optimization

To optimize execution speed, standard multiplication and division instructions were bypassed. This Trapezoidal Rule calculator utilizes Logical Shift Left (LSL) to multiply interval sums, and Logical Shift Right (LSR) to divide the final integral sum by two, minimizing clock cycles.

Direct GPIO Hardware Interfacing

Bypassing high-level libraries, this hardware driver utilizes Thumb-2 assembly to directly manipulate GPIO pins. By translating serial keystrokes into hex pattern addresses, the microcontroller directly toggles logic lines to enable 74LS138 decoders and illuminate specific coordinate patterns on an external 8×8 LED matrix.