Transcription of Machine Code -and- How the Assembler Works
{{id}} {{{paragraph}}}
Machine code -and- How the Assembler WorksMar 8 13, 20131 / 32 OutlineWhat is Machine code ?RISC vs. CISCMIPS instruction formatsAssembling basic instructionsR-type instructionsI-type instructionsJ-type instructionsMacro instructions2 / 32 Assembly language vs. Machine codeAssemblertranslates assembly code to Machine codeloop: lw $t3, 0($t0) lw $t4, 4($t0) add $t2, $t3, $t4 sw $t2, 8($t0) addi $t0, $t0, 4 addi $t1, $t1, -1 bgtz $t1, loop0x8d0b00000x8d0c00040x016c50200xad0a 00080x210800040x2129ffff0x1d20fff9 AssemblerAssembly program (text file)source codeMachine code (binary)object code3 / 32 What is Machine code ? Machine code is theinterfacebetween software and hardwareThe processor is hardwired to implement Machine code the bits of a Machine instruction aredirect inputsto thecomponents of the processorThis is only true for RISC architectures!4 / 32 Decoding an instruction (RISC)5 / 32 What about CISC?
RISC vs. CISC MIPS instruction formats Assembling basic instructions R-type instructions I-type instructions J-type instructions Macro instructions 29/32. Basic instructions vs. macro instructions Basic assembly instruction has a corresponding machine code instruction can find the name in the op/funct table
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}