Dec 232017
Astronomy program that shows night sky.
File STARRY64.ZIP from The Programmer’s Corner in
Category Science and Education
Astronomy program that shows night sky.
File Name File Size Zip Size Zip Type
CONSTEL.DAT 3952 1500 deflated
LPT2COM.BAT 441 276 deflated
MESSIER.DAT 6719 1825 deflated
PLANETS.DAT 2658 1059 deflated
STARRY.DAT 191150 56619 deflated
STARRY.DOC 31286 9743 deflated
STARRY.EXE 234224 89365 deflated

Download File STARRY64.ZIP Here

Contents of the STARRY.DOC file

Indoor Astronomy with
Hercules, CGA, EGA, VGA,
Math Coprocessor, Mouse, and
Dot Matrix, Laser, and Inkjet Printers.

Version 6.4 (8/20/91)
Copyright 1991 by Rob Crockett

Starry Nights Version 6.4 Page 2

Table of Contents Page
------------------------------------------------------- ----
Introduction 3
Files 3
Quick start 4
Additional Info 5
The Databases 5
Running Starry Nights 5
The Main Menu 6
A. Select by Altitude and Azimuth 6
C. Select by Constellation 6
M. Select by Messier Object 6
P. Select by Planet 6
R. Select by Right Ascension and Declination 7

D. Date/Time and Latitude/Longitude 7
G. Changing the graphics mode 8
O. BV/Highlight/Width/Messier/Alt-Az mode 8
I. Re-Initializing and saving settings 9

Plot the sky 9
Status Lines 9
Mouse 10
Printing 10
Screen Orientation and Alt/Az mode 11
Screen Colors 11
Star Magnitude 11

The Status Box--Finding an Object in the Sky 11
STARRY.EXE: Math co-processor support 11
STARRY.PAS: Pascal source code 12
Credits 12

Copyright 1991 Rob Crockett

Starry Nights Version 6.4 Page 3

Written with Turbo Pascal v5.0 for the PC, this program uses Hercules
graphics, CGA, EGA or VGA to display stars, constellations, planets,
the moon, and Messier objects in a corner of any part of the sky.
While displaying the sky, a Microsoft compatible mouse or cursor keys
can be used to draw lines on the screen, write text on the screen, and
identify a star or planet. The screen display of the stars then can
printed on an Epson compatible dot matrix printer, a Hewlett-Packard
LaserJet series II compatible laser printer, or a Hewlett-Packard
DeskJet 500 compatible inkjet printer. If available, a math
coprocessor will be used to speed computations.

Latest additions to the program include support for inkjet printers,
the ability to use EGA/VGA LCD displays, the addition of numerous
graphics modes, the ability to flip the star display top-to-bottom and
right-to-left to match to view through a telescope, and the convertion
of the planet coordinates to Epoch 2000 to match the star database.

If you feel the need to pass this program around, do so in an
uninhibited fashion and without guilt. If you feel the need to modify
the databases or program, try to refrain from passing along the
contaminated version without at least leaving notice of your deed in
the package.

If you enjoy this program as much as I do and you want to support this
sort of software, I will be more than satisfied that you have paid
your due if you simply SEND ME A POSTCARD with a quick note about how
you like the program and how it works on your system. I wrote this
program as a low budget way for me to look at the stars during the day
and as an easy way to find the planets at night, and it gives me great
pleasure to hear of others using it for the same.

FILES: STARRY.EXE main program
STARRY.DAT star database
MESSIER.DAT messier object database
PLANETS.DAT planet reference data
CONSTEL.DAT constellation data
STARRY.DOC this file
LPT2COM.BAT example to redirect printer to COM port

The program works without undue introduction, but a few pointers might
be helpful to the interested.

To start, type "STARRY" from DOS in a directory containing the above files.
STARRY loads the data files, reads the time and date from your
computer, defaults to Pittsburgh PA latitude and longitude, and
examines your system for a mouse driver and a graphics card.

Copyright 1991 Rob Crockett

Starry Nights Version 6.4 Page 4

Choosing star data file: On first use, you should use the ASCII file
STARRY.DAT and create the binary file STARBIN.DAT by choosing "3"
(provided you are running from a hard disk and have plenty of disk
space). Thereafter, you can simply press return here to default load
STARBIN.DAT, a much faster load than STARRY.DAT. If you run out of
memory while loading STARRY.DAT (STARRY reports "Memory low"), STARRY
will just use as many stars as will fit into the available memory.

Choose an object to view: You can default to the Orion constellation by
just pressing return here at the main menu. Or you can choose to
point the center of the screen to point at a different constellation,
a particular right ascension and declination, an altitude and azimuth
(by altitude from horizon and compass heading), a Messier object, a
planet, or the moon by using MAIN MENU choices A, C, M, P, R.

Choose screen orientation: The default orientation of the screen is for
the bottom of the screen to be parallel to the celestial equator
(faster display). If you are not familiar with right ascention,
declination, and the celestial equator, change to the more
conventional view of the stars with the bottom of your screen parallel
to the horizon by selecting the "ALT/AZ" mode from the "O"ptions menu.
For the orientation of your screen to then match the view outside in
the ALT/AZ mode, you must also have the proper time, date, latitude,
and longitude set.

Plot the sky: Press from the main menu to see the stars. Use the
cursor keys or mouse buttons indicated at the bottom of the screen to
draw lines, type text, or identify objects. If you wish to print the
screen, ready your printer, press "P", then select your printer type.
STARRY sends the screen to your parallel printer port LPT1 (also
called PRN). Use the batch file "LPT2COM.BAT" or something similar to
redirect output prior to starting STARRY if your printer is on a
different port (a COM port for example). Press RETURN (ENTER) to
continue back to the main menu.

Throughout the program, simply press return to enter (or keep) the value in
parentheses. To enter a coordinate, follow the instructions with each
screen page. In general, values can be entered as decimal (5.34),
degrees/hours (5:20:24), or a combination (5:24.4). When entering the
date, be sure to use slash separators (3/19/1995) and use the whole
year (1995 instead of 95).


The database contains all stars brighter than 5.0 magnitude, and many
selected fainter stars. The star database is organized and read as an
ASCII file from brightest star to dimmest.

Copyright 1991 Rob Crockett

Starry Nights Version 6.4 Page 5

There are some 4103 objects in the database and room in the program
for many more (up to about 5000 with 640K memory). To add objects,
simply insert at the end (or anywhere except the first three lines) in
the above format with your favorite editor, following the format of
the rest of the database.

Coordinates are in right ascension and declination, epoch 2000. HR is
hours, DEG is degrees, MN is minutes, SEC and SC are seconds--be sure
to separate the components with colons. "Mag" is the magnitude of the
star in yellow light, the approximate visual magnitude. Recall that
the brighter the star, the less the magnitude--the brightest stars
have negative magnitudes. "B-V col" is an indication of the color of
the star, ranging from -0.25 to +2.5, with blue at the negative side,
red at the far positive. Of the remaining space (Rank, CON, and Star
Name), the abbreviated constellation (CON) is used in the program to
highlight the appropriate constellation, and Rank and Star Names are
used when identifying objects with the mouse or cursor keys after the
objects have been plotted. Constellation abbreviations used within
STARRY also include "MES" for messier objects, "PLT" for planets, and
"MON" for the moon.

The other databases (MESSIER.DAT, PLANETS.DAT, and CONSTEL.DAT) are
read in a similar manner but should not be modified. However, the
last two entries in CONSTEL.DAT (OP1 and OP2) are yours to modify.
Put your favorite coordinates here, then pick from the constellation
menu for multiple easy accesses. If you want to highlight objects you
have added to STARRY.DAT, put its constellation abbreviation (instead
of "OP1" for example) and center coordinates here in CONSTEL.DAT.

On running "STARRY.EXE" from DOS, you will first see a menu of ways to
load the main star array. You will first need to select load type #2
or #3 to load with STARRY.DAT. If you selected #3, and if you have a
hard disk I recommend it highly, thereafter you can load with the
created data STARBIN.DAT and save considerable time. STARBIN.DAT is a
machine code file thus is difficult to modify but quick to load. In
the mean time, the program has loaded the other databases (CONSTEL.DAT
and PLANETS.DAT) and requested the current time and date from your


A. SELECT BY ALTITUDE AND AZIMUTH. If you have a particular area of the
sky in mind, enter its height from the horizon (altitude) and the
compass heading (azimuth) where
North: 0 or 360
East: 90
South: 180
West: 270.
For this function to work properly, the date, time, latitude, and

Copyright 1991 Rob Crockett

Starry Nights Version 6.4 Page 6

longitude must be correct (see "D" below).

C. SELECT BY CONSTELLATION. By selecting a constellation from the 88
available, you set the constellation to be highlighted and the
coordinates of the sky to be viewed. On bringing up the grid of
abbreviations, use your cursor keys to move the pointer, select by
pressing return, retain same by pressing escape.

M. SELECT BY MESSIER OBJECT. Use the cursor keys to scroll through the
list of star clusters, nebulae, and galaxies compiled by the Frenchman
Charles Messier.

P. SELECT BY PLANET. By selecting a planet or the moon, you set the
screen coordinates to view the sky with the planet front and center.
While STARRY calls up the planetary coordinates, the data is displayed
on the screen in a format comparable to that found monthly in Sky and
Telescope magazine. If you compare STARRY to S&T, you should find
them in close agreement with the exception of pluto. Since the
orbital mechanics of pluto are not well understood (at least by me),
and its position is correspondingly difficult to calculate, the
information given on pluto is a rough estimate--the further from Jan
0.5 1985 the rougher. Note that although the planet positions in S&T
are for the Epoch of date, the positions reported by STARRY are for
Epoch 2000, to match with the star database. If you have previously
selected the "ALT/AZ" (see main menu choice "O" below), the planet
coordinates will be displayed as altitude and azimuth. Lastly, decide
if you want STARRY to select and highlight a nearby constellation.
Doing so allows you to orient yourself without referring to right
ascension and declination.

R. SELECT BY RA/DEC. Manual entry of right ascension and declination is
accomplished with this selection. To display the position of a comet,
for example, type in its coordinates here, then display the sky. The
center of the plotted sky, identified with cross-hairs on the sky
plot, represents the RA/DEC you selected. You can choose to highlight
a nearby constellation to orient yourself.

D. DATE/TIME, LAT/LONG. Press return to scan through the selections or
type in date/time, latitude/longitude, as in the examples. Time and
date are read initially from your computer. Time and date are used in
the calculation of planet positions (right ascension and declination),
and time, date, latitude, and longitude are used to calculate the
corresponding altitude and azimuth. The first step in all this is
converting longitude to time zone--far from an exact science with one
time zone for roughly every 15 degrees of longitude--then local time
(LCT or local civil time), time zone, and daylight savings time status
(DST) to Universal Time (UT). Universal time is the local time at the
prime meridian (longitude=0). The formula is:


Copyright 1991 Rob Crockett

Starry Nights Version 6.4 Page 7

where Zone=(-Longitude)/15 and west longitude is negative.

For the United States:
Zone = 5 = Eastern Standard Time
Zone = 6 = Central
Zone = 7 = Mountain
Zone = 8 = Pacific

Since the true time zones usually follow state lines rather than
lines of longitude, you may have to wing it with these conversions.
If you know you are in the Mountain time zone, for example, and on
this menu page the calculated zone is 6, start winging.

Daylight savings (DST=1) is active in most states from 02:00 AM of
the first Sunday in April until the last Sunday of October. Otherwise
DST=0. In this program, DST changes at 00:00 AM Sunday.

G. NEW GRAPHICS MODE. If you have one of those fancy multisync monitors
or you had trouble plotting with the screen mode that STARRY selected,
you can choose another mode here. If you have a VGA liquid crystal
display (LCD), often not all colors will be displayed when viewing the
stars. You can fix the problem by pressing "B" here to force the
display to black and white, then select a VGA 16 color mode. Although
this is technically a 16 color mode, 15 of the colors will be forced
to white (thus will be black on the white LCD background).

return to scan through the choices.

Displaying in B-V color gives shows the approximate star color on the
EGA and VGA (see plotting the stars below for a description of the
colors). Both HGA and CGA are in high resolution mode while showing
the stars and display only two colors--and the black background is one
of them. On the EGA and VGA, if a constellation is highlighted, all
other stars are displayed as green (Messier objects are
purple/magenta, planets are red), otherwise everything is displayed in

Width describes the approximate horizontal dimension of the screen in
degrees. Use this to zoom in or out.

If selected to be displayed, Messier objects will be magenta (EGA/VGA)
or white (CGA/Herc). Messier objects are identified in the data base
by STARRY by the constellation abbreviation 'MES'.

If you have mouse and driver installed but are unable to use it on the
graphics screen, disable it here by selecting 'N'. Your mouse and
driver must be MicroSoft compatible to work.

Ordinarily, the stars are displayed so that the celestial equator is

Copyright 1991 Rob Crockett

Starry Nights Version 6.4 Page 8

parallel to the top and bottom sides of your screen. If you are not
used to thinking of the stars this way, you can choose the more
conventional view of the stars with the horizon parallel to your
screen top and bottom by selecting "Y" here for ALT/AZ mode. With
this mode, constellations will be oriented on the screen the same way
that you see them in the sky. Unfortunately, the extra calculations
involved slow down the star plotting considerably, particularly if you
are using a version without math co-processor support or you are using
an 8088. For the ALT/AZ mode to work properly, you must have the
correct time, date, latitude, and longitude entered.

To match the view through a telescope, you can flip the display of the
stars on your screen. Choose left-to-right, top-to-bottom, or both.

I. RE-INITIALIZE. If you get lost with all the above choices and wish to
reset the program the current time, date, and all the default values,
mash "I" then hammer . If you want to save some of the
options, type "S". This will save the BV, highlight, messier, alt/az
mode, and mouse options as well as the latitude, longitude, and
graphics mode. To use these saved settings, type "U". This
information is saved in the file SETTINGS.DAT. If SETTINGS.DAT is
found by STARRY on start-up, your saved settings will be automatically
used. To return STARRY to its original virgin condition, delete
SETTINGS.DAT (and STARBIN.DAT) while in DOS (assuming you have
modified no other files).

PLOT THE SKY. Pressing at the main menu plots the sky according to
the above parameters, allows you to modify the screen to a limited
extent with a mouse, and allows printing of the screen. While STARRY
plots the stars, along the bottom of the screen you will see a status

RA 19:11:59 DEC -27:20:23 ALT -40:57:59 AZ 265:41:53 Working

From the left, right ascension in hours:minutes:seconds, declination
in degrees:minutes:seconds, altitude in degrees:minutes:seconds,
azimuth in degrees:minutes:seconds, and the plotting progress. As
soon as the screen has been plotted (or aborted by pressing return)
the mouse/keyboard instructions appear over the lower status line.

Along the top of the screen you will see:

Starry..Crockett 03/18/89 16:07 SAGITTARIUS Saturn [ALT/AZ] [+]

This gives you the date, time, constellation highlighted, planet
pointed to, and if in Alt/Az mode has been selected (see main menu
choice "O"), ALT/AZ is displayed. In the upper right corner, the
screen flip mode is indicated: [-] indicates left-to-right; [|] top-
to-bottom; and [+] is both.

Copyright 1991 Rob Crockett

Starry Nights Version 6.4 Page 9

Cross hairs (larger than those marking the center screen) will appear
at the center of the screen when star plotting is done or when
plotting has been aborted, and instructions for the mouse or cursor
keys will appear at the bottom of the screen.

If you have a Microsoft-compatible mouse and driver loaded, depress
the left mouse button to set the origin of a line, and depress the
right mouse button to draw from the origin to the current position
(and reset the origin to the current position). Hold the right button
down while moving the mouse to draw arcs. If you make a mistake (and
I always do), press the "e" key on your keyboard to erase the last
line drawn. Unfortunately, stars that you have obliterated by drawing
over will not reappear by erasing that line. To write text on the
screen, move the cross-hairs to the location, press "w", type in your
message, and press return. To identify a star, press "f" with the
cross-hairs on the object. To move on, press return.

If you do not have a mouse driver loaded or have selected the mouse to
be inactive (see main menu choice "O"), large cross hairs will appear
at the center of the screen and you can use the cursor keys to effect
screen changes. Use the arrow keys to move about the screen. If you
want to speed movement, press 't' to toggle to higher cursor jump
(moves 10 pixels instead of 1 per key press). To make fine
adjustments to cursor position, type 't' to slow cursor down again.
Press 's' to set the origin of a line, then press 'd' to draw from
origin to current cursor position. Press 'f' to identify a star under
the cursor. Press 'w', type a message, then press return to write
text to the cursor position on the screen. Finally, press RETURN to
exit the cursor mode and progress to printer option.

To print, ready your printer, then press "p". You will be prompted
for the printer type. The screen will be processed and sent directly
to your parallel printer port (LPT1 or PRN). Press ESCAPE to abort
printing. If you have a printer attached to a serial port, you can
still print with STARRY by using a series of DOS commands before
starting STARRY to redirect output from your parallel to your serial
port. Use the MODE command (check your DOS manual) as follows:

MODE LPT1:=COM1: ...for example to redirect to COM1, then...
MODE COM1:96,N,8,1,P ...or something similar to set COM1's
parameters to match your printer. Check your printer manual for
these values.

The batch file LPT2COM.BAT included with this program is an example of
a batch file you might run before starting STARRY to redirect printer
output to your COM1 port.

The coordinates of the status line define the center of the screen and
is marked by the cross at screen center. The borders at the top and
bottom of the screen are parallel to the celestial equator--the line

Copyright 1991 Rob Crockett

Starry Nights Version 6.4 Page 10

defined by a declination of zero--unless the screen is in ALT/AZ mode.
In ALT/AZ mode, the top and bottom borders of the screen are parallel
to the horizon.

The colors of the objects plotted depends on the type of screen you
have and the choices made earlier. ONLY EGA AND VGA MONITORS WILL
have a single display color with a black background (black is the
second color).

For EGA and VGA then, if a constellation is highlighted, all other
stars will be green. Messier objects are, if displayed, magenta (if a
constellation is highlighted or B-V color is used) or white. Planets
are high intensity red. The moon is high intensity blue. If star
temperature (color/B-V) is to be viewed, stars are plotted in B-V
color (EGA/VGA only) according to the following scheme:

B-V < -0.15 dark blue
-0.15 <= B-V < 0.10 light blue
0.10 <= B-V < 0.65 white
0.65 <= B-V < 1.10 yellow
1.10 <= B-V < 1.70 orange
B-V >= 1.70 light red

Magnitude is displayed by increasing the number of pixels with
decreasing magnitude for stars, planets, and Messier objects.
Highlighting with CGA and HGA is done by subtracting 2.5 from the
magnitude of each star in the constellation of interest (thus
increasing the number of pixels per star).

mag < 0 = 13 pixels
0 <= mag < 0.5 = 11 pixels
0.5 <= mag < 1.0 = 9 pixels
1.0 <= mag < 1.5 = 7 pixels
1.5 <= mag < 2.3 = 5 pixels
2.3 <= mag < 3.0 = 3 pixels
3.0 <= mag < 4.0 = 2 pixels
mag > 4.0 = 1 pixel

Below the main menu is a box containing much of the information
selected with the choices above. To find that elusive object in the
sky that appears at the center of the STARRY display, use the
constellations as reference and look to the area described by the
altitude and azimuth. The altitude is degrees up from the horizon
with alt=0 at the horizon and alt=90 straight up overhead. Azimuth is
degrees around the horizon with 0 or 360 as true north, 90 as true
east, 180 as true south, and 270 as true west. In the United States,

Copyright 1991 Rob Crockett

Starry Nights Version 6.4 Page 11

remember that magnetic north (bearing on a compass) is about 12
degrees east of true north so subtract 12 from the azimuth to get a
compass heading (check me by pointing your compass at Polaris in the
Little Dipper/Ursa minor). An additional, although small,
consideration is the refracting effect of the atmosphere which makes
objects appear at greater altitude than in reality they are. This is
most pronounced at the horizon, increasing altitude by at most 30
minutes of arc, and is virtually nil above 15 degrees of altitude.

STARRY.EXE: math coprocessor support.
This version checks for and supports the 8087, 80287, and the (yowsa)
80387 math coprocessors. If detected by STARRY, you will enjoy a
substantial decrease in the time needed to plot the stars and
calculate positions of the planets.

A truly versatile program is one that you can modify to meet your
specific needs. If you would like to participate in the black art of
programming in astronomy, I will provide you with a copy of the STARRY
source code to use and abuse for the nominal fee of $75.00. I ask
only that you do not distribute the source code or your modified
version. As one who has hacked many a program, I know this is asking
a lot, but I would like to maintain one version yet allow anyone the
opportunity to both program and manipulate equations in astronomy.


Program written by yours truly,
Rob Crockett (Compuserve [76167,1561]; Prodigy MWBP31A)
2415 Clearview Drive
Glenshaw, PA 15116.
(412) 486-4361

Program written using Turbo Pascal v5.0 by Borland International
Incorporated, 1988.

Planetary, moon, and time handling routines adapted from BASIC routines
found in "Astronomy with your personal computer" (Cambridge University
Press: Great Britain, 1985) by Peter Duffett-Smith.

Main star database (STARRY.DAT) derived from the Yale Bright Star
Catalogue, data for Epoch 2000: Hoffliet, D. (with the collaboration of
Jaschek, C.) 1982, the BRIGHT STAR CATALOG, 4th revised edition (New Haven:
Yale University Observatory).

Copyright 1991 Rob Crockett

 December 23, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>