This is probably more an error on my part but I am getting a strange error when trying to invoke PCBASIC from a desktop shortcut.
I will include the startup script and the programs that I am trying to run. The error is that when the script runs, it seems to run the wrong BASIC program. Instead of running the one I want to run, it runs a seemingly random other program.
To make it short, I am trying to run a script that will assign three drive letters to allow data files to be created and stored in one folder, another folder for storing and updating ASCII based files and a final folder to hold Comma Separate Values files for storing files that are written and read by EXCEL in a CSV format.
At the most, I wll only ever have a maximum of eight files open at any one time.
The code was written around 1977 on a TANDY Model I and uses a technique that does a close from one program and a run of another. This may be causing some form of memory overrun but it worked fine on GWBASIC under Windows XP-Pro SP3 until Microsoft did a patch and killed something. Afterwards, I had to put the Windows XP-Pro with SP3 back up and running on a stand-alone box with no network access just to keep these programs running.
The original author is long dead so no possibility of any fixes. I am just keeping it running for my father who is 89 this year and does not have any intentions of learning any new programs.
Here is the code from the SURVEY.BAT file:
CLS
C:
CD \PLCEA-PROGRAMS
echo "Sorry it does work perfectly yet Dad, but WHEN BASIC LOADS, TYPE "LOAD SURVEY.BAS" AND PRESS ENTER"
echo "THEN TYPE "RUN" AND PRESS ENTER"
REM THE NEXT LINE DID SAY
REM C:\PCBASIC\PCBASIC.EXE --mount=A:C:\PLCEA-DATA,B:C:\PLCEA-ASCII,W:C:\PLCEA-CSV -f=8 SURVEY.BAS
REM But that seem to work for a while and then it just started running the wrong programs
REM So I changed it to just set up the environment variables and then let him type to rest
C:\PCBASIC\PCBASIC.EXE --mount=A:C:\PLCEA-DATA,B:C:\PLCEA-ASCII,W:C:\PLCEA-CSV -f=8
I know it sort of hokey, but this is a simple workaround for now, I just leave off the call to the startup program and have him type it in and press enter, then type run.
The SURVEY.BAS programs has the following:
10 KEY OFF
20 CLEAR 1000
30 DEFINT A
40 CLS
50 PRINT
60 PRINT TAB(12) "SURVEY SOFTWARE"
70 PRINT
80 PRINT TAB(5)"PLEASE SELECT FROM THE FOLLOWING OPTIONS:"
90 PRINT
100 PRINT " <F> FIELD CLOSURE "
110 PRINT " <C> COORDINATE GEOMETRY"
120 PRINT " <M> MISC. PROGRAMS"
130 PRINT " <I> INTERPOLATE"
150 PRINT " <K> PLATCHECK"
160 PRINT
170 PRINT " <A> CONVERT DATA FILES TO ASCII"
180 PRINT " <B> CONVERT RECON/RANGER DATA BACK TO SURVEY DATA FORMAT"
190 PRINT
200 PRINT " <D> EXIT THE PROGRAM" : PRINT
210 PRINT " SELECT OPTION ";
220 GOSUB 440
230 YZ$=XX$
240 A%=INSTR("KkFfCcMmIiDdAaBb",XX$)
250 GOSUB 370
260 ON A% GOTO 340,340,280,280,300,300,310,310,320,320,330,330,350,350,360,360
270 GOTO 40
280 RUN "TRAVERSE.BAS"
300 RUN "CORGEOM.BAS"
310 RUN "MISC.BAS"
320 RUN "INTERP.BAS"
330 CLS : SYSTEM
340 RUN "PLATCK.BAS"
350 RUN "CNVTFILE.BAS"
360 RUN "ASC2DAT.BAS"
370 IF A%=0 THEN 380 ELSE RETURN
380 BEEP
390 PRINT
400 PRINT "THE LETTER USED DOES NOT COORESPOND TO THE AVAILABLE OPTIONS"
410 FOR X=1 TO 1000
420 NEXT
430 RETURN
440 XX$=INKEY$:IF XX$<>"" THEN PRINT XX$:RETURN ELSE GOTO 440
The program it seems to want to run is the CORGEOM.BAS programs that is quite long so I won't bore you with all of it...
One other problem I have encountered is that sometimes it will not load a program but just load some few lines of bogus code and then hang up.
The machine I am running this on is a Windows 10-Pro system on an HP Envy Notebook (i7,8gb RAM,etc)
Again, Thanks for the nice emulator of the old GW-BASIC.
Hopefully you will be able to point me in the correct direction to resolve this little problem.
Thanks,
John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi John, thanks for your report! Good to know the emulator is helping keep the old programs going.
I will try the program to see if I can reproduce the problem. Please stay tuned here as I may need more information from you.
By the way (and this is unrelated to the issue you're running into) since the programs were intended for Tandy you can more accurately emulate a Tandy 1000 with the command-line option --preset=tandy. Then again, if you are used to running this on GW-BASIC on Windows XP the default settings you're using are more similar to that setup.
Either way, if it ran without problems under GW-BASIC the intention is that it should run without problems under PC-BASIC, so there probably is a bug of some sort in PC-BASIC that I'll try to identify.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As noted below, the machine I started with costs me $799 in 1977 (1978 something like that) and I spent everything I had saved for college buying the thing. I used it to program these Land Surveying and Civil Engineering programs that were used (and still are) by my dad's land surveying business. He is still puttering along and enjoys the fact that he can say that $1500 he paid me for the pograms and the machine are the best investment he ever made in my education. Of course, now at age 60, I am slowing down myself and am struggling to finish my PhD in Urban Planning so coding is not my long suite.
Thanks for your help and for providing a path for some of us kids to keep our folks busy.
John
PS: I still have the original machines (TRS-80 Model I, the TRS-80 Model 4) along with the instruction manual that I wrote for my younger brother to use when running the programs. My brother is now the owner of the business and got his Land SUrveying license and is a Professional Engineer. He still uses the programs since he works with my dad on select projects. If you ever want the machine that it all started on, give me a ring and I can make the hardware available to you very cheap.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
"One other problem I have encountered is that sometimes it will not load a program but just load some few lines of bogus code and then hang up."
This is probably a separate problem and I'd like to know more about it. Could you elaborate on it? E.g.:
Does it always happen with the same program (if so, it would help if you could share the original file as an attachment - don't just paste the code as the problem may be triggered by something in the file)
Does it happen when you load the program with the LOAD statement or from the command line as you do above? There is a bug in loading files from the command line on Windows that has recently been brought to my attention and is solved for the next release. If the program loads correctly with LOAD it is probably the same bug.
Thanks!
Rob
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One more thing - Could you also attach the original file for the BASIC file SURVEY.BAS please? I know you've posted the program text but there are many issues which can only be reproduced if I have the original file, since GW-BASIC files are usually stored an a binary format. You can use the 'add attachments' button below the forum text entry form to upload it.
From reading your post again the problem does not occur if you load the file through the LOAD statement, but it does occur if you load it through your batch file, is that correct?
If so, here's a workaround that you can use which will save your Father from having to type the command every time he uses the program until this issue is fixed.
In your SURVEY.BAT batch file, change the command to the following:
(note the single and double quotes, they are important). The command you use should work fine, but I think you may be affected by the same bug I mentioned earlier. That bug will be fixed for the .6 release but until then let me know if this workaround works.
Hope this helps,
Rob
Last edit: Rob Hagemans 2016-03-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I will summarize all the questions and reply to this one unless you want me to reply separately.
1) If I use the pcbasic program and run the load command, the correct program loads.
If I run it from the script, it loads correctly for the first ten to fifteen times, then it starts to load the wrong program.
2) One note, I am running a version of Python for a program (ESRI ArcMap) that is a 2.7
version. Here is the version data from the IDE:
Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
3) Using the improved script that you sent 30 minutes ago, it runs the correct program.
4) I will attach the BASIC programs.
5) The original TANDY computer was called the Model I. It had 4K of memory and ran Microsoft Level I ROM Basic. See link for information (http://www.old-computers.com/museum/computer.asp?c=409). I have ported these programs from that machine to DOS on an original IBM PC, then PC-XT, PC-AT, Dell 386,, HP 486, Pentium, then to Windows using GW-BASIC for Windows 3.0 through XP-Pro. Now with your help to Windows 10.
6) I will meet with my dad this week and ask him to run it through its paces.
Again, thanks for the prompt reply. Looks like that has it working for now!
Many Thanks for the PCBASIC program!
This is probably more an error on my part but I am getting a strange error when trying to invoke PCBASIC from a desktop shortcut.
I will include the startup script and the programs that I am trying to run. The error is that when the script runs, it seems to run the wrong BASIC program. Instead of running the one I want to run, it runs a seemingly random other program.
To make it short, I am trying to run a script that will assign three drive letters to allow data files to be created and stored in one folder, another folder for storing and updating ASCII based files and a final folder to hold Comma Separate Values files for storing files that are written and read by EXCEL in a CSV format.
At the most, I wll only ever have a maximum of eight files open at any one time.
The code was written around 1977 on a TANDY Model I and uses a technique that does a close from one program and a run of another. This may be causing some form of memory overrun but it worked fine on GWBASIC under Windows XP-Pro SP3 until Microsoft did a patch and killed something. Afterwards, I had to put the Windows XP-Pro with SP3 back up and running on a stand-alone box with no network access just to keep these programs running.
The original author is long dead so no possibility of any fixes. I am just keeping it running for my father who is 89 this year and does not have any intentions of learning any new programs.
Here is the code from the SURVEY.BAT file:
CLS
C:
CD \PLCEA-PROGRAMS
echo "Sorry it does work perfectly yet Dad, but WHEN BASIC LOADS, TYPE "LOAD SURVEY.BAS" AND PRESS ENTER"
echo "THEN TYPE "RUN" AND PRESS ENTER"
REM THE NEXT LINE DID SAY
REM C:\PCBASIC\PCBASIC.EXE --mount=A:C:\PLCEA-DATA,B:C:\PLCEA-ASCII,W:C:\PLCEA-CSV -f=8 SURVEY.BAS
REM But that seem to work for a while and then it just started running the wrong programs
REM So I changed it to just set up the environment variables and then let him type to rest
C:\PCBASIC\PCBASIC.EXE --mount=A:C:\PLCEA-DATA,B:C:\PLCEA-ASCII,W:C:\PLCEA-CSV -f=8
I know it sort of hokey, but this is a simple workaround for now, I just leave off the call to the startup program and have him type it in and press enter, then type run.
The SURVEY.BAS programs has the following:
10 KEY OFF
20 CLEAR 1000
30 DEFINT A
40 CLS
50 PRINT
60 PRINT TAB(12) "SURVEY SOFTWARE"
70 PRINT
80 PRINT TAB(5)"PLEASE SELECT FROM THE FOLLOWING OPTIONS:"
90 PRINT
100 PRINT " <F> FIELD CLOSURE "
110 PRINT " <C> COORDINATE GEOMETRY"
120 PRINT " <M> MISC. PROGRAMS"
130 PRINT " <I> INTERPOLATE"
150 PRINT " <K> PLATCHECK"
160 PRINT
170 PRINT " <A> CONVERT DATA FILES TO ASCII"
180 PRINT " <B> CONVERT RECON/RANGER DATA BACK TO SURVEY DATA FORMAT"
190 PRINT
200 PRINT " <D> EXIT THE PROGRAM" : PRINT
210 PRINT " SELECT OPTION ";
220 GOSUB 440
230 YZ$=XX$
240 A%=INSTR("KkFfCcMmIiDdAaBb",XX$)
250 GOSUB 370
260 ON A% GOTO 340,340,280,280,300,300,310,310,320,320,330,330,350,350,360,360
270 GOTO 40
280 RUN "TRAVERSE.BAS"
300 RUN "CORGEOM.BAS"
310 RUN "MISC.BAS"
320 RUN "INTERP.BAS"
330 CLS : SYSTEM
340 RUN "PLATCK.BAS"
350 RUN "CNVTFILE.BAS"
360 RUN "ASC2DAT.BAS"
370 IF A%=0 THEN 380 ELSE RETURN
380 BEEP
390 PRINT
400 PRINT "THE LETTER USED DOES NOT COORESPOND TO THE AVAILABLE OPTIONS"
410 FOR X=1 TO 1000
420 NEXT
430 RETURN
440 XX$=INKEY$:IF XX$<>"" THEN PRINT XX$:RETURN ELSE GOTO 440
The program it seems to want to run is the CORGEOM.BAS programs that is quite long so I won't bore you with all of it...
One other problem I have encountered is that sometimes it will not load a program but just load some few lines of bogus code and then hang up.
The machine I am running this on is a Windows 10-Pro system on an HP Envy Notebook (i7,8gb RAM,etc)
Again, Thanks for the nice emulator of the old GW-BASIC.
Hopefully you will be able to point me in the correct direction to resolve this little problem.
Thanks,
John
Hi John, thanks for your report! Good to know the emulator is helping keep the old programs going.
I will try the program to see if I can reproduce the problem. Please stay tuned here as I may need more information from you.
By the way (and this is unrelated to the issue you're running into) since the programs were intended for Tandy you can more accurately emulate a Tandy 1000 with the command-line option
--preset=tandy
. Then again, if you are used to running this on GW-BASIC on Windows XP the default settings you're using are more similar to that setup.Either way, if it ran without problems under GW-BASIC the intention is that it should run without problems under PC-BASIC, so there probably is a bug of some sort in PC-BASIC that I'll try to identify.
View and moderate all "[CLOSED] Bug reports" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
As noted below, the machine I started with costs me $799 in 1977 (1978 something like that) and I spent everything I had saved for college buying the thing. I used it to program these Land Surveying and Civil Engineering programs that were used (and still are) by my dad's land surveying business. He is still puttering along and enjoys the fact that he can say that $1500 he paid me for the pograms and the machine are the best investment he ever made in my education. Of course, now at age 60, I am slowing down myself and am struggling to finish my PhD in Urban Planning so coding is not my long suite.
Thanks for your help and for providing a path for some of us kids to keep our folks busy.
John
PS: I still have the original machines (TRS-80 Model I, the TRS-80 Model 4) along with the instruction manual that I wrote for my younger brother to use when running the programs. My brother is now the owner of the business and got his Land SUrveying license and is a Professional Engineer. He still uses the programs since he works with my dad on select projects. If you ever want the machine that it all started on, give me a ring and I can make the hardware available to you very cheap.
"One other problem I have encountered is that sometimes it will not load a program but just load some few lines of bogus code and then hang up."
This is probably a separate problem and I'd like to know more about it. Could you elaborate on it? E.g.:
LOAD
statement or from the command line as you do above? There is a bug in loading files from the command line on Windows that has recently been brought to my attention and is solved for the next release. If the program loads correctly withLOAD
it is probably the same bug.Thanks!
Rob
One more thing - Could you also attach the original file for the BASIC file
SURVEY.BAS
please? I know you've posted the program text but there are many issues which can only be reproduced if I have the original file, since GW-BASIC files are usually stored an a binary format. You can use the 'add attachments' button below the forum text entry form to upload it.From reading your post again the problem does not occur if you load the file through the
LOAD
statement, but it does occur if you load it through your batch file, is that correct?If so, here's a workaround that you can use which will save your Father from having to type the command every time he uses the program until this issue is fixed.
In your
SURVEY.BAT
batch file, change the command to the following:(note the single and double quotes, they are important). The command you use should work fine, but I think you may be affected by the same bug I mentioned earlier. That bug will be fixed for the .6 release but until then let me know if this workaround works.
Hope this helps,
Rob
Last edit: Rob Hagemans 2016-03-21
View and moderate all "[CLOSED] Bug reports" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I will summarize all the questions and reply to this one unless you want me to reply separately.
1) If I use the pcbasic program and run the load command, the correct program loads.
If I run it from the script, it loads correctly for the first ten to fifteen times, then it starts to load the wrong program.
2) One note, I am running a version of Python for a program (ESRI ArcMap) that is a 2.7
version. Here is the version data from the IDE:
Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
3) Using the improved script that you sent 30 minutes ago, it runs the correct program.
4) I will attach the BASIC programs.
5) The original TANDY computer was called the Model I. It had 4K of memory and ran Microsoft Level I ROM Basic. See link for information (http://www.old-computers.com/museum/computer.asp?c=409). I have ported these programs from that machine to DOS on an original IBM PC, then PC-XT, PC-AT, Dell 386,, HP 486, Pentium, then to Windows using GW-BASIC for Windows 3.0 through XP-Pro. Now with your help to Windows 10.
6) I will meet with my dad this week and ask him to run it through its paces.
Again, thanks for the prompt reply. Looks like that has it working for now!
John