TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Paul Edwards
from: david nugent
date: 1994-04-27 07:22:26
subject: msdos program

> dn> # include 
 > dn> # include 
 > dn> # include 
 > dn> # include 
 > dn> # include 

 > First of all, you said that you left unportable stuff to
 > assembler.  I can sympathise with that attitude, however your
 > actions seem entirely different. First of all you go and
 > include all these headers, then you use open instead of
 > fopen, and you have a "seg" variable too, and then you use
 > inline assembler which looks like it's using C constructs in
 > it anyway!  So you seem to have tied yourself down to the way
 > a particular C compiler handles inline assembler, rather than
 > having more "generic" assembler code.

It was convenient - normally I would although this case was trivial.  That
inline assembler syntax works with both MSC and Borland. There are subtle
difference in the implementation, but if you're careful you can write for
both just fine.

And "portable" does not at all restrict a programmer to using ISO
functions. I didn't say "portable to any ISO environment", just
'portable', in this case to any environment supporting POSIX1 I/O.


 > In the below segment, you decided to push ds.  Why didn't you
 > also do that with bx, dx, cx and ax?

They don't need to be preserved.


 > What do you use as a reference to all the DOS interrupts?

I can't count the number of references available.  :-)  Ralf Brown's
interrupt list is a as good as any.


 > And why didn't my code using huge pointers work?  BFN.

I have no idea off-hand.  I'd have to dump it to assembler and take a look,
but I don't have the compiler being used handy.


  david

---

* Origin: Unique Computing Pty Ltd (3:632/348)
SEEN-BY: 50/99 54/54 620/243 623/625 630 632/103 301 348 365 386 998 633/371
SEEN-BY: 634/384 635/210 502 503 541 544 636/100 670/206 711/409 430 807 808
SEEN-BY: 711/809 932 934 712/623 713/888 714/906 800/1
@PATH: 632/348 635/503 50/99 54/54 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.