Board index » delphi » Help! Can't use CRT unit

Help! Can't use CRT unit

I just switched from a Pentium 66 running Windows 95 version 4.00.950
to a Pentium II 300 running Windows 95 version 4.00.1111 and found
thaty I can no longer run any program that uses CRT. I get the
error message
Runtime error 200 at ...
Could someone tell me why?

Thanks
Tuan

 

Re:Help! Can't use CRT unit


Quote
Tuan Pham wrote:
> I just switched from a Pentium 66 running Windows 95 version 4.00.950
> to a Pentium II 300 running Windows 95 version 4.00.1111 and found
> thaty I can no longer run any program that uses CRT. I get the
> error message
> Runtime error 200 at ...
> Could someone tell me why?

Check the discussions on Crt.Delay error already posted in this
newsgroup.

Re:Help! Can't use CRT unit


JRS:  In article <357779C1.126E9...@unsw.edu.au> of Fri, 5 Jun 1998
14:53:21 in comp.lang.pascal.borland, Tuan Pham <tuan.p...@unsw.edu.au>
wrote:

Quote
>I just switched from a Pentium 66 running Windows 95 version 4.00.950
>to a Pentium II 300 running Windows 95 version 4.00.1111 and found
>thaty I can no longer run any program that uses CRT. I get the
>error message
>Runtime error 200 at ...
>Could someone tell me why?

You've been posting here long enough, unless it was someone else of the
same name; the answer has repeatedly been given and cited here.

Read before Write!
Pascal Start-Up Error 200 on fast PCs when using the Crt unit is a VFAQ!

Read the many earlier postings in the comp.lang.pascal.borland (Frank H,
Roger D, ...) and borland.public.turbopascal newsgroups (you can use
DejaNews), including the comp.lang.pascal.borland mini-FAQ, and Prof.
Salmi's FAQ  ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip #124, and/or see
http://www.merlyn.demon.co.uk/  clpb-faq.txt  pas-time.htm  pas-linx.htm
Some collected patches are in http://www.merlyn.demon.co.uk/zipfiles/
Another fix is to avoid all use of the Crt unit, or, if accurate delay is
not needed, to compile with TP5 or TP6.

--
John Stockton, Surrey, UK.    j...@merlyn.demon.co.uk     Turnpike v1.12    MIME.

Re:Help! Can't use CRT unit


Dr John Stockton (j...@merlyn.demon.co.uk) wrote:
: Tuan Pham <tuan.p...@unsw.edu.au>: wrote:
: >I just switched from a Pentium 66 running Windows 95 version 4.00.950
: >to a Pentium II 300 running Windows 95 version 4.00.1111 and found
: >thaty I can no longer run any program that uses CRT. I get the
: >error message Runtime error 200 at ...
:
: You've been posting here long enough, unless it was someone else of the
: same name; the answer has repeatedly been given and cited here.

       If the delay() statement isn't called, does the
bad code compile anyway?   If not it doesn't make sense
to fool with patches, another delay routine could be
used instead, something like..

Program {*word*198}laa;

Procedure {*word*198}lay(sex : Integer);
var    Loop1,Loop2,Loop3,CPU_Speed,Pause : Integer;
begin
   CPU_Speed:= 40;
   For Loop3:= 1 to sex do
   For Loop2:= 1 to CPU_Speed do
   for Loop1:= 1 to 6789 do Pause:= mem[$b800:Loop1];
end;

begin
   {*word*198}lay(3);
end.

       This seems to run just like it is without any
units at all, and the CPU speed can either be changed
manually or a routine used to find it and make CPU_Speed
a runtime adjusted variable.
       But it couldn't be that simple, could it? :-)

Ken Fischer

---

Re:Help! Can't use CRT unit


Quote
In article <Eu3p4r....@iglou.com>, Ken Fischer <kefis...@iglou.com> wrote:

:       If the delay() statement isn't called, does the
:bad code compile anyway?   If not it doesn't make sense

Prompted by that question I have made the following addition to the
FAQ item #124:

 Q2: If the delay() statement isn't called, does the code compile
bad anyway?

 A2: Had you first carefully read the FAQ item #124 "Curing Crt
initialization runtime error 200 on fast machines" you would have
noted "The bug is in the [TP7] Crt routine's initialization code".
It is NOT calling delay() that causes the error. It is the "Uses
Crt". Thus you can't avoid the problem by just not using delay() if
you insert the Crt unit into a TP 7.0 program in a fast PC. The
error is a Crt initialization error, not a delay() error. The
(further) problem with delay() is that it can be inaccurate. That
aspect is covered in the item #67 "If Delay procedure does not work
properly, how do I fix it?".

   All the best, Timo

....................................................................
Prof. Timo Salmi   Co-moderator of news:comp.archives.msdos.announce
Moderating at ftp:// & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/>  ; FIN-65101,  Finland

Spam foiling in effect.  My email filter autoresponder will return a
required email password to users not yet in the privileges database.

Re:Help! Can't use CRT unit


JRS:  In article <6laf4q$...@majakka.uwasa.fi> of Sat, 6 Jun 1998
07:04:42 in comp.lang.pascal.borland, Timo Salmi <t...@majakka.uwasa.fi>
wrote:

Quote
>In article <Eu3p4r....@iglou.com>, Ken Fischer <kefis...@iglou.com> wrote:
>:       If the delay() statement isn't called, does the
>:bad code compile anyway?   If not it doesn't make sense

>Prompted by that question I have made the following addition to the
>FAQ item #124:

> Q2: If the delay() statement isn't called, does the code compile
>bad anyway?

> A2: Had you first carefully read the FAQ item #124 "Curing Crt
>initialization runtime error 200 on fast machines" you would have
>noted "The bug is in the [TP7] Crt routine's initialization code".
>It is NOT calling delay() that causes the error. It is the "Uses
>Crt". Thus you can't avoid the problem by just not using delay() if
>you insert the Crt unit into a TP 7.0 program in a fast PC. The
>error is a Crt initialization error, not a delay() error. The
>(further) problem with delay() is that it can be inaccurate. That
>aspect is covered in the item #67 "If Delay procedure does not work
>properly, how do I fix it?".

Ow!  You've just written a FAQ item with endless recursion!  ISTM that
the line starting A2 needs to contain A1 after #124.

The presently-offered alternatives to Delay have a resolution not of 1ms
but of 55ms; a procedure "Dally" could be written in pure Pascal (for
readability) to implement the algorithm of Crt.Delay but with variables
of adequate length.  This would solve, for those who do not need Crt
otherwise (and #124 names replacement routines for much of Crt (that bit
could become A3?)) the Delay problem not only for V7 users but also for
users of earlier versions.

--
John Stockton, Surrey, UK.    j...@merlyn.demon.co.uk    Turnpike v1.12    MIME.
  Web <URL:http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms, & links.
  Correct 4-line sig. separator is as above, a line precisely "-- " (SoRFC1036)
  Do not Mail News to me.    Before a reply, quote with ">" or "> " (SoRFC1036)

Other Threads