正在加载图片...
符号语言 The early programmers realized that it would be a tremendous help to use mnemonic symbols for the instruction codes and memory locations,so they developed assembly language for this purpose. ORIG x3000 Address (in hexadecimal)of the first instruction LD R1,FIRST Copy the number in memory location FIRST to register R1 LD R2, SECOND Copy the number in memory location SECOND to register R2 ADD R3,R2,R1 Add the numbers in R1 and R2 and place the sum in register R3 ST R3,SUM Copy the number in R3 to memory location SUM HALT ;Halt the program FIRST FILL #5 Location FIRST contains decimal 5 SECOND.FILL #6;Location SECOND contains decimal 6 SUM BLKW #1 Location SUM (contains 0 by default) .END ;End of program符号语言 • The early programmers realized that it would be a tremendous help to use mnemonic symbols for the instruction codes and memory locations, so they developed assembly language for this purpose
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有