Introduction to RISC Assembly Language / Edition 1

Introduction to RISC Assembly Language / Edition 1

by John Waldron
     
 

ISBN-10: 0201398281

ISBN-13: 9780201398281

Pub. Date: 10/21/1998

Publisher: Addison-Wesley

As the best way to gain an understanding of how a computer processor works at the lower levels, assembly language programming is essential background for every computer science and electronic engineering student. It is, however, often considered an arcane and complex discipline, because many first encounter it through the daunting instructions and registers of the

Overview

As the best way to gain an understanding of how a computer processor works at the lower levels, assembly language programming is essential background for every computer science and electronic engineering student. It is, however, often considered an arcane and complex discipline, because many first encounter it through the daunting instructions and registers of the Intel 8086 family.

Programming in a simple RISC architecture is very different due to the elegant and compact instruction set. Students of this text who have never programmed before and who study it simultaneously with a course on a higher-level language report that it is easier and more logical to program in assembly!

Introduction to RISC Assembly Language Programming:

  • is based around the MIPS RISC processor, a simple, clean RISC processor whose architecture and assembly language is easy to learn and understand
  • speeds up the learning process by enabling the reader to start writing simple assembly language programs early, while assuming no prior knowledge of computer programming
  • links with an automatic program testing system, allowing a lecturer to set programming questions and mark the assignments automatically, or a reader to test a MIPS assembly language program against numerous test inputs
  • uses the SPIM simulator, a freely available virtual machine that allows users to write and simulate running MIPS R2000/R3000 assembly language programs on PC, Macintosh or UNIX platforms. with excellent source-level debugging tools
  • contains a large number of example programs and programming questions
  • is supported by related software freely available via the Web http://www.compapp.dcu.ie/~jwaldron

Product Details

ISBN-13:
9780201398281
Publisher:
Addison-Wesley
Publication date:
10/21/1998
Edition description:
New Edition
Pages:
200
Product dimensions:
6.20(w) x 9.20(h) x 0.44(d)

Table of Contents

Preface v
1 Introduction
1(8)
1.1 Basic computer organization
1(2)
1.2 Machine language
3(1)
1.3 Assembly language
3(1)
1.4 Why program in assembly language?
4(1)
1.5 Outline of chapters
5(2)
1.6 Summary
7(1)
Exercises
7(2)
2 Essential background information
9(8)
2.1 Introduction
9(1)
2.2 Decimal and binary numbers
9(1)
2.3 Hexadecimal numbers
10(2)
2.4 Binary addition
12(1)
2.5 Two's complement numbers
12(2)
2.6 Bits, bytes and nibbles
14(1)
2.7 Storing characters
14(2)
2.8 Summary
16(1)
Exercises
16(1)
3 MIPS computer organization
17(8)
3.1 Introduction
17(1)
3.2 The MIPS design
17(1)
3.3 Memory layout
18(1)
3.4 The MIPS registers
19(2)
3.5 The SPIM simulator
21(1)
3.6 I/O organization
21(2)
3.7 Summary
23(1)
Exercises
23(2)
4 An example MIPS program
25(24)
4.1 Introduction
25(1)
4.2 Source code format
25(4)
4.3 Description of hello.a
29(2)
4.4 Putting theory into practice
31(6)
4.5 Load and store instructions
37(1)
4.6 Arithmetic instructions
38(2)
4.7 Multiplication and division
40(2)
4.8 Programming example
42(6)
4.9 Summary
48(1)
Exercises
48(1)
5 Control flow structures
49(10)
5.1 Introduction
49(1)
5.2 Control structures
49(1)
5.3 Conditional branches
50(1)
5.4 Example programs using loops
51(7)
5.5 Summary
58(1)
Exercises
58(1)
6 Addressing modes
59(14)
6.1 Introduction
59(1)
6.2 MIPS instruction formats
59(1)
6.3 MIPS register addressing
60(2)
6.4 MIPS base addressing
62(1)
6.5 MIPS immediate addressing
63(1)
6.6 MIPS PC-relative addressing
64(1)
6.7 Example program using base addressing
64(5)
6.8 Example program using indexed addressing
69(3)
6.9 Base register addressing vs. indexed addressing
72(1)
6.10 Summary
72(1)
Exercises
72(1)
7 Logical, shift and rotate instructions
73(12)
7.1 Introduction
73(1)
7.2 Shift and rotate instructions
73(1)
7.3 Logical instructions
74(2)
7.4 An example program
76(6)
7.5 Summary
82(1)
Exercises
83(2)
8 Stacks and procedures
85(36)
8.1 Introduction
85(1)
8.2 The stack
85(6)
8.3 Procedure calls
91(1)
8.4 Passing parameters
92(1)
8.5 Temporary and saved registers
93(1)
8.6 Stack frames
93(7)
8.7 Assembly code from a real compiler
100(4)
8.8 Example recursive programs
104(15)
8.9 Summary
119(1)
Exercises
120(1)
Appendix A MIPS programming exams 121(24)
A.1 Introduction 121(1)
A.2 MIPSMARK software 122(2)
A.3 Exam questions using program loops 124(7)
A.4 Exam question using bit manipulation 131(1)
A.5 Exam questions using the stack 132(8)
A.6 Exam questions using functions 140(5)
Appendix B MIPS/SPIM instruction quick reference 145(6)
Appendix C MIPS/SPIM instruction reference 151(26)
Index 177

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >