English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm a newbie trying to write a program that will work with the system's timer, but when I try to run some lines of assembling code, the compiler tells me that in-line assembler is disallowed. I am using an old compiler but I don't know if the compiler is the problem. Is there any freely downloadable compiler that could accept assembler code without so much trouble?

2006-09-21 19:53:17 · 6 answers · asked by fmg134s 2 in Computers & Internet Programming & Design

I am using the Turbo C compiler version 2.0 for the MS-DOS plattform

2006-09-22 07:48:33 · update #1

6 answers

You should also be aware that not every language that has a compiler will support assembly language inline. And not every compiler, especially the free ones will support in-line assembly the same way. Best to check your documentation or search online for it. NOTE: You should also be made aware, if you aren't, that there are two styles of x86 assembly language syntax. Intel is the most widely known and AT&T is the other version, more familiar to *nix users. You should probably see if you're using a gcc compliant compiler with the 'as' assembler. If so, the problem may be you need the AT&T syntax conventions. I hope this helps.

P.S. In future questions, give a few more details such as platform, compiler, language, etc. It'll get you a more precise answer.

2006-09-22 05:10:14 · answer #1 · answered by Anonymous · 0 0

Every compiler I have worked with allowed assembly code inline. Maybe you are specifying an option that tells it not to allow that? It obviously knows what it is if it tells you it isn't allowed.

You don't specify the language, but for a free C, C++, java, fortran, etc compiler, check out gcc (GNU C Compiler).

2006-09-21 21:15:34 · answer #2 · answered by Ken H 4 · 0 0

What compiler are you using? Which operating system are you programming for? Linux? DOS?
Maybe you can find an old DOS version of Borland Turbo C++, or Microsoft C. Try Google searching for them. I'm not familiar with any Linux compilers if you're programming for Linux.

2006-09-21 21:55:00 · answer #3 · answered by Balk 6 · 0 0

1. You say "old compiler" but do not say what is it.
2. For approx. 20-30 years almost all compilers allow you to use assembler pieces of code. Check your compiler manual -- maybe, you need some special parameter or you need some specific syntax as, say,
__asm
{
...
}

2006-09-21 20:54:26 · answer #4 · answered by alakit013 5 · 0 0

What compiler? What language? What platform?

There's nowhere near enough information here to help you effectively.

Rawlyn.

2006-09-21 21:56:28 · answer #5 · answered by Anonymous · 0 0

the syntax could also be
#pragma ASM

//your code here

#pragma ENDASM

2006-09-22 02:09:32 · answer #6 · answered by justme 7 · 0 0

fedest.com, questions and answers