1
Copyright 2005 by Oxford University Press, Inc. Computer Architecture Parhami2 Figure 7.1 Steps in transforming an assembly language program to an executable program residing in memory. 7.1 Machine and Assembly Languages
Copyright 2005 by Oxford University Press, Inc. Computer Architecture Parhami3 Figure 7.2 An assembly language program, its machine language version, and the symbol table created during the assembly process.
Copyright 2005 by Oxford University Press, Inc. Computer Architecture Parhami4.macro/.end_macro : start and the end of macroinstruction.text : beginning of a program segment.data : beginning of a data segment.byte,.word,.float,.double : define one or more entities of specified data type.align : force the next data’s address to be a multiple of 2**h.space : reserve space.ascii : define a string of ASCII characters.global : specify the global significance 7.2 Assembler Directives (Only for assembler)
Copyright 2005 by Oxford University Press, Inc. Computer Architecture Parhami5 Table 7.1 Pseudoinstructions accepted by the MiniMIPS assembler. 7.3 Pseudo-instructions
Copyright 2005 by Oxford University Press, Inc. Computer Architecture Parhami6
Copyright 2005 by Oxford University Press, Inc. Computer Architecture Parhami7 7.4 Macro-instructions To replace a sequence of instructions with parameters
Copyright 2005 by Oxford University Press, Inc. Computer Architecture Parhami8 Linker: Make sure all symbols across modules (program files) are accessible Loader: Copying executable file to memory & jump to start-up routine that calls the main routine 7.5 Linking and Loading
Copyright 2005 by Oxford University Press, Inc. Computer Architecture Parhami9 Figure 7.3 The graphical user interface of PCSpim. Menu selections are partially shown on the left. 7.6 Running assembler programs
Copyright 2005 by Oxford University Press, Inc. Computer Architecture Parhami10 Table 7.2 Input/output and control functions of syscall in PCSpim.