System32 Services Overview

System32 provides several services that can be used by application programmers. These services are the standard System32 services, but every function can be replaced by modules or drivers etc. This way V2_OS is very expandable for hardware support, because when one module installs a 'service-upgrade' for for example a currently unsupported media, all applications can transparently access these media without the need to recompile or reprogram the code.

The System32 Services are accessed through an Interrupt handler. System32 Installs at bootup a handler on interrupt 20h (32d). By passing the service number in the 'AL' register and executing an int 20h instruction, all applications, regardless of the language they are written in, can use these services.

Some things to keep in mind while using System32 Services:

*All System32 Services are by default are executed in 32Bit Protected mode. It is possible for these services to jump to 16Bit code or even Realmode. This can be useful for accessing for example the Bios, or executing PCI or EISA ROM code.

*The application is responsible for providing a valid, reasonable stack. Reasonable means 'about' 40h bytes, but keep in mind that 'upgraded services' could require more stack space. Since the V2_OS encourages the use of the 'Shared Stack space', there should in most cases not be any problems with the stack.

*System32 Services expect, like the entire V2_OS that GS = the 4Gig selector.

*System32 Services can be called from 32Bit and 16Bit code.

*System32 Services can ony be called from protected mode, not from realmode.

*System32 Services can use other System32 Services.

*System32 Services should only destroy/use the register contents of the specified 'Output' registers, but in development stages, don't be surprised to see other registers be destroyed to.