Machine language vs. assembly language
Realmachine language level programming means to handle the bit ncodings of machine instructions
Example(MIPS CPU: addition$t0←$t0+$t1):
1000010010100000000100000
Assembly languageintroduces symbolic names (mnemonics) for machine instructions and makes programming less error-prone:
Example(MIPS CPU: addition$t0←$t0+$t1):
Realmachine language level programming means to handle the bit ncodings of machine instructions
Example(MIPS CPU: addition$t0←$t0+$t1):
1000010010100000000100000
Assembly languageintroduces symbolic names (mnemonics) for machine instructions and makes programming less error-prone:
Example(MIPS CPU: addition$t0←$t0+$t1):
add $t0, $t0, $t1
Anassemblertranslates mnemonics into machine instructions
–Normally: mnemonic
1:1
←→machine instruction
–Also: the assembler supportspseudo instructionswhich are translated
into series of machine instructions (mnemonic
1:n
←→machine instruction)
本文介绍了机器语言和汇编语言的区别。机器语言直接处理比特级的指令编码,而汇编语言通过为机器指令引入助记符来降低编程错误的风险。以MIPS CPU为例,展示了相同操作在两种语言中的不同表示形式。
180

被折叠的 条评论
为什么被折叠?



