home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / progtool / modula2 / lpr / mogli / os.def < prev    next >
Encoding:
Modula Definition  |  1994-09-22  |  35.4 KB  |  1,002 lines

  1.  
  2.   (* --------------------------------------------------------------------- *)
  3.   (*              OS (Operating System) DEFINITION MODULE                  *)
  4.   (* --------------------------------------------------------------------- *)
  5.   (*  Einheitliche Modula-2 Schnittstelle zu (X)BIOS, GEMDOS des ATARI ST  *)
  6.   (* --------------------------------------------------------------------- *)
  7.   (*                           Uwe Brahm                                   *)
  8.   (*                      Johannes Schneiders                              *)
  9.   (* --------------------------------------------------------------------- *)
  10.   (*            Version 1.0 von Mittwoch dem 1. November 1989              *)
  11.   (* --------------------------------------------------------------------- *)
  12.   (* Alle Rechte vorbehalten. Insbesondere bleiben Änderungen jeglicher    *)
  13.   (* Art, sowie Anpassungen an andere Compiler bzw. Computersysteme        *)
  14.   (* ausschließlich uns vorbehalten.                                       *)
  15.   (*          Copyright © 1989 by Uwe Brahm, Johannes Schneiders.          *)
  16.   (* --------------------------------------------------------------------- *)
  17.   (* Es wurden alle erdenklichen Maßnahmen getroffen, um die Korrektheit   *)
  18.   (* dieser Bibliothek zu gewährleisten. Wir können dennoch keine Gewähr   *)
  19.   (* für die Vollständigkeit und Korrektheit übernehmen und schließen      *)
  20.   (* deshalb alle Gewährleistungsansprüche, die durch Fehler in der        *)
  21.   (* Software entstehen, ausdrücklich aus.                                 *)
  22.   (* --------------------------------------------------------------------- *)
  23.   (* Um einen einheitlichen Standard auch in Zukunft gewährleisten zu      *)
  24.   (* können, existiert eine zentrale Softwarewartung der Bibliotheken.     *)
  25.   (* Sollten Sie Fehler entdecken oder Verbesserungsvorschläge haben,      *)
  26.   (* wenden Sie sich schriftlich an:                                       *)
  27.   (*  U.Brahm, J.Schneiders,  Carlo-Schmid-Straße 15, 6750 Kaiserslautern  *)
  28.   (* --------------------------------------------------------------------- *)
  29.   (* Unterstützte Compiler:                                                *)
  30.   (*                    TDI Modula-2  (Version 3.00)                       *)
  31.   (*                    SPC Modula-2  (Version 1.42)                       *)
  32.   (* --------------------------------------------------------------------- *)
  33.   (* ATARI ST ist ein Warenzeichen der Firma Atari                         *)
  34.   (* GEM ist ein Warenzeichen der Firma Digital Research                   *)
  35.   (* --------------------------------------------------------------------- *)
  36.  
  37.  
  38.  
  39. DEFINITION MODULE OS;
  40.  
  41.  
  42.   FROM SYSTEM IMPORT ADDRESS, BYTE;
  43.  
  44.  
  45.   VAR
  46.     BiosResult   : LONGINT;
  47.     XBiosResult  : LONGINT;
  48.     GEMDOSResult : LONGINT;
  49.  
  50.  
  51.   CONST
  52.     (* TOS-Fehlermeldungen *)
  53.     (* BIOS-Fehlermeldungen *)
  54.     Okay                  =   0 ; (* Funktion erfolgreich ausgefuehrt               *)
  55.     Error                 =  -1 ; (* Es ist ein Fehler aufgetreten, der nicht       *)
  56.                                   (* genauer spezifiziert werden kann               *)
  57.     DriveNotReady         =  -2 ; (* Angesprochenes Geraett nicht angeschlossen,    *)
  58.                                   (* nicht funktionsbereit oder reagiert nicht      *)
  59.     UnknownCommand        =  -3 ; (* Peripheriegeraet kennt Kommando nicht          *)
  60.     CRCError              =  -4 ; (* Beim Lesen ist ein Fehler aufgetreten          *)
  61.     BadRequest            =  -5 ; (* Peripheriegeraet kann Kommando nicht           *)
  62.                                   (* ausfuehren. Befehlsparameter und Kontext ?     *)
  63.     SeekError             =  -6 ; (* angesprochener Track nicht erreichbar          *)
  64.     UnknownMedia          =  -7 ; (* Leseversuch gescheitert, Disk ohne Bootsektor. *)
  65.     SectorNotFound        =  -8 ; (* Sektor wurde nicht gefunden                    *)
  66.     NoPaper               =  -9 ; (* Drucker nicht betriebsbereit                   *)
  67.     WriteFault            = -10 ; (* Fehler bei Schreiboperation aufgetreten        *)
  68.     ReadFault             = -11 ; (* Fehler bei Leseoperation aufgetreten           *)
  69.     GeneralError          = -12 ; (* Allgemeiner Fehler                             *)
  70.     WriteProtectedDisk    = -13 ; (* Diskette ist schreibgeschuetzt                 *)
  71.     MediaChange           = -14 ; (* Diskette wurde seit gewechselt                 *)
  72.     UnknownDevice         = -15 ; (* Unbekanntes Geraet                             *)
  73.     BadSectorFormat       = -16 ; (* defekte Sektoren beim Formatieren entdeckt     *)
  74.     InsertOtherDisk       = -17 ; (* Eine andere Diskette muß eingelegt werden      *)
  75.  
  76.     (* BDOS-Fehlermeldungen *)
  77.     InvalidFunctionNumber = -32 ; (* Unbekannte Funktionsnummer               *)
  78.     FileNotFound          = -33 ; (* Datei nicht gefunden                     *)
  79.     PathNotFound          = -34 ; (* Ordner nicht gefunden                    *)
  80.     NoFileHandlesLeft     = -35 ; (* Keine File-Handles mehr uebrig           *)
  81.     AccessDenied          = -36 ; (* Zugriff nicht erlaubt                    *)
  82.     InvalidHandle         = -37 ; (* Falsche Handle-Nummer der Datei          *)
  83.     NotEnoughMemory       = -39 ; (* Nicht genuegend Speicher                 *)
  84.     InvalidBlockAddress   = -40 ; (* Adresse des Speicherblocks falsch        *)
  85.     InvalidDrive          = -46 ; (* Laufwerksbezeichnung ungueltig           *)
  86.     NotSameDrive          = -48 ; (* Dateien auf verschiedenen Laufwerken     *)
  87.     NoMoreFiles           = -49 ; (* Keine weiteren Dateien zu oeffnen uebrig *)
  88.  
  89.     (* Andere Fehler *)
  90.     RangeError            = -64 ; (* Bereichsfehler                           *)
  91.     InternalGEMDOSError   = -65 ; (* Interner GEMDOS-Fehler, Hiiiilllfffee !! *)
  92.     WrongLoadFormat       = -66 ; (* Format des Programms nicht korrekt       *)
  93.     MShrinkMfreeError     = -67 ; (* Fehler bei ShrinkMemory(), FreeMemory()  *)
  94.  
  95.  
  96.   (* ------------------------- BIOS Definitionen  ------------------------ *)
  97.  
  98.  
  99.   CONST
  100.     (* Device : INTEGER *)
  101.     PRT              = 0;  (* Drucker,         Parallele Schnittstelle *)
  102.     AUX              = 1;  (* Serielles Gerät, Serielle Schnittstelle  *)
  103.     CON              = 2;  (* Console,         Bildschirm              *)
  104.     MIDI             = 3;  (* Midi,            MIDI Schnittstelle      *)
  105.     IKBD             = 4;  (* Keyboard,        Tastatur                *)
  106.     RAWCON           = 5;  (* Konsole,         ohne Terminalemulation  *)
  107.  
  108.     (* Keyboard State : BITSET *)
  109.     RightShift       = 0;
  110.     LeftShift        = 1;
  111.     ControlKey       = 2;
  112.     AlternateKey     = 3;
  113.     CapsLock         = 4;
  114.     RightMouseButton = 5;
  115.     LeftMMouseButton = 6;
  116.     ReservedKey      = 7;
  117.  
  118.     (* MediaChangeState : INTEGER *)
  119.     NoChange         = 0;  (* Diskette wurde mit Sicherheit nicht gewechselt *)
  120.     MayHaveChanged   = 1;  (* Diskette wurde moeglicherweise gewechselt      *)
  121.     Changed          = 2;  (* Diskette wurde mit Sicherheit gewechselt       *)
  122.  
  123.     (* RWType : INTEGER *)
  124.     Read               = 0;  (* Normales Lesen                             *)
  125.     Write              = 1;  (* Normales Schreiben                         *)
  126.     ReadNoMediaChange  = 2;  (* Lesen, ohne Aenderung des media-change     *)
  127.     WriteNoMediaChange = 3;  (* Schreiben, ohne Aenderung des media-change *)
  128.  
  129.  
  130.   TYPE
  131.     MDPointerType    = POINTER TO MDType;
  132.  
  133.     MPBType          = RECORD  (* Memory Parameter Block *)
  134.                          FreeListPtr      : MDPointerType;  (* Zeiger auf 'Memory Free List'            *)
  135.                          AllocatedListPtr : MDPointerType;  (* Zeiger auf 'Memory Allocated List'       *)
  136.                          RovingPtr        : MDPointerType;  (* roving pointer; wird nur intern benötigt *)
  137.                        END;
  138.  
  139.     MDType           = RECORD  (* Memory Deskriptor Type *)
  140.                          NextPtr      : MDPointerType; (* Zeiger auf naechsten MD   *)
  141.                          StartAddress : ADDRESS;       (* Anfangsadresse des Blocks *)
  142.                          BlockLength  : LONGINT;      (* Laenge des Blocks         *)
  143.                          OwnerPtr     : ADDRESS;       (* Zeiger auf Prozess-Beschreibungs-Struktur *)
  144.                        END;
  145.  
  146.     BPBType          = RECORD (* BIOS Parameter Block *)
  147.                          BytesPerSector  : CARDINAL; (* Bytes pro Sektor                       *)
  148.                          ClusterSize     : CARDINAL; (* Sektoren pro Cluster (Einheit)         *)
  149.                          BytesPerCluster : CARDINAL; (* Bytes pro Cluster                      *)
  150.                          LengthOfDir     : CARDINAL; (* Laenge des Directories in Sektoren     *)
  151.                          FATSize         : CARDINAL; (* Laenge des File Allocation Table (FAT) *)
  152.                          FATStartRecord  : CARDINAL; (* Startsektor der zweiten FAT            *)
  153.                          FirstFreeSector : CARDINAL; (* Sektornummer des ersten freien Sektors *)
  154.                          NumberOfCluster : CARDINAL; (* Gesamtzahl der Cluster auf dem Medium  *)
  155.                          Flags           : CARDINAL; (* diverse Flags                          *)
  156.                        END;
  157.  
  158.     BPBPointerType   = POINTER TO BPBType;
  159.  
  160.  
  161.   (* ------------------------- BIOS Prozeduren --------------------------- *)
  162.  
  163.  
  164.   PROCEDURE GetMPB              (VAR MemoryParameterBlock : MPBType);
  165.  
  166.    (* BIOS-Funktionsnummer:  0 *)
  167.  
  168.  
  169.   PROCEDURE DeviceInState       (Device     : INTEGER;
  170.                                  VAR Status : BOOLEAN);
  171.  
  172.    (* BIOS-Funktionsnummer:  1 *)
  173.  
  174.  
  175.   PROCEDURE DeviceIn            (Device     : INTEGER;
  176.                                  VAR Return : LONGCARD);
  177.  
  178.    (* BIOS-Funktionsnummer:  2 *)
  179.  
  180.  
  181.   PROCEDURE DeviceOut           (Device : INTEGER;
  182.                                  Char   : CHAR);
  183.  
  184.    (* BIOS-Funktionsnummer:  3 *)
  185.  
  186.  
  187.   PROCEDURE ReadWriteAbsolute   (ReadWriteFlag     : INTEGER;
  188.                                  Buffer            : ADDRESS;
  189.                                  Count             : INTEGER;
  190.                                  StartSectorNumber : INTEGER;
  191.                                  Device            : INTEGER;
  192.                                  VAR Return        : LONGINT);
  193.    (* BIOS-Funktionsnummer:  4 *)
  194.  
  195.  
  196.  
  197.   PROCEDURE GetSetException     (VectorNumber : INTEGER;
  198.                                  NewVector    : ADDRESS);
  199.  
  200.    (* BIOS-Funktionsnummer:  5 *)
  201.  
  202.  
  203.   PROCEDURE TickCalibration     (VAR MilliSeconds : LONGCARD);
  204.  
  205.    (* BIOS-Funktionsnummer:  6 *)
  206.  
  207.  
  208.   PROCEDURE GetBPB              (Drive      : CARDINAL;
  209.                                  VAR Return : BPBPointerType);
  210.  
  211.    (* BIOS-Funktionsnummer:  7 *)
  212.  
  213.  
  214.   PROCEDURE DeviceOutState      (Device     : INTEGER;
  215.                                  VAR Status : BOOLEAN);
  216.  
  217.    (* BIOS-Funktionsnummer:  8 *)
  218.  
  219.  
  220.   PROCEDURE MediaChanged        (Drive      : CARDINAL;
  221.                                  VAR Status : LONGINT);
  222.  
  223.    (* BIOS-Funktionsnummer:  9 *)
  224.  
  225.  
  226.   PROCEDURE DriveMap            (VAR DriveSet : LONGBITSET);
  227.  
  228.    (* BIOS-Funktionsnummer: 10 *)
  229.  
  230.  
  231.   PROCEDURE GetSetKeyboardState (Mode       : BITSET;
  232.                                  VAR Return : LONGINT);
  233.  
  234.    (* BIOS-Funktionsnummer: 11 *)
  235.  
  236.  
  237.  
  238.   (* ------------------------- XBIOS Definitionen  ----------------------- *)
  239.  
  240.  
  241.   CONST
  242.     (* MouseType : INTEGER *)
  243.     DisableMouse     =  0;
  244.     RelativeMouse    =  1;
  245.     AbsoluteMouse    =  2;
  246.     UnusedMouse      =  3;
  247.     KeycodeMouse     =  4;
  248.     (* Resolution : INTEGER fuer GetResolution, SetScreen *)
  249.     Low              =  0;
  250.     Medium           =  1;
  251.     High             =  2;
  252.     (* Wertvorgabe fuer Sector auf neuen Floppies, 010101010... *)
  253.     VirginMedia      =  0E5E5H;
  254.     (* SerialDevice : INTEGER *)
  255.     RS232Device      =  0;
  256.     KeyboardDevice   =  1;
  257.     MIDIDevice       =  2;
  258.     (* SerialSpeed : INTEGER *)
  259.     Baud19200        =  0;
  260.     Baud9600         =  1;
  261.     Baud4800         =  2;
  262.     Baud3600         =  3;
  263.     Baud2400         =  4;
  264.     Baud2000         =  5;
  265.     Baud1800         =  6;
  266.     Baud1200         =  7;
  267.     Baud600          =  8;
  268.     Baud300          =  9;
  269.     Baud200          = 10;
  270.     Baud150          = 11;
  271.     Baud134          = 12;
  272.     Baud110          = 13;
  273.     Baud75           = 14;
  274.     Baud50           = 15;
  275.     (* FlowControl : BITSET *)
  276.     XONXOFF          =  0;
  277.     RTSCTS           =  1;
  278.     (* Timer : INTEGER *)
  279.     TimerA           =  0;
  280.     TimerB           =  1;
  281.     TimerC           =  2;
  282.     TimerD           =  3;
  283.     (* PrinterConfiguration : BITSET *)
  284.     MatrixDaisyWheel =  0;    (* Matrixdrucker oder Typenraddrucker  *)
  285.     Monochrome       =  1;    (* farbig oder monochrom               *)
  286.     AtariEpson       =  2;    (* Atari/Epson Drucker                 *)
  287.     DarftFinal       =  3;    (* normale oder hohe Quality           *)
  288.     CentronicsRS232  =  4;    (* Parallele oder RS232                *)
  289.     FormSingleSheet  =  5;    (* Endlospapier oder Einzelblatteinzug *)
  290.     (* Blitmodeflags : BITSET *)
  291.     BlitterOn        =  0;
  292.     BlitterUsed      =  1;
  293.  
  294.  
  295.   TYPE
  296.     ParameterBlock     = RECORD
  297.                            TopMode    : (OriginBottom, OriginTop);
  298.                            Buttons    : CHAR;
  299.                            XParameter : CHAR;
  300.                            YParameter : CHAR;
  301.                            (* Fuer den 'AbsoluteMouse mode' das folgende: *)
  302.                            XMax       : INTEGER;
  303.                            YMax       : INTEGER;
  304.                            XInitial   : INTEGER;
  305.                            YInitial   : INTEGER;
  306.                          END;
  307.  
  308.     PaletteType        = ARRAY [0..15] OF CARDINAL;
  309.  
  310.     IOBPointerType     = POINTER TO IOBType;
  311.  
  312.     IOBType            = RECORD
  313.                            IOBufferPointer : ADDRESS;  (* Zeiger auf den Buffer    *)
  314.                            IOBufferSize    : INTEGER;  (* Laenge des Buffers       *)
  315.                            IOBufferHead    : INTEGER;  (* naechste Schreibposition *)
  316.                            IOBufferTail    : INTEGER;  (* naechste Leseposition    *)
  317.                            IOBufferLow     : INTEGER;  (* 'untere Wassermarke'     *)
  318.                            IOBufferHigh    : INTEGER;  (* 'obere Wassermarke       *)
  319.                          END;
  320.  
  321.     KeyTransferPointer = POINTER TO KeyTransferType;
  322.  
  323.     KeyTransferType    = ARRAY [0..127] OF BYTE;
  324.  
  325.     KeyTablePointer    = POINTER TO KeyTableType;
  326.  
  327.     KeyTableType       = RECORD
  328.                            unshift  : KeyTransferPointer; (* Tabelle fuer 'normale' Tastendruecke      *)
  329.                            shift    : KeyTransferPointer; (* Tabelle fuer Tastendruecke mit 'Shift'    *)
  330.                            capslock : KeyTransferPointer; (* Tabelle fuer Tastendruecke bei 'Capslock' *)
  331.                          END;
  332.  
  333.    KBDVectorPointer    = POINTER TO KBDVectorType;
  334.  
  335.    KBDVectorType       = RECORD
  336.                            MidiVector       : ADDRESS; (* MIDI-Eingabe          *)
  337.                            KeyboardError    : ADDRESS; (* Tatstatur-Fehler      *)
  338.                            MidiError        : ADDRESS; (* MIDI-Fehler           *)
  339.                            StateVector      : ADDRESS; (* Status von IKDB lesen *)
  340.                            MouseVector      : ADDRESS; (* Mausabfrage           *)
  341.                            ClockVector      : ADDRESS; (* Uhrzeitabfrage        *)
  342.                            JoyVector        : ADDRESS; (* Joystickabfrage       *)
  343.                            MidiSystemVector : ADDRESS; (* MIDI-Systemvektor     *)
  344.                            IKBDSystemVektor : ADDRESS; (* IKBD-Systemvektor     *)
  345.                          END;
  346.  
  347.    PBType              = RECORD
  348.                            PBHeight           : INTEGER; (* Bildschirmhoehe in Punkten     *)
  349.                            PBLeft             : INTEGER; (* Linker Rand in Punkten         *)
  350.                            PBRight            : INTEGER; (* Rechter Rand in Punkten        *)
  351.                            PBScreenResolution : INTEGER; (* Aufloesung (0..2)              *)
  352.                            PBColorPointer     : ADDRESS; (* Druckertyp Atari/Epson         *)
  353.                            PBPrinterType      : LONGINT; (* 0 : Atari Matrix Monochrom     *)
  354.                                                          (* 1 : Atari Matrix Farbig        *)
  355.                                                          (* 2 : Atari Typenrad Monochrom   *)
  356.                                                          (* 3 : Epson Matrix Monochrom     *)
  357.                            PBPrinterPort      : INTEGER; (* Schnittstelle Centronics/RS232 *)
  358.                            PBMask             : INTEGER; (* Zeiger auf Halbtonmaske        *)
  359.                          END;
  360.  
  361.    PBPointerType       = POINTER TO PBType;
  362.  
  363.  
  364.   (* ------------------------ XBIOS Prozeduren --------------------------- *)
  365.  
  366.  
  367.   PROCEDURE InitMouse             (MouseType       : INTEGER;
  368.                                    VAR Parameter   : ParameterBlock;
  369.                                    ProcedureVector : ADDRESS);
  370.  
  371.     (* XBIOS-Funktionsnummer:  0 *)
  372.  
  373.  
  374.   PROCEDURE Ssbrk                 (Amount            : INTEGER;
  375.                                    VAR ReturnAddress : ADDRESS);
  376.  
  377.     (* XBIOS-Funktionsnummer:  1 *)
  378.  
  379.  
  380.   PROCEDURE PhysicalBase          (VAR StartAddress: ADDRESS);
  381.  
  382.     (* XBIOS-Funktionsnummer:  2 *)
  383.  
  384.  
  385.   PROCEDURE LogicalBase           (VAR StartAddress : ADDRESS);
  386.  
  387.     (* XBIOS-Funktionsnummer:  3 *)
  388.  
  389.  
  390.   PROCEDURE GetResolution         (VAR Value : INTEGER);
  391.  
  392.     (* XBIOS-Funktionsnummer:  4 *)
  393.  
  394.  
  395.   PROCEDURE SetScreen             (LogicalStartAddress  : ADDRESS;
  396.                                    PhysicalStartAddress : ADDRESS;
  397.                                    Resolution           : INTEGER);
  398.  
  399.     (* XBIOS-Funktionsnummer:  5 *)
  400.  
  401.  
  402.   PROCEDURE SetPalette            (VAR Palette : PaletteType);
  403.  
  404.     (* XBIOS-Funktionsnummer:  6 *)
  405.  
  406.  
  407.   PROCEDURE GetSetColor           (ColorNumber     : INTEGER;
  408.                                    ColorRegister   : INTEGER;
  409.                                    VAR ReturnColor : INTEGER);
  410.  
  411.     (* XBIOS-Funktionsnummer:  7 *)
  412.  
  413.  
  414.   PROCEDURE FloppyRead            (Buffer        : ADDRESS;
  415.                                    DriveNumber   : INTEGER;
  416.                                    StartSector   : INTEGER;
  417.                                    TrackNumber   : INTEGER;
  418.                                    Side          : INTEGER;
  419.                                    SectorNumbers : INTEGER;
  420.                                    VAR Return    : INTEGER);
  421.  
  422.     (* XBIOS-Funktionsnummer:  8 *)
  423.  
  424.  
  425.   PROCEDURE FloppyWrite           (Buffer        : ADDRESS;
  426.                                    DriveNumber   : INTEGER;
  427.                                    StartSector   : INTEGER;
  428.                                    TrackNumber   : INTEGER;
  429.                                    Side          : INTEGER;
  430.                                    SectorNumbers : INTEGER;
  431.                                    VAR Return    : INTEGER);
  432.  
  433.     (* XBIOS-Funktionsnummer:  9 *)
  434.  
  435.  
  436.   PROCEDURE FloppyFormat          (Buffer           : ADDRESS;
  437.                                    DriveNumber      : INTEGER;
  438.                                    SectorsPerTrack  : INTEGER;
  439.                                    TrackNumber      : INTEGER;
  440.                                    Side             : INTEGER;
  441.                                    Interleave       : INTEGER;
  442.                                    VirginBitPattern : INTEGER;
  443.                                    VAR Return       : INTEGER);
  444.  
  445.     (* XBIOS-Funktionsnummer: 10 *)
  446.  
  447.  
  448.   PROCEDURE GetDSB                ();
  449.  
  450.     (* XBIOS-Funktionsnummer: 11 *)
  451.  
  452.  
  453.   PROCEDURE MidiWriteString       (VAR ByteStream : ARRAY OF BYTE;
  454.                                    StreamLength   : INTEGER);
  455.  
  456.     (* XBIOS-Funktionsnummer: 12 *)
  457.  
  458.  
  459.   PROCEDURE SetMFPInterrupt       (InterruptNumber : INTEGER;
  460.                                    VectorPointer   : ADDRESS);
  461.  
  462.     (* XBIOS-Funktionsnummer: 13 *)
  463.  
  464.  
  465.   PROCEDURE GetIORecord           (SerialDevice      : INTEGER;
  466.                                    VAR ReturnPointer : IOBPointerType);
  467.  
  468.     (* XBIOS-Funktionsnummer: 14 *)
  469.  
  470.  
  471.   PROCEDURE RS232Configure        (SerialSpeed     : INTEGER;
  472.                                    FlowControl     : BITSET;
  473.                                    UCR             : INTEGER;
  474.                                    RSR             : INTEGER;
  475.                                    TSR             : INTEGER;
  476.                                    SCR             : INTEGER;
  477.                                    VAR RS232Return : LONGINT);
  478.  
  479.     (* XBIOS-Funktionsnummer: 15 *)
  480.  
  481.  
  482.   PROCEDURE SetKeyTable           (VAR Unshift          : KeyTransferPointer;
  483.                                    Shift                : KeyTransferPointer;
  484.                                    Capslock             : KeyTransferPointer;
  485.                                    VAR ReturnKeyPointer : KeyTablePointer);
  486.  
  487.     (* XBIOS-Funktionsnummer: 16 *)
  488.  
  489.  
  490.   PROCEDURE Random                (VAR ReturnValue : LONGCARD);
  491.  
  492.     (* XBIOS-Funktionsnummer: 17 *)
  493.  
  494.  
  495.   PROCEDURE PrototypeBootSector   (Buffer        : ADDRESS;
  496.                                    SerialNumber  : LONGINT;
  497.                                    DiskType      : INTEGER;
  498.                                    ExecutionFlag : INTEGER);
  499.  
  500.     (* XBIOS-Funktionsnummer: 18 *)
  501.  
  502.  
  503.   PROCEDURE FloppyVerify          (Buffer          : ADDRESS;
  504.                                    DriveNumber     : INTEGER;
  505.                                    StartSector     : INTEGER;
  506.                                    TrackNumber     : INTEGER;
  507.                                    Side            : INTEGER;
  508.                                    SectorNumbers   : INTEGER;
  509.                                    VAR ReturnValue : INTEGER);
  510.  
  511.     (* XBIOS-Funktionsnummer: 19 *)
  512.  
  513.  
  514.   PROCEDURE ScreenDump;
  515.  
  516.     (* XBIOS-Funktionsnummer: 20 *)
  517.  
  518.  
  519.   PROCEDURE CursorConfigure       (Rate            : INTEGER;
  520.                                    Function        : INTEGER;
  521.                                    VAR ReturnValue : INTEGER);
  522.  
  523.     (* XBIOS-Funktionsnummer: 21 *)
  524.  
  525.  
  526.   PROCEDURE XSetTime              (DateTime : LONGCARD);
  527.  
  528.     (* XBIOS-Funktionsnummer: 22 *)
  529.  
  530.  
  531.   PROCEDURE XGetTime              (VAR ReturnValue : LONGCARD);
  532.  
  533.     (* XBIOS-Funktionsnummer: 23 *)
  534.  
  535.  
  536.   PROCEDURE RestoreKeyTable;
  537.  
  538.     (* XBIOS-Funktionsnummer: 24 *)
  539.  
  540.  
  541.   PROCEDURE IKBDWriteString       (VAR ByteStream : ARRAY OF BYTE;
  542.                                    StreamLength   : INTEGER);
  543.  
  544.     (* XBIOS-Funktionsnummer: 25 *)
  545.  
  546.  
  547.   PROCEDURE DisableMFPInterupt    (InterruptNumber : INTEGER);
  548.  
  549.     (* XBIOS-Funktionsnummer: 26 *)
  550.  
  551.  
  552.   PROCEDURE EnableMFPInterupt     (InterruptNumber : INTEGER);
  553.  
  554.     (* XBIOS-Funktionsnummer: 27 *)
  555.  
  556.  
  557.   PROCEDURE GISRegisterAccess     (Data            : INTEGER;
  558.                                    RegisterNumber  : INTEGER;
  559.                                    VAR ReturnValue : INTEGER);
  560.  
  561.     (* XBIOS-Funktionsnummer: 28 *)
  562.  
  563.  
  564.   PROCEDURE OffGISBit             (BitNumber : INTEGER);
  565.  
  566.     (* XBIOS-Funktionsnummer: 29 *)
  567.  
  568.  
  569.   PROCEDURE OnGISBit              (BitNumber : INTEGER);
  570.  
  571.     (* XBIOS-Funktionsnummer: 30 *)
  572.  
  573.  
  574.   PROCEDURE SetMFPTimer           (Timer           : INTEGER;
  575.                                    ControlRegister : INTEGER;
  576.                                    DataRegister    : INTEGER;
  577.                                    VectorPointer   : ADDRESS);
  578.  
  579.     (* XBIOS-Funktionsnummer: 31 *)
  580.  
  581.  
  582.   PROCEDURE DoSound               (SoundPointer : ADDRESS);
  583.  
  584.     (* XBIOS-Funktionsnummer: 32 *)
  585.  
  586.  
  587.   PROCEDURE GetSetPrinter         (PrinterConfiguration    : BITSET;
  588.                                    VAR ReturnConfiguration : BITSET);
  589.  
  590.     (* XBIOS-Funktionsnummer: 33 *)
  591.  
  592.  
  593.   PROCEDURE GetKBDV               (VAR ReturnPointer : KBDVectorPointer);
  594.  
  595.     (* XBIOS-Funktionsnummer: 34 *)
  596.  
  597.  
  598.   PROCEDURE GetSetAutoRepeat      (Initial         : INTEGER;
  599.                                    Repeat          : INTEGER;
  600.                                    VAR ReturnValue : INTEGER);
  601.  
  602.     (* XBIOS-Funktionsnummer: 35 *)
  603.  
  604.  
  605.   PROCEDURE PrintBlock            (Pointer : PBPointerType);
  606.  
  607.     (* XBIOS-Funktionsnummer: 36 *)
  608.  
  609.  
  610.   PROCEDURE VerticalSynchronisation;
  611.  
  612.     (* XBIOS-Funktionsnummer: 37 *)
  613.  
  614.  
  615.   PROCEDURE SuperExecute          (CodePointer : ADDRESS);
  616.  
  617.     (* XBIOS-Funktionsnummer: 38 *)
  618.  
  619.  
  620.   PROCEDURE PuntAES;
  621.  
  622.     (* XBIOS-Funktionsnummer: 39 *)
  623.  
  624.  
  625.   PROCEDURE GetSetBlitterMode     (Flag            : INTEGER;
  626.                                    VAR ReturnState : BITSET);
  627.  
  628.     (* XBIOS-Funktionsnummer: 64 *)
  629.  
  630.  
  631.   (* ---------------------- GEMDOS Definitionen ---------------------------*)
  632.  
  633.  
  634.   CONST
  635.     (* FileAttributes : BITSET *)
  636.     WriteProtected = 0;
  637.     HiddenFile     = 1;
  638.     SystemFile     = 2;
  639.     DiskName       = 3;
  640.     Folder         = 4;
  641.     Archiv         = 5;
  642.     (* FileOpen-Mode : INTEGER *)
  643.     ReadMode       = 0;
  644.     WriteMode      = 1;
  645.     ReadWriteMode  = 2;
  646.     (* SeekMode : INTEGER *)
  647.     FileStart      = 0;
  648.     ActualPosition = 1;
  649.     FileEnd        = 2;
  650.     (* Mode : INTEGER *)
  651.     ReadAttribute  = 0;
  652.     WriteAttribute = 1;
  653.     (* StandardFileHandle : INTEGER *)
  654.     StandardIn     = 0;  (* Tastatur                *)
  655.     Standardout    = 1;  (* Bildschirm              *)
  656.     SeriellPort    = 2;  (* Serielle Schnittstelle  *)
  657.     ParallelPort   = 3;  (* Parallele Schnittstelle *)
  658.     (* LoadMode : INTEGER *)
  659.     LoadAndStart   = 0;
  660.     LoadOnly       = 3;
  661.     StartProgram   = 4;
  662.     NewBasePage    = 5;
  663.  
  664.  
  665.   TYPE
  666.     DTAType             = RECORD
  667.                             Reserved      : ARRAY [0..19] OF CHAR;  (* 21 Bytes fuer GEMDOS reserviert *)
  668.                             FileAttribute : BITSET;                 (* Datei-Attribut                  *)
  669.                             FileTime      : INTEGER;                (* Uhrzeit                         *)
  670.                             FileDate      : INTEGER;                (* Datum                           *)
  671.                             FileLength    : LONGINT;                (* Dateilaenge                     *)
  672.                             FileName      : ARRAY [0..14] OF CHAR;  (* Dateiname                       *)
  673.                           END;
  674.  
  675.     DTAPointerType      = POINTER TO DTAType;
  676.  
  677.     DiskInfoType        = RECORD
  678.                             FreeCluster       : LONGINT;  (* Anzahl der freien Cluster *)
  679.                             TotalCluster      : LONGINT;  (* Gesamtzahl der Cluster    *)
  680.                             BytesPerSector    : LONGINT;  (* Bytes pro Sektor          *)
  681.                             SectorsPerCluster : LONGINT;  (* Sektoren pro Cluster      *)
  682.                           END;
  683.  
  684.     DiskInfoPointerType = POINTER TO DiskInfoType;
  685.  
  686.     DOSTime             = RECORD
  687.                             Time : INTEGER;
  688.                             Date : INTEGER;
  689.                           END;
  690.  
  691.     DOSTimePointer      = POINTER TO DOSTime;
  692.  
  693.  
  694.   (* ------------------------- GEMDOS Prozeduren ------------------------- *)
  695.  
  696.  
  697.   PROCEDURE Terminate0;
  698.  
  699.     (* GEMDOS-Funktionsnummer:  0 *)
  700.  
  701.  
  702.   PROCEDURE ConsoleIn           (VAR CharValue : LONGINT);
  703.  
  704.     (* GEMDOS-Funktionsnummer:  1 *)
  705.  
  706.  
  707.   PROCEDURE ConsoleOut          (CharValue : INTEGER);
  708.  
  709.     (* GEMDOS-Funktionsnummer:  2 *)
  710.  
  711.  
  712.   PROCEDURE AuxiliaryIn         (VAR CharValue : INTEGER);
  713.  
  714.     (* GEMDOS-Funktionsnummer:  3 *)
  715.     (* ATARI empfiehlt: besser BIOS-Funktion benutzen *)
  716.  
  717.  
  718.   PROCEDURE AuxiliaryOut        (CharValue : INTEGER);
  719.  
  720.     (* GEMDOS-Funktionsnummer:  4 *)
  721.  
  722.  
  723.   PROCEDURE PrinterOut          (CharValue       : INTEGER;
  724.                                  VAR ReturnValue : INTEGER);
  725.  
  726.     (* GEMDOS-Funktionsnummer:  5 *)
  727.  
  728.  
  729.   PROCEDURE RawInOut            (Function        : INTEGER;
  730.                                  VAR ReturnValue : LONGINT);
  731.  
  732.     (* GEMDOS-Funktionsnummer:  6 *)
  733.  
  734.  
  735.   PROCEDURE RawIn               (VAR CharValue  : LONGINT);
  736.  
  737.     (* GEMDOS-Funktionsnummer:  7 *)
  738.  
  739.  
  740.   PROCEDURE NoEchoIn            (VAR CharValue  : INTEGER);
  741.  
  742.     (* GEMDOS-Funktionsnummer:  8 *)
  743.  
  744.  
  745.   PROCEDURE ConsoleWriteString  (OutputString     : ARRAY OF CHAR;
  746.                                  VAR WrittenChars : LONGINT);
  747.  
  748.     (* GEMDOS-Funktionsnummer:  9 *)
  749.  
  750.  
  751.   PROCEDURE ConsoleReadString   (VAR InputString : ARRAY OF CHAR);
  752.  
  753.     (* GEMDOS-Funktionsnummer: 10 *)
  754.  
  755.  
  756.   PROCEDURE ConsoleInState      (VAR IsThere : INTEGER);
  757.  
  758.     (* GEMDOS-Funktionsnummer: 11 *)
  759.  
  760.  
  761.   PROCEDURE SetDrive            (DriveNumber     : INTEGER;
  762.                                  VAR DriveVektor : BITSET);
  763.  
  764.     (* GEMDOS-Funktionsnummer: 14 *)
  765.  
  766.  
  767.   PROCEDURE ConsoleOutState     (VAR ReturnValue : LONGINT);
  768.  
  769.     (* GEMDOS-Funktionsnummer: 16 *)
  770.  
  771.  
  772.   PROCEDURE PrinterOutState     (VAR ReturnValue : INTEGER);
  773.  
  774.     (* GEMDOS-Funktionsnummer: 17 *)
  775.  
  776.  
  777.   PROCEDURE AuxiliaryInState    (VAR IsThere : INTEGER);
  778.  
  779.     (* GEMDOS-Funktionsnummer: 18 *)
  780.  
  781.  
  782.   PROCEDURE AuxiliaryOutState   (VAR ReturnValue : INTEGER);
  783.  
  784.     (* GEMDOS-Funktionsnummer: 19 *)
  785.  
  786.  
  787.   PROCEDURE GetDrive            (VAR ReturnDrives : INTEGER);
  788.  
  789.     (* GEMDOS-Funktionsnummer: 25 *)
  790.  
  791.  
  792.   PROCEDURE SetDTA              (VAR DTAPointer : DTAPointerType);
  793.  
  794.     (* GEMDOS-Funktionsnummer: 26 *)
  795.  
  796.  
  797.   PROCEDURE SupervisorMode      (VAR Stack : LONGINT);
  798.  
  799.     (* GEMDOS-Funktionsnummer: 32 *)
  800.  
  801.  
  802.   PROCEDURE GetDate             (VAR Today  : INTEGER);
  803.  
  804.     (* GEMDOS-Funktionsnummer: 42 *)
  805.  
  806.  
  807.   PROCEDURE SetDate             (Today         : INTEGER;
  808.                                  VAR TodayOkay : INTEGER);
  809.  
  810.     (* GEMDOS-Funktionsnummer: 43 *)
  811.  
  812.  
  813.   PROCEDURE GetTime             (VAR Now : INTEGER);
  814.  
  815.     (* GEMDOS-Funktionsnummer: 44 *)
  816.  
  817.  
  818.   PROCEDURE SetTime             (Now         : INTEGER;
  819.                                  VAR NowOkay : INTEGER);
  820.  
  821.     (* GEMDOS-Funktionsnummer:  45 *)
  822.  
  823.  
  824.   PROCEDURE GetDTA              (VAR DTAPointer : DTAPointerType);
  825.  
  826.     (* GEMDOS-Funktionsnummer: 47 *)
  827.  
  828.  
  829.   PROCEDURE GetVersion          (VAR VersionNumber : INTEGER);
  830.  
  831.     (* GEMDOS-Funktionsnummer: 48 *)
  832.  
  833.  
  834.   PROCEDURE TerminateResident   (MemoryAmount : LONGINT;
  835.                                  ReturnState  : INTEGER);
  836.  
  837.     (* GEMDOS-Funktionsnummer: 49 *)
  838.  
  839.  
  840.   PROCEDURE GetDriveFreeSpace   (VAR DiskInfo : DiskInfoType;
  841.                                      Drive    : INTEGER;
  842.                                  VAR Return   : INTEGER);
  843.  
  844.     (* GEMDOS-Funktionsnummer: 54 *)
  845.  
  846.  
  847.   PROCEDURE DirectoryCreate     (PathName        : ARRAY OF CHAR;
  848.                                  VAR ReturnValue : INTEGER);
  849.  
  850.     (* GEMDOS-Funktionsnummer: 57 *)
  851.  
  852.  
  853.   PROCEDURE DirectoryDelete     (PathName        : ARRAY OF CHAR;
  854.                                  VAR ReturnValue : INTEGER);
  855.  
  856.     (* GEMDOS-Funktionsnummer: 58 *)
  857.  
  858.  
  859.   PROCEDURE SetPath             (PathName        : ARRAY OF CHAR;
  860.                                  VAR ReturnValue : INTEGER);
  861.  
  862.     (* GEMDOS-Funktionsnummer: 59 *)
  863.  
  864.  
  865.   PROCEDURE FileCreate          (PathName       : ARRAY OF CHAR;
  866.                                  Attribute      : BITSET;
  867.                                  VAR FileHandle : INTEGER);
  868.  
  869.     (* GEMDOS-Funktionsnummer: 60 *)
  870.  
  871.  
  872.   PROCEDURE FileOpen            (PathName       : ARRAY OF CHAR;
  873.                                  Mode           : INTEGER;
  874.                                  VAR FileHandle : INTEGER);
  875.  
  876.     (* GEMDOS-Funktionsnummer: 61 *)
  877.  
  878.  
  879.   PROCEDURE FileClose           (FileHandle      : INTEGER;
  880.                                  VAR ReturnValue : INTEGER);
  881.  
  882.     (* GEMDOS-Funktionsnummer: 62 *)
  883.  
  884.  
  885.   PROCEDURE FileRead            (FileHandle      : INTEGER;
  886.                                  Size            : LONGINT;
  887.                                  BufferAddress   : ADDRESS;
  888.                                  VAR ReturnValue : LONGINT);
  889.  
  890.     (* GEMDOS-Funktionsnummer: 63 *)
  891.  
  892.  
  893.   PROCEDURE FileWrite           (FileHandle      : INTEGER;
  894.                                  Size            : LONGINT;
  895.                                  BufferAddress   : ADDRESS;
  896.                                  VAR ReturnValue : LONGINT);
  897.  
  898.     (* GEMDOS-Funktionsnummer: 64 *)
  899.  
  900.  
  901.   PROCEDURE FileDelete          (PathName        : ARRAY OF CHAR;
  902.                                  VAR ReturnValue : INTEGER);
  903.  
  904.     (* GEMDOS-Funktionsnummer: 65 *)
  905.  
  906.  
  907.   PROCEDURE FileSeek            (FileHandle      : INTEGER;
  908.                                  SeekMode        : INTEGER;
  909.                                  Position        : LONGINT;
  910.                                  VAR ReturnValue : INTEGER);
  911.  
  912.     (* GEMDOS-Funktionsnummer: 66 *)
  913.  
  914.  
  915.   PROCEDURE FileAttributes      (PathName        : ARRAY OF CHAR;
  916.                                  Mode            : INTEGER;
  917.                                  VAR Attribute   : BITSET;
  918.                                  VAR ReturnValue : INTEGER);
  919.  
  920.     (* GEMDOS-Funktionsnummer: 67 *)
  921.  
  922.  
  923.   PROCEDURE FileDuplicate       (StandardFileHandle : INTEGER;
  924.                                  VAR ReturnHandle   : INTEGER);
  925.  
  926.     (* GEMDOS-Funktionsnummer: 69 *)
  927.  
  928.  
  929.   PROCEDURE FileForce           (StandardFileHandle : INTEGER;
  930.                                  NonStandardHandle  : INTEGER;
  931.                                  VAR ReturnValue    : INTEGER);
  932.  
  933.     (* GEMDOS-Funktionsnummer: 70 *)
  934.  
  935.  
  936.   PROCEDURE GetPath             (VAR Path        : ARRAY OF CHAR;
  937.                                  Drive           : INTEGER;
  938.                                  VAR ReturnValue : INTEGER);
  939.  
  940.     (* GEMDOS-Funktionsnummer: 71 *)
  941.  
  942.  
  943.   PROCEDURE MemoryAllocate      (Amount          : LONGINT;
  944.                                  VAR ReturnValue : ADDRESS);
  945.  
  946.     (* GEMDOS-Funktionsnummer: 72 *)
  947.  
  948.  
  949.   PROCEDURE MemoryFree          (BlockAddress    : ADDRESS;
  950.                                  VAR ReturnValue : INTEGER);
  951.  
  952.     (* GEMDOS-Funktionsnummer: 73 *)
  953.  
  954.  
  955.   PROCEDURE MemoryShrink        (BlockAddress    : ADDRESS;
  956.                                  Size            : LONGINT;
  957.                                  VAR ReturnValue : INTEGER);
  958.  
  959.     (* GEMDOS-Funktionsnummer: 74 *)
  960.  
  961.  
  962.   PROCEDURE Execute             (LoadMode        : INTEGER;
  963.                                  Path            : ARRAY OF CHAR;
  964.                                  CmdLine         : ARRAY OF CHAR;
  965.                                  Environment     : ARRAY OF CHAR;
  966.                                  VAR ReturnValue : LONGINT);
  967.  
  968.     (* GEMDOS-Funktionsnummer: 75 *)
  969.  
  970.  
  971.   PROCEDURE Terminate           (Return : INTEGER);
  972.  
  973.     (* GEMDOS-Funktionsnummer: 76 *)
  974.  
  975.  
  976.   PROCEDURE SearchFirst         (Filename        : ARRAY OF CHAR;
  977.                                  Attributes      : BITSET;
  978.                                  VAR ReturnValue : INTEGER);
  979.  
  980.     (* GEMDOS-Funktionsnummer: 78 *)
  981.  
  982.  
  983.   PROCEDURE SearchNext          (VAR ReturnValue : INTEGER);
  984.  
  985.     (* GEMDOS-Funktionsnummer: 79 *)
  986.  
  987.  
  988.   PROCEDURE FileRename          (OldName : ARRAY OF CHAR;
  989.                                  NewName : ARRAY OF CHAR);
  990.  
  991.     (* GEMDOS-Funktionsnummer: 86 *)
  992.  
  993.  
  994.   PROCEDURE FileDateTime        (VAR DateTime : DOSTimePointer;
  995.                                  FileHandle   : INTEGER;
  996.                                  Mode         : INTEGER);
  997.  
  998.     (* GEMDOS-Funktionsnummer: 87 *)
  999.  
  1000.  
  1001. END OS.
  1002.