文档介绍:School of Design, Engineering & Computing
BSc (Hons) Computing
BSc (Hons) Software Engineering Management
ARM: Assembly Language Programming
Peter Knaggs
and
Stephen Welsh
August 31, 2004
Contents
Contents i
List of Programs vii
Preface ix
1 Introduction 1
The Meaning of Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Binary Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
puter Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
The Binary Programming Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Using Octal or Hexadecimal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Instruction Code Mnemonics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
The Assembler Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Additional Features of Assemblers . . . . . . . . . . . . . . . . . . . . . . . 4
Choosing an Assembler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Disadvantages of Assembly Language . . . . . . . . . . . . . . . . . . . . . . . . . . 5
High-Level Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Advantages of High-Level Languages . . . . . . . . . . . . . . . . . . . . . . 6
Disadvantages of High-Level Languages . . . . . . . . . . . . . . . . . . . . 7
Which Level Should You Use? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Applications for Machine Language . . . . . . . . . . . . . . . . . . . . . . . 8
Applications for Assembly Language . . . . . . . . . . . . . . . . . . . . . . 8
Applications for High-Level Language . . . . . . . . . . . . . . . . . . . . . 8
Other Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Why Learn Assembler? . . . . . . . . . . . . . . .