




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、Chapter 7Low-Level ProgrammingLanguagesChapter GoalsList the operations that a computer can performDiscuss the relationship between levels of abstraction and the determination of concrete algorithm stepsDescribe the important features of the Pep/7 virtual machineDistinguish between immediate mode ad
2、dressing and direct addressingChapter Goals Convert a simple algorithm into a machine-language programDistinguish between machine language and assembly languageDescribe the steps in creating and running an assembly-language programConvert a simple algorithm into an assembly-language programChapter G
3、oals Distinguish between instructions to the assembler and instructions to be translated Describe two approaches to testingDesign and implement a test plan for a simple assembly-language program Computer Operations A computer is a programmable electronic device that can store, retrieve, and process
4、dataData and instructions to manipulate the data are logically the same and can be stored in the same placeStore, retrieve, and process are actions that the computer can perform on data Machine Language Machine language The instructions built into the hardware of a particular computer Initially, hum
5、ans had no choice but to write programs in machine language because other programming languages had not yet been invented Machine LanguageEvery processor type has its own set of specific machine instructionsThe relationship between the processor and the instructions it can carry out is completely in
6、tegrated Each machine-language instruction does only one very low-level task Pep/7: A Virtual Computer Virtual computer A hypothetical machine designed to contain the important features of real computers that we wantto illustratePep/7designed by Stanley Warfordhas 32 machine-language instructionsWe
7、are only going to examine a fewof these instructionsFeatures in Pep/7The memory unit is made up of 4,096bytes Pep/7 Registers/Status Bits CoveredThe program counter(PC (contains the addressof the next instruction to be executedThe instruction register(IR(contains a copy of the instruction being exec
8、utedThe accumulator(A registerStatus bit N(1if A register is negative;0otherwiseStatus bit Z(1if the A register is0;and0otherwiseFeatures in Pep/7 Figure 7.1Pep/7s architectureInstruction FormatThere are two parts to an instruction The 8-bit instruction specifierAnd optionally, the 16-bit operand sp
9、ecifier Instruction Format The instruction specifier is made up ofseveral sectionsThe operation codeThe register specifierThe addressing-mode specifier Instruction FormatThe operation code specifies which instruction is to be carried outThe 1-bit register specifier is 0 if register A (the accumulato
10、r is involved, which is the case in this chapter.The 2-bit addressing-mode specifier says how to interpret the operand part of the instructionInstruction Format Some Sample Instructions Figure 7.3 Subset of Pep/7 instructionsA Program Example Lets write "Hello" on the screen Pep/7 Simulato
11、r A program that behaves just like the Pep/7 virtual machine behavesTo run a program, we enter the hexadecimal code, byte by byte with blanks between each Assembly Language Assembly languages A language thatuses mnemonic codes to representmachine-language instructionsThe programmer uses these alphan
12、umeric codes in place of binary digitsA program called an assembler reads each of the instructions in mnemonic form andtranslates it into the machine-languageequivalentPep/7 Assembly Language Figure 7.5Assembly Process A New Program 7-21 Our Completed Program 7-22 Status Bits Status bits allow a pro
13、gram to make a choice. BRLT Set the PC to the operand, if N is 1 (A register is less than zero BREQ Set the PC to operand, if Z is 1 (A register is equal to zero 7-23 Testing Test plan A document that specifies how many times and with what data the program must be run in order to thoroughly test the program A cod
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 教育心理學(xué)在災(zāi)害應(yīng)對(duì)中的重要作用
- 以人為本智慧校園內(nèi)跑腿服務(wù)的創(chuàng)新思考
- 教育政策案例分析與未來(lái)展望
- 學(xué)生管理與醫(yī)療領(lǐng)域中的心理干預(yù)策略研究
- 2025屆吉林省松原市乾安縣七中高一物理第二學(xué)期期末監(jiān)測(cè)試題含解析
- 河南省洛陽(yáng)市2025年高一物理第二學(xué)期期末預(yù)測(cè)試題含解析
- 教育技術(shù)與學(xué)習(xí)科學(xué)的交叉融合新案例解析
- 浙江省金華市東陽(yáng)中學(xué)2025屆物理高一下期末質(zhì)量跟蹤監(jiān)視試題含解析
- 如何運(yùn)用教育游戲化提升孩子的學(xué)習(xí)興趣
- 中職德育情感課件
- 江蘇南京金陵中學(xué)2024~2025學(xué)年高二下冊(cè)期末考試數(shù)學(xué)試題含解析
- 2026屆高三語(yǔ)文一輪復(fù)習(xí)教學(xué)計(jì)劃
- 公司攝影小組活動(dòng)方案
- 銀行 輿情培訓(xùn) 課件
- 小兒重癥??七M(jìn)修匯報(bào)
- 寧城職教中心實(shí)習(xí)實(shí)訓(xùn)基地項(xiàng)目可行性論證報(bào)告
- DB14-T 3403-2025 灌木林地造林技術(shù)規(guī)程
- 2025廣西中醫(yī)藥大學(xué)賽恩斯新醫(yī)藥學(xué)院教師招聘考試試題
- 京東居家客服面試題及答案
- 制造業(yè)中數(shù)字孿生技術(shù)的市場(chǎng)推廣策略研究
- JJF(贛) 028-2024 氣相分子吸收光譜儀校準(zhǔn)規(guī)范
評(píng)論
0/150
提交評(píng)論