486 pc or early 90s computer and old Nasa programs

Kubala95

New member
Joined
Jan 30, 2011
Messages
22
Reaction score
0
Points
1
The h parameter should be MSB (or rather MSD I believe, as MSB seems a typo)
I checked it during my tests in QEMU, the same error.

The c parameter should name an input file containing columns to extract
You're right but even if 'c' is ommited, situation doesn't change. By the way, that would show a file path error rather than a stack problem.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,832
Reaction score
353
Points
83
What error occurs depends on how it was programmed ;)
I would try with a very short input file, if that works increase the size ....until it breaks.
If it breaks immediately (with a shortened input) however...then....then try something else ;)

To debug it (on assembly level) might be a tough job to do, but until you have the real hardware you have something to do.

TL;DR : I am out of ideas.
 

ncc1701d

Member
Joined
Aug 9, 2009
Messages
204
Reaction score
6
Points
18
Read the manual!
The h parameter should be MSB (or rather MSD I believe, as MSB seems a typo)
The c parameter should name an input file containing columns to extract
Code:
                   sedr2asc User's Guide
===========================================================================
General Info:
===========================================================================

The sedr2asc program is used to extract data from the PDS Archive CD-ROM's
containing the Pioneer Venus Orbiter (PVO) Supplemental Experimenter Data
Record (SEDR) dataset. The program is written in the C programming language
and will compile using either the Gnu C Compiler (2.3) with the
"-traditional" option or the sun C compiler version 3.1.

The original PVO SEDR tapes contained 6 files per orbit (logical header,
pulse time, spin period, selected roll reference, attitude, and ephemeris).
This program can extract any of these files and either display the data to
the screen or output data to an ASCII file on the local system. In addition
to the basic 6 files, this program can extract data identical to the
ephemeris dataset submitted by the Magnetometer instrument team or it can
output the matrix which rotates from Inertial Spacecraft
Coordinates to Venus Solar Orbital coordinates. Please see the coordinate
system description text on the CD-ROM for definitions of these coordinate
systems.

===========================================================================
Usage
===========================================================================

The program is command-line driven. All options to the program are given
at run-time in the same command that executes the program. All options, except
colfile are required!!!

Usage:

sedr2asc [infile=AAA] [ascfile=BBB] [host=CCC] [filetype=DDD] (colfile=EEEEE)

or , to reducing typing,

sedr2asc [i=AAA] [a=BBB] [h=CCC] [f=DDD] (c=EEEEE)

  Options:

      infile:     The complete name including path to the input data file.
      ascfile:    The name of the output file or "-" for output-to-screen.
      host:       The type of host system you are working on.
                   VALID:  sun, SUN, IBM, HP, MSB (MicroSoft DOS), PC (IBM DOS)
      filetype:   The type of input file.
                   VALID:  PULSE, SPIN, EPHEM, LOGISTIC, SEL_ROLL, ATTITUDE,
                           MAG_EPHEM, SC2VSO_MAT
      colfile:    An ASCII file containing a list of column (numbers) to be
                  extracted from the "ephemeris" dataset. This file contains
                  1 column number per line.

===============================================================================
Examples
===============================================================================

For all usage examples, we will assume an IBM PC or compatible
computer with a CDROM mounted as drive D:

--------------------------------------------------------------
                         Example 1:
--------------------------------------------------------------
Extract an ephemeris data file for orbit 291 to the file "mydata.asc"

sedr2asc infile=D:\DATA\EPHEM\ORB0201\EP0291.DAT outfile=mydata.asc
host=pc filetype=ephem

--------------------------------------------------------------
                         Example 2:
--------------------------------------------------------------
Extract the list of columns specified in the file "eph_cols.asc" from
the ephemeris data file for orbit 291 to the file "mydata.asc"

sedr2asc infile=D:\DATA\EPHEM\ORB0201\EP0291.DAT outfile=mydata.asc
host=pc filetype=ephem colfile=eph_cols.asc

--------------------------------------------------------------
                         Example 3:
--------------------------------------------------------------
Extract a spin period data file for orbit 363 to the screen

sedr2asc outfile=- host=pc filetype=spin
infile=D:\DATA\SPIN\ORB0301\SP0363.DAT

--------------------------------------------------------------
                         Example 4:
--------------------------------------------------------------
Extract a spacecraft attitude data file for orbit 341 to the screen

sedr2asc filetype=attitude infile=D:\DATA\ATTITUDE\ORB0301\AT0341.DAT
outfile=- host=pc


--------------------------------------------------------------
                         Example 5:
--------------------------------------------------------------
Extract a pulse time data file for orbit 241 to an ASCII file

sedr2asc filetype=pulse infile=D:\DATA\PULSE\ORB0201\PT0241.DAT
host=pc outfile=mydata.asc



As you can see the order in which options are given is not important. The
software only requires that all options be fully specified.
Thanks. I appreciate your enthusiasm. I have been through that already though and read the help text you refer to. msb stands for "microsoft binary" so its not mistake. Using any other setting besides PC for h meant the results output for PT or AT or SP were wrong. Only setting h = pc made those results correct. Thats why I am pretty sure PC should be the setting for all types to convert including EPs. I did try again using msb for h and still got the over flow error. It is interesting though and noteworthy that this program help mentions 2 DOS types to choose from. According to wikopedia ibm dos is just a rebranding of msdos so this program must notice differences between the two. However looking at source code there is no real mentioning of how it differentiates between the 2 DOSs.
of
 
Last edited:

n72.75

Addon Developer
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,257
Reaction score
783
Points
128
Location
Biddeford ME
Website
mwhume.space
Preferred Pronouns
he/him
Try reaching out to the guys in the pdp10 IRC channel (libera). I think your best bet might be to figure out the format of the data files and read them directly. If the data originally came from an IBM 360/370 it's almost certainly EBCDIC.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,348
Reaction score
505
Points
153
Location
Vienna
As the source code is available, I'd suggest trying to recompile it for modern machines. It is not that big for it to be an incomprehensible process. Looking through it, it looks like there is a parser at work, most probably one done by early lex/yacc implementations. I have seen enough stack overflows from them in the past, so my bet would be on the parser puking over that specific file format. I guess it does so on the original hardware as well.
All in all, I'd not invest more time in finding some old hardware when the source is there for further investigation.
 

JDat

Active member
Joined
Sep 6, 2010
Messages
105
Reaction score
74
Points
43
As the source code is available, I'd suggest trying to recompile it for modern machines. It is not that big for it to be an incomprehensible process. Looking through it, it looks like there is a parser at work, most probably one done by early lex/yacc implementations. I have seen enough stack overflows from them in the past, so my bet would be on the parser puking over that specific file format. I guess it does so on the original hardware as well.
All in all, I'd not invest more time in finding some old hardware when the source is there for further investigation.
Source code recompilation fail in many places. It is easier to write converter from beginning and use old source code as reference manual.


I also tested linux version, but got error regarding incomplete input parameters. Summing everything up conclusion is following: coverter have lot of bugs and no woder that it have stack overflow in MSDOS. Probably it will never work in MS-DOS. Right now the only hope is P100 with MSDOS6.22, but no time for that now. Otherwise need to make huge patchs in code and recompile or rewrite converter code.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,348
Reaction score
505
Points
153
Location
Vienna
OP, what columns would you want? I got it to compile and get results from the file, but it always sends me through some menu pages selecting columns. I did so by means of using the first one, which resulted in the 2 files attached. Can you inspect them and tell me if it is plausible?

EDIT: Almost forgot, find the x86 binary attached in the ZIP. I found one problem with it: you have to enter full paths, relative ones don't work.

EDIT2: Found a problem in the floating format, should be fixed now in the attachments, please reload and re-check.

EDIT3: After playing with it, I found the reason that the column-selection file is not accepted rather trivial: it works as designed. Since the command-line parser has a preset option "CMDFILE", the "COLFILE" option can't be matched with "c" alone. You have to use "co" for this short option, then it works as expected.
 

Attachments

  • EP000.ASC.txt
    101.5 KB · Views: 7
  • EP000.ASC_hdr.txt
    686 bytes · Views: 7
  • sedr2asc.zip
    19.6 KB · Views: 5
Last edited:

ncc1701d

Member
Joined
Aug 9, 2009
Messages
204
Reaction score
6
Points
18
Try reaching out to the guys in the pdp10 IRC channel (libera). I think your best bet might be to figure out the format of the data files and read them directly. If the data originally came from an IBM 360/370 it's almost certainly EBCDIC.
The Part of the data files .dat which are EBCDIC are easy to read and convert to .asc but arent used in the EP .dat files which are the problem files. I figured out the EBCDIC parts. Also any parts of the data files no matter the type SP, PT or EP etc which do simple conversions from binary to positive integers are easy to figure out and work. The floating point values are the major problem. In the code there are floating point format changes to IBM360 and then to IEEE. Also has multiple instances of byte swapping, Some masking, 2s compliments code but its hard to understand how they all work together. Thanks for the recommendation to libera.
 

ncc1701d

Member
Joined
Aug 9, 2009
Messages
204
Reaction score
6
Points
18
OP, what columns would you want? I got it to compile and get results from the file, but it always sends me through some menu pages selecting columns. I did so by means of using the first one, which resulted in the 2 files attached. Can you inspect them and tell me if it is plausible?

EDIT: Almost forgot, find the x86 binary attached in the ZIP. I found one problem with it: you have to enter full paths, relative ones don't work.

EDIT2: Found a problem in the floating format, should be fixed now in the attachments, please reload and re-check.

EDIT3: After playing with it, I found the reason that the column-selection file is not accepted rather trivial: it works as designed. Since the command-line parser has a preset option "CMDFILE", the "COLFILE" option can't be matched with "c" alone. You have to use "co" for this short option, then it works as expected.
Looks like you might have got it to work!! Yea! I am going to spend some time thinking and looking at what you did and respond more later today.
 

ncc1701d

Member
Joined
Aug 9, 2009
Messages
204
Reaction score
6
Points
18
OP, what columns would you want? I got it to compile and get results from the file, but it always sends me through some menu pages selecting columns. I did so by means of using the first one, which resulted in the 2 files attached. Can you inspect them and tell me if it is plausible?

EDIT: Almost forgot, find the x86 binary attached in the ZIP. I found one problem with it: you have to enter full paths, relative ones don't work.

EDIT2: Found a problem in the floating format, should be fixed now in the attachments, please reload and re-check.

EDIT3: After playing with it, I found the reason that the column-selection file is not accepted rather trivial: it works as designed. Since the command-line parser has a preset option "CMDFILE", the "COLFILE" option can't be matched with "c" alone. You have to use "co" for this short option, then it works as expected.
What are you running your version of the program in? windows? dos? What type of machine? Trying it in DOS i get "The program cannot be run in DOS mode.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,348
Reaction score
505
Points
153
Location
Vienna
What are you running your version of the program in? windows? dos? What type of machine? Trying it in DOS i get "The program cannot be run in DOS mode.
On Windows, of course. Windows 7 x64, to be precise. It should run on every modern windows machine. It is a re-compile of the source code with Visual Studio 2019.
 

ncc1701d

Member
Joined
Aug 9, 2009
Messages
204
Reaction score
6
Points
18
On Windows, of course. Windows 7 x64, to be precise. It should run on every modern windows machine. It is a re-compile of the source code with Visual Studio 2019.
I tried under dos. Got message about not liking it but switched to windows 7 now so exact same setup here now as you. I am playing with it now. I dont get menu pages though that you mention. I get output but not exactly like your example when going beyone the first 3 columns so Iam checking out everything playing with columns etc in the col.asc file. More later.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,348
Reaction score
505
Points
153
Location
Vienna
Remember to use "co=" instead of "c=" when specifying a colfile. If I start it without a colfile (or with the wrong option), I get text pages where I have to select the column number manually in a kind of menu:
1628195988670.png
1628196010562.png
1628196036138.png
1628196054782.png

I also noticed that I have to specify the host type as PC instead of MSB, otherwise the numbers have too high exponents.
 

ncc1701d

Member
Joined
Aug 9, 2009
Messages
204
Reaction score
6
Points
18
Remember to use "co=" instead of "c=" when specifying a colfile. If I start it without a colfile (or with the wrong option), I get text pages where I have to select the column number manually in a kind of menu:
View attachment 26218
View attachment 26219
View attachment 26220
View attachment 26221

I also noticed that I have to specify the host type as PC instead of MSB, otherwise the numbers have too high exponents.
yes..thanks. I got it to work ok. Thank you! !!
 
Last edited:
Top