dos.h using int86() with linuc C language !
hey i am working on a small project and i have to use the int86 and the union REGS i got the dos.h and inter this code
Code:
#include<stdio.h> |
You have to? Why?
If this is for school, then I hope it's early enough that you can still drop the course and get a full refund. The only way to get this working is to actually build and run it in DOS. Use a virtual machine running FreeDOS and a copy of Turbo C++. |
There's no "equivalent" or "direct replacement". Linux handles OS
and hardware internals quite differently. What are you trying to achieve? Try finding the Linux equivalent. Cheers, Tink P.S.: Better off in PROGRAMMING, moved accordingly. |
aha i have windows 7 version i know that i should work on windows 7 actually i did and i get the same error which is
undefined reference int86() ....even i include the proper library dos.h that have the function int86 !!! another thing i am sure that there is a replacement for dos.h specially for accessing the register but i want to know what is to know what is the replacement thanks anyway |
Quote:
Furthemore, as you have already been told twice, there is no way to get this working in anything other than DOS. Not Windows 7. DOS. |
int86( 0x10, ®s, ®s );
its mean to call interrupt 10 to get the color in specific register i know what the code means ! and i know its work,i search the internet and i found other have the same code i copy it but i got just one problem int86 is udefined is that mean the problem is from the header dos.h ( i speak now as i tried it in windows version) |
What colour in which register? There's no such thing in newer versions
of Windows OR in Linux. |
Quote:
Here's what you need to set up a build environment for this: http://www.virtualbox.org/ http://www.freedos.org/ http://www.delorie.com/djgpp/ You install VirtualBox on your host system (works in both Linux and Windows), you install FreeDOS in VirtualBox, and you install djgpp in FreeDOS. Then you use djgpp to build the program. No, there is no other way. You have your solution. Now mark the thread as solved. |
http://gd.tuwien.ac.at/languages/c/p...own/advcw1.htm
here is an examples |
Quote:
--- rod. |
The use of int86() is a MS &/or Borland method of accessing X86 real-mode BIOS interrupts. There is no way these are going to work from any protected-mode OS. There is probably a way to emulate such a real-mode configuration, such as Qemu. The code can probably be compiled with gcc, but will not link, due to the absence of any working library containing the int86() function. The error message 'undefined reference int86()' seems to support this.
In general terms, the BIOS Int 10h is used to control the video susbsytem, including both text-mode and some graphics modes. In practice, the BIOS calls were rarely used to actually perform graphics functionality (poor speed). If the OP wants to simply write text to character cells in a text-mode screen, there are the ncurses calls that are probably the closest approximations in Linux of the the Int 10h BIOS calls. --- rod. |
thanks theNbmor but even when i used it on MS OS system i got an error undefined ref and i use a header (dos.h) that contains int86() ...can be another error not related to the header ! mm actually i have a dos.h that dont contains the int86() but i downloaded new one contains int86() and then i got that erro ( undefined reference int86())
|
Are you aware that DOS and Windows 7 are different operating systems?
|
aha i know that but still u can use the CMD in any windows version to reach to the interrupt 10 !! so it should work!
|
Quote:
If you want to continue following DOS-specific tutorials that don't work in Windows 7 (certainly not in cmd.exe), then follow my instructions in post #8 to get them working. |
All times are GMT -5. The time now is 08:20 PM. |