Teen Programmers Unite  
 

 

Return to forum top

ANSI C++

Posted by shroomrefic29 [send private reply] at August 23, 2001, 09:47:17 AM


I know ANSI C++ implements a standard library such as I/O, but I havet this one question, how do they implement this on various OS'es? Do they use the native API available? or is there another way to do this?
I know it seems weird to ask this, but it would answer alot of my questions...

Posted by RedX [send private reply] at August 23, 2001, 01:22:12 PM

The ANSI standard only covers the names ot the libraries and the prototypes of the functions and what those should do. The implementation is left for the programmers.
The MS-Dos hardware specific functions make use of memory adresses and interrupts from the processor. (Mostly it's writting a few values to processor registers and invoke an hardware interrupt). What interrupt does what depends on what processor is used. For example: on a IBM compatible processor under MS-Dos setting the famous mode 13h: put 00h in register AH, 13h in AL and invoke interrupt 10. Other harware functions are handled in a simular manner.

Windows has it API's to handle these low level functions.

Other non-hardware depending functions are written like any other function and can be exactly the same on differend OSes.

RedX

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.