




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
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. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 低空經(jīng)濟(jì)對城市智能化的推動作用
- 推動跨部門合作實(shí)現(xiàn)公共服務(wù)資源共享
- 家庭農(nóng)場與農(nóng)民生產(chǎn)技術(shù)培訓(xùn)協(xié)議
- 愛的傳遞我與母親的故事14篇范文
- 2025年四川省南充市中考地理試題 (原卷版)
- 高一人教版英語《Discovering Useful Structures》
- 音樂與數(shù)學(xué)的融合歷史及其教育意義
- 顧客體驗(yàn)設(shè)計在新零售中的實(shí)施路徑
- 顧客體驗(yàn)設(shè)計提升新零售競爭力的關(guān)鍵
- 青年如何利用科技工具提升工作效率
- 2025年高等數(shù)學(xué)期末考試試題及答案
- 2024北京朝陽區(qū)四年級(下)期末英語試題及答案
- 2024中國國新基金管理有限公司相關(guān)崗位招聘7人筆試參考題庫附帶答案詳解
- 公安外宣工作培訓(xùn)
- 光伏組件清洗合同
- 作風(fēng)建設(shè)學(xué)習(xí)教育心得體會:在深入學(xué)習(xí)中校準(zhǔn)思想坐標(biāo)持續(xù)轉(zhuǎn)變工作作風(fēng)(3篇)
- 人體解剖學(xué)題庫(含答案)
- 2025年浙江省新能源投資集團(tuán)股份有限公司招聘筆試參考題庫附帶答案詳解
- 傳統(tǒng)加油站行業(yè)痛點(diǎn)分析與數(shù)字化解決方案
- 法人授權(quán)委托書深圳標(biāo)準(zhǔn)版
- 2025年新高考?xì)v史預(yù)測模擬試卷山東卷(含答案解析)
評論
0/150
提交評論