OSUtils.pas 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. {
  2. File: CarbonCore/OSUtils.h
  3. Contains: OS Utilities Interfaces.
  4. Version: CarbonCore-654.0.85~1
  5. Copyright: © 1985-2005 by Apple Computer, Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://www.freepascal.org/bugs.html
  9. }
  10. { Pascal Translation Updated: Peter N Lewis, <[email protected]>, November 2005 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit OSUtils;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,CFBase,MixedMode,MacMemory,DateTimeUtils,CFString,Endian;
  92. {$ALIGN POWER}
  93. { HandToHand and other memory utilties were moved to MacMemory.h }
  94. { Date and Time utilties were moved to DateTimeUtils.h }
  95. {$ALIGN MAC68K}
  96. const
  97. useFree = 0;
  98. useATalk = 1;
  99. useAsync = 2;
  100. useExtClk = 3; {Externally clocked}
  101. useMIDI = 4;
  102. const
  103. false32b = 0; {24 bit addressing error}
  104. true32b = 1; {32 bit addressing error}
  105. const
  106. { result types for RelString Call }
  107. sortsBefore = -1; {first string < second string}
  108. sortsEqual = 0; {first string = second string}
  109. sortsAfter = 1; {first string > second string}
  110. const
  111. dummyType = 0;
  112. vType = 1;
  113. ioQType = 2;
  114. drvQType = 3;
  115. evType = 4;
  116. fsQType = 5;
  117. sIQType = 6;
  118. dtQType = 7;
  119. nmType = 8;
  120. type
  121. QTypes = SignedByte;
  122. type
  123. SysParmTypePtr = ^SysParmType;
  124. SysParmType = packed record
  125. valid: UInt8;
  126. aTalkA: UInt8;
  127. aTalkB: UInt8;
  128. config: UInt8;
  129. portA: SInt16;
  130. portB: SInt16;
  131. alarm: SInt32;
  132. font: SInt16;
  133. kbdPrint: SInt16;
  134. volClik: SInt16;
  135. misc: SInt16;
  136. end;
  137. type
  138. SysPPtr = SysParmTypePtr;
  139. type
  140. QElemPtr = ^QElem;
  141. QElem = record
  142. qLink: QElemPtr;
  143. qType: SInt16;
  144. qData: array [0..0] of SInt16;
  145. end;
  146. type
  147. QHdrPtr = ^QHdr;
  148. QHdr = record
  149. qFlags: SInt16;
  150. qHead: QElemPtr;
  151. qTail: QElemPtr;
  152. end;
  153. type
  154. DeferredTaskProcPtr = procedure( dtParam: SInt32 );
  155. DeferredTaskUPP = DeferredTaskProcPtr;
  156. {
  157. * NewDeferredTaskUPP()
  158. *
  159. * Availability:
  160. * Mac OS X: in version 10.0 and later in CoreServices.framework
  161. * CarbonLib: in CarbonLib 1.0 and later
  162. * Non-Carbon CFM: available as macro/inline
  163. }
  164. function NewDeferredTaskUPP( userRoutine: DeferredTaskProcPtr ): DeferredTaskUPP; external name '_NewDeferredTaskUPP';
  165. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  166. {
  167. * DisposeDeferredTaskUPP()
  168. *
  169. * Availability:
  170. * Mac OS X: in version 10.0 and later in CoreServices.framework
  171. * CarbonLib: in CarbonLib 1.0 and later
  172. * Non-Carbon CFM: available as macro/inline
  173. }
  174. procedure DisposeDeferredTaskUPP( userUPP: DeferredTaskUPP ); external name '_DisposeDeferredTaskUPP';
  175. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  176. {
  177. * InvokeDeferredTaskUPP()
  178. *
  179. * Availability:
  180. * Mac OS X: in version 10.0 and later in CoreServices.framework
  181. * CarbonLib: in CarbonLib 1.0 and later
  182. * Non-Carbon CFM: available as macro/inline
  183. }
  184. procedure InvokeDeferredTaskUPP( dtParam: SInt32; userUPP: DeferredTaskUPP ); external name '_InvokeDeferredTaskUPP';
  185. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  186. type
  187. DeferredTask = record
  188. qLink: QElemPtr;
  189. qType: SInt16;
  190. dtFlags: SInt16;
  191. dtAddr: DeferredTaskUPP;
  192. dtParam: SInt32;
  193. dtReserved: SInt32;
  194. end;
  195. DeferredTaskPtr = ^DeferredTask;
  196. {
  197. In order for MachineLocation to be endian-safe, a new member
  198. has been added to the 'u' union in the structure. You are
  199. encouraged to use the new member instead of the old one.
  200. If your code looked like this:
  201. MachineLocation.u.dlsDelta = isDLS? 0x80: 0x00;
  202. you should change it to this:
  203. MachineLocation.u.dls.Delta = isDLS? 0x80: 0x00;
  204. to be endian safe. The gmtDelta remains the same; the low 24-bits
  205. are used. Remember that order of assignment DOES matter:
  206. This will overwrite results:
  207. MachineLocation.u.dls.Delta = 0xAA; // u = 0xAAGGGGGG; G=Garbage
  208. MachineLocation.u.gmtDelta = 0xBBBBBB; // u = 0x00BBBBBB;
  209. when in fact reversing the assignment would have preserved the values:
  210. MachineLocation.u.gmtDelta = 0xBBBBBB; // u = 0x00BBBBBB;
  211. MachineLocation.u.dls.Delta = 0xAA; // u = 0xAABBBBBB;
  212. NOTE: The information regarding dlsDelta in Inside Mac is INCORRECT.
  213. It's always 0x80 for daylight-saving time or 0x00 for standard time.
  214. }
  215. type
  216. MachineLocationPtr = ^MachineLocation;
  217. MachineLocation = packed record
  218. latitude: Fract;
  219. longitude: Fract;
  220. case SInt16 of
  221. {$ifc TARGET_RT_BIG_ENDIAN}
  222. 0: (
  223. dlsDelta: SInt8; { signed byte; daylight savings delta }
  224. );
  225. {$endc}
  226. 1: (
  227. gmtDelta: SInt32; { use low 24-bits only }
  228. );
  229. 2: (
  230. {$ifc TARGET_RT_LITTLE_ENDIAN}
  231. pad0,pad1,pad2: SInt8;
  232. {$endc}
  233. Delta: SInt8;
  234. );
  235. end;
  236. {
  237. * IsMetric()
  238. *
  239. * Availability:
  240. * Mac OS X: in version 10.0 and later in CoreServices.framework
  241. * CarbonLib: in CarbonLib 1.0 and later
  242. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  243. }
  244. function IsMetric: Boolean; external name '_IsMetric';
  245. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  246. {
  247. * GetSysPPtr() *** DEPRECATED ***
  248. *
  249. * Deprecated:
  250. * Don't use this function; it always returns NULL on Mac OS X.
  251. *
  252. * Availability:
  253. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
  254. * CarbonLib: in CarbonLib 1.0 and later
  255. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  256. }
  257. function GetSysPPtr: SysPPtr; external name '_GetSysPPtr';
  258. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  259. {
  260. NOTE: SysBeep() has been moved to Sound.h.
  261. We could not automatically #include Sound.h in this file
  262. because Sound.h indirectly #include's OSUtils.h which
  263. would make a circular include.
  264. }
  265. {
  266. * DTInstall() *** DEPRECATED ***
  267. *
  268. * Deprecated:
  269. * The Deferred Task Manager is deprecated. Look into restructuring
  270. * your code to use threads, or MPTasks, or some other threading
  271. * solution.
  272. *
  273. * Summary:
  274. * Adds the specified task record to the deferred-task queue.
  275. *
  276. * Availability:
  277. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
  278. * CarbonLib: in CarbonLib 1.0 and later
  279. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  280. }
  281. function DTInstall( dtTaskPtr: DeferredTaskPtr ): OSErr; external name '_DTInstall';
  282. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  283. {
  284. * DTUninstall() *** DEPRECATED ***
  285. *
  286. * Deprecated:
  287. * The Deferred Task Manager is deprecated. Look into restructuring
  288. * your code to use threads, or MPTasks, or some other threading
  289. * solution.
  290. *
  291. * Summary:
  292. * Adds the specified task record to the deferred-task queue.
  293. *
  294. * Availability:
  295. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
  296. * CarbonLib: not available
  297. * Non-Carbon CFM: not available
  298. }
  299. function DTUninstall( dtTaskPtr: DeferredTaskPtr ): OSErr; external name '_DTUninstall';
  300. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  301. function GetMMUMode: SInt8; inline;
  302. procedure SwapMMUMode( var mode: SInt8 ); inline;
  303. {
  304. * Delay()
  305. *
  306. * Availability:
  307. * Mac OS X: in version 10.0 and later in CoreServices.framework
  308. * CarbonLib: in CarbonLib 1.0 and later
  309. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  310. }
  311. procedure Delay( numTicks: UInt32; var finalTicks: UInt32 ); external name '_Delay';
  312. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  313. {
  314. * WriteParam() *** DEPRECATED ***
  315. *
  316. * Deprecated:
  317. * This function no longer does anything on Mac OS X; you should
  318. * remove all calls to it from your code.
  319. *
  320. * Availability:
  321. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
  322. * CarbonLib: in CarbonLib 1.0 and later
  323. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  324. }
  325. function WriteParam: OSErr; external name '_WriteParam';
  326. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  327. {
  328. * Enqueue()
  329. *
  330. * Availability:
  331. * Mac OS X: in version 10.0 and later in CoreServices.framework
  332. * CarbonLib: in CarbonLib 1.0 and later
  333. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  334. }
  335. procedure Enqueue( qElement: QElemPtr; qHeader: QHdrPtr ); external name '_Enqueue';
  336. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  337. {
  338. * Dequeue()
  339. *
  340. * Availability:
  341. * Mac OS X: in version 10.0 and later in CoreServices.framework
  342. * CarbonLib: in CarbonLib 1.0 and later
  343. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  344. }
  345. function Dequeue( qElement: QElemPtr; qHeader: QHdrPtr ): OSErr; external name '_Dequeue';
  346. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  347. {
  348. * SetCurrentA5() *** DEPRECATED ***
  349. *
  350. * Deprecated:
  351. * You no longer need to use SetCurrentA5() on Mac OS X.
  352. *
  353. * Availability:
  354. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
  355. * CarbonLib: in CarbonLib 1.0 and later
  356. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  357. }
  358. function SetCurrentA5: SInt32; external name '_SetCurrentA5';
  359. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  360. {
  361. * SetA5() *** DEPRECATED ***
  362. *
  363. * Deprecated:
  364. * You no longer need to use SetA5() on Mac OS X.
  365. *
  366. * Availability:
  367. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.4
  368. * CarbonLib: in CarbonLib 1.0 and later
  369. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  370. }
  371. function SetA5( newA5: SInt32 ): SInt32; external name '_SetA5';
  372. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  373. {
  374. * InitUtil() *** DEPRECATED ***
  375. *
  376. * Availability:
  377. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.3
  378. * CarbonLib: in CarbonLib 1.0 and later
  379. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  380. }
  381. function InitUtil: OSErr; external name '_InitUtil';
  382. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  383. {
  384. * MakeDataExecutable()
  385. *
  386. * Availability:
  387. * Mac OS X: in version 10.0 and later in CoreServices.framework
  388. * CarbonLib: in CarbonLib 1.0 and later
  389. * Non-Carbon CFM: in InterfaceLib 7.5 and later
  390. }
  391. procedure MakeDataExecutable( baseAddress: UnivPtr; length: UInt32 ); external name '_MakeDataExecutable';
  392. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  393. {
  394. * ReadLocation()
  395. *
  396. * Availability:
  397. * Mac OS X: in version 10.0 and later in CoreServices.framework
  398. * CarbonLib: in CarbonLib 1.0 and later
  399. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  400. }
  401. procedure ReadLocation( var loc: MachineLocation ); external name '_ReadLocation';
  402. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  403. {
  404. * WriteLocation() *** DEPRECATED ***
  405. *
  406. * Availability:
  407. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.0
  408. * CarbonLib: in CarbonLib 1.0 and later
  409. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  410. }
  411. procedure WriteLocation( const (*var*) loc: MachineLocation ); external name '_WriteLocation';
  412. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  413. {
  414. * TickCount()
  415. *
  416. * Availability:
  417. * Mac OS X: in version 10.0 and later in CoreServices.framework
  418. * CarbonLib: in CarbonLib 1.0 and later
  419. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  420. }
  421. function TickCount: UInt32; external name '_TickCount';
  422. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  423. {
  424. * CSCopyUserName()
  425. *
  426. * Availability:
  427. * Mac OS X: in version 10.0 and later in CoreServices.framework
  428. * CarbonLib: in CarbonLib 1.5 and later
  429. * Non-Carbon CFM: not available
  430. }
  431. function CSCopyUserName( useShortName: Boolean ): CFStringRef; external name '_CSCopyUserName';
  432. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  433. {
  434. * CSCopyMachineName()
  435. *
  436. * Availability:
  437. * Mac OS X: in version 10.0 and later in CoreServices.framework
  438. * CarbonLib: in CarbonLib 1.5 and later
  439. * Non-Carbon CFM: not available
  440. }
  441. function CSCopyMachineName: CFStringRef; external name '_CSCopyMachineName';
  442. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  443. {
  444. NOTE: SysEnvirons is obsolete. You should be using Gestalt.
  445. }
  446. { Environs Equates }
  447. const
  448. curSysEnvVers = 2; {Updated to equal latest SysEnvirons version}
  449. type
  450. SysEnvRecPtr = ^SysEnvRec;
  451. SysEnvRec = record
  452. environsVersion: SInt16;
  453. machineType: SInt16;
  454. systemVersion: SInt16;
  455. processor: SInt16;
  456. hasFPU: Boolean;
  457. hasColorQD: Boolean;
  458. keyBoardType: SInt16;
  459. atDrvrVersNum: SInt16;
  460. sysVRefNum: SInt16;
  461. end;
  462. const
  463. { Machine Types }
  464. envMac = -1;
  465. envXL = -2;
  466. envMachUnknown = 0;
  467. env512KE = 1;
  468. envMacPlus = 2;
  469. envSE = 3;
  470. envMacII = 4;
  471. envMacIIx = 5;
  472. envMacIIcx = 6;
  473. envSE30 = 7;
  474. envPortable = 8;
  475. envMacIIci = 9;
  476. envMacIIfx = 11;
  477. const
  478. { CPU types }
  479. envCPUUnknown = 0;
  480. env68000 = 1;
  481. env68010 = 2;
  482. env68020 = 3;
  483. env68030 = 4;
  484. env68040 = 5;
  485. const
  486. { Keyboard types }
  487. envUnknownKbd = 0;
  488. envMacKbd = 1;
  489. envMacAndPad = 2;
  490. envMacPlusKbd = 3;
  491. envAExtendKbd = 4;
  492. envStandADBKbd = 5;
  493. envPrtblADBKbd = 6;
  494. envPrtblISOKbd = 7;
  495. envStdISOADBKbd = 8;
  496. envExtISOADBKbd = 9;
  497. implementation
  498. {$R-}
  499. function GetMMUMode: SInt8; inline;
  500. begin
  501. GetMMUMode:= true32b
  502. end;
  503. procedure SwapMMUMode( var mode: SInt8 ); inline;
  504. begin
  505. mode := true32b;
  506. end;
  507. end.