-
Notifications
You must be signed in to change notification settings - Fork 2
/
book.html
172 lines (150 loc) · 8.3 KB
/
book.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<!doctype html>
<html lang="en">
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-K44SMSMGJJ"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-K44SMSMGJJ');
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="bootstrap-4.0.0/favicon.ico">
<title>RISC-V Assembly Programming: About the Book</title>
<!-- Bootstrap core CSS -->
<link href="bootstrap-4.0.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="jumbotron.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link" href="./index.html">Home</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="./book.html">Book</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./exercise-book.html">Exercises</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./simulator.html">Simulator</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./contact.html">Contact</a>
</li>
<!--
<li class="nav-item">
<a class="nav-link" href="./other-resources.html">Other Resources</a>
</li>
-->
<!-- REMOVE
<li class="nav-item">
<a class="nav-link disabled" href="#">Disabled</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="http://example.com" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>
<div class="dropdown-menu" aria-labelledby="dropdown01">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li>
-->
</ul>
<!-- REMOVE
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
-->
</div>
</nav>
<main role="main">
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron" >
<div class="container">
<table>
<tbody>
<tr>
<td style="vertical-align:middle; width:200px">
<a target="_blank" href="book/riscv-book.html"><img width="200px" src="images/book-cover-icon.jpg"/></a>
</td>
<td style="vertical-align:middle; padding-left: 50pt;">
<h1 class="display-5">An Introduction to Assembly Programming with RISC-V</h1>
<br/>
<a href="https://a.co/d/gUfKWsD" target="_blank"><img src="images/available-at-amazon.png" width="130" height="55"/></a>
<a href="https://riscv-programming.org/book/riscv-book.html" target="_blank"><img src="images/online-version.png" width="130" height="55"/></a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="container">
<!-- Example row of columns -->
<div class="row">
<!-- Section -->
<div class="col-md-12">
<h2>Overview</h2>
<p><a href="book/riscv-book.html" target="_blank">An Introduction to Assembly Programming with RISC-V</a> is a textbook for programmers that want to learn how to program in assembly language.
It leverages the RISC-V ISA to guide the reader through the main concepts of assembly programming and the assembly process.
</p>
<p>
The book is divided into three parts: I) Fundamental concepts, II) User-level programming, and III) System-level programming.
</p>
<p>
The first part, "fundamental concepts", starts by providing a brief overview of how computers are organized and how programs are executed by computers. Then, it discusses how data is represented on modern computers, including how numbers and text are represented, how data is organized on the main memory, and how computer instructions are encoded.
Next, it discusses how native programs are generated, the assembly process, and the main elements of object (binary) files, including symbols, labels, and references. Finally, it introduces the main elements of the assembly language and some of the most common assembly directives. It is worth noting that most of the concepts introduced in this part are orthogonal to the RISC-V ISA, <i>i.e.</i>, they do not change when programming in assembly language for other ISAs.
</p>
<p>
The second part, user-level programming, focuses on the implementation of user software, <i>i.e.</i>, software that performs operations with data that is located on CPU registers and the main memory.
It starts by presenting the basic elements of the RISC-V ISA, including the data types, registers, and instructions.
Then, it shows how to use RISC-V instructions to implement basic control-flow sentences, such as conditionals and loops.
Finally, it introduces the program stack, shows how to implement routines, and discusses the elements of the ABI and how it facilitates software composition.
All examples in this part of the book rely on system calls to perform I/O operations.
</p>
<p>
The third part focus on system-level programming, including interacting with peripherals and securing the system against faulty or malicious user programs.
It starts by presenting how to write code to directly interact with input and output hardware devices and the concept of busy waiting.
Then, it motivates the need for hardware interrupts and shows how to program them on RISC-V ISAs.
Finally, it discusses privilege levels and how software interrupts and exceptions may be used to protect RISC-V systems from faulty or malicious user programs.
</p>
</div>
<!-- Section -->
<div class="col-md-12">
<h2>Main difference from other RISC-V books</h2>
<p>While other RISC-V books focus on the ISA design decisions and details, this book focuses on teaching assembly programming.
</p>
</div>
<!-- Section -->
<div class="col-md-12">
<h2>Target audience</h2>
<p>This book is intended for people that have basic knowledge of computer programming using high-level languages and want to learn assembly programming.
<!-- Computer Science and Computer Engineering Undergraduate students may benefit from... -->
</div>
</div>
<hr>
</div> <!-- /container -->
</main>
<!--
<footer class="container">
<p>© 2021</p>
</footer>
-->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="bootstrap-4.0.0/assets/js/vendor/jquery-slim.min.js"><\/script>')</script>
<script src="bootstrap-4.0.0/assets/js/vendor/popper.min.js"></script>
<script src="bootstrap-4.0.0/dist/js/bootstrap.min.js"></script>
</body>
</html>