叶梅芬:打造“生态+经济”共融共生发展模式
![]() ???? MC6800 ?????. | |
???? | ???, ???? |
---|---|
??? | 1949? |
?????(??: assembly language) ?? ???? ??(assembler language)[1]? ???? ??? ??? ?? ?? ????? ????.
??? ??? ?? ???? ???? ????, ??? ???? ???? ????? ?????? ?? ??? ??. ??? CPU?? ???? ?????? ??? ??? ?????, ????? ??? ??, ??? ??? ?? ??? ?? ???. ?? ?? ???? ????? ??? ??? ?????, ??? ?? ??? ?? ????? ?? ? ???, ?? ??? ?????? ???? ??.
??? ?? ?? ??? ?? ?? ???(mnemonic)? ???? ??? ? ??. ?? ???? ???? ?? ???? ??? ?? ?? ?? ??? ??.
??
[??]????
[??]????(assembler)? ?????? ??? ??? ???? ??? ??? ?? ??? ?? ?? ????? ???. ????? ?? ??? ?????, ??? ????? ?? ??? ????? ??? ? ?? ?? ???? ????? ??????. ?? ???? ??? ????? ???? ???? ???, ???? ???? ??? ???? ??. ??? ??(mnemonics)? opcode? ???? ??? ??? ?? ???? ?? ???? ?? ?????? ?? ??? ?????.[2] ??? ???? ?????? ??? ?? “?(逆)????”(disassembler)??. ?? ???? ?? ?????? ??? ??? ?? ???? ??? ?? ??? ???, ?? ??? ? ??? ? ??? ??? ??? ?? ??? ???? ???? ?????? ??.
??? ???? ?? ??? ????? ??? ?? ??? ???? ???? ???? ???? ??, ???? ?? ?? ?? ?? ?? ?? ????. ?? ??? ????? ?? ?? ??, ?? ??? ????/?? ?? ? ??, ?? ??? ??? ??? ?? ?? ??? ?? ??? ??? ????? ??.
MIPS, Sun Sparc, HP PA-RISC? ?? RISC ?? ????? ?? ??? ????? ?? ???? ??? ??? ??? ??????? ?????? ????? ??? ? ??. ? ????? 1950???? ?? ?? ???, ?? ??? ?? ????? ??? ?? ??? ?? ????. ??? ????? ?? ????? ?? ??? ???. ????? ???? ??? ???? ????? ??.
??? ?
[??]?????? ? ?? ??? ???, ?? ????? ??? ?? ??? ?? ??? ??? ????? ?? ???.
- 1??(one-pass) ????? ?? ??? ? ?? ???.
- ?? ??(multi-pass) ????? ?? ????? ?? ??? ?? ??? ??? ??? ??? ??? ?? ????? ???? ???? ??? ?????.
1?? ?????? ???? ?? ??? ????? ?? ????. 2? ??? ?????? ??? ?? ?? ????. ??? ??? ???? ???? ??? ?? ?? ?? ?? ????? ????. ?? ?? ????? ?? ????? ? ??? ??? ??? ??.[3]
?? ????
[??]? ??? ?? ????? ??? ?? ?? ???? ????:
- ???? ?? ??
- ?? ??? ????/?? ?? ? ??
- ??/???, ???(union), ???, ??? ??? ?? ??? ?? ???
- ??? ??? ??
- ???, ????, ???, ???, ??? ?? ?? ?? ????? ??[4]
?????
[??]???? ??? ???? CPU? ??? ??? ? ?? 0? 1? ???? ???? ????. ??? ? ???? ?? ??? ???? ?? ??? ??(mnemonic symbol)? ?? ??? ? ? ?? ???? ??? ??? ? ??? ? ?? ???? ????.
?? ??,
10110000 01100001
? x86 ?? CPU? ??? ????, ??? ?????? ???? ??? ??.
mov al, 061h
??? mov? ?? move? ??? ?????, al? CPU?? ?? ??? ???? ????? ????. ???, 061h? 16?? 61 (? ??? 97, ??? 01100001)??. ? ? ?? ?? 16?? 61? al????? ???? ???, 1? 0? ??? ????? ??? ???? ???? ?? ??. ?????? ??? ???? ????.
?? ?? ????
[??]??? NASM x86 ?????? ??? ?? ?? ??????.
adosseg
.model small
.stack 100h
.data
hello_message db 'Hello, World!',0dh,0ah,'$'
.code
main proc
mov ax, @data
mov ds, ax
mov ah, 9
mov dx, offset hello_message
int 21h
mov ax, 4C00h
int 21h
main endp
end main
?? ??
[??]??
[??]- ↑ Assembler language, IBM Knowledge center
- ↑ David Salomon (1993). Assemblers and Loaders
- ↑ Beck, Leland L. (1996). 〈2〉. 《System Software: An Introduction to Systems Programming》. Addison Wesley.
- ↑ Hyde, Randall. "Chapter 12 – Classes and Objects". The Art of Assembly Language, 2nd Edition. No Starch Press. ? 2010.