MU CPTR 308 - MIPS conventions for memory usage

Unformatted text preview:

LinkersBinary and Text FilesMemory UsageUsing SPIMMemory UsageMIPS conventions for memory usageNot hardware enforced.Programmer/Assembler/Linker/Loader conventionsDivide memory in 3 parts: text, data,&stack segmentsFigure: Memory Layout() Assembler, Linker, and SPIM October 13, 2008 8 / 17Using SPIM1Linkers2Binary and Text Files3Memory Usage4Using SPIM() Assembler, Linker, and SPIM October 13, 2008 9 / 17Using SPIMSPIMSimulates SPIMWhat it doesn’t simulateInstruction timingsActual memoryInstructions in memory may differ() Assembler, Linker, and SPIM October 13, 2008 10 / 17Using SPIMSPIM InterfaceFigure: SPIM Interface() Assembler, Linker, and SPIM October 13, 2008 11 / 17Using SPIMAssembly program skeletonFigure: Skeleton MIPS program() Assembler, Linker, and SPIM October 13, 2008 12 / 17Using SPIMAssembler SyntaxComments begin with #Labels: alphanumeric, , .; begin with an alphabetDirectives begin with a .Register addressing: $8, $16 or $t0, $s0() Assembler, Linker, and SPIM October 13, 2008 13 / 17Using SPIMAssembler SyntaxData declarations: .datasyntax: name: storage type value(s)types possible: .byte, .word, .space, .asciiznum: .word 5array1: .byte ‘a’, ‘b’() Assembler, Linker, and SPIM October 13, 2008 14 / 17Using SPIMSimple MIPS programFigure: Simple MIPS program() Assembler, Linker, and SPIM October 13, 2008 15 / 17Using SPIMSystem Callssyscall instruction for OS-like commandsLoad the proper code in $v0, call syscallFigure: syscall codes() Assembler, Linker, and SPIM October 13, 2008 16 / 17Using SPIMMIPS program us ing syscallFigure: MIPS program that uses syscall() Assembler, Linker, and SPIM October 13, 2008 17 /


View Full Document

MU CPTR 308 - MIPS conventions for memory usage

Download MIPS conventions for memory usage
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view MIPS conventions for memory usage and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view MIPS conventions for memory usage 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?