HDTenEightyP/NetNews huggingface dataset:
From: ppollet@cismibm.univ-lyon1.fr (Patrick POLLET)
Newsgroups: comp.lang.pascal
Subject: Re: Turbo Pascal V6.0 BUG?! Fixed?
Date: Thu, 17 Dec 1992 10:05:23 GMT
Organization: INSA  CENTRE INFORMATIQUE DU 1er CYCLE
NNTP-Posting-Host: 134.214.232.25

In article <1992Dec17.004658.26894@news.acns.nwu.edu> delusion@casbah.acns.nwu.edu (Albert Schmezer) writes:
>From: delusion@casbah.acns.nwu.edu (Albert Schmezer)
>Subject: Turbo Pascal V6.0 BUG?! Fixed?
>Date: Thu, 17 Dec 1992 00:46:58 GMT

>        Hello all. I seem to have uncovered some bugs in Turbo Pascal V6.0
>that I hope some people could shed some light on. Are these internal bugs? Can
>they be fixed? Are they fixed in TP 7.0 or BP 7.0?

>var     i: integer;
>        l: longint;

>begin
>        i:=400; l:=i*104;
>end.

>        It will return a NEGATIVE number! Switch the i variable to a longint,
>and it will work fine! Why?! 

That's not a bug but the standard behaviour of the integer type.
When you declare a variable of a given type, say integer , you 
declare to the compiler  that you are conscient that the 
values taken by that varaible will always be in a certain range....

Integer goes from -32768 to 32767.   (that is storage within a word
of 16 bits with one bit for sign and 15 for the abs(value).

  Assembly language calculations with integers do not check overflow
conditions. So if a result gets too big, the bit 15 may get set to 1
and the number "looks" negative ...
  so you result 104*400 = 41600 is out of range. It is returned as 
  41600-65536 i.e. -23936  
the same is true with  additions (try 20000+20000) (-20000 -20000)....

You may experiment with it using the Evaluate... in the Debug Menu of TP6
( use the ,h specifier to get results in HEX, and you will see when 
the bit 15 gets set to 1)

>        2.) ALL the Turbo products (Turbo Pascal V5.0, 6.0, Turbo C, and Turbo
>C++ V2.0) refuse to work with my EMS driver (ACCEMM.SYS). They lock up
>immediately upon bootup. WHY?! Hmmmm!

     They seem to dectect your EMS driver but not using it properly.
 It the version up to date ? 

 In TP6 there is a command line option /X to DISABLE the usage of EMS  
 even if one is present 
   something like TURBO -X-  (* the minus after is to turn it off*)
   check the User Guide beginning of Section IDE reference....

  The same option may be present in the others products (? ) I don't 
have them... 
ppollet@cismibm.univ-lyon1.fr (Patrick POLLET)
--------------------------------------------------------
Dr Patrick L.Pollet
Institut National des Sciences Appliques
Centre Informatique du 1er Cycle  Bat 110
20 Avenue A.Einstein
69621 Villeurbanne Cedex France
--------------------------------------------------------
Phone: 72 43 83 80 -   la premiere erreur c'est
Fax  : 72 43 85 33 -   de se lever le matin  ... GASTON
-------------------------------------------------------
From: thompson@kuhub.cc.ukans.edu
Newsgroups: comp.lang.pascal
Subject: Is LHA source in Pascal?
Date: 16 Dec 92 18:23:11 CST
Organization: University of Kansas Academic Computing Services

Hello all,

I am writing a recipe database system in Turbo Pascal for Windows
(I'm waiting for the OS/2 version).  I was thinking of compressing
the recipes (I have several thousand).  I thought of a few ways
of doing this in my head, but alas, I am no compression expert.

I remember that the source to LHA is free, but is there any Pascal
source?  Or is it just C?  Also, I only need to compress text, so
if anyone has any ideas on where I should look for algorithms,
please let me know.  

Thanks,

-- 
| Charles A. Thompson      | thompson@ukanvm.cc.ukans.edu        |
| University of Kansas     | thompson@ukanvax.cc.ukans.edu       |
| > They call me SkiBum <  | 32 bit OS/2 2.0 is for you!         |
|----------------------------------------------------------------|
| Listen to Rush Limbaugh from 12-3 EST on the radio EVERYWHERE! |
------------------------------------------------------------------
Newsgroups: comp.lang.pascal
From: Wayde_Police@mindlink.bc.ca (Wayde Police)
Subject: Turbo TSR's
Organization: MIND LINK! - British Columbia, Canada
Date: Fri, 18 Dec 1992 09:01:33 GMT

I would like to write a TSR accessing a device driver using Turbo Pascal 6,
is there any example code available, or any pitfalls I should be aware of
before embarking on such an excercise? Any code snipits would of course be
appreciated ....

        Thanks all,
        Wayde


--
+-------------------------------+
|  I D E A  Technologies        | Imagination & Digital Experience Applied
|  Wayde V. Police              |        386sxBB  +  030Amiga    Hardware,
|  Wayde_Police@mindlink.bc.ca  |     (DOS.Win3+) ^  (AmigaDOS)  Software,
|  Vancouver, B.C. Canada       |               W.V.P.         & Wetware!
+-------------------------------+
From: sl9dm@cc.usu.edu
Newsgroups: comp.lang.pascal
Subject: TP7 Tvision sources needed
Date: 11 Dec 92 14:54:47 MDT
Organization: Utah State University

Anyone know where I can FTP some Tvision Sources as a Demo? I recently aquired
TP 7 and have been programing in TP for a little while. I'm daring to venture
into the dangerous world of TVision Programing, but do not know where to begin.
If someone knows a place to FTP some sources (Especially the source for the
IDE! With the Pulldown menus and all the windows and stuff) PLEASE EMAIL them
to me as I will have little time to read this news confrence in the upcomming
week.

Thanks in advance!!

-- 
-----------------------------------------------------------------------------
This Personal opinion junk was brought to you by one of the following Folks:

In the BBS World: The Master Ninja
in the REAL world: Dan Egli
on the Internet: SL9DM@CC.USU.EDU
-----------------------------------------------------------------------------
Newsgroups: comp.lang.pascal
From: ts@uwasa.fi (Timo Salmi)
Subject: Re: text mode scrolling text down?
Keywords: scroll
Organization: University of Vaasa, Finland
Date: Sat, 12 Dec 1992 21:09:15 GMT

In article <gilligan.724186673@cs1.bradley.edu> gilligan@cs1.bradley.edu (Edward Henigin) writes:
>Okay, I know there's a built in way to scroll text off the screen
>going up (just to a writeln on line 25) but is there a built in way
>to scroll text down?

A bit of juggling with InsLine can achieve you that.  The reference
manual has more on InsLine.

>Also, what is the function (I assume it's in crt.tpu) that returns
>the cursor position?

That too is given in the manual.  But if you wish to avoid using the
Crt unit because of the limitations it imposes then you can apply

TSUNTG: (uses Dos)
  GOATXY   As the ordinary GoToXY but no Crt unit required
  RDENKEFN Enhanced keyboard ReadKey, detects also F11 and F12
  READKEFN As the ordinary ReadKey but no Crt unit required
  WHEREXFN As the ordinary WhereX but no Crt unit required
  WHEREYFN As the ordinary WhereY but no Crt unit required
from
  99367 Nov  8 19:13 garbo.uwasa.fi:/pc/ts/tspa3140.zip
 101110 Nov  8 19:13 garbo.uwasa.fi:/pc/ts/tspa3150.zip
 103186 Nov  8 19:13 garbo.uwasa.fi:/pc/ts/tspa3155.zip
 103345 Nov  8 19:13 garbo.uwasa.fi:/pc/ts/tspa3160.zip

   All the best, Timo

..................................................................
Prof. Timo Salmi
Moderating at garbo.uwasa.fi anonymous FTP archives 128.214.87.1
Faculty of Accounting & Industrial Management; University of Vaasa
Internet: ts@uwasa.fi Bitnet: salmi@finfun   ; SF-65101, Finland
From: nimcompu@oneb.almanac.bc.ca
Newsgroups: comp.lang.pascal
Subject: Sorting Algoritm Needed
Date: 19 Dec 92 04:27:03 GMT
Article-I.D.: oneb.s8H1VB2w164w
Organization: The Old Frog's Almanac, Nanaimo, B.C.

Does anyone have an algorithm that sorts names alphabetically?  I need to 
sort names with three parts to them, such as: 'Firstname Middlename 
Lastname.'  If you have such an algoritm (in Pascal of course) please send 
it to me.  I will be very thankful.
                Thanks in advance.
                        nimcompu@oneb.almanac.bc.ca


           nimcompu@oneb.almanac.bc.ca (Eric van Wiltenburg)
     The Old Frog's Almanac  (Home of The Almanac UNIX Users Group)    
(604) 245-3205 (v32)    <Public Access UseNet>    (604) 245-4366 (2400x4)
        Vancouver Island, British Columbia    Waffle XENIX 1.64  
Newsgroups: comp.lang.pascal
From: gyl.midroni@rose.com (gyl midroni)
Subject: BPW debugger bug?
Organization: Rose Media Inc, Toronto, Ontario.
Date: Tue, 15 Dec 1992 00:14:14 GMT
X-Gated-By: Usenet <==> RoseMail Gateway (v1.70)


Date Entered: 12-14-92 19:12

    I put up a message yesterday about unexplained Borland Pascal 7.0 
(windows) debugger crashes. I have localized the problem in a 
reproducible manner and wonder if anyone else can reproduce this:

The problem is with the GlobalCompact(-1) function running in the 
debugger.  To test this, use the BSCRLAPP program found in the 
...\examples\win\owl directory.  This program shows how to use AHINCR 
to load a bitmap of size > 64K.  
    The call to globalcompact(-1) is made in this program.  I am not 
sure why -1 is used as the variable, as the docs don't mention this 
option.  In fact, the debugger works fine with the call 
globalcompact(0).    
    Anyway, when I run this program with the call to 
globalcompact(-1), no breakpoints are recognized after the function 
call.  The application continues to run, seemingly normally, but the 
debugger crashes when I try to exist the application.  This does not 
occur if the call is deleted, or made to glocalcompact(0).

    ????Any Comments?????  

                        Gyl
                gyl.midroni@rose.com

---
   RR 1.60 R001881
   RM 2.00 : RoseNet<=>Usenet Gateway : Rose Media 416-733-2285
Newsgroups: comp.lang.pascal
Subject: Re: Funny (?) DOS IDE editor window chars
From: sjmadsen@apsvax.aps.muohio.edu (Steve Madsen)
Date: 16 Dec 92 15:18:36 -0500
X-Newsreader: TIN [version 1.1 PL6]

	I noticed that "M" character yesterday as well.  It disappeared
after a little while, but I had no idea what it appear in the first
place or disappear later.

	My docs didn't have anything about in them, either.  I'd be real
interested if anyone could tell us why this happens!

sjmadsen@apsvax.aps.muohio.edu
Newsgroups: comp.lang.pascal
From: dov@menora.weizmann.ac.il (Dov Grobgeld)
Subject: Trapping Ctrl-Alt-Del in a Turbo Pascal program
Organization: The Weizmann Institute of Science
Date: Sun, 13 Dec 1992 10:20:44 GMT

Here is my solution to the problem of trapping Ctrl-Alt-Del. As extra suger, 
I'm providing hooks to make this program TSR. Happy hacking!

<<File: trapboot.pas>>

{$m 1024,0,0} { Necesarry if you want to make the program resident. }
{****************************************************************************}
{* NoBoot                                                                   *}
{*                                                                          *}
{* This program stops rebooting while it is running by trapping             *}
{* Ctrl-Alt-Del.                                                            *}
{*                                                                          *}
{* Dov Grobgeld                                                             *}
{* 1992-12-13                                                               *}
{----------------------------------------------------------------------------}

USES
  Dos, crt;

VAR
  OldKBVec : POINTER;

{ Declare all variables in our interrupt routine global so that no stack }
{ allocation of variables will be done during the interrupt.             }
var
  Regs : registers;
  temp : byte;
  KBflag1: BYTE ABSOLUTE $40:$17;

PROCEDURE MyKB; INTERRUPT;
CONST
  EOI = $20;
  KB_DATA = $60;
  KB_CTL = $61;
  INT_CTL = $20;
  DEL_sc = $53;   { Scancode of the del key }

BEGIN
  { Check if Alt and Ctrl are pressed }
  IF ((KBFlag1 AND 4)=4) AND ((KBFlag1 and 8)=8) AND
    (Port[KB_DATA]= DEL_sc) THEN BEGIN { get scancode of pressed key }

    { The following four lines signals that the key is read and that the }
    { hardware interrupt is over. }
    temp:=Port[Kb_CTL];
    Port[KB_CTL]:= temp OR $80;
    Port[KB_CTL]:= temp;
    Port[INT_CTL]:= EOI;

    { Don't do ANYTHING here that requires BIOS. This 'writeln' is using the }
    { crt unit.                                                              }
    writeln('Ouch! That hurts!');  { Show we are here and alive! }
  END
  ELSE BEGIN
    intr($69, Regs); { Call the old interrupt routine }
  END;
END;

VAR
  Ch : CHAR;

BEGIN
  GetIntVec($9, OldKBVec);
  SetIntVec($69, OldKBVec);
  SetIntVec($9, @MyKB);

  { Keep(0); } { Uncomment and erase the rest of the lines to make this program resident. }

  REPEAT
    writeln('Press escape to exit. Or Ctrl-Alt-Del if you want...');
    ch:= readkey;
  UNTIL ch=#27;

  { Forgetting the next line will very surely crash your computer. }
  SetIntVec($9, OldKbVec);
END.

--
                                                        ___   ___
                                                      /  o  \   o \
Dov Grobgeld                                         ( o  o  ) o   |
The Weizmann Institute of Science, Israel             \  o  /o  o /
"Where the tree of wisdom carries oranges"              | |   | |
                                                       _| |_ _| |_
From: SKLEPZI@SSB1.SAFF.UTAH.EDU (Steven Klepzig)
Subject: Re: Wanted: Code for sorting a file
Organization: University of Utah
Date: Tue, 15 Dec 92 17:19:51 GMT

In article <1992Dec15.135354.10665@htsa.aha.nl> quintenu@htsa.aha.nl (
Quinten Uijldert) writes:
>Who can E-Mail me some code for sorting a file. The file contains
>records like this:
>TYPE
>  RecType = RECORD
>    Name, Street, Zip, Telephone: String;
>  END;
>  FileType = TEXT;
>
>VAR
>  Rec: RecType;
>  f: FileType;
>
>I Want to sort the file on Rec.Name, but I can't figure it out how
>to do it.
>I Use TP 6.0.

If the entire file can fit in memory consider creating a linked list in 
memory of the records and do an insertion sort while reading records.  
Sorting to disk can get messy, if you have the older Turbo Access programs 
you could use the Sort program included with it.

Also in "Turbo Pascal 6.0 Techniques and Utilities" (ISBN 1-56276-010-6)
there are some code portions for extending filepos, filesize, and seek to 
text files, using DOS funtion 42h.  However, the copyright on the book 
prohibits me from posting the source for these funtions without permission 
and I don't have permission from Ziff-Davis Press.

HTH...
Steven (sklepzi@ssb1.saff.utah.edu)
From: icsu0237@cs.montana.edu (Jeff Patterson)
Newsgroups: comp.lang.pascal
Subject: Re: need help with 'boss key'/screen blank
Date: 15 Dec 92 10:23:24 GMT
Article-I.D.: coe.1992Dec15.102324.1063
Organization: Montana State University, Dept. of Computer Science, Bozeman MT 59717

In article <Bz9tor.8sq@javelin.sim.es.com> tpehrson@javelin.sim.es.com writes:
>could someone please tell me an easy way to blank a text screen and grab it
>back to serve as a 'boss key'?  i'm wondering if i can do some memory
>fancy-footing so that i can stuff it / pull it and not have to redraw.
>
>responses anticipated with gratitude.
>

I too had this problem.  It's not as difficult as you might think...
A simple and effective way to do this is to define a type at start:

	type
	  screentype:array[80,25] of word;

and then to define two variables as follows

	var
	  screen:screentype absolute $B800:0000; {address of text page}
	  screencopy:screentype;

The address should be the same on your computer.  If not, see if you can find
it in a tech man.

Anyway, what has been created is a variable called screen which always has in it
what is currently on the monitor, and a copy of this variable called screencopy.
When the "boss key" condition is met, simply include the following command:

	screencopy:=screen;

then write whatever you feel is a good "boss key" front (a C:\ or something)
When you want to toggle back, simply type:

	screen:=screencopy;

and BLAM!, you have what you originally had.  Hope that this can help somehow...

			Hope I could help out,
				 - Jeff

-- 
================================================================================
Jeff Patterson   CS Department  || "We are the keepers of the sacred words..."
icsu0237@caesar.cs.montana.edu  ||            - Head Knight who says "NEEEGH!"
================================================================================
Newsgroups: comp.lang.pascal
From: peter@psychnet.psychol.utas.edu.au (Peter R. Tattam)
Subject: Re: High speed clock
Keywords: clock
Organization: Psychology Department, University of Tasmania
Date: Wed, 16 Dec 1992 07:14:44 GMT

Well.  Here 'tis.
have fun.
------------------- cut here ----------------------
{ millisecond timer unit }

unit msecs;

interface

var
   timer:word;                     { msec timer }
   idle:procedure; {  you can change this to do something useful when delaying}

procedure delay_ticks(t:word);     { resume until t clock ticks have elapsed }
procedure start_clock;             { starts the 1 msec timer }
procedure stop_clock;              { stops the 1 msec timer }

implementation

uses dos;

procedure delay_ticks(t:word);
begin
  inc(t,timer);
  repeat idle until integer(timer - t) >= 0;
end;

const clock_active:boolean = false;
      one_msec = 1193;
var   save_clock:pointer;
      clocks:word;

procedure tick_int; far; assembler;
asm
  push ax
  push ds
  mov ax,seg @data
  mov ds,ax
  mov al,$20
  out $20,al
  inc [timer]
  add [clocks],one_msec
  jnc @1
  pushf
  call [save_clock]
@1:
  pop ds
  pop ax
  iret
end;


procedure start_clock;
begin
  if clock_active then exit;
  inc(clock_active);
  timer := 0;
  clocks := 0;
  getintvec($08,save_clock);
  setintvec($08,@tick_int);
  port[$43] := $36;
  port[$40] := lo(one_msec);
  port[$40] := hi(one_msec);
end;

procedure stop_clock;
begin
  if not clock_active then exit;
  dec(clock_active);
  port[$43] := $36;
  port[$40] := 0;
  port[$40] := 0;
  setintvec($08,save_clock);
end;

procedure nothing; far;
begin
end;

var saveexit:pointer;

procedure uninstall; far;
begin
  exitproc := saveexit;
  if clock_active then stop_clock;
end;

begin
  timer := 0;
  idle := nothing;
  saveexit := exitproc;
  exitproc := @uninstall;
end.


-------------------- cut here --------------------
----------------------------------------------------------------------------
P.Tattam                                    International Phone 61-02-202346
Programmer, Psychology Department           Australia     Phone   002-202346
University of Tasmania, Hobart, Tasmania, Australia
----------------------------------------------------------------------------
Newsgroups: comp.lang.pascal
From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
Subject: Re: TP's reset on read-only files
Organization: Queen's University
Date: Mon, 14 Dec 1992 02:58:04 GMT

In article <1992Dec12.214246.50@newton.hartwick.edu> wisanr@newton.hartwick.edu writes:
> 
>I've been astonished to discover that TP's reset procedure can't open a
>read-only file ex@|cept as a text file.  This appears to be true of
>every version since TP1.  If it weren't clearly documented I'd call it a bug:
>reset opens a text file for input and any other kind of file for
>input and output.  In consequence, DOS will reject an attempt to reset a file
>with attribute read-only.

No, Reset opens other files with mode FileMode.  Change FileMode to 0 if you 
want read-only access to a binary file.  Better yet, don't use binary files 
at all.  Use streams, and specify the open mode when you open them.  Streams 
are at least as fast and much more flexible than binary files in TP.  (The 
TDOSStream is about identical to an untyped binary file.  The TBufStream can 
be much faster when buffering helps; sometimes it's slower, when 
buffering hurts.)

Duncan Murdoch
dmurdoch@mast.queensu.ca
From: berend@contrast.wlink.nl (Berend de Boer)
Newsgroups: comp.lang.pascal
Subject: Turbo Vision Questions
Date: Fri, 11 Dec 1992 08:53:16

Richard Madison wrote in a message to All:

 RM> 	1/  Printer.  In Turbo Vision, if you send something to
 RM> printer and it doesn't work (Off, Out of Paper, Not on
 RM> Line, etc..) then 	you get prompted for ENTER or CANCEL.  If
 RM> you enter it tries again (and loops back if it still does
 RM> not work),  My problem is 	that if you select CANCEL, the
 RM> program bombs.  I want it to re-turn something so if you
 RM> select CANCEL then you return to the program.

Turn of IOerrorchecking and check IOResult for any errors. If IOResult
<> 0 then you can display an error message.


 RM> 	3/  Screen.  I want the program to dect if you are in 50/43
 RM> line mode, and then change to 25 line mode, and upon exit,
 RM> change back to 50 line mode.

The startup screen mode is saved by InitVideo in the StartUpMode
variable. Set the ScreenMode variable to switch to 25 or 43/50 line
mode. ScreenMode is used by InitVideo to set the screen to.


Groetjes,

Berend. (-:
fido: 2:281/527.23
email: berend@contrast.wlink.nl

Newsgroups: comp.lang.pascal
From: trygves@fdh.hsf.no (Trygve Storr|nningen)
Subject: REQUEST: novell interrupt  
Keywords: novell interrupt login_name 
Organization: Finnmark College
Date: Tue, 15 Dec 1992 11:00:10 GMT
Reply-To: trygves@fdh.hsf.no

Can anybody help me finding the interrupt for getting 
a novell current user_name and the current station adress ?? 

I have searched  the "Interrupt List" by Ralf Brown, but
wasn`t able to find anything about this subject ..

---
Trygve Storr|nningen              Phone: +47 84 40322
Amtmannsnesvn. 5                  Internet: trygves@fdh.hsf.no
N-9500  ALTA
NORWAY                            Member of Alta...
From: roth@oasys.dt.navy.mil (Pete Roth)
Newsgroups: comp.lang.pascal
Subject: Funny (?) DOS IDE editor window chars
Date: 15 Dec 92 13:05:39 GMT
Reply-To: roth@oasys.dt.navy.mil (Pete Roth)
Organization: The David Taylor Model Basin

I've noticed that when I reload a file that's already been "made" that
the editor window occasionally posts an "M" next to the spot
where the "file has been changed" symbol appears (lower left corner
of the window). I haven't found anything in the K's of doc pages that
might give me a clue to this behavior.

Are there other characters that can appear?
Where do the docs reference these things ?
What are they characters telling me ?

regards, pete
- - - - - - - - - - - - - - - - - - - - - - - - - -
Peter N Roth      roth@oasys.dt.navy.mil
The operating system of the future: WindoesN'T.
From: alanchem@csd4.csd.uwm.edu (Alan Scott Olson)
Newsgroups: comp.lang.pascal
Subject: Novell Queues
Date: 16 Dec 1992 21:49:50 GMT
Organization: Computing Services Division, University of Wisconsin - Milwaukee
Distribution: usa
NNTP-Posting-Host: 129.89.7.4
Originator: alanchem@csd4.csd.uwm.edu

Simple question....

With BP 7.0, how difficult is it to direct output to a Novell queue, on a 
dedicated print server.

- Alan

-- 
 ______________/ Alan S. Olson  Swanson Environmental, Inc. \_________________
/     e-mail to alanchem@csd4.csd.uwm.edu  OR  alan@alchemy.chem.uwm.edu      \
|          Want some good music?  Check out Milwaukee's own BoDeans           |
+-----------------------------------------------------------------------------+