文档详情

微机原理指令系统实验.ppt

发布:2017-06-21约6.4千字共31页下载文档
文本预览下载声明
第五章 8086指令系统 §调试软件的使用 上机过程和DEBUG的使用 上机过程: 编辑源文件:必须以.asm为扩展名; 汇编成目标代码; 连接成可执行文件; 运行或用DEBUG调试。 步骤: 1、编辑源程序:(设文件名:FILE.ASM) 2、汇编成目标代码: 上机过程和DEBUG的使用 C:\masmmasm file.asm Microsoft (R) Macro Assembler Version 5.00 Copyright (C) Microsoft Corp 1981-1985, 1987. All rights reserved. Object filename [file.OBJ]: Source listing [NUL.LST]:file Cross-reference [NUL.CRF]: 50992 + 419264 Bytes symbol space free 0 Warning Errors 0 Severe Errors 若有错误,则根据提示的行号及类型回步骤1修改 上机过程和DEBUG的使用 3、连接成可执行文件 C:\masmlink file(.obj) Microsoft (R) Overlay Linker Version 3.60,Copyright (C) Microsoft Corp 1983-1987. All rights reserved. RUN Filename:[file.exe] 若有错误,则根据提示的行号及类型回步骤1修改 上机过程和DEBUG的使用 4、调试程序 Cmasmdebug/? Runs Debug, a program testing and editing tool. 5、DEBUG程序的使用 ⑴启动进入DEBUG DEBUG [[drive:][path]filename [testfile-parameters]] [drive:][path]filename Specifies the file you want to test. testfile-parameters Specifies command-line information required by the file you want to test. 上机过程和DEBUG的使用 ⑵DEBUG命令集:(实际使用演示) -? assemble A [address] ;汇编 compare C range address ;比较 dump D [range] ;显示内存 enter E address [list] ;数据输入 fill F range list ;内存填充 go G [=address] [addresses];运行程序 hex H value1 value2(求两数的和、差) input I port ;输入 load L [address] [drive] [firstsector] [number] move M range address ;数据移动 name N [pathname] [arglist] ;命名 上机过程和DEBUG的使用 output O port byte ;输出 proceed P [=address] [number] ;跳过运行 quit Q ;退出 register R [register] ;寄存器查看与修改 search S range list ;搜索 trace T [=address] [value] ;跟踪执行 unassemble U [range]
显示全部
相似文档