(ebook - english) anization and Design - The Hardware-Software Interface - Appendix A.pdf
A APPENDIX Assemblers, Linkers, and the SPIM Simulator James R. Larus Computer Sciences Department University of Wisconsin–Madison Fear of serious injury cannot alone justify suppression of free speech and assembly. Louis Brandeis Whitney v. California, 1927 Introduction A-3 Assemblers A-10 Linkers A-17 Loading A-19 Memory Usage A-20 Procedure Call Convention A-22 Exceptions and Interrupts A-32 Input and Output A-36 SPIM A-38 MIPS R2000 Assembly Language A-49 Concluding Remarks A-75 Key Terms A-76 Exercises A-76 Introduction Encoding instructions as binary numbers is natural and efficient put- ers. Humans, however, have a great deal of difficulty understanding and manipulating these numbers. People read and write symbols (words) much better than long sequences of digits. Chapter 3 showed that we need not choose between numbers and words puter instructions can be represented in many ways. Humans can write and read symbols, - puters can execute the equivalent binary numbers. This appendix describes the process by which a human-readable program is translated into a form that puter can execute, provides a few hints about writing assembly pro- grams, and explains how to run these programs on SPIM, a simulator that executes MIPS programs. Unix, Windows, and DOS versions of the SPIM sim- ulator are available through . Assembly language is the symbolic representation of puter’s binary en- coding—machine language. Assembly language is more readable than machine language because it uses symbols instead of bits. The symbols in assembly lan- guage monly occurring bit patterns, such as opcodes and register specifiers, so people can read and remember them. In addition, assembly lan- guage permits programmers to use labels to identify and name particular memory words that hold instructions or data. A-4 Appendix A Assemblers, Link
(ebook - english) anization and Design - The Hardware-Software Interface - Appendix A 来自淘豆网www.taodocs.com转载请标明出处.