Chapter 7
The GO32 unit

This chapter of the documentation describe the GO32 unit for the Free Pascal compiler under DOS. It was donated by Thomas Schatzl (tom__at__work@geocities.com), for which my thanks. This unit was first written for DOS by Florian Kl”ampfl. This chapter is divided in four sections. The first two sections are an introduction to the GO32 unit. The third section lists the pre-defined constants, types and variables. The last section describes the functions which appear in the interface part of the GO32 unit.


 7.1 Introduction
 7.2 Protected mode memory organization
   What is DPMI
   Selectors and descriptors
   FPC specialities
   dos memory access
   I/O port access
   Processor access
   Interrupt redirection
   Handling interrupts with DPMI
   Protected mode interrupts vs. Real mode interrupts
   Creating own interrupt handlers
   Disabling interrupts
   Hardware interrupts
   Software interrupts
   Real mode callbacks
 7.3 Types, Variables and Constants
   Constants
   Predefined types
   Variables.
 7.4 Functions and Procedures
   allocate____ldt____descriptors
   allocate____memory____block
   copyfromdos
   copytodos
   create____code____segment____alias____descriptor
   disable
   dosmemfillchar
   dosmemfillword
   dosmemget
   dosmemmove
   dosmemput
   enable
   free____ldt____descriptor
   free____memory____block
   free____rm____callback
   get____cs
   get____descriptor____access____rights
   get____ds
   get____linear____addr
   get____meminfo
   get____next____selector____increment____value
   get____page____size
   get____pm____interrupt
   get____rm____callback
   get____rm____interrupt
   get____run____mode
   get____segment____base____address
   get____segment____limit
   get____ss
   global____dos____alloc
   global____dos____free
   inportb
   inportl
   inportw
   lock____code
   lock____data
   lock____linear____region
   outportb
   outportl
   outportw
   realintr
   seg____fillchar
   seg____fillword
   segment____to____descriptor
   seg____move
   set____descriptor____access____rights
   set____pm____interrupt
   set____rm____interrupt
   set____segment____base____address
   set____segment____limit
   tb____size
   transfer____buffer
   unlock____code
   unlock____data
   unlock____linear____region