Thread View: comp.bugs.misc
4 messages
4 total messages
Started by Dana Uehara c/o Andrew Nash
Fri, 28 Aug 1992 09:24
BASICA programming bugs
Author: Dana Uehara c/o Andrew Nash
Date: Fri, 28 Aug 1992 09:24
Date: Fri, 28 Aug 1992 09:24
33 lines
1961 bytes
1961 bytes
(If this article is not in the proper newsgroup, please forward it to the proper newsgroup -- thanks!) Does anyone have any suggestions as to how to debug BASIC/BASICA programs so the graphics commands don't lock up the computer? I have an IBM-compatible computer with a CGA screen. Most DOS and BASIC programs are compatible with the computer (I think the DOS version is 2.0). However, with a few computer programs written in BASIC the commands "GET" and "PUT" seem to be the culprits in locking up the computer. When deleted, the programs appear to run normally. But when kept, the commands either produce strange graphics on the screen or completely lock up the computer so I have to reboot the system to do any further work. Is there a way to redo the statements (instead of using GET/PUT) so the computer (hopefully) won't lock up? A couple of other programs that use similar statements have worked, but most haven't. DEBUG.COM hasn't really been much help because I'm not familiar with machine/ assembly language (I'm more familiar with BASIC). One of the commands I encountered, however, when using DEBUG had a statement "LOCK". Any advice would be greatly appreciated. Please reply via email since I hardly read this newsgroup. Thanks in advance for any help! -- ===== Dana Uehara [c/o <anash@uhunix.uhcc.hawaii.edu> (Andrew Nash)] ===== "You'll be the first kind on our block to break the *sound* barrier!" "Come on, I've already broken the *pain* barrier..." -- Max & PJ
Re: BASICA programming bugs
Author: Dana Uehara c/o Andrew Nash
Date: Fri, 28 Aug 1992 09:27
Date: Fri, 28 Aug 1992 09:27
13 lines
1016 bytes
1016 bytes
In article <1992Aug28.092454.1412@news.Hawaii.Edu> I write: >I have an IBM-compatible computer with a CGA screen. Most DOS and BASIC >programs are compatible with the computer (I think the DOS version is 2.0). > Oops, I meant to say DOS 3.2, not 2.0. I don't know if that still helps, however... -- ===== Dana Uehara [c/o <anash@uhunix.uhcc.hawaii.edu> (Andrew Nash)] ===== "You'll be the first kind on our block to break the *sound* barrier!" "Come on, I've already broken the *pain* barrier..." -- Max & PJ
Re: BASICA programming bugs
Author: Stephen C. Trier
Date: Fri, 28 Aug 1992 16:08
Date: Fri, 28 Aug 1992 16:08
46 lines
2684 bytes
2684 bytes
In article <1992Aug28.092454.1412@news.Hawaii.Edu> anash@uhunix.uhcc.hawaii.edu (Dana Uehara c/o Andrew Nash) writes:
>However, with a few computer programs written in BASIC the commands "GET"
>and "PUT" seem to be the culprits in locking up the computer. When deleted,
>the programs appear to run normally. But when kept, the commands either
>produce strange graphics on the screen or completely lock up the computer
>so I have to reboot the system to do any further work.
This is usually caused by passing very strange parameters to the GET and
PUT functions.
If many programs by different authors fail on your computer, it is possible
that you have a hardware problem.
>DEBUG.COM hasn't really been much help because I'm not familiar with machine/
>assembly language (I'm more familiar with BASIC). One of the commands I
>encountered, however, when using DEBUG had a statement "LOCK".
No one would intentionally design an instruction to lock up a computer
into an assembly language and call it that. (They'd give it a better
name, like "HALT".) The "LOCK" you saw is a prefix to another instruction;
it tells the CPU that the instruction is to be run without interruption.
This sort of thing is useful when dealing with interrupt handlers or
task switching.
>Any advice would be appreciated.
First, don't use DEBUG to debug a BASIC program. BASICA is an interpreter,
not a compiler, so you are NOT going to get very far.
Second, I suggest that you look at the TRON, TROFF, STOP, GET, and PUT
entries in your BASIC manual. TRON and TROFF let you trace the progress
of a BASIC program. STOP lets you set a breakpoint in the middle of the
program so that you can take a look at the program's current state. The
GET and PUT entries are important for obvious reasons. Check out the
space requirements outlined under GET, because those are probably being
being violated.
Good luck!
Stephen
--
"Beware of programmers who Stephen Trier
carry screwdrivers." Network Services Engineering, IRIS/INS/Telecom
Leonard Brandwein Case Western Reserve University
trier@ins.cwru.edu
Re: BASICA programming bugs
Author: Tom Reingold
Date: Thu, 03 Sep 1992 13:55
Date: Thu, 03 Sep 1992 13:55
39 lines
2415 bytes
2415 bytes
anash@uhunix.uhcc.hawaii.edu (Dana Uehara c/o Andrew Nash) writes:
$ (If this article is not in the proper newsgroup, please forward it to the
$ proper newsgroup -- thanks!)
$ Does anyone have any suggestions as to how to debug BASIC/BASICA programs
$ so the graphics commands don't lock up the computer?
$ I have an IBM-compatible computer with a CGA screen. Most DOS and BASIC
$ programs are compatible with the computer (I think the DOS version is 2.0).
$ However, with a few computer programs written in BASIC the commands "GET"
$ and "PUT" seem to be the culprits in locking up the computer. When deleted,
$ the programs appear to run normally. But when kept, the commands either
$ produce strange graphics on the screen or completely lock up the computer
$ so I have to reboot the system to do any further work.
$ Is there a way to redo the statements (instead of using GET/PUT) so the
$ computer (hopefully) won't lock up? A couple of other programs that use
$ similar statements have worked, but most haven't.
$ DEBUG.COM hasn't really been much help because I'm not familiar with machine/
$ assembly language (I'm more familiar with BASIC). One of the commands I
$ encountered, however, when using DEBUG had a statement "LOCK".
The BASICA.COM that comes with IBM PC-DOS is intended for PC's made by
the IBM corporation. This is one place where so-called compatibles are
not so compatible with IBM's. If you are using IBM's BASICA, I would
things not to work.
The reason for this is that IBM's interpreter calls routines in the IBM
ROM. These routines are not in ROMs of compatible PC's for copyright
reasons. So the BASIC interpreter must have all the calls in software
since there is no ROM helping out.
--
Tom Reingold
tr@samadams.princeton.edu OR ...!princeton!samadams!tr
"Warning: Do not drive with Auto-Shade in place. Remove
from windshield before starting ignition."
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads