LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-26-2015, 05:08 PM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Rep: Reputation: 255Reputation: 255Reputation: 255
C programming: graphvga.h for Linux ?


Hello,

I would like to compile this program on linux:

Code:
#include <stdio.h>
#include <conio.h>
#include <graphvga.h>

void initvga(){
 union REGS reg;
  reg.h.ah=0;
  reg.h.al=19;
  int86(0x10, &reg, &reg);
}

void closevga(){
 union REGS reg;
  reg.h.ah=0;
  reg.h.al=3;
  int86(0x10, &reg, &reg);
}

int main(){ 
   initvga();
   getch();
   /// bla bla ...
   closevga();
}
Would you know where to find the graphvga.h on linux?
Or a very close clone?

thank you
 
Old 10-26-2015, 05:25 PM   #2
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
There are only 2 hits in google for that and one of them is this thread.

FYI that code will need to be completely rewritten as it is DOS 16 bit, uses interrupts and is not even close to portable.
 
Old 10-26-2015, 05:38 PM   #3
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by wildwizard View Post
There are only 2 hits in google for that and one of them is this thread.

FYI that code will need to be completely rewritten as it is DOS 16 bit, uses interrupts and is not even close to portable.
The well-known Borland C 4.0 is the software, having the lib graphvga.h, loadpcx.h,...
 
Old 10-27-2015, 09:38 AM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,863
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Install dosbox, and turboc/borlandc in it; it might work in that. Perhaps.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux programming employable programming language emekadavid Linux - General 8 09-21-2012 03:19 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration