HDTenEightyP/NetNews huggingface dataset:
From: baylor@ccwf.cc.utexas.edu (Baylor)
Newsgroups: comp.lang.pascal
Subject: What can i do in a TSR?
Summary: yet another FAQ TSR question
Keywords: TSR
Date: 23 Jul 92 22:19:26 GMT
Organization: The University of Texas at Austin, Austin TX


	Someone wants me to write  a TSR for him and i need to do
a little checking.
	What can i NOT do in a TSR. I actually understand the theory
of tsrs ok and believe i can write one easily enough, but i am 
quite aware i can't use dos. I think i can use int 10 to write
to the screen (writeln is bad in a tsr isn't it?).
	What this person needs is something that checks a port
(he does alot of networking/modem stuff) and have it written 
to the hard drive. Can i do background disk-writes in a TSR
(oh yeah, i constantly poll the port to see if i need to write)?
I'm not sure if writing to the hard drive uses int $13 or dos
or both  (or neither :)? ).
	Also, i've downloaded several (4? 5?) tsr programs from
wuarchive but haven't extensively tested them. Has anyone used
any of those programs? Any problems? I have sometimes experienced
problems with hot keys accidenta;;y starting my screen saver rather
than the program but my tsr laden environment (through norton no less)
is probably less than great.
	And if anyone wonders, i've done this before some time ago
and have books around here (on just about anything) that i plan to
dive into shortly, but i wanted the initial observations from others
on whether or not i want to disk-writes in a tsr or not ( i have 
never done modem programming before - this seems all ibm to ibm
modem netting).
	Any helpful hints appreciatted.

	Oh yes, i heard turbo's keep procedure clobbers the dos
stack/frame/something. That true? I can write (have written) this
in assembler if turbo's functions have bugs.

-- 
-----------------------------------------------------------------------
Baylor Wetzel    baylor@cc.utexas.edu        Hang Tyson 
Free Leonard Peltier
-----------------------------------------------------------------------
Newsgroups: comp.lang.pascal
From: als@vl.ts.kiev.ua (Alexander Shehovtsov)
Subject: Re: Rom Bios?
Reply-To: als@vl.ts.kiev.ua
Organization: TechnoSoft
Date: Mon, 20 Jul 92 09:13:33 -0400

>   Boris Tyshkiewitch <btysh@aha.msk.su> writes:
>
>   > FMnzf> presumably because it is *not* possible to find the BIOS one with any
>   > FMnzf> certainty.
>
>   >Why? Theare are a well known techology to find a real interupts vectors. This
>   >technology used in virus and antivirus software. So make own small debbuger
>
>   > 1.  Install vector Int 1h - single step interrupt.
>   > 2.  set the sengle step flag
>   > 3.  Execute interrupt You are interesting in.
>   > 4.  Monitor CS:IP address until it points to ROM ( 0F000:?????)
>   >     This is the entry to the roms int. handler.
>

  It's not so easy as looks, especially when talking about virus and
antivirus software. There are at least three methods to foolish this
algorithm:

    1. If virus or antivirus sets OFF the single step flag. It's not
       very hard to do, if it can intercept interrupt You are interesting in
       before your debugger;

    2. More interesting idea: programm in interrupt chain before
       installation makes scan of the part of memory from 0F000:0000
       to find code of RET FAR. Then program in its codes
       belonging to interrupt chain makes FAR CALL to this position.
       Your debugger would be very happy to find this RET FAR in
       BIOS, but you would not be so happy in that case :-)

    3. EMM386.SYS in DOS 5.0 and QEMM.SYS from DesQView are able to
       load programms into UMB (Upper Memory Blocks), even "replacing"
       BIOS by their "stealth technology". The addresses of these
       programms can be any except only video memory, so 0F000:0000
       may be not ROM but RAM.

-- 
Alexander Shehovtsov,      (044) 266-70-28 (9:00 - 18:00 Kiev, Ukraine) voice
           als@vl.ts.kiev.ua    Relcom | 2:463/30.5  or  2:463/34.4   FidoNet
                                                       


Newsgroups: comp.lang.pascal
From: als@vl.ts.kiev.ua (Alexander Shehovtsov)
Subject: Re: TPv5.5 optimizations--Constant Folding?
Reply-To: als@vl.ts.kiev.ua
Organization: TechnoSoft
Date: Tue, 21 Jul 92 17:49:23 -0400

>   If I have string literals strewn about my code will the v5.5 Turbo Pascal
>   compiler replace subsequent occurances with a pointer instead of duplicating
>   the literal?
>
>   Ie, if the statement: " errmsg := 'Unknown command,'; " occurs 20 times,
>   (exactly the same in each case), will the string be stored once or 20 times?
>
  Yes! And it's easy to optimize this assignment, defining somewhere
global typed constant:

        CONST
               ErrorMessage : string[17] = 'Unknown command';

and then writing such statements:

               errmsg := ErrorMessage;


-- 
Alexander Shehovtsov,      (044) 266-70-28 (9:00 - 18:00 Kiev, Ukraine) voice
           als@vl.ts.kiev.ua    Relcom | 2:463/30.5  or  2:463/34.4   FidoNet
                                                       


Newsgroups: comp.lang.pascal
From: gill@eagle (Warren Gill)
Subject: Re: Sparse matrices
X-Newsreader: Tin 1.1 PL4
Organization: Sangamon State University
Date: Wed, 22 Jul 1992 17:47:27 GMT

   You can do a sparce matrix using a doubly-linked list, where one link
 represents the vertical, and the other the horizontal.
   Each column of the matrix is represented by a circularly linked list
 with a head node, as is each row. The head node for column x is also the
 head node for row x.  Each head node has three fields: down, right, and
 next.  _down_ links into a column list, _right_ links into a row list, 
 and _next_ links the head nodes together.
   All the other nodes have five fields: row, col, down, right, and value.
 _row_ and _col_ are the row # and col #; _down_ and _right_ are pointers
 to the next non-zero term in the same row/column.  This is a record type
 you could use:

     Type SparceMatrix = ^MatrixNode;
          MatrixNode   = Record
                           down : SparceMatrix;
                           right : SparceMatrix;
                           Case head: Boolean of
                             True: (next : SparceMatrix);
                             False: (value : Integer;
                                     row   : Integer;
                                     col   : Integer);
                         End;

      ______                                                               
      )     (   Greetings from the Land of Lincoln                         
     /       |  Sangamon State University, Springfield, IL                 
    (        |                                                             
     \_  *   |                                                             
       \     |  Warren Gill, Microcomputer Software Specialist             
       /    /   Internet:  Gill@Eagle.Sangamon.edu                         
        \/\/                                                               
Newsgroups: comp.lang.pascal
From: wippel@nbrwh49.bnr.ca (Roland Wippel)
Subject: VM PASCALVS to HP Pascal or C Converter?
Organization: Northern Telecom, Bramalea, Canada
Date: Fri, 24 Jul 92 14:50:23 GMT

Does anyone know of a converter that will convert from IBM PASCALVS
to either C or HP Pascal.
From: drvsim01@uctvax.uct.ac.za (Simon Driver)
Newsgroups: comp.lang.pascal
Subject: Re: I need help with TVISION (StatusLine)
Date: 22 Jul 92 13:15:04 GMT
Article-I.D.: uctvax.1992Jul22.111504.202068
Organization: University of Cape Town

In article below <LOPEZJ@EVALUN11.BITNET> writes:

>      -How can I do that StatusLine show help messages (like IDE of Turbo
>  Pascal). I think that I would use the Hint function but I don't know do
>  it.


I asked this question a while back and got a few replies (thank you) but all
involved the hint. You just place a global variable in your hint function and
this takes care of this, but you get the following problem.

F1 Help | Please wait while loading C:\TP6\TEST.TXT

This doesn't help much because if it is a large file, or it is being formated,
the user might think (s)he can press F1 to get help during the loading process.

What I did was to do a hack job. Just before and after the loading process, you
cheat a bit and get the statusline to point to your own bit of text, then
update the statusline. I can post the source if anyone is interested.

BTW : I'm still looking for a TVision Word Wrap editor object.

Cheers,
       Simon.
-- 
*****************************************************************
\*****                                                          *\      
 *****   Simon Driver                                           **
 \****                                                          **\
  ****   InterNet : DRVSIM01@UCTVAX.UCT.AC.ZA                   ***   
  \***   FidoNet  : 5:7102/120.1                                ***\   
   ***              Simon.Driver@p1.f120.n7102.z5.fidonet.org   ****
   \**                                                          ****\
    **   Comment  : Pascal Programmers Do It With Indentation   *****
    \*                                                          *****\
     *****************************************************************
Newsgroups: comp.lang.pascal
From: ts@uwasa.fi (Timo Salmi)
Subject: Re: PASCAL TO C TRANSLATOR
Organization: University of Vaasa, Finland
Date: Mon, 27 Jul 1992 04:11:38 GMT

In article <24JUL92.19215652@skyfox.usask.ca> dash@skyfox.usask.ca writes:
>Hi, I am new to this group. This may be an old question. But I would appreciate
>if someonecould let me know whether a PASCAL TO C translator exists.

There is some, now oldish, information on this in the Frequently
Asked Questions
112730 Jun 13 12:23 garbo.uwasa.fi:/pc/ts/tsfaq29.zip

You might find it also of general interest as a new user.  Another
FAQ that you might want to look at (for programming, not for P->C)
is
 36094 Jul 21 16:34 garbo.uwasa.fi:/pc/doc-net/faqp9207.zip

"If you do not know how to go about getting this material, users are
welcome to email me for the prerecorded garbo.uwasa.fi instructions
(long, circa 29Kb).  North American users are referred to the garbo
mirror on wuarchive.wustl.edu.  Australian users are referred to the
archie.au mirror.  The mirrors may lag occasionally, or might not
have all the files.  If you do not receive my reply within five
days, please ask your own site's system manager to construct a
returnable mail path for you". 

..................................................................
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: sl8nl@cc.usu.edu
Newsgroups: comp.lang.pascal
Subject: Re: merging virtual screens?
Date: 23 Jul 92 23:51:11 MDT
Followup-To: comp.lang.pascal
Organization: Utah State University

In article <76490@ut-emx.uucp>, baylor@ccwf.cc.utexas.edu (Baylor) writes:
> 
> 	Quick question for those who understand me or have played a couple
> of games by apogee and others:
> 	How do you make a set portion of a graphics screen scroll
> and have the backdrop stay constant? It's done on commander keen
> and cosmos cosmic adventure (don't know any non-games that do it).
> I thought i had heard it was done by merging two screens, having a
> backdrop screen (like a mountain scene) that never moves (except scroll
> horiz with the rest of the game/program) and a foreground screen
> where all the action is that can scroll up or down.
> 	Maybe you have a seperate page where the sprites move and 
> move that to the visual screen quickly, knowing which parts of the
> screen to overwrite and which to leave alone. Or maybe i'm way off
> (these games use fairly large virtual screens - can't imagine
> two pages of them).

No, you don't do that.  Dual playfields don't exist on the IBM...they do
on the Amiga.  So, on the IBM, you have to duplicate them the best that
you can.

The Apogee games, in fact, do not use large virtual screens.  OK, they had a
max of 256k of EGA memory to use (yes, commander Keen is EGA.)  Just for a
byte-per-pixel organization, let's flip to an extended VGA mode.

The Apogee games are on a 320x200 screen.  However, you'll notice they 
smooth pan the display.  This is done on a background screen (virtual).  The
largest VGA virtual screen that can fit in the tweaked modes is 512x512...
however, for iintense animation without a flicker, you have to have two 
pages to flip.  This means that your largest screen would be, say, 420x320.

You can pan around this 420x320, but eventually you must update the display.
The only way I've come up with without dual playfields is to copy the background
image down (say the mountains in the background) and then to update the other
tiles.  You can get speed from this if you write your routines to specifically
handle your tiles...not general putimages for instance.

> 	I don't necc. need code, just a general idea of what to look
> at or what they're doing.

I've had up to 10 dual playfields at once on a 286-12 going.  I can't 
release the code (sorry, it's protected by a company...I normally do 
release all of my code), but it can be done...the most animation I've had
going at once is smooth panning, 40 sprites, 5 dual playfields, and music.
Sucked away system time, but it was fast.

> 	Also, if anyone knows a better newsgroup for ibm graphics
> questions (alt.headache) please let me know.
> 	Oh yeah, this is in turbo pas 6, but really it all comes
> down to assembler.

For this, it really does come down to incredibly fast assembler.

Joshua Jensen
Xillion Software Development
From: bsc0@ns1.cc.lehigh.edu (BRIAN STUART COSTELLO)
Newsgroups: comp.lang.pascal
Subject: Variable record files
Date: 22 Jul 92 13:12:06 GMT
Organization: Lehigh University

If anyone knows of any routines that would allow variable record sizes in a
file, please tell me.

What's I'd like is the ability to enter in text of any size (up to, say, 20k),
and when I wrote it to disk, I don't want the record to take up 20k if I
entered in 1k's worth.

Thank you,
-- 
-Brian

BSC0@NS.CC.LEHIGH.EDU
From: roth@oasys.dt.navy.mil (Pete Roth)
Newsgroups: comp.lang.pascal
Subject: Re: HELP !!! Is there any ability to pass various number of parameters to TP 6.0 function or procedure
Date: 27 Jul 92 11:41:34 GMT
Reply-To: roth@oasys.dt.navy.mil (Pete Roth)
Organization: The David Taylor Model Basin

In comp.lang.pascal, soi@utrade.e-burg.su (Oleg I. Subachev) writes:
>Dear Madams and Sirs !!!
>
>Can anybody hint me whether there is any hook to pass various
>number of parameters to TP 6.0 functions and procedures.

You mean, like the Fortran MAX function?  There is NO way to specify
that a procedure accepts a variable number of parameters.

If you _really_ need it, work-arounds might include passing a single data
structure such as an array or linked list. The procedure would then have
to unpack the structure itself.

Just curious: what is it you're trying to do?

regards, pete
- - - - - - - - - - - - - - - - - - - - - - - - - -
Peter N Roth      roth@oasys.dt.navy.mil
"Never argue with someone who buys ink by the barrel." - Daniel Janal.
From: amead@s.psych.uiuc.edu (Alan Mead)
Newsgroups: comp.lang.pascal
Subject: PGA.BGI ( was programming the IBM PC & XT )
Date: 23 Jul 92 19:23:46 GMT
Organization: UIUC Department of Psychology

Thanks for your advice about programming the IBM PC and XT with Turbo Pascal.

The program works well enough (even slower than I imagined, but serviceably
fast).  I had not considered the speed and noise of the (floppy) disks but
that isn't too bad.

But most of the computers have, I think, "Personal Graphics Monitors".  Does
that mean no graphics?  Or perhaps I'm wrong about the label on the monitor?

Thanks again.

-alan mead
From: frederm@prism.CS.ORST.EDU (Michael Frederick)
Newsgroups: comp.lang.pascal
Subject: I need mouse code
Date: 30 Jul 92 09:13:25 GMT
Article-I.D.: CS.1992Jul30.091325.10833
Organization: Oregon State University, Computer Science Dept.



  Does anyone out there have some generic code that reads the location
  of the mouse other than "mousewhere" or the ones included in the
  "drivers.tpu"?

  Someone earlier asked the same question but I did not see a reply so'
  I thought I'd ask too.

  What I'm looking for is some code that includes the interupt calls and
  etc.  Mainly I want to be able to tell what pixel the mouse is on in
  any graphics mode....

  also

  Someone earlier wanted to know how to see if an alt key or shift key has
  been pressed.

  you can detect this simply by having a pointer point to ptr($40,$17);

  var p:^byte;
  begin
   p:=ptr($40,$17);
   if p^ & 1 = 1 then right shift was pushed;
   if p^ & 2 = 2 then left shift was pushed;


   this is a quick example.. You should be able to play around with it to
   see what else it detects (alt and ctrl keys and etc...);

   thanx all,

   MIKE
Newsgroups: comp.lang.pascal
From: userDHAL@mts.ucs.UAlberta.CA (David Halliwell)
Subject: Re: Is this legal - why/why not?
Organization: University Of Alberta, Edmonton Canada
Date: Thu, 30 Jul 1992 19:21:33 GMT

reagan@hiyall.enet.dec.com (John R. Reagan) writes:


>In article <Bs6L75.BDK@knot.ccs.queensu.ca>, dmurdoch@QueensU.CA (Duncan Murdoch) writes...
>> 
>>Is that really illegal, or did you make a typo?  It compiles just as
>>you'd expect in Turbo Pascal:  "foo" becomes the standard 16 bit integer
>>type, "integer" becomes the subrange 1..10.  TP processes the declarations
>>strictly sequentially; I had thought standard Pascal did it that way
>>too.

>Nope, I didn't make a typo.  The Pascal standard doesn't discuss
>"sequential" anything.  The "INTEGER = 1..10" is a defining occurrance
>of the identifier INTEGER for the entire region (the region goes backwards
>to the beginning of the block).  This definition of INTEGER retroactively
>changes the previous use of INTEGER in the definition of FOO.  You now
>have a "use before declare" situation and thats illegal.

    Are you sure that standard Pascal doesn't discuss sequential
anything? I always thought that the basic governing principle of
Pascal was that *everything* in the language definition was sequential:
you can't do anything unless you have already told the compiler about
it. Of course, the compiler has predefined types, etc., but beyond
those basics you have to declare or define everything. You can't refer
to a variable, function, or procedure until the code that defines it
has been compiled. If you *have* to (due to interdependencies), then
you need to forward declare the procedure.
  
    To retroactively change the previous use would require multiple
passes through the source code. And then we would be reduced to
FORTRAN compile speeds ;-)
 
    Or am I suffering a memory parity error?

>Of course, noone claims that Turbo Pascal is standards conforming...

   Amen to that.
  
 
Dave Halliwell
Department of Geography
University of Alberta
Edmonton, Alberta
Newsgroups: comp.lang.pascal
From: soi@utrade.e-burg.su (Oleg I. Subachev)
Subject: HELP !!! Is there any ability to pass various number of parameters to TP 6.0 function or procedure
Reply-To: soi@utrade.e-burg.su
Organization: Ural's Trade House
Date: Mon, 20 Jul 92 14:10:56 +0300

Dear Madams and Sirs !!!

Can anybody hint me whether there is any hook to pass various
number of parameters to TP 6.0 functions and procedures.

------------------------------------------------------------
Oleg Subachev                           soi@utrade.e-burg.su

main specialist                    phone: +7 (3432) 53-37-36
informational department             fax: +7 (3432) 53-37-25
Ural's Trade House                 telex:     721744 UTRD SU
Yekaterinburg
Russia                        home phone: +7 (3432) 72-27-49


Newsgroups: comp.lang.pascal
From: death@acca.nmsu.edu (The Grimm Reaper)
Subject: Re: Pascal Pretty Printer (?)
Organization: New Mexico State University
X-Newsreader: Tin 1.1 PL4
Date: Wed, 22 Jul 1992 10:04:31 GMT

markham@brtph600.bnr.ca (Andrew Markham P205) writes:
: I know about pretty printers for C, but can't seem to
: find one for Pascal.  Somebody HAS to have written one
: by now.
: 
: Anybody have one?  If not, I'll get to work on one.
: 
: BTW, if this is a FAQ, I aplogize, but I don't remember seeing 
: it in there.

The best publicly available one is REFORM24, but it doesn't support some
of the newer TP extensions, such as objects or BASM.  TurboPower Software,
on the other hand, has one in their excellent Turbo Analyst package, and
they -do- keep it updated to the current versions of TP.
Newsgroups: comp.lang.pascal
From: ins894r@aurora.cc.monash.edu.au (Aaron Wigley [Wigs])
Subject: Re: Is this legal - why/why not?
Organization: Monash University
X-Newsreader: Tin 1.1 PL4
Date: Wed, 29 Jul 1992 07:24:08 GMT

sirosh@cs.utexas.edu (Joseph Sirosh) writes:
: I have two questions.
: 
: 1. The following declaration for an enumerated type is legal.
:     Type Used = (Integer, Char, Boolean);
: 
: even though Integer, Char, Boolean etc. are names of predefined types.
: This works on Think Pascal on the Mac.

In pascal it is possible to redefine types:
Eg,

Type
	real = extended;

What it seems you are doing is redefing the types Integer, Char, Boolean,
and I would expect big problems..

: Joseph 

Aaron Wigley
ins894r@aurora.cc.monash.edu.au
From: gt1827a@prism.gatech.EDU (david daniell)
Newsgroups: comp.lang.pascal
Subject: Stony Brook Pascal+
Date: 30 Jul 92 17:17:25 GMT
Followup-To: gt1827a@prism.gatech.edu
Organization: Georgia Institute of Technology

Has anyone had any experience using Pascal+ yet?  I'm looking to use it
to interface existing Turbo Pascal 6.0 code to Alsys Ada, a task which is
beyond the capabilities of TP.  Anyone with any experiences with this
package, particularly the interfacing capabilities, let me know your 
opinion.


-- 
David Daniell
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt1827a
Internet: gt1827a@prism.gatech.edu
Newsgroups: comp.lang.pascal
From: edlee@chinet.chi.il.us (Edward Lee)
Subject: Re: Pascal Pretty Printer (?)
Date: Tue, 21 Jul 1992 16:56:34 GMT
Organization: Chinet - Public Access UNIX


I've written one, called EPB (Ed's Pascal Beautifier), currently
updated to version 2.32.  I think that I may add a colored source code
viewing option to it later.  At this time, it performs automatic
indentation for nested IF THEN ELSE constructs and normalizes Turbo
Pascal v4.0 and user identifier capitalizations, pads some symbols with
spaces, plus some other things. An older version of this program is
available from Simtel.  A sequence of updates have been submitted
to comp.binaries.ibm.pc over the past few months, but none of them
have appeared in that newsgroup so far as I am aware.  It seems that
I have been updating the program faster than a reviewer can be found
for the program and complete the testing of a submission.

If any of you are interested in the program, I will accept requests
for the program, and once I receive several requests or a week passes,
I will send out one uuencoded mail message to the multiple requestors.


-Ed L