metados.pas 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. {
  2. Copyright (c) 2016 by Free Pascal development team
  3. XBIOS interface unit for Atari TOS (MetaDOS functions)
  4. See the file COPYING.FPC, included in this distribution,
  5. for details about the copyright.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. **********************************************************************}
  10. {$PACKRECORDS 2}
  11. {$MODESWITCH OUT+}
  12. unit metados;
  13. interface
  14. type
  15. {* Available from MetaDOS version 2.30 *}
  16. PMETAINFO2 = ^TMETAINFO2;
  17. TMETAINFO2 = record
  18. version: word;
  19. magic: longint;
  20. log2phys: Pointer;
  21. end;
  22. {* Structure used by Metainit() *}
  23. PMETAINFO = ^TMETAINFO;
  24. TMETAINFO = record
  25. drivemap: LongInt;
  26. version: Pchar;
  27. reserved: LongInt;
  28. info: PMETAINFO2; {* Available from MetaDOS version 2.30 *}
  29. end;
  30. PMETA_DRVINFO = ^TMETA_DRVINFO;
  31. TMETA_DRVINFO = record
  32. name: PChar;
  33. reserved: array[0..2] of LongInt;
  34. end;
  35. procedure xbios_Metainit(out buffer: TMETAINFO); syscall 14 48;
  36. function xbios_Metaopen(drive: smallint; out buffer: TMETA_DRVINFO): LongInt; syscall 14 49;
  37. function xbios_Metaclose(drive: smallint): LongInt; syscall 14 50;
  38. function xbios_Metaread(drive: smallint; buffer: Pointer; blockno: LongInt; count: smallint): LongInt; syscall 14 51;
  39. function xbios_Metawrite(drive: smallint; buffer: Pointer; blockno: LongInt; count: smallint): LongInt; syscall 14 52;
  40. function xbios_Metaseek(drive: smallint; dummy, offset: longint): LongInt; syscall 14 53;
  41. function xbios_Metastatus(drive: smallint; buffer: Pointer): LongInt; syscall 14 54;
  42. function xbios_Metaioctl(drive: smallint; magic: LongInt; opcode: smallint; buffer: Pointer): LongInt; syscall 14 55;
  43. implementation
  44. end.