(完整word版)计算机组成原理与汇编语言复习资料(word文档良心出品) 下载本文

内容发布更新时间 : 2024/12/27 20:27:32星期一 下面是文章的全部内容请认真阅读。

ocusing on ways and means of improving and upgrading work, further development of \d\horised\d the existing building \household, one document\nd file storage work must be unconditional and full coverage. Main corridor leading to the town (road, river) village, the Central built-up area of the town on both sides must be to create a %unauthorised village\According to \d villages\d and shanty towns, villages, old houses, reconstruction of old plant, expand create, upgrading creates files, the real %unauthorised village\nto the benefit of the people of very good thing. (B) to strictly manage count as unauthorised controls. Promoting the \w\ol work to move the center of gravity, management measures to the front, and earnestly pipes effectively. A strict new unauthorised network responsibility. Sectors such as land, housing and basic stations (stations) and the Township of grid accountability mechanisms must be strictly in accordance with the new regulatory requirements, effective implementation of the area of responsibility of the new inspections, suppression, demolition work to ensure that the new \olerance\c security, water, electricity, water, oceans and fisheries, tourism collaboration, market supervision departments should strictly enforce the illegal construction of disposal of relevant provisions of the regulations, effective fulfilment of responsibilities, particularly in electricity and water supply, and other units may not be new illegal buildings to supply water and electricity supply. While more regulation to prevent personal privacy violations. Illicit trading in illegal construction in the Ministry of public security sector to strictly from the blow. Three is to create additional offence reporting system of incentives. According to building law and covers an area of nature, to report timely degree divided report grade, effective after the removal of certain incentives. (C) integrated implementation \ng demolition, modification, use\bination. Demolition is the means and purpose built is. To adhere to the building demolished, combination of construction and demolition waste, demolished with combined efforts to improve the scientific level of three to split; second, we must pay attention to \three to split\s\strict transformation, and dangerous old room transformation and \road sides\s work organic combined up, active do River, and along demolition work, and manpower advance village in the, and old residential demolition work, to improved masses housing conditions and live environment; three to put \nd small, and bulk industry structure transformation upgrade of important initiatives to caught, speed up advance industry Park, effective optimization park environment及程序的运行时间。因为对于实现相同的功能,可以采用不同的指令或指令序列,而这些指令或指令序列的字节数及执行时间有可能不相同的。

(4) 对于学习各功能部件与系统总线的连接及硬件系统的调试,都十分有意义,因为CPU

与存储器、I/O端口协调工作时,存在一个时序上的配合问题。 (5) 才能更好地处理微机用于过程控制及解决实时控制的问题 8、中断服务子程序的响应过程

CPU响应中断以后,就会中止当前的程序,转去执行一个中断服务子程序,以完成为相应设备的服务。中断服务子程序的一般结构如图7-4所示。

(1) 保护现场(由一系列的PUSH指令完成)。目的是为了保护那些与主程序中有冲突的寄存器,(如AX,BX,CX等),如果中断服务子程序中所使用的寄存器与主程序中所使用的寄存器等没有冲突的话,这一步骤可以省略。

(2) 开中断(由STI指令实现)。目的是为了能实现中断的嵌套。 (3) 中断服务

(4) 恢复现场是与保护现场对应的,但要注意数据恢复的次序,以免混乱。

(5) 返回(使用中断返回指令IRET)。不能使用一般的子程序返回指令RET,因为IRET指令除了能恢复断点地址外,还能恢复中断响应时的标志寄存器的值,而这后一个动作是RET指令不能完成的。

中断的工作过程可分为五大步骤:

即中断请求、中断判优、中断响应、中断服务和中断返回。

9、写出下面运算式对标志寄存器中标志的影响

0101 0100 1001

0100 0101 1001

0011 0110 1010

1001 1010 0011

CF=0、AF=1、PF=1、ZF=0、SF=1、OF=1(两正数相加结果为负) 10、 8086系统存储容量是多少?写出物理地址区域

8086有20根地址总线,因此,它可以直接寻址的存储器单元数为220=1Mbyte 8086可直接寻址1Mbyte的存储空间,其地址区域为00000H—FFFFFH,与存储单元一一对应的20位地址,我们称之为存储单元的物理地址。

nd improve idle land of utilization, real achieved environment improved and productivity development mutual promoting total win. Five, firmly implement, promoting work ahead, to create highlights. Third deployment, implementation of seven, then it is imperative to strengthen responsibility and improve the mechanisms and implementation. All localities and departments must be convinced that goals, going all out, mustering spirit, work together to ensure that this year's objectives carry out tasks, at the forefront. First, we must strengthen the leadership to implement. Departments at all levels should always work and rural \three to split\n important position, and carry the main responsibility, main leader personally, leaders arrested and layers of responsibility rank transmission pressure established hierarchical accountability, and work together to promote the work of the mechanism, a concerted effort pay attention to implementation. County nongban, flood, three to one down to further play a leading catch total, integrated and coordinated role of all kinds is \\s, formed the alignment on the fire line and management a lively situation. Second, we must strengthen the test implementation of the Governor. Role play the Governor got the baton, for agricultural and rural focus and \atment\ork, refine improve assessment methods and evaluation system, accurate assessment. Combined with \, tree benchmark\ding five major operations, carry on and gain firsthand experience of supervision, in particular, to strengthen the focus on the \ong\sion, urged all levels longer on duty in place. Through the supervisory assessment, to promote habits, stimulating power. Third, we must strengthen implementation style. Departments at all levels to work in rural areas and \nt\ning cadres for major platforms, compete against large examination room, inspection cadres work performance of the ring, water control and the Japanese pulled a workout, training, discovery and selection of cadres. Than good catch up, first to excellence-oriented. Party members and cadres at all levels must adhere to the rural, water control and the Japanese pulled a grass-roots, \n the shelf, leaned\c style, the spirit of play, become a benchmark model. Four, we must strengthen propaganda implementation. Comprehensive utilization of micro-credit, micro-blogging, new media, mining, summarizing, good publicity work in the countryside and \split\ advanced models, point to gather positive energy for the community to see the results of our work in time, increase public awareness, participation rates, satisfaction and support. Play gongqingfu, a mass organization and grass-roots such as schools, communityThe role of 第 5 页 2020-1-8

ocusing on ways and means of improving and upgrading work, further development of \d\horised\d the existing building \household, one document\nd file storage work must be unconditional and full coverage. Main corridor leading to the town (road, river) village, the Central built-up area of the town on both sides must be to create a %unauthorised village\According to \d villages\d and shanty towns, villages, old houses, reconstruction of old plant, expand create, upgrading creates files, the real %unauthorised village\nto the benefit of the people of very good thing. (B) to strictly manage count as unauthorised controls. Promoting the \w\ol work to move the center of gravity, management measures to the front, and earnestly pipes effectively. A strict new unauthorised network responsibility. Sectors such as land, housing and basic stations (stations) and the Township of grid accountability mechanisms must be strictly in accordance with the new regulatory requirements, effective implementation of the area of responsibility of the new inspections, suppression, demolition work to ensure that the new \olerance\c security, water, electricity, water, oceans and fisheries, tourism collaboration, market supervision departments should strictly enforce the illegal construction of disposal of relevant provisions of the regulations, effective fulfilment of responsibilities, particularly in electricity and water supply, and other units may not be new illegal buildings to supply water and electricity supply. While more regulation to prevent personal privacy violations. Illicit trading in illegal construction in the Ministry of public security sector to strictly from the blow. Three is to create additional offence reporting system of incentives. According to building law and covers an area of nature, to report timely degree divided report grade, effective after the removal of certain incentives. (C) integrated implementation \ng demolition, modification, use\bination. Demolition is the means and purpose built is. To adhere to the building demolished, combination of construction and demolition waste, demolished with combined efforts to improve the scientific level of three to split; second, we must pay attention to \s\strict transformation, and dangerous old room transformation and \road sides\s work organic combined up, active do River, and along demolition work, and manpower advance village in the, and old residential demolition work, to improved masses housing conditions and live environment; three to put \nd small, and bulk industry structure transformation upgrade of important initiatives to caught, speed up advance industry Park, effective optimization park environment三、程序题

1、设内存BUFF开始的单元中依次存放着30个8位无符号数,求它们的和并放在SUM单元中,试编写程序。(10分)

解:这是一个求累加的程序。程序如下:

MOV SI,BUFF ;设地址指针 MOV CX,30 ;设计数初值 XOR

AGAIN: ADD

2、利用查表法计算平方值。已知0 ~ 9的平方值连续存在以SQTAB开始的存储区域中,求SUR单元内容X的平方值,并放在DIS单元中。假定0≤X≤ 9且为整数。(15分) 解:建立平方表,通过查表完成。 STACK SEGMENT

DB 100 DUP(?)

ADC INC DEC JNZ

AX,AX ;设累加器初值 AL,[SI] AH,0 SI CX

AGAIN ;循环累加

MOV SUM,AX

STACK ENDS

DATA SEGMENT

SUR DB ? DIS DB ?

SQTAB DB 0,1,4,9,16,25,36,49,64,81 ; 0~9的平方表

DATA ENDS CODE SEGMENT

ASSUME CS:CODE,DS:DATA,SS:STACK,ES:DATA

BEGIN:PUSH DS

MOV AX,0

PUSH AX ;保证返回DOS, MOV AX,DATA

MOV DS,AX ;为DS送初值

nd improve idle land of utilization, real achieved environment improved and productivity development mutual promoting total win. Five, firmly implement, promoting work ahead, to create highlights. Third deployment, implementation of seven, then it is imperative to strengthen responsibility and improve the mechanisms and implementation. All localities and departments must be convinced that goals, going all out, mustering spirit, work together to ensure that this year's objectives carry out tasks, at the forefront. First, we must strengthen the leadership to implement. Departments at all levels should always work and rural \o split\portant position, and carry the main responsibility, main leader personally, leaders arrested and layers of responsibility rank transmission pressure established hierarchical accountability, and work together to promote the work of the mechanism, a concerted effort pay attention to implementation. County nongban, flood, three to one down to further play a leading catch total, integrated and coordinated role of all kinds is \\heir responsibilities, formed the alignment on the fire line and management a lively situation. Second, we must strengthen the test implementation of the Governor. Role play the Governor got the baton, for agricultural and rural focus and \ork, refine improve assessment methods and evaluation system, accurate assessment. Combined with \play, tree benchmark\ng five major operations, carry on and gain firsthand experience of supervision, in particular, to strengthen the focus on the \ns \supervision, urged all levels longer on duty in place. Through the supervisory assessment, to promote habits, stimulating power. Third, we must strengthen implementation style. Departments at all levels to work in rural areas and \nt\cadres for major platforms, compete against large examination room, inspection cadres work performance of the ring, water control and the Japanese pulled a workout, training, discovery and selection of cadres. Than good catch up, first to excellence-oriented. Party members and cadres at all levels must adhere to the rural, water control and the Japanese pulled a grass-roots, \down the shelf, leaned\of play, become a benchmark model. Four, we must strengthen propaganda implementation. Comprehensive utilization of micro-credit, micro-blogging, new media, mining, summarizing, good publicity work in the countryside and \point to gather positive energy for the community to see the results of our work in time, increase public awareness, participation rates, satisfaction and support. Play gongqingfu, a mass organization and grass-roots such as schools, communityThe role ofocusing on ways and means of improving and upgrading work, further development of \d\horised\d the existing building \household, one document\nd file storage work must be unconditional and full coverage. Main corridor leading to the town (road, river) village, the Central built-up area of the town on both sides must be to create a %unauthorised village\According to \d villages\d and shanty towns, villages, old houses, reconstruction of old plant, expand create, upgrading creates files, the real %unauthorised village\nto the benefit of the people of very good thing. (B) to strictly manage count as unauthorised controls. Promoting the \w\ol work to move the center of gravity, management measures to the front, and earnestly pipes effectively. A strict new unauthorised network responsibility. Sectors such as land, housing and basic stations (stations) and the Township of grid accountability mechanisms must be strictly in accordance with the new regulatory requirements, effective implementation of the area of responsibility of the new inspections, suppression, demolition work to ensure that the new \olerance\c security, water, electricity, water, oceans and fisheries, tourism collaboration, market supervision departments should strictly enforce the illegal construction of disposal of relevant provisions of the regulations, effective fulfilment of responsibilities, particularly in electricity and water supply, and other units may not be new illegal buildings to supply water and electricity supply. While more regulation to prevent personal privacy violations. Illicit trading in illegal construction in the Ministry of public security sector to strictly from the blow. Three is to create additional offence reporting system of incentives. According to building law and covers an area of nature, to report timely degree divided report grade, effective after the removal of certain incentives. (C) integrated implementation \ng demolition, modification, use\bination. Demolition is the means and purpose built is. To adhere to the building demolished, combination of construction and demolition waste, demolished with combined efforts to improve the scientific level of three to split; second, we must pay attention to \three to split\s\strict transformation, and dangerous old room transformation and \road sides\s work organic combined up, active do River, and along demolition work, and manpower advance village in the, and old residential demolition work, to improved masses housing conditions and live environment; three to put \nd small, and bulk industry structure transformation upgrade of important initiatives to caught, speed up advance industry Park, effective optimization park environment

LEA BX,SQTAB ;以下程序部分完成查表求平方值 MOV AH,0 ;亦可用查表指令完成(如下程序段) MOV AL,SUR ;AL=X LEA BX, SQTAB ADD

BX,AX ; MOV AL, SUR

MOV AL,[BX] ; XLAT MOV DIS,AL ; MOV DIS, AL

CODE ENDS

END BEGIN

3、在中断向量表中查找从键盘输入的字符,并将其个数用二进制形式显示出来。 code SEGMENT ;代码段开始 ASSUME CS:code

begin: MOV AX, 0000H ;设置查找首地址 MOV DS, AX MOV SI,0000H

MOV CX,0400H ;设置查找长度 MOV BX,0 ;计算值初值 MOV AH,01H ;从键盘输入 INT 21H ;输入关键字 MOV DL,AL

;保存在DL中

next: LODSB ;从串取 CMP AL, DL ;与关键字比较 JNZ point

INC BX ;计算值加1 point: LOOP next ;查找结束? CALL display MOV AH,4CH ;用二进制显示BX内容子程 display PROC

MOV CX, 16 ;显示位数 rotate: ROL BX, 1 MOV DL, BL AND DL, 01H

nd improve idle land of utilization, real achieved environment improved and productivity development mutual promoting total win. Five, firmly implement, promoting work ahead, to create highlights. Third deployment, implementation of seven, then it is imperative to strengthen responsibility and improve the mechanisms and implementation. All localities and departments must be convinced that goals, going all out, mustering spirit, work together to ensure that this year's objectives carry out tasks, at the forefront. First, we must strengthen the leadership to implement. Departments at all levels should always work and rural \three to split\n important position, and carry the main responsibility, main leader personally, leaders arrested and layers of responsibility rank transmission pressure established hierarchical accountability, and work together to promote the work of the mechanism, a concerted effort pay attention to implementation. County nongban, flood, three to one down to further play a leading catch total, integrated and coordinated role of all kinds is \\s, formed the alignment on the fire line and management a lively situation. Second, we must strengthen the test implementation of the Governor. Role play the Governor got the baton, for agricultural and rural focus and \atment\ork, refine improve assessment methods and evaluation system, accurate assessment. Combined with \, tree benchmark\ding five major operations, carry on and gain firsthand experience of supervision, in particular, to strengthen the focus on the \ong\sion, urged all levels longer on duty in place. Through the supervisory assessment, to promote habits, stimulating power. Third, we must strengthen implementation style. Departments at all levels to work in rural areas and \nt\ning cadres for major platforms, compete against large examination room, inspection cadres work performance of the ring, water control and the Japanese pulled a workout, training, discovery and selection of cadres. Than good catch up, first to excellence-oriented. Party members and cadres at all levels must adhere to the rural, water control and the Japanese pulled a grass-roots, \n the shelf, leaned\c style, the spirit of play, become a benchmark model. Four, we must strengthen propaganda implementation. Comprehensive utilization of micro-credit, micro-blogging, new media, mining, summarizing, good publicity work in the countryside and \split\ advanced models, point to gather positive energy for the community to see the results of our work in time, increase public awareness, participation rates, satisfaction and support. Play gongqingfu, a mass organization and grass-roots such as schools, communityThe role of;调用显示子程 ;调用4CH功能

INT 21H ;返回DOS

第 7 页 2020-1-8

ocusing on ways and means of improving and upgrading work, further development of \d\horised\d the existing building \household, one document\nd file storage work must be unconditional and full coverage. Main corridor leading to the town (road, river) village, the Central built-up area of the town on both sides must be to create a %unauthorised village\According to \d villages\d and shanty towns, villages, old houses, reconstruction of old plant, expand create, upgrading creates files, the real %unauthorised village\nto the benefit of the people of very good thing. (B) to strictly manage count as unauthorised controls. Promoting the \w\ol work to move the center of gravity, management measures to the front, and earnestly pipes effectively. A strict new unauthorised network responsibility. Sectors such as land, housing and basic stations (stations) and the Township of grid accountability mechanisms must be strictly in accordance with the new regulatory requirements, effective implementation of the area of responsibility of the new inspections, suppression, demolition work to ensure that the new \olerance\c security, water, electricity, water, oceans and fisheries, tourism collaboration, market supervision departments should strictly enforce the illegal construction of disposal of relevant provisions of the regulations, effective fulfilment of responsibilities, particularly in electricity and water supply, and other units may not be new illegal buildings to supply water and electricity supply. While more regulation to prevent personal privacy violations. Illicit trading in illegal construction in the Ministry of public security sector to strictly from the blow. Three is to create additional offence reporting system of incentives. According to building law and covers an area of nature, to report timely degree divided report grade, effective after the removal of certain incentives. (C) integrated implementation \ng demolition, modification, use\bination. Demolition is the means and purpose built is. To adhere to the building demolished, combination of construction and demolition waste, demolished with combined efforts to improve the scientific level of three to split; second, we must pay attention to \s\strict transformation, and dangerous old room transformation and \road sides\s work organic combined up, active do River, and along demolition work, and manpower advance village in the, and old residential demolition work, to improved masses housing conditions and live environment; three to put \nd small, and bulk industry structure transformation upgrade of important initiatives to caught, speed up advance industry Park, effective optimization park environment ADD DL, 30H MOV AH, 2H INT 21H LOOP rotate

RET ;子程返回 display ENDP

code ENDS ;代码段结束 END begin

四、设计题

1、设有若干片256K×8位的SRAM芯片,问:

(1) 采用字扩展方法构成2048KB的存储器需要多少片SRAM芯片? (2) 该存储器需要多少字节地址位?

(3) 画出该存储器与CPU连接的结构图,设CPU的接口信号有地址信号、数据信号、控制信号MREQ#和R/W#。

解:(1) 该存储器需要2048K/256K = 8片SRAM芯片;

(2) 需要21条地址线,因为221=2048K,其中高3位用于芯片选择,低18位作为每

个存储器芯片的地址输入。

(3) 该存储器与CPU连接的结构图如下。

MREQ OE#A20-18 3-8译ramselA20-0R/W ramsel ramsel A 17-0WE

… ramsel

CPU 256 256 256 88× × 8× D ~ D ~ D ~ D ~ DDD70707070WE WE 256 8× D ~ D70WE

2、设有若干片256K×8位的SRAM芯片,问:

(1) 如何构成2048K×32位的存储器?

nd improve idle land of utilization, real achieved environment improved and productivity development mutual promoting total win. Five, firmly implement, promoting work ahead, to create highlights. Third deployment, implementation of seven, then it is imperative to strengthen responsibility and improve the mechanisms and implementation. All localities and departments must be convinced that goals, going all out, mustering spirit, work together to ensure that this year's objectives carry out tasks, at the forefront. First, we must strengthen the leadership to implement. Departments at all levels should always work and rural \o split\portant position, and carry the main responsibility, main leader personally, leaders arrested and layers of responsibility rank transmission pressure established hierarchical accountability, and work together to promote the work of the mechanism, a concerted effort pay attention to implementation. County nongban, flood, three to one down to further play a leading catch total, integrated and coordinated role of all kinds is \\heir responsibilities, formed the alignment on the fire line and management a lively situation. Second, we must strengthen the test implementation of the Governor. Role play the Governor got the baton, for agricultural and rural focus and \ork, refine improve assessment methods and evaluation system, accurate assessment. Combined with \play, tree benchmark\ng five major operations, carry on and gain firsthand experience of supervision, in particular, to strengthen the focus on the \ns \supervision, urged all levels longer on duty in place. Through the supervisory assessment, to promote habits, stimulating power. Third, we must strengthen implementation style. Departments at all levels to work in rural areas and \nt\cadres for major platforms, compete against large examination room, inspection cadres work performance of the ring, water control and the Japanese pulled a workout, training, discovery and selection of cadres. Than good catch up, first to excellence-oriented. Party members and cadres at all levels must adhere to the rural, water control and the Japanese pulled a grass-roots, \down the shelf, leaned\of play, become a benchmark model. Four, we must strengthen propaganda implementation. Comprehensive utilization of micro-credit, micro-blogging, new media, mining, summarizing, good publicity work in the countryside and \point to gather positive energy for the community to see the results of our work in time, increase public awareness, participation rates, satisfaction and support. Play gongqingfu, a mass organization and grass-roots such as schools, communityThe role of