please dont rip this site
Groups
List	

Use
 The DOS services are invoked by placing the number of the desired function in  
register AH, subfunction in AL, setting the other registers to any specific  
requirements of the function, and invoking int 21h.  
 
 On return, the requested service will be performed if possible. Most codes  
will return an error; some return more information. Details are contained in  
the listings for the individual functions. Extended error return may be  
obtained by calling function Int\21f\59. 
 
 Register settings listed are the ones used by DOS. Some functions will return  
with garbage values in unused registers. Do not test for values in unspecified  
registers; your program may exhibit odd behavior. DOSs -GENERAL REGISTERS
 
 DS:DX pointers are the data segment register (DS) indexed to the DH and DL 
registers (DX). DX always contains the offset address, DS contains the segment  
address. 

 The File Control Block services struc -FCB were part of DOS 1.0. Since  
the release of DOS 2.0, Microsoft has recommended that these services not be  
used. A set of considerably more enhanced services (handle services) were  
introduced with DOS 2.0. The handle services provide support for wildcards and  
subdirectories, and enhanced error detection via function Int\21f\59. 
 
 The data for the following calls was compiled from various Intel, Microsoft,  
IBM, and other publications. There are many subtle differences between MSDOS  
and PCDOS and between the individual versions. Differences between the  
versions are noted as they occur. 


 There are various ways of calling the DOS functions. For all methods, the 
function number is loaded into register AH, subfunctions and/or parameters are 
loaded into AL or other registers, and call int 21 by one of the following  
methods: 
 A) call interrupt 21h directly  (the recommended procedure) 
 B) perform a long call to offset 50h in the program's PSP. 
     1) This method will not work under DOS 1.x 
     2) Though recommended by Microsoft for DOS 2.0, this method takes more 
	time and is no longer recommended. 
 C) place the function number in CL and perform an intrasegment call to  
    location 05h in the current code segment. This location contains a long 
    call to the DOS function dispatcher.  
     1) IBM recommends this method be used only when using existing programs  
	written for different calling ng conventions. (such as converting CP/M 
	programs). This method should be avoided unless you have some specific 
	use for it. 
     2) AX is always destroyed by this method. 
     3) This method is valid only for functions 00h-24h. 
 
 There are also various ways of exiting from a program. (assuming it is not 
intended to be a TSR). All methods except call Int\21f\4C must ensure that the
segment register contains the segment address of the PSP. 
 A) Int\21f\4C (Terminate with Result Code). This is the "official"
    recommended method of returning to DOS.
 B) Int\21f\00 (Exit Program). This is the early style int 21 function call.
    It simply calls Int\20.
 C) Int\20 (Exit).
 D) A INTEL\80x86op -JMP to offset 00h (Int\20 vector) in the Program
    Segment Prefix. This is just a roundabout method to call int 20h. This
    method was set up in DOS 1.0 for ease of conversion for CP/M programs. It
    is no longer recommended for use.
 E) A INTEL\80x86op -JMP to offset 05h (Int\21 vector) in the Program
    Segment Prefix, with AH set to 00h or 4Ch. This is a CP/M type function.


file: /Techref/INT/21.htm, 3KB, , updated: 1999/4/21 07:54, local time: 2024/11/25 06:30,
TOP NEW HELP FIND: 
3.15.228.171:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://sxlist.com/techref/INT/21.htm"> IBM Personal Computers - DOS Function Calls</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to sxlist.com!


Site supported by
sales, advertizing,
& kind contributors
just like you!

Please don't rip/copy
(here's why

Copies of the site on CD
are available at minimal cost.
 

Welcome to sxlist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .