© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
S. SmithRISC-V Assembly Language ProgrammingMaker Innovations Serieshttps://doi.org/10.1007/979-8-8688-0137-2_6

6. Functions and the Stack

Stephen Smith1  
(1)
Gibsons, BC, Canada
 

In this chapter, how to organize code into small independent units called functions is explained. This allows the building of reusable components that can easily be used from anywhere by setting up parameters and calling them.

Typically, in software development, low-level components are a starting point. Next, they are built on to create higher- and higher-level modules. So far, in this book, how to loop, perform conditional logic, and perform some arithmetic were presented. Now, how ...

Get RISC-V Assembly Language Programming: Unlock the Power of the RISC-V Instruction Set now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.