Post Reply 
HP 200 LX 2MB and Borland Turbo C 2.01
02-04-2019, 04:24 PM
Post: #1
HP 200 LX 2MB and Borland Turbo C 2.01
Questions have been asked about the HP 95/100/200LX family earlier on, so here we go.

I have finallly managed to install Turbo C on my HP 200 LX. And it works. Well, almost, since the memory runs out when truing to compile the tiniest little program.

#include <stdio.h>
main()
{
printf("Hello HP 200LX!");
return 0;
}

The compiler acceppted the code but ran out of RAM. I just had some 20KB free RAM indicated initially but things went sour at some 10KB indicated. (The compiler shows the RAM status during compilation.)
I tried these variants in order to get it running.
A. TC via File Manager.
B. TC from DOS 5.0 prompt.
C. TCC as A above.
D. TCC as B above.

All variants gave the same result. I fiddeled with the RAM setup, and was able to run from DOS prompt when the DOS portion of system RAM was about 400 KB.

My two questions are:
1. Have anyone ever gotten to the point of compiling "anything" with the Turbo C on a HP 200 LX?
2. If so, I would much appreciate a clue or perhaps an answer to my little mystery.

Regards,
Matti Sweden
Find all posts by this user
Quote this message in a reply
02-04-2019, 05:06 PM
Post: #2
RE: HP 200 LX 2MB and Borland Turbo C 2.01
Have you tried it without the stdio.h?
Find all posts by this user
Quote this message in a reply
02-04-2019, 07:02 PM
Post: #3
RE: HP 200 LX 2MB and Borland Turbo C 2.01
First, what does "mem" show for free memory prior to launching TurboC? You might need to close System Manager entirely if you want to use the IDE (More, Menu, Application, Terminate All). You might be able to squeeze out just enough to use it under System Manager if you configure DOS to run with all available memory. The default "DOS" icon in More will only give you as much as you've specified in Setup/System/Advanced (probably 64-96 KB or so).

You can create additional "DOS" icons in More that allocate different amounts of memory. Simply create a new icon, and set the program path to "D:\DOS\COMMAND.COM|", with the pipe (shift+backslash) character at the end. This will give you a DOS icon that grabs all available RAM (probably around 400 KB if nothing is running). If you want to be a bit more conservative, put a desired number of KB after the pipe character, e.g. "|256" to reserve 256 KB for DOS programs.

I have "DOS (All Mem)" and "DOS (256 KB)" icons on mine, the former grabbing whatever RAM is leftover depending on what else I've got running, and the latter targeting 256 KB.

On a slightly related note, I'd suggest taking a look at Turbo Pascal 5.5. The IDE runs great on the palmtop, and the language, libraries, and surviving documentation are more suitable for developing on old DOS machines these days.
Visit this user's website Find all posts by this user
Quote this message in a reply
02-04-2019, 07:09 PM
Post: #4
RE: HP 200 LX 2MB and Borland Turbo C 2.01
Thanks for the fast reply.
I do not really remember the details. However I´ll try to find the mentioned software.

Regards,
Matti
Find all posts by this user
Quote this message in a reply
02-04-2019, 09:26 PM
Post: #5
RE: HP 200 LX 2MB and Borland Turbo C 2.01
(02-04-2019 05:06 PM)KeithB Wrote:  Have you tried it without the stdio.h?

stdio.h contains the prototype for printf() so you'll find it difficult compiling that!

This said, you could try omitting it but providing a prototype yourself. Something like this (untested):

Code:
int printf(char*);

int main()
{
  printf("Hello HP 200LX!");
  return 0;
}
Find all posts by this user
Quote this message in a reply
02-04-2019, 10:26 PM
Post: #6
RE: HP 200 LX 2MB and Borland Turbo C 2.01
I should have been a bit more clear.

stdio.h might include a lot of baggage that uses a lot of memory. Try an even simpler program:

int main()
{
return 0;
}
Find all posts by this user
Quote this message in a reply
02-05-2019, 01:51 AM
Post: #7
RE: HP 200 LX 2MB and Borland Turbo C 2.01
printf() has a lot of baggage you don't need. Try puts()
Find all posts by this user
Quote this message in a reply
02-05-2019, 10:13 PM
Post: #8
RE: HP 200 LX 2MB and Borland Turbo C 2.01
The 200LX has the full 640KB of RAM available to DOS so there is no reason why it shouldn't be able to compile such a simple C program if contemporary PCs of the time could.

Try exiting File Manager completely (Menu -> Application -> Terminate All) and try compiling from the DOS command line.

Make sure you have a reasonable amount of space available on the C: drive - the compiler will need to create temporary files.
Find all posts by this user
Quote this message in a reply
02-06-2019, 04:12 AM
Post: #9
RE: HP 200 LX 2MB and Borland Turbo C 2.01
FYI, the 200LX has a 80186 processor, which mean that it does not support high memory (himem) but do support the expanded memory (EMS).
This memory, activated by a EMM driver loaded in config.sys, reserve a 64 KB space in the upper memory area (between 640K and 1024K) to do RAM bank switching.
Turbo C 2.0 automatically detect and use EMS memory if found, freeing up space in the lower memory area. (0K..640K)
Find all posts by this user
Quote this message in a reply
02-06-2019, 04:16 PM
Post: #10
RE: HP 200 LX 2MB and Borland Turbo C 2.01
Is Turbo C available for download aywhere? I would like to give it a try on my 1000Cx as well.

Cheers,
Harald
Find all posts by this user
Quote this message in a reply
02-06-2019, 04:56 PM
Post: #11
RE: HP 200 LX 2MB and Borland Turbo C 2.01
Turbo C 2.X:

https://winworldpc.com/product/borland-turbo-c/2x

Turbo Pascal 5.5:

https://winworldpc.com/product/turbo-pascal/5x

Loads of Borland manual scans:

http://www.bitsavers.org/pdf/borland/
(Drill down into the subdirectories.)
Visit this user's website Find all posts by this user
Quote this message in a reply
02-06-2019, 06:49 PM
Post: #12
RE: HP 200 LX 2MB and Borland Turbo C 2.01
Look for MASM or TASM also. We used Turbo C and Pascal and assembly using MASM in college. I always wanted a 95/100/200lx and finally got a 200lx a couple years ago but it has a bad display.
Find all posts by this user
Quote this message in a reply
02-06-2019, 07:39 PM
Post: #13
RE: HP 200 LX 2MB and Borland Turbo C 2.01
(02-06-2019 04:56 PM)Dave Britten Wrote:  Turbo C 2.X:

https://winworldpc.com/product/borland-turbo-c/2x

Turbo Pascal 5.5:

https://winworldpc.com/product/turbo-pascal/5x

Loads of Borland manual scans:

http://www.bitsavers.org/pdf/borland/
(Drill down into the subdirectories.)

Thanks a lot for the links!
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)