资源描述:
《实验三-数据串传送与查表程序》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、实验三数据串传送和查表程序实验目的通过实验掌握下列知识:1、堆栈。堆栈指示器SP和堆栈操作指令PUSH和POP。2、段寄存器和物理地址计算。3、查表法和查表指令XLATo4、数据串传送程序和数据串传送指令MOVS、ST0S及重复前辍REP。5、循环指令R0L、逻辑与指令AD和清方向位指令CLD。6、伪操作指令DB。实验内容及步骤一、利用查表方法把DX的内容(十六进制数)转换成ASCII码1、用A命令键入下列程序:MOVBX,1000MOVDI,2000MOVCX,4LOP:PUSHexMOVCL,4ROLDX,CLP
2、OPexMOVAL,DLANDAL,OFXLATCLDST0SBLOOPLOPINT20DOSBox0.74,Cpuspeed:3000cycles,Frameskip0,Program:DEBUGC:>debug-a0100073F:010Gmovbx.1000073F:0103movdi,ZO0O073F:0166movex,40?3F:0109pushex073F:010AmovcL4073F:010Croldxjd073F:010EPOPex073F:010FmovaLdl073F:0111andaljof人
3、Error073F:0111andal,of八Error073F:0111andal,0f073F:O113xlat073F:0114cld073F:0115stosb073F:0116loop01090?3F:O118intZ0073F:O11AE:>c:2、用A命令在100011处键入下列ASCII码并用D命令检查之:DB'0123456789ABCDEF'用D命令检查时注意左边的ASCH码值和右边的字符。DOSBox0.74,Cpuspeed:3000cycles,Frameskip0,Program:DEB
4、UG073F:0103movdi.2000movex>4pushexmovrolPOPmovand073F:O106073F:0109073F:O10A073F:01OC073F:010E073F:O10F073F:0111073F:0111andcE4dx,clexal,dlaljof人Erroraljof八Erroral,Of073F:O111073F:O113073F:0114073F:O115073F:O116073F:0118073F:O11A-a10O0073F:100O073F:1010-dlOGG101
5、0073F:10003031323334353637-383961626364656601Z3456789abcdef073F:1010GOandxlatcldstosbloop0109int20db,01Z3456789abcdef,3、用R命令给DX送一个四位的十六进制数(例7F8E)。3000cycles,Frameskip0fProgram:DEBUG073F:O10Amovcl,4G73F:O10Croldxjd073F:O10EPOPex073F:01OFmovaEdl073F:O111andaljof八E
6、rror073F:0111andal,of八Error0?3F:0111andal,Of073F:O113073F:0114cldG73F:0115stosb073F:0116loop0109073F:0118irrtZOG73F:O11ADOSDOSBox0.74,Cpuspeed:-a1000073F:1OO0dbJ0123456789abcdef'073F:1010-dlOOO1010073F:100O3031323334353637-38396162636465660123456?89abcdef0?3F:10
7、10GO-rdxDX0000:7f8e4.用T命令逐条运行这程序到LOOP指令处,观察并记录每次运行结果,特别是SP和堆栈内容(用I)命令检查)。073F:01F00000000000000000-0000000000000000-dlOO073F:0100BB0010BF0020B904-GO51Bl04D3C25988Q.••・Y.073F:0110DOZ4OFD7FCAAEZFl-CDZ0000034GOZE07•$4...073F:01Z00000000000000000-0000000000GO0000073
8、F:01300000000000000000-0000000000GO0000073F:01400000000000000000-0000000000000000073F:01500000000000000000-0000000000000000073F:O1600000000000000000-0000000000000000(