文件名称:shiyan6
介绍说明--下载内容均来自于网络,请自行研究使用
1.编写完整的汇编语言程序:
(1) 从键盘输入一系列字符(以回车符结束),并按字母、数字及其他字符分类计数,最后显示这三类的计数结果。
(2) 已定义了两个整数变量A和B,试编写程序完成下列功能(使用简化段源程序格式):
若两个数中有一个是奇数,则将奇数存入A中,偶数存入B中;
若两个数均为奇数,则将两数均加1后存回原变量;
若两个数均为偶数,则两个变量均不改变。
(3) 用减奇数次数的方法,求一个数的近似平方根,这个平方根是一个整数。如求17的平方根,可以用17相继减去奇数1、3、5、7、…,当结果为负数时停止,即:
17-1-3-5-7-9<0
可以看出,17在减去5次奇数后结果变为负数,可以近似认为17的平方根在4与5之间,计算NUM的平方根,如果NUM=17,则ANS中保存结果4。
(4) 以下面形式定义一个长整数,其所占用字节数由N得到,比如128位的数5746352413DE89674523BC9A78563412H定义成:
NUM DB 12H,34H,56H,78H,9AH,0BCH,23H,45H
DB 67H,89H,0DEH,13H,24H,35H,46H,57H
N DB $-NUM
试编写一个程序,实现对N字节的NUM的值求补(类似NEG的操作),并把求补后的值仍保存在NUM中。-(1) the preparation of a complete assembly language programs:
(1) a series of characters (with a carriage return) entered from the keyboard, press the letters, numbers and other characters count and display the count of these three results.
(2) defines two integer variables A and B, try to write programs to accomplish the following functions (using the simplified segment of source code format):
If the two numbers is odd, then the odd deposit A deposit, even in B
If the two numbers are odd, will be two numbers are stored back in the original variables plus 1
If the two numbers are even, then the two variables did not change.
(3) less odd number of times, find the approximate square root of a number, the square root is an integer. Demand, such as the square root of 17, with 17 successively subtracting the odd-numbered 1,3,5,7, ..., stop when the result is negative, that is:
17-1-3-5-7-9 <0
It can be seen, 17 minus 5 odd results become negat
(1) 从键盘输入一系列字符(以回车符结束),并按字母、数字及其他字符分类计数,最后显示这三类的计数结果。
(2) 已定义了两个整数变量A和B,试编写程序完成下列功能(使用简化段源程序格式):
若两个数中有一个是奇数,则将奇数存入A中,偶数存入B中;
若两个数均为奇数,则将两数均加1后存回原变量;
若两个数均为偶数,则两个变量均不改变。
(3) 用减奇数次数的方法,求一个数的近似平方根,这个平方根是一个整数。如求17的平方根,可以用17相继减去奇数1、3、5、7、…,当结果为负数时停止,即:
17-1-3-5-7-9<0
可以看出,17在减去5次奇数后结果变为负数,可以近似认为17的平方根在4与5之间,计算NUM的平方根,如果NUM=17,则ANS中保存结果4。
(4) 以下面形式定义一个长整数,其所占用字节数由N得到,比如128位的数5746352413DE89674523BC9A78563412H定义成:
NUM DB 12H,34H,56H,78H,9AH,0BCH,23H,45H
DB 67H,89H,0DEH,13H,24H,35H,46H,57H
N DB $-NUM
试编写一个程序,实现对N字节的NUM的值求补(类似NEG的操作),并把求补后的值仍保存在NUM中。-(1) the preparation of a complete assembly language programs:
(1) a series of characters (with a carriage return) entered from the keyboard, press the letters, numbers and other characters count and display the count of these three results.
(2) defines two integer variables A and B, try to write programs to accomplish the following functions (using the simplified segment of source code format):
If the two numbers is odd, then the odd deposit A deposit, even in B
If the two numbers are odd, will be two numbers are stored back in the original variables plus 1
If the two numbers are even, then the two variables did not change.
(3) less odd number of times, find the approximate square root of a number, the square root is an integer. Demand, such as the square root of 17, with 17 successively subtracting the odd-numbered 1,3,5,7, ..., stop when the result is negative, that is:
17-1-3-5-7-9 <0
It can be seen, 17 minus 5 odd results become negat
(系统自动生成,下载前可以参看下载内容)
下载文件列表
实验6
.....\601.asm
.....\602.asm
.....\603.asm
.....\604.asm
.....\601.asm
.....\602.asm
.....\603.asm
.....\604.asm