# Generating "star graphs" under CP/M using Turbo Pascal and PLOT33 - CP/M

This is a discussion on Generating "star graphs" under CP/M using Turbo Pascal and PLOT33 - CP/M ; Please visit http://primepuzzle.com/blog/starps17.html My brother-in-law got me interested in a "puzzle" he learned about involving computing the number of unique stars you can draw which have a specified number of points. I've worked on this very interesting problem and have ...

# Thread: Generating "star graphs" under CP/M using Turbo Pascal and PLOT33

1. ## Generating "star graphs" under CP/M using Turbo Pascal and PLOT33

http://primepuzzle.com/blog/starps17.html

My brother-in-law got me interested in a "puzzle" he learned about
involving computing the number of unique stars you can draw which have
a specified number of points. I've worked on this very interesting
problem and have written several computer programs which compute these
numbers and actually plot the "star graphs." Since the compilers I
used are CP/M-based, I thought there might be some interest here.

Lee

2. ## Re: Generating "star graphs" under CP/M using Turbo Pascal and PLOT33

Hello, Lee!

> My brother-in-law got me interested in a "puzzle" he learned about
> involving computing the number of unique stars you can draw which have
> a specified number of points. I've worked on this very interesting
> problem and have written several computer programs which compute these
> numbers and actually plot the "star graphs." Since the compilers I
> used are CP/M-based, I thought there might be some interest here.

I wonder why you did not use Dr. Logo? The code would have been much
simpler.

Since this is the comp.os.cpm Newsgroup, doing this kind of stuff with
GSX (Graphics System eXtension for CP/M is a PORTABLE graphics
systems) would enable you to produce "graphs" the same under CP/M (8-
bit), CP/M-86, and MS-DOS. Digital Research produced a booklet showing
how to program GSX with all its compilers. I know that CBASIC Compiler
(CB-80 and CB-86) were "extended" to have built-in graphics commands.
There is even a big book printed by Wiley in the USA that explained
all that ("CBASIC/CB86 with graphics: programming for business").

I remember that a Frenchman did an impressive GSX demo on the Amstrad
PCW8256, twenty years ago. But, since I am a BASIC fan, I have no idea
what became the source code. I have a 100-pages text explaining how to
program GSX from BASIC. I hope to make it "Literate Programming". (In
this regard, it was interesting to see how you explained your
programs.)

Yours Sincerely,
Mr Emmanuel Roche

3. ## Re: Generating "star graphs" under CP/M using Turbo Pascal and PLOT33

Many years ago, I wrote a Mallard BASIC program that displays a PLOT33
vector image on a GSX display. It was written for the PCW, but should work
under Mallard on other systems.

It's PLOTGSX.BAS in .
Seems that the drawing instructions in a .VEC file are a fairly good match
for GSX operations.

--
John Elliott

Thinks: This is what a nice clean life leads to. Hmm, why did I ever lead one?
-- Bluebottle, in the Goon Show

On Thu, 24 Jan 2008 06:14:18 -0800 (PST), roche182@laposte.net wrote:

>I remember that a Frenchman did an impressive.....

Hey, Emmanuel, I hear there may be an opening for a stock
broker - but you might have to move to Paris. Or, maybe you
can find a reward for simply locating the previous employee?

Might get you the means to pick up some newer gear....

Bill

5. ## Re: Generating "star graphs" under CP/M using Turbo Pascal and PLOT33

On Jan 24, 9:14 am, roche...@laposte.net wrote:

I hope to make it "Literate Programming". (In this regard, it was
interesting to see how you explained your programs.)

Thanks!

I may have spent more time documenting the trouble shooting and
features of this application than I did coding the application. I have
browsed your "Literate Programming" material and find it interesting.
I usually document externally, not internally.

I chose to use Turbo Pascal, not GSX, because, one, I know nothing
about GSX and, two, the fellow who wrote PLOT33 had a sample ap
written in this language that generated a graph that was close to what
I needed. PLOT33, speaking of well documented programs, is a
masterpiece. Had I read it more carefully, the very final sentence in
the doc (!), which warned you that PIP needed to be invoked w/ its [O]
option (for Object ie. Binary code) when you were sending your
masterpiece to your printer, the two days I "wasted" trying to figure
out why my printer was hanging would have been avoided!

I think what may have interested me most in this project was my
discovery that there is an Epson 9PIN emulator available for people
who don't happen to have an Epson 9PIN printer. This allowed my
brother to print our cool stars on his inkjet printer, from DOS. The
http://primepuzzle.com/blog/DOSPrinter.zip. This is a 30-day trial
version.

6. ## Re: Generating "star graphs" under CP/M using Turbo Pascal and PLOT33

Hello, Lee!

> I chose to use Turbo Pascal, not GSX, because, one, I know nothing

Re-reading my message, I see that I forgot to say that the impressive
demo of GSX that I saw 20 years ago on an Amstrad PCW8256 (it was
displayed in a computer shop, to show customers what the PCW was able
to do) was written in Turbo Pascal.

Also, I saw that you are still using TP 2.0. Even if I am not a Turbo
Pascal fan, I could provide you with a copy of TP 3.01A (the last one
for CP/M), if you want.

GSX is powerful 1) because it is portable at the source level and 2)
it uses drivers. You mention the Epson FX-80, but it was limited to
144 dots per inch. I started writing a laser printer driver (at 300
dots per inch, at the time), but never finished it. The best driver
made by Digital Research was the one that I used for years to produce
"business graphics" on the graphics plotter Hewlett-Packard HP7470A.
It is able to display 3,000 by 10,000 dots on a page... It can be
found for peanuts on eBay. (The problem was that it uses "felt-tip
markers" -- I hope that I remember the correct English word). But, its
big advantage is that it can print in colors. (Me, I kept using only 4
colors: black, red, green, and blue.)

Yours Sincerely,
Mr Emmanuel Roche

7. ## Re: Generating "star graphs" under CP/M using Turbo Pascal and PLOT33

On Jan 25, 7:43 am, roche...@laposte.net wrote:

> Hello, Lee!
>
> Re-reading my message, I see that I forgot to say that the
> impressive demo of GSX that I saw 20 years ago on an Amstrad
> PCW8256 (it was displayed in a computer shop, to show customers
> what the PCW was able to do) was written in Turbo Pascal.

Interesting!

> Also, I saw that you are still using TP 2.0. Even if I am not a
> Turbo Pascal fan, I could provide you with a copy of TP 3.01A (the > last one for CP/M), if you want.

Thanks but I have the book for 2.0 and I'm helpless w/o the book. I
use an include file called PARAMSTB.INC in the current ap which I
wrote some time back because 2.0 does not have a builtin function to
grab the parameters from the command tail (3.0 does). In fact I've
written three versions of this function, two for use under Z-System
and this one which works under CP/M. Interestingly, I found a subtle
bug in this one while testing this ap.

> GSX is powerful 1) because it is portable at the source level and
> 2) it uses drivers. You mention the Epson FX-80, but it was limited > to 144 dots per inch. I started writing a laser printer driver (at > 300 dots per inch, at the time), but never finished it. The best
> driver made by Digital Research was the one that I used for years > to produce "business graphics" on the graphics plotter
> Hewlett-Packard HP7470A.
> It is able to display 3,000 by 10,000 dots on a page... It can be
> found for peanuts on eBay. (The problem was that it uses "felt-tip
> markers" -- I hope that I remember the correct English word). But, > its big advantage is that it can print in colors. (Me, I kept using > only 4 colors: black, red, green, and blue.)
>

I'm in the market for a new computer and noticed a color laser printer
from HP that goes for about \$300. Unbelievable.

> Yours Sincerely,
> Mr Emmanuel Roche