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

ErnestoAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Infinity08Connect With a Mentor Commented:
Take a look at TASM :

        http://info.borland.com/borlandcpp/cppcomp/tasmfact.html

It seems the assembler you posted was written for it :)
0
 
ZoppoCommented:
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
0
 
ErnestoAuthor Commented:
code code
0
 
masheikCommented:
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
0
All Courses

From novice to tech pro — start learning today.