Assembling COM executables on win xp
Is there a way of assembling x86 code into COM executables? I am using masm32 as my assembler. Can't find enough information on the assembling/linking command line so I always end up getting errors...
Here's a simple program and the error I get:
Any ideia? Suggestions to other assemblers with better documentation would be nice too...
Code:
.model tiny .code ORG 100H HOST: mov ah, 9 mov dx, OFFSET HI int 21H mov ax, 4C00H int 21H HI DB 'Hi$' END HOST
Command used to assembly and Error:
D:>ml /AT test.s Microsoft (R) Macro Assembler Version 6.14.8444 Copyright (C) Microsoft Corp 1981-1997. All rights reserved.
Assembling: test.s Microsoft (R) Incremental Linker Version 5.12.8078 Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
/z2 "host.obj" /t "test.com" NUL LINK : warning LNK4044: unrecognized option "z2"; ignored LINK : warning LNK4044: unrecognized option "t"; ignored test.obj : warning LNK4033: converting object format fro开发者_C百科m OMF to COFF test.obj : fatal error LNK1190: invalid fixup found, type 0x0001
Include your assembly code as inline assembly into a C file, then compile it with a standard C compiler to COM.
精彩评论