




已阅读5页,还剩31页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Relatively Simple CPU and 8085 microprocessor Instruction Set Architecture,Presented by: Chi Yan HungClass: Cs 147 - sec 2 Fall 2001Prof: Sin-Min Lee,Chapter 3,Topics to cover,3.4.,Relatively Simple Instruction Set Architecture,3.5.,8085 Microprocessor Instruction Set Architecture Analyzing the 8085 Instruction Set Architecture,3.6.,Summary,Relatively Simple microprocessors, or CPUDesigned as an instructional aid and draws its features from several real microprocessorsToo limited to run anything as complex as personal computerIt has about the right level of complexity to control a microwave oven or other consumer appliance,3.4.,Instruction Set Architecture (ISA)Memory ModelRegistersInstruction set,Memory ModelThis microprocessor can access 64K ( = 216 ) bytes of memoryEach byte has 8 bits, therefore it can access 64K 8 bits of memory64K of memory is the maximum limit, sometimes asystem based on this CPU can have less memoryUse memory to map I/OSame instructions to use for accessing I/O devices and memory,Registers Accumulator (AC), is an 8-bit general purpose register Register R, is an 8-bit general purpose register. It supplies the second operand and also it can be use to store data that the AC will soon need to access. Flag Z, is an 1-bit zero flag. Z is set to 1 or 0 whenever an instruction is execute Other registers that cannot be directly accessed by programmer,Instruction SetData movement instructionsData operation instructionsProgram control instructions,Data movement instruction for the Relatively Simple CPU,AC accumulator registerR general purpose register/M 16-bit memory address,NOP - performs no operation LDAC - loads data from memory and stores it in the AC STAC - copies data from AC to memory location MVAC - copies data in AC to register R MOVR - copies data from R to AC,Data operation instruction for the Relatively Simple CPU,AC accumulator registerR general purpose registerZ zero flag,Program control instruction for the Relatively Simple CPU,Z zero flag - 16-bit memory address,Note: Each instruction is having an 8-bit instruction code. LDAC, STAC, JUMP, JUMPZ, and JPNZ instructions all require a 16-bit memory address, represented by /M. These instructions each require 3 bytes in memory.,Instruction formats for the Relatively Simple CPU,byte 1byte 2byte 3,Example:25:JUMP 1234 Hinstruction stored in memory: 25th byte25:0000 0101(JUMP) 26th byte26:0011 0100(34H) 27th byte27:0001 0010(12H),H - in hexadecimal format,The Algorithm of the program1:total = 0, i = 02:i = i + 13:total = total + i4:IF i n THEN GOTO 2What exactly this algorithm doing is: 1+ 2 + + (n 1) + n,Example program using Relatively Simple CPU coding,The Relatively Simple CPU coding of the program,CLACSTAC totalSTAC iLoop:LDAC iINACSTAC iMVACLDAC totalADDSTAC totalLDAC nSUBJPNZ Loop,total = 0, i = 0,i = i +1,total = total +1,IF i n THEN GOTO Loop,Relatively Simple microprocessors, or CPUDesigned as an instructional aid and draws its features from several real microprocessorsToo limited to run anything as complex as personal computerIt has about the right level of complexity to control a microwave oven or other consumer appliance,3.5.1-3,Instruction Set Architecture (ISA)Memory ModelRegisters SetInstruction Set,Memory ModelThis microprocessor is a complete 8-bit parallel Central Processing Unit (CPU). Each byte has 8 bitsIsolated I/O, input and output devices are treated as being separate from memory. Different instructions access memory and I/O devices,Register Set Accumulator A, is an 8-bit register. Register B, C, D, E, H, and L, are six 8-bit general purpose register. These registers can be accessed individually, or can be accessed in pairs. Pairs are not arbitrary; BC are a pair (16- bit), as are DE, and HL Register HL is used to point to a memory location. Stack pointer, SP, is an 16-bit register, which contains the address of the top of the stack.,The sign flag, S, indicates the sign of a value calculated by an arithmetic or logical instruction. The zero flag, Z, is set to 1 if an arithmetic or logical operation produces a result of 0; otherwise set to 0. The parity flag, P, is set to 1 if the result of an arithmetic or logical operation has an even number of 1s; otherwise it is set to 0. The carry flag, CY, is set when an arithmetic operation generates a carry out. The auxiliary carry flag, AC, very similar to CY, but it denotes a carry from the lower half of the result to the upper half.,The interrupt mask, IM, used to enable and disable interrupts, and to check for pending interrupts,Instruction SetData movement instructionsData operation instructionsProgram control instructions,Data movement instruction for the 8085 microprocessor,r, r1, r2 any 8-bits register / M memory locationrp register pair BC, DE, HL, SP(Stack pointer)n 8-bit address or data value,Data operation instruction for the 8085 microprocessor,CY carry flag,Program control instruction for the 8085 microprocessor,cond conditional instructionsNZ (Z = 0)Z (Z = 1)P (S = 0)N (S = 1)PO (P = 0)PE (P = 1)NC (CY = 0)C (CY = 1)Z zero flag, S sign flag, P parity flag, C carry flag,Note: Each instruction is having an 8-bit instruction code. Some instructions have fields to specify registers, while others are fixed.,Instruction formats for the Relatively Simple CPU,byte 1byte 2,Example:25:MVIr, ninstruction stored in memory: 25th byte25:00xxx110(MVI r) 26th byte26:xxxx xxxx(low-order memory),Two-byte,Specifies r,Example:25:MOVr1, r2instruction stored in memory: 25th byte25:0000 0001(MOV) 26th byte26:xxxx xxxx(specifies r1) 27th byte27:yyyy yyyy(specifies r2),byte 1byte 2byte 3,Three-byte,Example:25:LXIrp, instruction stored in memory: 25th byte25:00rp 0001(LXI rp) 26th byte26:xxxx xxxx(low-order memory) 27th byte27:yyyy yyyy(high-order memory),Example:25:LXIrp, instruction stored in memory: 25th byte25:00rp 0001(LXI rp) 26th byte26:xxxx xxxx(low-order memory) 27th byte27:yyyy yyyy(high-order memory),Specifies rp,The Algorithm of the program1:total = 0, i = 02:i = i + 13:total = total + i4:IF i n THEN GOTO 2,n + (n - 1) + + 1,The 8085 coding of the program,LDA nMOV B, AXRA ALoop:ADD BDCR BJNZ LoopSTA total,Example program using 8085 microprocessor coding,i = n,sum = A A = 0,sum = sum + i,i = i - 1,IF i 0 THEN GOTO Loop,total = sum,Analyzing the 8085 ISAThe 8085 CPUs instruction set is more complete than that of the Relatively Simple CPU. More suitable for consumer appliance.Too limited to run anything as complex as personal computer,3.5.4.,Advantages of the 8085s ISA vs. Relative Simple CPUIt has the ability to use subroutinesIt can incorporate interrupts, and it has everything the programmer needs in order to process interrupts.The register set for the 8085 is mostly sufficient, thus less coding apply which will improve task completion.,The instruction set is fairly orthogonal. E.g. no clear accumulator instructionDisadvantages of the 8085s ISA Like the Relatively Simple CPU, it cannot easily process floating point data.,Summary of ISA1.The ISA specifies a.an instruction set that the CPU can processb.its user accessible registersc.how it interacts with memory2.The ISA does not specify how the CPU is design
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 【中考专题】2026年中考数学专项提优复习:圆【附答案】
- 2025酒店客房代销品采购合同
- 2025年甘肃省平凉华亭市山寨回族乡招聘行政村村文书模拟试卷及答案详解一套
- 2025福建农信春季招聘考试服务热线考前自测高频考点模拟试题完整答案详解
- 2025标准合同模板:厨师劳务聘用合同样本
- 2025企业经营承包合同模板
- 2025福建福州市永泰县青少年业余体校外聘柔道教练员招聘1人模拟试卷及完整答案详解1套
- 2025广东深圳北京大学国际法学院招聘1人模拟试卷完整答案详解
- 2025福建闽南师范大学引进人才招聘97人模拟试卷附答案详解(完整版)
- 2025年福建省市场监督管理局直属事业单位公开招聘20人考前自测高频考点模拟试题(含答案详解)
- 2024年《招标采购专业知识与法律法规》考前必刷必练题库500题(含真题、必会题)
- 中考语文名著总复习-三年中考真题《红星照耀中国》(教师版)
- 《张仲景活血通络法研究》
- 工程造价预算及成本控制手册
- 超星尔雅学习通《当代大学生国家安全教育》章节测试答案
- DL∕T 5285-2018 输变电工程架空导线(800mm以下)及地线液压压接工艺规程
- NB/T 11431-2023土地整治煤矸石回填技术规范
- 房建类工程施工方案
- 国家开放大学《病理学与病理生理学》形考任务1-4参考答案
- 中国腹腔镜胃癌根治手术质量控制专家共识
- 离散数学概论第2版田秋红习题答案
评论
0/150
提交评论