home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / bugs / misc / 157 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  2.6 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!gatech!usenet.ins.cwru.edu!slc6!trier
  2. From: trier@slc6.ins.cwru.edu (Stephen C. Trier)
  3. Newsgroups: comp.bugs.misc
  4. Subject: Re: BASICA programming bugs
  5. Message-ID: <1992Aug28.160850.6621@usenet.ins.cwru.edu>
  6. Date: 28 Aug 92 16:08:50 GMT
  7. References: <1992Aug28.092454.1412@news.Hawaii.Edu>
  8. Sender: news@usenet.ins.cwru.edu
  9. Organization: Case Western Reserve University, Cleveland, OH (USA)
  10. Lines: 47
  11. Nntp-Posting-Host: slc6.ins.cwru.edu
  12.  
  13. In article <1992Aug28.092454.1412@news.Hawaii.Edu> anash@uhunix.uhcc.hawaii.edu (Dana Uehara c/o Andrew Nash) writes:
  14. >However, with a few computer programs written in BASIC the commands "GET"
  15. >and "PUT" seem to be the culprits in locking up the computer.  When deleted,
  16. >the programs appear to run normally.  But when kept, the commands either
  17. >produce strange graphics on the screen or completely lock up the computer
  18. >so I have to reboot the system to do any further work.
  19.  
  20. This is usually caused by passing very strange parameters to the GET and
  21. PUT functions.
  22.  
  23. If many programs by different authors fail on your computer, it is possible
  24. that you have a hardware problem.
  25.  
  26. >DEBUG.COM hasn't really been much help because I'm not familiar with machine/
  27. >assembly language (I'm more familiar with BASIC).  One of the commands I
  28. >encountered, however, when using DEBUG had a statement "LOCK".
  29.  
  30. No one would intentionally design an instruction to lock up a computer
  31. into an assembly language and call it that.  (They'd give it a better
  32. name, like "HALT".)  The "LOCK" you saw is a prefix to another instruction;
  33. it tells the CPU that the instruction is to be run without interruption.
  34. This sort of thing is useful when dealing with interrupt handlers or
  35. task switching.
  36.  
  37. >Any advice would be appreciated.
  38.  
  39. First, don't use DEBUG to debug a BASIC program.  BASICA is an interpreter,
  40. not a compiler, so you are NOT going to get very far.
  41.  
  42. Second, I suggest that you look at the TRON, TROFF, STOP, GET, and PUT
  43. entries in your BASIC manual.  TRON and TROFF let you trace the progress
  44. of a BASIC program.  STOP lets you set a breakpoint in the middle of the
  45. program so that you can take a look at the program's current state.  The
  46. GET and PUT entries are important for obvious reasons.  Check out the
  47. space requirements outlined under GET, because those are probably being
  48. being violated.
  49.  
  50. Good luck!
  51.  
  52.    Stephen
  53.  
  54. -- 
  55. "Beware of programmers who     Stephen Trier
  56.  carry screwdrivers."          Network Services Engineering, IRIS/INS/Telecom
  57.        Leonard Brandwein       Case Western Reserve University
  58.                                trier@ins.cwru.edu
  59.