Ernesto
asked on
RUN ASM FILE INTO C
HI ALL
HOW CAN I RUN ASM FILE INTO C OR IS ANY TOOL TO RUN ASM FILES?
HOW CAN I RUN ASM FILE INTO C OR IS ANY TOOL TO RUN ASM FILES?
; This program displays "Hello, World!"
dosseg
.model small
.stack 100h
.data
hello_message db 'Hello, World!',0dh,0ah,'$'
.code
main proc
mov ax,@data
mov ds,ax
mov ah,9
mov dx,offset hello_message
int 21h
mov ax,4C00h
int 21h
main endp
end main
ASKER
code code
hi,
you have to code like this inside c code
asm("assembly code");
example,
asm ("movl") //someting like this,
you can get more information here
http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html
you have to code like this inside c code
asm("assembly code");
example,
asm ("movl") //someting like this,
you can get more information here
http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you'll need either an assembler (a compiler for assembler code) or need to embed the code into a C/C++ compiler which supports inline assembler ...
BTW: This is assembler code for 16-bit MS-DOS - I don't think it would run in Windows.
ZOPPO