编写一个汇编程序,使用DOS功能调用完成字符串的显示以及从程序退回到操作系统
2条回答 默认 最新
- curating 2022-12-07 22:56关注
debug调试程序在win10默认已经移除,需要安装 DOSBox 和debug。
看实验要求,你应该具备实验环境。
参考:jmp 126 ; Jump over data that follows: db 0d,0a,"This is my first DEBUG program!" db 0d,0a,"$" ; End of string marker above: "$"=24h mov ah,9 ; Function 09 of Int 21h: mov dx,102 ; DS:DX -> $-terminated string. int 21 ; Write String to STD Output. mov ah,0 ; Function 00 of Int 21h: int 21 ; Terminate Program.
示例如下:
debug -n c:\temp\doswinok.com -a 100 cs:0100 jmp 138 cs:0102 db 0d,0a,"It's OK to run this " cs:0118 db "program under DOS or Windows!" cs:0135 db 0d,0a,24 cs:0138 mov dx,102 cs:013B mov ah,9 cs:013D int 21 cs:013F mov ax,4c01 cs:0142 int 21 cs:0144 [Press ENTER key.] -rcx CX 0000 :44 -w Writing 00044 bytes [ 68 bytes in decimal ] -q
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥20 西门子S7-Graph,S7-300,梯形图
- ¥50 用易语言http 访问不了网页
- ¥50 safari浏览器fetch提交数据后数据丢失问题
- ¥15 matlab不知道怎么改,求解答!!
- ¥15 永磁直线电机的电流环pi调不出来
- ¥15 用stata实现聚类的代码
- ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
- ¥20 docker里部署springboot项目,访问不到扬声器
- ¥15 netty整合springboot之后自动重连失效
- ¥15 悬赏!微信开发者工具报错,求帮改