An Introduction to Assembly Programming with RISC-V

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

This book focuses on teaching the art of programming in assembly language, using the RISC-V ISA as the guiding example. Towards this goal, the text spans, at an introductory level, the organization of computing systems, describes the mechanics of how programs are created and introduces basic programming concepts including both user level and system programming. The ability to read and write code in low-level assembly language is a powerful skill to be able to create high performance programs, and to access features of the machine that are not easily accessible from high-level languages such as C, Java or Python, for example to control peripheral devices. The book introduces the organization of computing systems, and the mechanics of creating programs and converting them to machine-readable format suitable for execution. It also teaches the components of a program, or how a programmer communicates her intent to the system via directives, data allocation primitives and finally the ISA instructions, and their use. Basic programming concepts of control flow, loops as well as the runtime stack are introduced. Next the book describes the organization of code sequences into routines and subroutines, to compose a program. The text also addresses issues related to system programming, including notions of peripheral control and interrupts. This text, and ancillary teaching materials, has been used in introductory classes at the University of Campinas, Brazil (UNICAMP) and has undergone refinement and improvement for several editions.

Author(s): Edson Borin
Edition: 1
Year: 2021

Language: English
Pages: 151

Cover
Foreword
Contents
Glossary
Acronyms
Part I - Introduction to Computer Systems and Assembly Language
1 - Execution of Programs: 10,000 ft Overview
2 - Data Representation on Modern Computers
3 - Assembly, Object and Executable Files
4 - Assembly Language
Part II - User-Level Programming
5 - Introduction
6 - The RV32I ISA
7 - Controlling the Execution Flow
8 - Implementing Routines
Part III - System-Level Programming
9 - Accesing Peripherals
10 - External Interrupts
11 - Software Interrupts and Exceptions
Bibliography
Appendix A - RV32IM ISA Reference Card