HDTenEightyP/NetNews huggingface dataset:
From: imhw400@indyvax.iupui.edu
Newsgroups: comp.os.msdos.programmer
Subject: Where is the size of the environment block?
Date: 19 Aug 92 13:58:10 -0500

WARNING:  newbie-type question follows.  I've been writing mainframe assembly
language for years, but this is my very first program for MSDOS or the 80x86.

I'm writing a gadget that needs to create or update an environment variable. 
I'm writing in Arrowsoft Assembler (the only real-address-mode translator I've
found for free :-) and have no libraries, so I have to code this myself.  I can
find the parent process' environment block with no problem, and (I think) I
understand the format thereof except for one thing:  how do I know the size of
the environment block that I've located, so I don't run off the end and damage
other structures?

So that I don't wind up bugging you-all endlessly, I'll ask another question of
those who answer:  where did you learn the answer?
-- 
Mark H. Wood, Lead Analyst/Programmer    +1 317 274 0749   [@disclaimer@]
Internet:  IMHW400@INDYVAX.IUPUI.EDU     BITNET:  IMHW400@INDYVAX
Celebrate freedom:  read a banned newsgroup.
Xref: sparky comp.os.msdos.programmer:8529 comp.lang.pascal:4847
Newsgroups: comp.os.msdos.programmer,comp.lang.pascal
Subject: Re: Problems using exec to run a program that accesses modem
From: sjmadsen@miavx1.acs.muohio.edu (Steve Madsen)
Date: 13 Aug 92 20:39:19 -0500
Organization: Miami of Ohio

> }It's my
> }experience that getting modems and serial ports to operate flawlessly when
> }there is no one there to fix things is a tough thing to do. 
> 
> Yeah, many BBS sysops swear to the existence of a 'vacation detector' in
> their hardware or BBS program.  A board that has been running flawlessly
> for months always seems to go down within twelve hours of the sysop leaving
> on a month-long vacation....

        I'd swear to it..  I helped to run a school BBS a couple years ago, and
it would always go down right after school let out Friday afternoon.  Of
course, we couldn't get to it until Monday morning... argh!

        Maybe the software is self-aware and we just don't know it! :)

-- 
Steve Madsen
Miami University  Oxford, OH
Internet: sjmadsen@miavx1.acs.muohio.edu
From: beaurega@ireq.hydro.qc.ca (Denis Beauregard)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Sorting/Printing
Date: 22 Aug 92 02:20:19 GMT
Organization: Institut de recherche d'Hydro-Quebec, Varennes, Canada

In article <1992Aug20.022202.2349@menudo.uh.edu> libh@Jane.UH.EDU writes:
>
>  I am working on a project for a friend that requires me to sort a large file
>of records (2000+ entries generally) that will change from month to month as he
>gets updates so I can never be certain of the number of records.  I would
>appreciate any suggestions on sorting the file.  Right now I am debating on how
>to treat it as a large array on disk and sort it as if it were in memory, but I
>also realize that it would be VERY slow.  Any suggestions would be greatly
>appreciated.
>

You forget to indicate what language you are using.

In C language, there is a function for sorting.  With large model,
your could build a table of 8000 entries, read your file line by line
and using strdup() have pointers in the table, then using a sort function
(most if not all C or C++ compilers have a sorting routine built-in).
I did so and made some customization.  For example, I can recode a
line so that J.4.12.3 > J.4.4.2, or names are de-abbreviated during sort.

If you have Basic, you will be probably very limited.


-- 
  \_\    Denis Beauregard  *  internet:beaurega@ireq.hydro.qc.ca
 /   \   Genealogiste officiel : Beauregard/Jarret/Jarest/Vincent
J   __>  Vient de paraitre : Andre Jarret et ses Ancetres
\_.-===  En vente par l'auteur                      Opinions ? Et pis non !
From: beaurega@ireq.hydro.qc.ca (Denis Beauregard)
Newsgroups: comp.os.msdos.programmer
Subject: Re: BIOS SPEED FOR VIDEO WRITES
Date: 22 Aug 92 23:59:29 GMT
Organization: Institut de recherche d'Hydro-Quebec, Varennes, Canada

In article <1992Aug20.131829.5606@tc.cornell.edu> homer@theory.TC.Cornell.EDU (Homer Smith) writes:
>
>     On my 386/33 with Trident 8900 chip the program takes 1:10
>minutes.
> 
>     On my 486/33 with identical video board the program takes 11:46
>minutes.
> 
>     Could someone please give me a hint why the 486 is 11 times
>slower than the 386. 
> 
>     Using another program that did a simple INC AX,1 repeatedly,
>the 486 was 2.8 times faster than the 386.
> 
>     Homer

On my 386/22 (yup, a 20 MHz boosted to 22 MHz), the Norton index is
50% higher in the Turbo mode, but the display output in DOS change
in some circumstances into a very slow (like a 300 baud teletype) writing.

-- 
  \_\    Denis Beauregard  *  internet:beaurega@ireq.hydro.qc.ca
 /   \   Genealogiste officiel : Beauregard/Jarret/Jarest/Vincent
J   __>  Vient de paraitre : Andre Jarret et ses Ancetres
\_.-===  En vente par l'auteur                      Opinions ? Et pis non !
Newsgroups: comp.os.msdos.programmer
From: messina@netcom.com (Tony Porczyk)
Subject: Re: 4DOS diversion (Was Re: A batch programming contest for you)
Date: Wed, 19 Aug 92 00:26:55 GMT
Organization: Messina Software

ts@uwasa.fi (Timo Salmi) writes:

>In article <1992Aug18.162657.27453@usenet.ins.cwru.edu> bx304@cleveland.Freenet.Edu (Jeff Epler) writes:
>>But *why* would you want to put yourself through the pain and agony of
>>doing such a thing, when if you but 4DOS you can just say %@ext[%1] and
>>be done with it...

>Oh no, not again :-).  Ok, I'll bite.  Another case of 4DOS vs MsDos
>for alt.religion.computers :-) :-).  Why even use 4DOS and a PC when
>one can use a Sun mainframe :-).  Why even use a computer.  There is
>no end to this tack. 

I have a string feeling you are confused.  4DOS is not a replacement of
MSDOS, it is a complement of it, just like COMMAND.COM is, of which it
is a replacement.  It has all the functionality and compatibility with
it, but adds some features which enhance _MSDOS_.  It does not require
any more hardware or any different hardware.

I found your reply to be either uninformed (despite your being a keeper
of garbo.uwasa) or misinforming.

t.
From: sweh@spuddy.uucp (Stephen Harris)
Newsgroups: comp.os.msdos.programmer
Subject: Re: A batch programming contest for you
Date: 19 Aug 92 15:39:02 GMT
Organization: Spuddy's Public Usenet Domain

In article <1992Aug18.052017.3758@uwasa.fi> ts@uwasa.fi (Timo Salmi) writes:
>I have a puzzle for you gentle fellow programmers who are interested
>in batch programming. The task is the following.  With the standard
>batch commands write a batch that returns the extension of the
>(file) name given to the batch as the parameter (%1). No external
>commands or programs are allowed to perform the task.

>Please post your potential suggestions and solutions in here for
>everyone to see. 

Well, here goes!

Here is an entry for your "what is the extension" BAT file competition.
It uses variables a,x,y.

  @echo off
  set x=%1
  if "%x%" == "" goto noext
  :loop
  for %%a in (/%x%) do set y=%%a
  if "%x%" == "%y%" goto noext
  if "%x%" == ".%y%" goto gotit
  set x=%y%
  goto loop
  :noext
  echo No extension specified
  goto end
  :gotit
  echo The extension is %y%
  :end

Total is 15 lines.  It has been tested under DOS 5.00, and Compaq DOS 3.31,
but it does not work with 4DOS.

It works by using an undocumented (I think!) feature of the for loop as
demonstrated by:
  C> type x.bat
  @echo off
  for %%a in (/hello) do echo %%a

  C> x
  h
  ello

Basically, preceeding the (string) with a / (/string) makes 'for' take the
first letter as one pass, and the rest as the second pass.  4DOS does not
understand this, and just prints /hello.  In 4DOS I'd just use %@ext[%&]
anyway :-)

And so, the program loops until the first character is a . in which case
the rest is an extension.
If there is only one character then there can not be an extension.

  C> ext test.me
  The extension is me

  C> ext test.
  No extension specified

  C> ext test
  No extension specified

  C> ext a.b.c.d.e
  The extension is b.c.d.e

Of course it needs enough environment space to run in :-)

PS: Timo, please don't moan at the .UUCP address :-)
-- 
                               Stephen Harris
               sweh@spuddy.uucp    ...!uknet!axion!spuddy!sweh

 * Meeeeow ! Call Spud the Cat on > +44 203 638780 < for free Usenet access *
Newsgroups: comp.os.msdos.programmer
From: shaun@octel.com (Ein keine nichtmusik)
Subject: Re: Compression Algorithms Required !
Organization: Octel Communications Inc., Milpitas Ca.
Date: Fri, 21 Aug 1992 17:46:18 GMT

In article <1992Aug18.152431.390@csc.canterbury.ac.nz> cctr132@csc.canterbury.ac.nz (Nick FitzGerald, CSC, Uni. of Canterbury, NZ) writes:
>In article <ebolog.4@elaine.ee.und.ac.za>, ebolog@elaine.ee.und.ac.za
>(EDWIN BOLOGNA : THIRD) writes:
>
>> If anyone out there has or knows where I can get my hands on ASM, C, or
>> PAS compression routines for LZH, or any other good compression algorithm
>> could you please mail me a copy.
>
>If you aren't too fixed to .LZH, you could get the portable .ZIP code
>from Info-Zip.  

Another excellent set of routines are the LZRW family, developed by Ross 
Williams in Australia.  There are several, some of which are optimized for
speed, and some for compression.  All the ones I've used take blocks of
input and produce blocks out output, so you can compress/decompress in a 
fixed amount of memory.  Source is available in very portable C, and in
optimized 68000 assembly in some cases.  See the comp.compression FAQ for
details.  I highly recommend the routines.

@Man
-- 
shaun@octel.com  ||  They lie, lie, lie and over simplify, I can't stannum; 
                 ||  They give me the fear.
@Man:  Hey...  You look like a floating disembodied head!
Beej:  Don't we all?
Newsgroups: comp.os.msdos.programmer
From: Frank Hoffmann <fh.pad@sni.de>
Subject: Re: Need help reading directory structures?
Organization: Siemens Nixdorf Info.Sys. AG, Paderborn, Germany
Date: Mon, 17 Aug 1992 14:33:55 GMT

millard@acsu.buffalo.edu (Peter G. Millard) writes:

>I was wondering what is the easiest way to check for and see
>if input is a directory or file (is this possible via interrups or
>something like them?)

>For example, at a prompt someone can type in either a filename
>or a directory (to search). I need to distinguish between the two.
>(ie. if they type in a filename, load the file...if it's a directory,
>jump to another subroutine to search the path w/ specific file specs and 
>show results in window,etc...)The problem I have is I don't know how
>to ask the drive if the input is a file or a dir..

>Is there an easy way to do this?

Sure !

1. Execute a _dos_findfirst() for that file. (Include all archive bits
   _A_NORMAL|_A_RDONLY|_A_HIDDEN|_A_SYSTEM|_A_SUBDIR|_A_ARCH )

2. Compare (find_t.attrib & A_SUBDIR). True ?? (>0), then it's a subdir!

frank
-------------------------------------------------------------------------------
    __________                  Frank Hoffmann
     /             /    Siemens-Nixdorf Info. Systems Voice: [+49] 5251 812 209
    /__           /      Dept: AP 52 / SW-Production    Fax: [+49] 5251 811 599
   /' _  _   __  //            Fuerstenallee 7          USA: fh.pad@sni-usa.com
__/__/__(_(_/ /_/^\__    W-4790 Paderborn / Germany    !USA: fh.pad@sni.de
-------------------------------------------------------------------------------
( * )  <--- The green dot.  This mail is reusable. Copy to /dev/null instantly.
-------------------------------------------------------------------------------
Newsgroups: comp.os.msdos.programmer
From: ericj@teal.csn.org (Eric Jacobsen)
Subject: Re: OS writing
Organization: Colorado SuperNet, Inc.
Date: Wed, 12 Aug 1992 17:29:09 GMT

fijma@cs.utwente.nl (Duco Fijma) writes:
>You probably mean: "Operating systems, design and implementation", by
>A.S.Tanenbaum. Indeed published by Prentics Hall. A well written book, with a
>good balance between theory and practice.

Add to your book list: "Operating System Design: The XINU Approach",
by Doug Comer, Prentice Hall, (C) 1984.

Maybe also "The Design of the UNIX Operating System",
by Maurice Bach, Prentice Hall, (C) 1986.

Eric Jacobsen
From: ex1neil@cybaswan.UUCP (Neil Woods)
Newsgroups: comp.os.msdos.programmer
Subject: Re: OS writing
Date: 12 Aug 92 08:45:31 GMT
Reply-To: ex1neil@cybaswan.UUCP (Neil Woods)
Organization: University College Swansea

In article <11AUG199214424286@sscvx1.ssc.gov> dlittle@sscvx1.ssc.gov (DENNIS LITTLE) writes:
>In article <yqoBPB2w164w@jksclub.scol.pa.us>, jks@jksclub.scol.pa.us (Jeremy K Summe writes...
>>I am interested in learning more about how OS's are  created.  Would 
>>anyon know of a good book or reference for me?  
>> 
>>  J|eremy    |  /
>>  K|enneth   |_/  jks@jksclub.scol.pa.us
>>  S|ummers   | \  jks@hogbbs.scol.pa.us
>>         ____|__\
>There is a book put out that may help that includes the source code to Minix.
>I haven't personnally ever read the bood (although I may when I have move time)
>but it should do the trick...  Was put out by Prentice Hall (sp) and I 
>believe was called Operating Systems Programming.
>
>me


The book is called "Operating Systems: Design and Implementation" by
Andrew S. Tanenbaum, published by Prentice-Hall, ISBN 0-13-637331-3 025.
I would recommend this book, which IMHO provides a very readable 
introduction to OS design.


-- 
Neil Woods.                 | JANET: ex1neil@uk.ac.swan.pyr
University College Swansea, | UUCP : ...!mcvax!ukc!swan.pyr!ex1neil
Wales, UK.                  | ARPA : ex1neil%pyr.swan.ac.uk@nfsnet-relay.ac.uk
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Newsgroups: comp.os.msdos.programmer
From: vincent@talos.pm.com (Andy Vincent)
Subject: PC CPU Type & Speed
Reply-To: vincent@talos.UUCP (Andy Vincent)
Organization: Philip Morris Research Center, Richmond, VA
Distribution: usa
Date: Thu, 13 Aug 92 19:29:48 GMT


NOTE: NOTE: NOTE:

I'm posting this for a friend. DO NOT REPLY TO ME!

Send all responses to

csc1jaw@cabell.vcu.edu


I am attempting to write a system information program much like a
Norton SI.  I am only interested in the system configuration section
of programs like SI or Checkit.  More specifically, what I want to
know is how to write code (in C of course) that will determine
CPU/FPU type and CPU speed, bus speed also if possible.  I can do
everything else (ports, drives, disk space, etc.) but I can't find
any info on CPU identification or speed determination.

Please help!

If you know of a reference (title, publisher, etc.) that discusses
system configuration programs for the PC, that would be great.
Source code would even be better.  Both might justify payment!

Thanks in advance
John Wickham
Newsgroups: comp.os.msdos.programmer
Subject: Help : Extended and Expanded Memory
From: ebolog@elaine.ee.und.ac.za (EDWIN BOLOGNA : THIRD)
Date: 20 Aug 92 13:21:45 +0200
Organization: Electronic Eng., Univ. Natal, Durban, South Africa


Does anyone out there happen to have PAS, C, or ASM source code that is
able to access Extended or Expanded memory. This computer has got Three Mbytes

Extended memory and I am unable to use any of it in my programs.

Any information at all on this will be greatly appreciated.

        Desperate fellow programmer (And very Greatful for any information)

                E.B. (EBOLOG@ELAINE.EE.UND.AC.ZA)

PS : Please be kind hearted and Assist !
From: sjm@miles.com (Scott Mark)
Newsgroups: comp.os.msdos.programmer
Subject: using nul: with windows?
Date: 18 Aug 92 13:54:28 GMT
Organization: Miles Inc., Diagnostics Division, Elkhart, IN

I'm having real trouble with nul: in windows:

echo > nul
echo > nul:

both cause sharing violations.  (I have 'share' installed, though I don't
think that it's used for nul:.)

Many of my batch files redirect output to nul:, so they won't run from a DOS
shell (full-screen or in a window), and MS C/C++ 7.0 programmer's workbench
won't compile files under windows, because it generates makefiles that
redirect output to nul:

Has anyone heard of this problem or a fix for it?
I'm using Dos 5.0, Win 3.1, and 386-Max.

Scott Mark
sjm@miles.com
Newsgroups: comp.os.msdos.programmer
From: uzun@crash.cts.com (Roger Uzun)
Subject: 386BSd and Linux source distributions
Organization: CTS Network Services (crash, ctsnet), El Cajon, CA
Date: 12 Aug 92 17:14:53 PDT

Where can I get the source distributions to 386BSD and Linux?
via anonymous ftp.
-Roger
Please EMail me a response if possible, I miss msgs in this
group at my site.
--------------------------------------------------------------
bix: ruzun
NET: uzun@crash.cts.com
Newsgroups: comp.os.msdos.programmer
From: hhanemaa@cs.ruu.nl (Harm Hanemaaijer)
Subject: Re: fast VGA sprite routines
Date: Mon, 17 Aug 1992 12:36:59 GMT
Organization: Utrecht University, Dept. of Computer Science

In <1992Aug14.151042.23556@zooid.guild.org> Ross Ridge <ross@zooid.guild.org> writes:

>bbs.brienv@tsoft.sf-bay.org (Brien Voorhees) writes:
>>  I've been working on some graphics routines for VGA mode 13h to handle
>>animating sprites while retaining the background and have managed to get
>> 'em goin' pretty fast (about 25-35 fps on a 486) but that's without 
>>much other overhead.  Once I add collision detection, sound, music, etc.
>>I don't think I'm going to have enough cpu time to spare.
>
>>    mov   cx,ywidth  // Set outer loop to run <ywidth> times
>>rowloop:             // once per row (duh)
>>    push  cx         // save what row we're on
>>    mov   cx,xwidth  // Set inner loop to run for each pixel on this line
>>subloop:  // There are actually two loop instructions that goto this 
>>label
>>    lodsb            // grab a pixel
>>    cmp   al,0
>>    je short itsblank  // if it's 0, skip it
>>    stosb              // otherwise, write it
>>    loop  subloop
>>    jmp short endsubloop  // Jump outta' here. Don't wanna' fall thru to  
>>                          // the other subloop section!
>>itsblank:
>>    inc   di              // Keep the destination index in sync
>>    loop  subloop         // Ready for the next pixel
>> 
>>endsubloop:             
>>    add   di,nextlineoffset  // Set destination pointer to proper offset 
>>                             // for beginning of next image line
>>    pop   cx              // Where were we?
>>    loop  rowloop         // Ready for next line
>
>
>	mov dx,ywidth
>	mov bx,xwidth
>loop1:
>	mov cx,bx
>loop2:
>	lodsb
>	or al,al
>	je skip
>	mov [es:di],al
>skip:
>	inc di
>	dec cx
>	bne loop2
>	add di,nextlineoffset
>	dec dx
>	bne loop1
>
>It's probably faster on 8086's too if your sprites don't have many
>zero's in them.
>
>							Ross Ridge

This can be faster by using loop enrolling. It saves precious branch penalties,
and reduces the number of instructions executed. With loop enrolling it works
like this:

@@loop2:
	cmp cx,8
	jae @@loopenroll ; handle 8 pixels without checking 
        lodsb	
	or al,al
	je skip
	mov es:[di],al
@@skip: inc di
	dec cx
	bne loop2
        ...

@@loopenroll:
        mov al,[si]	
	or al,al
	je @@skip1 
        mov es:[di],al
@@skip1:
        mov al,[si+1]
	or al,al
	je @@skip2
	mov es:[di+1],al
@@skip2:
	...
	sub cx,8
	add si,8
	add di,8
	jmp @@loop2 
 
Loop enrolling can improve most code that involves small loops.

Harm Hanemaayer
hhanemaa@cs.ruu.nl
Newsgroups: comp.os.msdos.programmer
From: drice@ponder.csci.unt.edu (Keith Rice)
Subject: Re: Sorting/Printing
Organization: University of North Texas
Distribution: usa
Date: Thu, 20 Aug 1992 05:47:54 GMT

In <1992Aug20.022202.2349@menudo.uh.edu> libh@Jane.UH.EDU writes:

>  Also, can someone tell me how to send escape codes to the printer.  I haven't
>had a reason until now but he wants the sorted file printed out in condensed
>print.  How do I send the 'chr(27) + ??' (the basic version) to the printer.  I
>tried sending the character 27 + value but it just gave me the ascii equivalent
>letter rather than changing the printer setup.  Thanks alot in advance for any
>help on either question....

Sounds to me like you are sending the '+' character right after the ESC.
The following line of BASIC code will send a control code to activate
italic mode on an Epson FX-series printer:

	LPRINT CHR$(27) + "4";
	(or)
	LPRINT CHR$(27) + CHR$(52);

Remember to end the string sent to the printer with ';' or you will
get an unwanted line feed.

--
D. Keith Rice -- University of North Texas -- drice@ponder.csci.unt.edu
-----------------------------------------------------------------------
Beta Test: To voluntarily entrust one's data, livelihood and sanity to
           hardware or software intended to destroy all three.  In
           earlier days, virgins were selected to beta test volcanoes.
From: ebolog@elaine.ee.und.ac.za (EDWIN BOLOGNA : THIRD)
Newsgroups: comp.os.msdos.programmer
Subject: Help : Music File Formats.
Date: 20 Aug 92 11:19:20 GMT
Organization: Electronic Eng., Univ. Natal, Durban, South Africa


Does anyone out there happen to have PAS, C, or ASM source code to decode
.MOD, .SAM, .SND, or .ROL music formats.

Any information at all on any of these formats will be greatly appreciated.

        Desperate fellow programmer (And very Greatful for any information)

                E.B. (EBOLOG@ELAINE.EE.UND.AC.ZA)

PS : Please be kind hearted and Assist !
Newsgroups: comp.os.msdos.programmer
From: gillmore@picard.slc.mentorg.com (Mike Gillmore (Consultant))
Subject: Re: Can TSR slow down system too much?
Reply-To: mike_gillmore@mentorg.com
Organization: Mentor Graphics Corp.,  Murray, Utah
Date: Mon, 17 Aug 1992 20:28:50 GMT

In article <15775@star.cs.vu.nl>, estel@cs.vu.nl (Stel E) writes:
> 
> Hai programmers,
> 
> I've made a simple Screen Saver. I'd like the program to work
> with both DOS and Windows programs. So I hooked it to the
> timer interrupt (0x1c). Every time this interrupt is generated
> (18.2 times a sec.) it checks the SHIFT status (scancode).
> If both SHIFT keys are pressed, the screen blanks, if some
> other key (SHIFT/ALT/CTRL) is pressed the screen unblankes.
> 
> The program has to check some things every time it's called.
> Can this slow down my machine too much? Can my clock start
> to run too slow (clock = DOS clock)? It's not so easy to
> test (my machine is quite fast). I couldn't notice any
> difference, not even when blanking/unblanking very fast and
> frequent.
> 
> I don't think it's a problem, but I wanna be sure.
> 
> 
> Thanks in advance,		Erik Stel (estel@cs.vu.nl)

Rather than checking at every clock tick, why not check with
each key press (Int 9).  This is much more efficient (at least
in my experience), and seems to make more sense.


-- 
Mike "Okie" Gillmore
no .sig, no glory
Newsgroups: comp.os.msdos.programmer
From: aki@cruzio.santa-cruz.ca.us
Newsgroups: comp.os.msdos.programmer
Subject: Re: Why can't I hook INT 21h???
Date: 18 Aug 92 17:18:35 GMT
Reply-To: aki@cruzio.santa-cruz.ca.us


struct REGPACK rp;  /* for the intr() call */
void interrupt myinthandler(ax,bx,cx,dx,bp,ds,es,flags)
{
  rp.r_ax=ax;
  rp.r_bx=bx;
  rp.r_cx=cx;
  rp.r_dx=dx;
  rp.r_bp=bp;
  /* plus other pointers and indexes as required */
  rp.r_ds=ds;
  rp.r_es=es;
  intr(old_ints_new_int_num, &rp);
  ax=rp.r_ax;
  bx=rp.r_bx;
  cx=rp.r_cx;
  dx=rp.r_dx;
  bp=rp.r_bp;
  ds=rp.r_ds;
  es=rp.r_es;
  flags=rp.r_flags;
}

The above is for Turbo-C.  Don't ask me how to convert it to other
C implementations.   The idea is simple.  You transfer the original
INT to a different location (just like the HD BIOS transfers the
FD INT 13H).  Then you use the REGPACK structure to move the information
that a particular ISR needs to the function and back.  Turbo-C
handles interrupt-functions very cleanly by pushing all registers
onto the stack;  thus it's easy to adjust the return values.  When
looking for a new place for the old ISR,  I routinely scan for an
empty location (0000:0000) in the area of INT 80H-FDH.  If DOS is
less than 3,  the vectors are not initialized and thus I just pick
F0H.

Some problems of the above code:  HUGE overhead as far as time,
HUGE stack requirement (if you count stack size in bytes).

Aki.
.

-- 
/  Phone: 408-662 9664   Fax: 662 9676  |  "Aki" pronounced: Ah-Key. I know  \ 
\  125 Searidge Ct #D, Aptos, CA 95003  |  what I'm doing most of the time.  /
Xref: sparky comp.os.msdos.programmer:8506 comp.lang.pascal:4832