trubo_c2.0自带一个测试程序:
#include <stdio.h>
void main()
{
printf("this is a C program. \n");
}
dosbox里面用tc编译,ida反汇编后,有一段这样的注释:
; File Name : F:\dosbox\Turbo_C2\tc\TEST.EXE
; Format : MS-DOS executable (EXE)
; Base Address: 0h Range: 0h-1860h Loaded length: 1860h
; Entry Point : 0:0
; OS type : MS DOS
; Application type: Executable 16bit
和一段这样的程序:
seg000:01FA ; Attributes: bp-based frame
seg000:01FA
seg000:01FA ; int __cdecl main(int argc, const char **argv, const char **envp)
seg000:01FA _main proc near ; CODE XREF: start+11Ap
seg000:01FA
seg000:01FA argc = word ptr 4
seg000:01FA argv = dword ptr 6
seg000:01FA envp = dword ptr 0Ah
seg000:01FA
seg000:01FA push bp
seg000:01FB mov bp, sp
seg000:01FD mov ax, 194h
seg000:0200 push ax ; format
seg000:0201 call _printf
seg000:0204 pop cx
seg000:0205 pop bp
seg000:0206 retn
seg000:0206 _main endp