Link to home
Start Free TrialLog in
Avatar of Ernesto
ErnestoFlag for Mexico

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?
; 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

Open in new window

Avatar of Zoppo
Zoppo
Flag of Germany image

Hi edo60,

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
Avatar of Ernesto

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
ASKER CERTIFIED SOLUTION
Avatar of Infinity08
Infinity08
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial