主题:一个简单的debug问题。
一个C程序,
#include "stdio.h"
#include "stdlib.h"
int main()
{
printf("Hello world~!\n");
//system("pause");
return 0;
}
生成一个1.exe
C:\debug 1.exe
-u
出现了
push cs
pop ds
mov dx,000e
mov ah,09
int 21
mov ax,4c01
int 21
push sp
db 68
db69
jnb 0033
下面还有很多代码我就不写了。
push cs
pop ds
mov dx,000e
mov ah,09
int 21
mov ax,4c01
int 21
看这段代码就想我用C写的程序,但是mov dx,000e
000E里面放的不是hello world而是放的,
This program cannot be run in DOS mode.
输出的也是
This program cannot be run in DOS mode.
怎么回事啊?
还有就是去掉C语言代码里面的注释。debug的汇编代码好象也是一样。晕哟,搞不懂。
哪位帮忙解释下吧。。debug 反的汇编代码怎么不是我写的C代码的功能输出Hello world呢?
#include "stdio.h"
#include "stdlib.h"
int main()
{
printf("Hello world~!\n");
//system("pause");
return 0;
}
生成一个1.exe
C:\debug 1.exe
-u
出现了
push cs
pop ds
mov dx,000e
mov ah,09
int 21
mov ax,4c01
int 21
push sp
db 68
db69
jnb 0033
下面还有很多代码我就不写了。
push cs
pop ds
mov dx,000e
mov ah,09
int 21
mov ax,4c01
int 21
看这段代码就想我用C写的程序,但是mov dx,000e
000E里面放的不是hello world而是放的,
This program cannot be run in DOS mode.
输出的也是
This program cannot be run in DOS mode.
怎么回事啊?
还有就是去掉C语言代码里面的注释。debug的汇编代码好象也是一样。晕哟,搞不懂。
哪位帮忙解释下吧。。debug 反的汇编代码怎么不是我写的C代码的功能输出Hello world呢?