-
July 23rd, 2002 04:31 AM
#1
Junior Member
-
July 23rd, 2002 07:02 AM
#2
As far as I know, Borland C++ (at least Turbo C++ and the original Borland C++ (not too sure about C++ Builder), doesn't allow you to integrate assembly language into your programs. Many C/C++ compilers out there are just that, and do not include separate assemblers to handle asm. There are separate programs from Borland (including tasm) which will do assembly language, but I'm not sure if you can somehow incorporate tasm into a C++ program. If I'm wrong, someone please correct me.
AJ
-
July 23rd, 2002 07:28 AM
#3
try doing something like this:
Code:
_asm
{ wait
fnstcw old_cw
wait
mov ax, word ptr old_cw
or ah, 0xc
mov word ptr new_cw,ax
fldcw new_cw
}
that exact code is used in some source i have and i know it will compile in msvc++("_asm" is a reserved word). obviously you would want to replace the code inside with whatever asm you wanted. give it a shot, you might get lucky
- 8-
There are 10 types of people in this world: those who understand binary, and those who dont.
-
July 23rd, 2002 07:34 AM
#4
8*B@LL, Microsoft Visual C++ 6.0 (post SP4 or SP5, I think) and VC++.NET includes the C++ preprocessor pack which includes the ability to compile assembly language from within C++ programs. Before the preprocessor pack was released (it was released as a separate download for users of versions prior to SP4/5) you were required to install a separate assembler (I prefer masm) and configure the compiler to allow you to use that as a separate directive when compiling your programs. In my experiences with Borland prodcuts (which I used to use when I first started programming C/C++ as well as Pascal and Assembly Language) there is no way to incorporate this type of asm segement into C++ and have it compile correctly.
AJ
-
July 23rd, 2002 11:02 AM
#5
ah, well like i said, it was just a "shot in the dark" so-to-speak.
- 8-
There are 10 types of people in this world: those who understand binary, and those who dont.
-
July 23rd, 2002 06:55 PM
#6
Junior Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks