C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 15th, 2009, 03:16 PM
MyKel_D MyKel_D is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Posts: 50 MyKel_D User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 57 m 11 sec
Reputation Power: 5
Send a message via MSN to MyKel_D
Converting FROM TurboC 3.1

The last time I programmed in C, it was with the 3.1 IDE. Although learning K&R C, it is this method that was used primarily. My question is: Will anyone help me to convert this piece of code so that I can use it in a newer C IDE (' DEV-C++).
Not knowing if the code would cause this site problems let me give a web link to a of the actual code.
File in question.

The piece that I need to exclude is the
" registerbgidriver(EGAVGA_driver);
registerbgidriver(Herc_driver);
if(initGraphics())
"
portion belonging to Borland.

If further is needed to help me in this endeavor, I will be glad to clarify.

Thank yo for any and all aid in this endeavor.

Reply With Quote
  #2  
Old August 15th, 2009, 05:40 PM
dwise1_aol's Avatar
dwise1_aol dwise1_aol is offline
Contributing User
Dev Shed God 2nd Plane (6000 - 6499 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 6,125 dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 3 Days 16 h 57 m 4 sec
Reputation Power: 1949
That's from the BGI, Borland Graphics Interface, which was a library of proprietary Borland extensions.

You will need to find a third-party library that supports it and that you can use with MinGW gcc (the compiler that Dev-C++ uses). I don't have, but it sticks in my mind that I had stumbled across such a library, though I forget which of my non-Borland compilers it was for. Google around for BGI and other keywords and see what you can find. You might also rummage around bloodshed, because they might offer something.

Otherwise, your option might be to resort to the free Borland 5.5 download, though I understand that's only the command-line tools and no help files.

Good luck in your search.


PS
Well duh! If all you want to do is compile that code, then why not locate an old Borland IDE? I'm sure they're still out there for free download, because we keep getting newbies here who saddle themselves with it (though to fair, in many cases it's their school that forces it on them).

Of course, that won't help you if your intention is to migrate your code. For that, I'm pretty sure that there's a BGI DLL out there.

Last edited by dwise1_aol : August 15th, 2009 at 06:15 PM.

Reply With Quote
  #3  
Old August 15th, 2009, 06:42 PM
MyKel_D MyKel_D is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Posts: 50 MyKel_D User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 57 m 11 sec
Reputation Power: 5
Send a message via MSN to MyKel_D
Thank you very mucmorh

Your post is very much appreciated. Yes it is my intention to migrate my old code. I still have a copy of TurboC 3.1 and it is installed on an old Win98 machine.
Poking around with some of the C files contained with the distribution I have I found that I may be able to just use one of the templates there and add my old code into it. I placed another file on the site:
a 3D fern
It occurs to me that I may just have to find the syntax use in the new compiler; such as randomize()/random() and putpixel()

again TY it is a start in the right direction.

p.s. is it just my imagination, but it seems to me that with a minor rewrite on variable usage that c can be rewritten as PHP very easily?

Last edited by MyKel_D : August 15th, 2009 at 07:14 PM. Reason: more info

Reply With Quote
  #4  
Old August 15th, 2009, 06:57 PM
sizablegrin's Avatar
sizablegrin sizablegrin is offline
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Jun 2005
Posts: 5,964 sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 2 Days 12 h 47 m 19 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 4850
You may be missing a salient point. That compiler was designed for a machine running in real mode (and maybe one level of protected mode). The only way you could use it on a modern machine would be on a VM that simulated such a system (or know enough to bypass the OS and bring your system up under such primitive conditions).

One also wonders why so many people are still using Dev-Cpp. It hasn't been maintained in years. It boggles the mind when "progressive" programmers decide to get daring and switch from Turbo C to Dev-Cpp. Makes me wanna sell 'em an 8080 and an ADM-3 terminal.
__________________
Write no code whose complexity leaves you wondering what the hell you did.
Politically Incorrect DaWei on Pointers Grumpy on Exceptions

Reply With Quote
  #5  
Old August 15th, 2009, 07:17 PM
MyKel_D MyKel_D is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Posts: 50 MyKel_D User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 57 m 11 sec
Reputation Power: 5
Send a message via MSN to MyKel_D
Some of us like to play in the past, while changing the future. I am an old coder from the late '70s and 80s' and am trying to learn the new world.
Got a question. Do you think that an Amiga 4000 with a Video Toaster is a obsolete piece of junk?
Let me explain me; please.
I hand write vrml 97 using PROTO and EXTERNPROTO alot and post it on a Apache 2.2 server, am currently building and hosting a 3D website around it. I enjoy coding as I am an old schooler. Humans like Jerry Houston, Steve Rimmer, Jerry Pournel, Steve Ciarcia are my heros when it comes to programming, I learned tons from them. JAVA makes my head spin, Bill Gates convinced the world that Y comes before X in his ROW/COLUMN way of doing BASIC graphics. What takes me 3 lines of code to do, the new world need 6 pages. All I want to do is put a colored pixel on the screen, use nested loops to move it across the screen, and not write a novel to do so. Things were much easier in the world before mice. I curently have an Apple IIe, an Apple IIgs, several 8088s, et. al. I love to write code on them, then translate it to the new world. Pardon me but the past is why the future exist in the first place. Not giving it due respect, insults the hard work of us that "file shared" and did it over BBS.

Last edited by MyKel_D : August 15th, 2009 at 07:48 PM. Reason: upset at the last poster

Reply With Quote
  #6  
Old August 16th, 2009, 04:27 AM
dwise1_aol's Avatar
dwise1_aol dwise1_aol is offline
Contributing User
Dev Shed God 2nd Plane (6000 - 6499 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 6,125 dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level)dwise1_aol User rank is General 14th Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 3 Days 16 h 57 m 4 sec
Reputation Power: 1949
Oh, dude! I was so busy replying on another forum, I forgot about this one!

My intro to computers was through the US Air Force computer repairman course, 30547 course at Keesler AFB, MS. From there, I went through the computer science curriculum at the University of North Dakota, Grand Forks.

Dude! I feel your pain! I suffered through those same days when 8K of RAM cost us a whopping $240!

Ain't it a fracking pain that everything just keeps changing on us?

Computer tech keeps changing. That is a given. What we need to do to maintain our kung fu is to be able to keep up with those changes. While at the same time remembering how we used to have to do things.


Dude! (which I feel is justified, since my friend has just completed a "surfer girl" course). Just what the frak are you trying to accomplish?

If your goal is to run your program with old tech, then you'ver accomplished that!

If your goal is to run old tech with new tech, then do that!

The BGI used the old video graphics tech to accomplish its goals. If you want to use new tech to do the same things, then you need to map the old function calls to the new graphics functions.

Dude! To put it in that universal language, Yiddish: Nu?

Reply With Quote
  #7  
Old August 16th, 2009, 10:36 AM
MyKel_D MyKel_D is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Posts: 50 MyKel_D User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 57 m 11 sec
Reputation Power: 5
Send a message via MSN to MyKel_D
A most appreciative thank you

'Tiz nice to know that there is more like me out there.
It IS my goal to update my old code to the new graphics routines, as stated it is just a matter of finding the replacement calls, I did manage to find random() and rand(), but I may have to go back to the ROM routines (i.e. WDOT) and make my own funtion. But somehow I feel that this too has been changed to something different.
Oh and of course I may have to write outtext() and outtextxy(), if I cannot find a good replacment call. Mayhaps OpenGL is my answer.
Again I apreciate your comments.

Reply With Quote
  #8  
Old August 16th, 2009, 11:10 AM
sizablegrin's Avatar
sizablegrin sizablegrin is offline
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Jun 2005
Posts: 5,964 sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 2 Days 12 h 47 m 19 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 4850
Actually, you're blathering. Pournelle can't code for poot and was the first to admit it back in his Byte heyday. Ciarcia is mainly a hardware type of guy. Row/column predates Gates. The Apple ][ was a piece of junk.

I know old. I once spent three weeks hacking 7 bytes out of a piece of code. At that time it was the economical thing to do. Expensive non-recurring cost to avoid even more expensive recurring costs.

I decry fat, bloated code as much as anyone and more than most, I expect. I cursed the folly of IBM/Intel/MS winning a market with a machine built like no competent pro would have built it.

If your hobby is playing with buggy whips and whiffle trees, have at it. I understand and respect that. I made the mistake of thinking you were asking a serious question for a useful purpose.

Reply With Quote
  #9  
Old August 16th, 2009, 12:25 PM
MyKel_D MyKel_D is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Posts: 50 MyKel_D User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 57 m 11 sec
Reputation Power: 5
Send a message via MSN to MyKel_D
Hmmm curious


And I thought this was a help site NOT a flame the student site. If you have anything that will help replace the old BGI calls then post it, if not stay out of this thread, K.

Reply With Quote
  #10  
Old August 16th, 2009, 12:38 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,383 Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 1 Day 20 h 49 m 30 sec
Reputation Power: 4080
Yep. Just use the WinBGIM project. Just google for "Dev C++ winbgim" and you should get everything you need. The WinBGIM library provides the same function names as the old borland BGI library, so it should be easy to port your code over.

One of these days, I should buck up and finish my linux port of the BGI functions .
__________________
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne

Reply With Quote
  #11  
Old August 16th, 2009, 12:42 PM
MyKel_D MyKel_D is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Posts: 50 MyKel_D User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 57 m 11 sec
Reputation Power: 5
Send a message via MSN to MyKel_D
OMG TY- will look into it this day. Let you know how it turns out.

Reply With Quote
  #12  
Old August 16th, 2009, 02:10 PM
sizablegrin's Avatar
sizablegrin sizablegrin is offline
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Jun 2005
Posts: 5,964 sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level)sizablegrin User rank is General 58th Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 2 Days 12 h 47 m 19 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 4850
You thought that was a flame? You've reinforced the opinion that you might actually be demented. I was trying to avoid that conclusion. Silly me.

Reply With Quote
  #13  
Old August 16th, 2009, 03:29 PM
MyKel_D MyKel_D is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Posts: 50 MyKel_D User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 57 m 11 sec
Reputation Power: 5
Send a message via MSN to MyKel_D
New Question

ok, one down am gettting console proggies. Now I have some old .obj code. Noticed that it will not add to a project. Is there a way to convert these old object codes to the new world, without the original source code ( I do have the TASM file).

Reply With Quote
  #14  
Old August 16th, 2009, 05:57 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,383 Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 1 Day 20 h 49 m 30 sec
Reputation Power: 4080
Not very likely, especially if the obj file is compiled for 16-bit. You can try compiling the ASM file if you have it though.

Reply With Quote
  #15  
Old August 16th, 2009, 06:04 PM
MyKel_D MyKel_D is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Posts: 50 MyKel_D User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 57 m 11 sec
Reputation Power: 5
Send a message via MSN to MyKel_D
It was 32 bit- afraid I'll have to rewrite all the routines (as the asm code is corrupt and cannot even be used in the old TC compiler). this is not really hard, I did it the first time, just time consuming. Thank you all for your input and help. at least my BGI stuff that don't use my object code works. Am currently changing all the BGI calls to OpenGL now that I have to ablity to run it in the new compiler.
If someone happens to run across a file named "myk.lib" I'd appreciate a holler.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Converting FROM TurboC 3.1

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap