Bladeren bron

more compilable -- WindowManager + KernelLog starts working (GC still inactive)

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7448 8c9fc860-2736-0410-a75d-ab315db34111
felixf 7 jaren geleden
bovenliggende
commit
5b8c5071f3
7 gewijzigde bestanden met toevoegingen van 245 en 319 verwijderingen
  1. 11 11
      source/AMD64.CPUID.Mod
  2. 10 98
      source/Builds.Tool
  3. 2 2
      source/Debugging.Mod
  4. 5 5
      source/Info.Mod
  5. 36 22
      source/Release.Tool
  6. 180 180
      source/Win32.ODBC.Mod
  7. 1 1
      source/Win64.Machine.Mod

+ 11 - 11
source/AMD64.CPUID.Mod

@@ -490,7 +490,7 @@ PROCEDURE ExtendedFunction0(VAR cpuInfo : CpuInformation);
 VAR eax, ebx, ecx, edx : SET;
 BEGIN
 	eax := {};
-	CPUID(SHORT(80000000H), eax, ebx, ecx, edx);
+	CPUID(LONGINT(80000000H), eax, ebx, ecx, edx);
 	(* The largest extended function as value from offset 8000000H. Since we don't have unsigned integers, ignore the MSB *)
 	cpuInfo.largestExtendedFunction := SYSTEM.VAL(LONGINT, eax - {31});
 	(* ebx, ecx & edx contain the same information as in standard function 0 *)
@@ -499,7 +499,7 @@ END ExtendedFunction0;
 PROCEDURE ExtendedFunction1(VAR cpuInfo : CpuInformation);
 VAR eax, ebx, ecx, edx : SET;
 BEGIN
-	CPUID(SHORT(80000001H), eax, ebx, ecx, edx);
+	CPUID(LONGINT(80000001H), eax, ebx, ecx, edx);
 	(* eax contains the same information as in standard function 1 *)
 	(* ebx: brandid, ignore so far*)
 	cpuInfo.extFeatures2 := ecx;
@@ -509,19 +509,19 @@ END ExtendedFunction1;
 PROCEDURE ExtendedFunction2to4(VAR cpuInfo : CpuInformation);
 VAR eax, ebx, ecx, edx : SET;
 BEGIN
-	CPUID(SHORT(80000002H), eax, ebx, ecx, edx);
+	CPUID(LONGINT(80000002H), eax, ebx, ecx, edx);
 	GetString(cpuInfo.processorName, 0, eax);
 	GetString(cpuInfo.processorName, 4, ebx);
 	GetString(cpuInfo.processorName, 8, ecx);
 	GetString(cpuInfo.processorName, 12, edx);
 	IF cpuInfo.largestExtendedFunction < 3 THEN RETURN END;
-	CPUID(SHORT(80000003H), eax, ebx, ecx, edx);
+	CPUID(LONGINT(80000003H), eax, ebx, ecx, edx);
 	GetString(cpuInfo.processorName, 16, eax);
 	GetString(cpuInfo.processorName, 20, ebx);
 	GetString(cpuInfo.processorName, 24, ecx);
 	GetString(cpuInfo.processorName, 28, edx);
 	IF cpuInfo.largestExtendedFunction < 4 THEN RETURN END;
-	CPUID(SHORT(80000004H), eax, ebx, ecx, edx);
+	CPUID(LONGINT(80000004H), eax, ebx, ecx, edx);
 	GetString(cpuInfo.processorName, 32, eax);
 	GetString(cpuInfo.processorName, 36, ebx);
 	GetString(cpuInfo.processorName, 40, ecx);
@@ -531,7 +531,7 @@ END ExtendedFunction2to4;
 PROCEDURE AmdExtendedFunction5(VAR cpuInfo : CpuInformation);
 VAR eax, ebx, ecx, edx : SET;
 BEGIN
-	CPUID(SHORT(80000005H), eax, ebx, ecx, edx);
+	CPUID(LONGINT(80000005H), eax, ebx, ecx, edx);
 	(* EAX *)
 	cpuInfo.l1DataTlbAssociativity2M4M := SYSTEM.VAL(LONGINT, LSH(eax * {24..31}, -24));
 	cpuInfo.l1DataTlbSize2M4M := SYSTEM.VAL(LONGINT, LSH(eax * {16..23}, -16));
@@ -558,7 +558,7 @@ END AmdExtendedFunction5;
 PROCEDURE AmdExtendedFunction6(VAR cpuInfo : CpuInformation);
 VAR eax, ebx, ecx, edx : SET;
 BEGIN
-	CPUID(SHORT(80000006H), eax, ebx, ecx, edx);
+	CPUID(LONGINT(80000006H), eax, ebx, ecx, edx);
 	cpuInfo.unifiedTlb := (eax * {16..31} = {}) & (ebx * {16..31} = {});
 
 	IF ~cpuInfo.unifiedTlb THEN
@@ -583,7 +583,7 @@ END AmdExtendedFunction6;
 PROCEDURE IntelExtendedFunction6(VAR cpuInfo : CpuInformation);
 VAR eax, ebx, ecx, edx : SET;
 BEGIN
-	CPUID(SHORT(80000006H), eax, ebx, ecx, edx);
+	CPUID(LONGINT(80000006H), eax, ebx, ecx, edx);
 	cpuInfo.l2CacheSize := SYSTEM.VAL(LONGINT, LSH(ecx * {16..31}, -16));
 	cpuInfo.l2Associativity := SYSTEM.VAL(LONGINT, LSH(ecx * {12..15}, -12));
 	cpuInfo.l2LineSize := SYSTEM.VAL(LONGINT, ecx * {0..7});
@@ -593,7 +593,7 @@ END IntelExtendedFunction6;
 PROCEDURE AmdExtendedFunction7(VAR cpuInfo : CpuInformation);
 VAR eax, ebx, ecx, edx : SET;
 BEGIN
-	CPUID(SHORT(80000007H), eax, ebx, ecx, edx);
+	CPUID(LONGINT(80000007H), eax, ebx, ecx, edx);
 	cpuInfo.powerManagement := edx;
 END AmdExtendedFunction7;
 
@@ -601,7 +601,7 @@ END AmdExtendedFunction7;
 PROCEDURE ExtendedFunction8(VAR cpuInfo : CpuInformation);
 VAR eax, ebx, ecx, edx : SET;
 BEGIN
-	CPUID(SHORT(80000008H), eax, ebx, ecx, edx);
+	CPUID(LONGINT(80000008H), eax, ebx, ecx, edx);
 	cpuInfo.linAddrSize := SYSTEM.VAL(LONGINT, LSH(eax * {8..15}, -8));
 	cpuInfo.physAddrSize := SYSTEM.VAL(LONGINT, eax * {0..7});
 	IF cpuInfo.cputype = Amd THEN
@@ -614,7 +614,7 @@ END ExtendedFunction8;
 PROCEDURE AmdExtendedFunctionA(VAR cpuInfo : CpuInformation);
 VAR eax, ebx, ecx, edx : SET;
 BEGIN
-	CPUID(SHORT(8000000AH), eax, ebx, ecx, edx);
+	CPUID(LONGINT(8000000AH), eax, ebx, ecx, edx);
 	cpuInfo.svmRev := SYSTEM.VAL(LONGINT, eax * {0..7});
 	cpuInfo.nasid := SYSTEM.VAL(LONGINT, ebx);
 END AmdExtendedFunctionA;

+ 10 - 98
source/Builds.Tool

@@ -83,102 +83,14 @@ SOLARIS32G -- 32 bit solaris a2 using generic object files
 
 Win64G -- work in progress
 ================
-
-SystemTools.DoCommands 
-
-Compiler.Compile -b=AMD --bits=64 --objectFile=Generic --newObjectFile  --symbolFile=Textual  --objectFileExtension=.GofWw --symbolFileExtension=.SymWw 
-	--traceModule=Trace
-	AMD64.Runtime.Mod Trace.Mod Generic.Win64.Kernel32.Mod Win64.Machine.Mod Heaps.Mod Generic.Modules.Mod 
-	Win64.Objects.Mod Win32.Kernel.Mod  
-	KernelLog.Mod Streams.Mod Commands.Mod Files.Mod Win32.WinFS.Mod Win32.Clock.Mod Dates.Mod 
-	AMD64.Reals.Mod Strings.Mod Diagnostics.Mod BitSets.Mod
-	StringPool.Mod ObjectFile.Mod GenericLinker.Mod GenericLoader.Mod BootConsole.Mod 
-	Win32.WinTrace.Mod Pipes.Mod Win32.StdIO.Mod Shell.Mod StdIOShell.Mod 
-	Generic.Reflection.Mod CRC.Mod SystemVersion.Mod Win64.Traps.Mod TrapWriters.Mod
-	ProducerConsumer.Mod 
 	
-	~
-
-StaticLinker.Link --fileFormat=PE64CUI --fileName=A264.exe --extension=GofWw --displacement=401000H  
-	Runtime Trace Kernel32 
-	Heaps Modules Objects Kernel
-	KernelLog Streams Commands Files WinFS Clock Dates Reals Strings Diagnostics BitSets 
-	StringPool ObjectFile GenericLinker Reflection  GenericLoader Shell  StdIOShell Traps ~
-
-FSTools.CloseFiles A264.exe  ~
-~
-
-	KernelLog Streams Commands Files WinFS Clock Dates Reals Strings Diagnostics BitSets StringPool ObjectFile GenericLinker Reflection  GenericLoader  BootConsole ~
-	~
-	 ConsumerProducer TestBoot ~
-	ProducerConsumer.Mod TestBoot.Mod 	
-
-~ BootConsole ~		
-
-
-FoxGenericObjectFile.Show ConsumerProducer.GofWw ~	
-
-SystemTools.FreeDownTo Compiler ~
-
-Compiler.Compile -b=AMD --bits=64 --objectFile=Generic --newObjectFile  --symbolFile=Textual  --objectFileExtension=.GofWw --symbolFileExtension=.SymWw 
-	--traceModule=Trace
-
-Disks.Mod
-Locks.Mod 
- UTF8Strings.Mod Displays.Mod Inputs.Mod Options.Mod Events.Mod EventsUtils.Mod 
-EventsKernelLog.Mod EventsFileLog.Mod EventsMemoryLog.Mod DynamicStrings.Mod XMLObjects.Mod XML.Mod 
-XMLScanner.Mod XMLParser.Mod Configuration.Mod FileHandlers.Mod BootShell.Mod ActiveTimers.Mod 
-Win32.GDI32.Mod Win32.Display.Mod Win32.WSock32.Mod Win32.Network.Mod Win32.IP.Mod Win32.DNS.Mod 
-Win32.UDP.Mod Win32.TCP.Mod Win32.CommandLine.Mod Serials.Mod SoundDevices.Mod Joysticks.Mod 
-TVDriver.Mod VirtualDisks.Mod DisplayNull.Mod Win32.V24.Mod Win32.Beep.Mod Win32.WinDisks.Mod 
-StringPool.Mod Diagnostics.Mod Debugging.Mod BitSets.Mod ObjectFile.Mod GenericLinker.Mod 
-StaticLinker.Mod FoxBasic.Mod FoxProgTools.Mod FoxScanner.Mod FoxCSharpScanner.Mod FoxSyntaxTree.Mod 
-FoxGlobal.Mod FoxActiveCells.Mod FoxHardware.Mod FoxFormats.Mod FoxFingerPrinter.Mod 
-FoxPrintout.Mod FoxParser.Mod FoxCSharpParser.Mod FoxSemanticChecker.Mod FoxBackend.Mod 
-FoxSections.Mod FoxFrontend.Mod FoxCompiler.Mod FoxOberonFrontend.Mod FoxCSharpFrontend.Mod 
-FoxInterfaceComparison.Mod FoxTextualSymbolFile.Mod FoxBinarySymbolFile.Mod FoxBinaryCode.Mod 
-FoxIntermediateCode.Mod FoxIntermediateBackend.Mod FoxCodeGenerators.Mod FoxBinaryObjectFile.Mod 
-FoxGenericObjectFile.Mod FoxAMD64InstructionSet.Mod FoxAMD64Assembler.Mod FoxAMDBackend.Mod FoxAssembler.Mod 
-FoxIntermediateAssembler.Mod FoxDisassembler.Mod FoxARMInstructionSet.Mod FoxARMAssembler.Mod FoxARMBackend.Mod 
-FoxMinosObjectFile.Mod FoxIntermediateParser.Mod FoxIntermediateObjectFile.Mod FoxIntermediateLinker.Mod 
-FoxTRMInstructionSet.Mod FoxTRMAssembler.Mod FoxTRMBackend.Mod FoxInterpreterBackend.Mod 
-FoxTranspilerBackend.Mod FoxDocumentationScanner.Mod FoxDocumentationTree.Mod FoxDocumentationPrinter.Mod 
-FoxDocumentationHtml.Mod FoxDocumentationParser.Mod FoxDocumentationBackend.Mod FoxProfiler.Mod 
-XMM.I386.Math.Mod XMM.I386.MathL.Mod ComplexNumbers.Mod FoxArrayBase.Mod 
-I386.FoxArrayBaseOptimized.Mod Errors.Mod ProcessInfo0.Mod ProcessInfo.Mod SystemTools.Mod Reboot.Mod 
-Win32.WinApplications.Mod XMM.I386.Math.Mod XMM.I386.MathL.Mod Random.Mod Drand48.Mod SerialsVirtual.Mod 
-Autostart.Mod FSTools.Mod UpTime.Mod CLUTs.Mod I386.Raster.Mod Localization.Mod Archives.Mod 
-WMRectangles.Mod WMEvents.Mod Repositories.Mod FP1616.Mod Texts.Mod UndoManager.Mod CRC.Mod Inflate.Mod 
-Unzip.Mod ZipFS.Mod Codecs.Mod UnicodeProperties.Mod ContextualDependency.Mod 
-UnicodeBidirectionality.Mod I386.WMRasterScale.Mod WMGraphics.Mod WMGraphicsSmooth.Mod TextUtilities.Mod 
-Types.Mod Models.Mod WMProperties.Mod WMMessages.Mod WMWindowManager.Mod 
-WMGraphicUtilities.Mod WMDropTarget.Mod WMComponents.Mod KernelLogger.Mod CompilerInterface.Mod 
-FoxTextCompiler.Mod PCDebug.Mod PCM.Mod PCS.Mod PCT.Mod PCBT.Mod PCLIR.Mod PCO.Mod PCG386.Mod PCC.Mod PCV.Mod 
-PCArrays.Mod PCB.Mod PCP.Mod PCA386.Mod PCOM.Mod PCOF.Mod PCOFPE.Mod PC.Mod ArrayBase.Mod 
-I386.ArrayBaseOptimized.Mod PCOARM.Mod PCARMCP.Mod PCARMRegisters.Mod PCAARM.Mod PCGARM.Mod ASMAMD64.Mod 
-PCAAMD64.Mod PCGAMD64.Mod WhitespaceRemover.Mod HostClipboard.Mod Win32.Clipboard.Mod Tar.Mod 
-Zlib.Mod ZlibBuffers.Mod ZlibDeflate.Mod ZlibInflate.Mod ZlibWriters.Mod ZlibReaders.Mod 
-Zip.Mod ZipTool.Mod BIT.Mod PNGDecoder.Mod BMPCodec.Mod GIFCodec.Mod JPEGDecoder.Mod 
-AnimationCodec.Mod PartitionsLib.Mod FATScavenger.Mod Partitions.Mod DiskTests.Mod DiskBenchmark.Mod 
-PartitionEditorTable.Mod Win32.HierarchicalProfiler0.Mod HierarchicalProfiler.Mod FTPClient.Mod XYModem.Mod 
-Shell.Mod ShellSerial.Mod Installer.Mod CryptoBigNumbers.Mod CryptoBase64.Mod CryptoUtils.Mod 
-CryptoCiphers.Mod CryptoARC4.Mod CryptoDES.Mod CryptoDES3.Mod CryptoHashes.Mod CryptoMD5.Mod 
-CryptoSHA1.Mod CryptoSHA256.Mod CryptoKeccakF1600.Mod CryptoKeccakSponge.Mod CryptoSHA3.Mod 
-CryptoCSPRNG.Mod CryptoPrimes.Mod CryptoDSA.Mod CryptoDiffieHellman.Mod CryptoAES.Mod 
-CryptoBlowfish.Mod CryptoTwofish.Mod CryptoCAST.Mod CryptoHMAC.Mod CryptoIDEA.Mod CryptoRSA.Mod 
-Checksum.Mod Fido.Mod I386.CPUID.Mod A2Sequencers.Mod PictImages.Mod V24Tracer.Mod 
-XMLGeneratorSchema.Mod CSS2.Mod CSS2Scanner.Mod CSS2Parser.Mod RAWPrinter.Mod LPR.Mod ASN1.Mod PKCS1.Mod 
-X509.Mod TLS.Mod TCPServices.Mod TestServer.Mod TCPTools.Mod Win32.Performance.Mod Bin2Hex.Mod 
-BinToCode.Mod Base64.Mod DisplayGTF.Mod GZip.Mod ShellCommands.Mod Telnet.Mod Info.Mod TFClasses.Mod 
-Mail.Mod SMTPClient.Mod TFLog.Mod WebHTTP.Mod WebHTTPClient.Mod WebHTTPTools.Mod 
-WebHTTPServer.Mod WebHTTPServerTools.Mod WebSSMPPlugin.Mod WebDefaultSSMP.Mod 
-WebHTTPServerStatistics.Mod POP3Client.Mod RFC865Client.Mod QuoteServer.Mod FTPFS.Mod WebFTPServer.Mod XModem.Mod 
-SearchTools.Mod DiffLib.Mod TextConverter.Mod TaskScheduler.Mod FTP.Mod DES.Mod VNCServer.Mod 
-WAVCodec.Mod MP3Decoder.Mod I386.IDCT.Mod AVI.Mod DivXTypes.Mod I386.DivXHelper.Mod 
-I386.DivXDecoder.Mod MPEGTables.Mod I386.MPEGUtilities.Mod MPEGVideoDecoder.Mod JPEG2000DecoderUtil.Mod 
-JPEG2000DecoderCS.Mod JPEG2000Decoder.Mod MD5.Mod HTTPSupport.Mod HTTPSession.Mod DynamicWebpage.Mod 
-DynamicWebpagePlugin.Mod PrevalenceSystem.Mod WMDropTarget.Mod GenericSort.Mod WebStd.Mod WebComplex.Mod 
-WMCharCodes.Mod HTMLScanner.Mod HTMLParser.Mod NewHTTPClient.Mod UnihanParser.Mod CSV.Mod 
-ColorModels.Mod WMDefaultWindows.Mod WMDefaultFont.Mod WMFontManager.Mod WMOberonFonts.Mod 
-WMCCGFonts.Mod WMBitmapFont.Mod OpenTypeInt.Mod OpenTypeScan.Mod OpenType.Mod OpenTypeFonts.Mod 
-WMOTFonts.Mod WindowManager.Mod  ~
+	Release.Build WinAosG64 ~
+
+	StaticLinker.Link --fileFormat=PE64CUI --fileName=A264.exe --extension=GofWw --displacement=401000H  
+		Runtime Trace Kernel32 
+		Heaps Modules Objects Kernel
+		KernelLog Streams Commands Files WinFS Clock Dates Reals Strings Diagnostics BitSets 
+		StringPool ObjectFile GenericLinker Reflection  GenericLoader Shell  StdIOShell Traps ~
+
+	FSTools.CloseFiles A264.exe  ~
+	~

+ 2 - 2
source/Debugging.Mod

@@ -6,11 +6,11 @@ VAR
 	DefaultLog, Log-: Streams.Writer;  f: Files.File;  lock: Locks.RWLock;
 
 	PROCEDURE Memory*( from, tov: ADDRESS );
-	VAR i: ADDRESS; val: LONGINT;
+	VAR i: ADDRESS; val: SIZE;
 	BEGIN
 		Log.String( ">>>>>" );  Log.Ln;
 		IF from = 0 THEN Log.String( "NIL Region" );  Log.Ln;  ELSE
-			FOR i := from TO tov BY 4 DO
+			FOR i := from TO tov BY SIZEOF(ADDRESS) DO
 				Log.Address( i );  Log.String( "H (" );  Log.Int( i, 0 );
 				Log.String( "," );  Log.Int( i - from, 4 );  Log.String( ") " );
 				SYSTEM.GET( i, val );  Log.Address( val );  Log.String( "H = " );

+ 5 - 5
source/Info.Mod

@@ -72,7 +72,7 @@ TYPE
 		VAR i, j : LONGINT; temp : Type;
 
 			PROCEDURE IsGreaterThan(CONST entry1, entry2 : Type; mode : LONGINT) : BOOLEAN;
-			VAR name1, name2: ARRAY 256 OF CHAR; count1,count2, size1, size2: LONGINT;
+			VAR name1, name2: ARRAY 256 OF CHAR; count1,count2, size1, size2: SIZE;
 			BEGIN
 				IF mode = SortByName THEN
 					GetName(entry1.ptag,name1);
@@ -219,7 +219,7 @@ TYPE
 						Reflection.GetProcedureName(types[i].pc, copy,startpc);
 						Strings.AppendX(string, copy);
 						Strings.Append(string,":");
-						Strings.IntToStr(types[i].pc - startpc, copy);
+						Strings.IntToStr(LONGINT(types[i].pc - startpc), copy);
 						Strings.Append(string,copy);
 					END;
 
@@ -259,9 +259,9 @@ TYPE
 		END ShowBlocks;
 
 		PROCEDURE Show(out : Streams.Writer; CONST mask : ARRAY OF CHAR; sortMode : LONGINT; byPC: BOOLEAN);
-		VAR nofUsedBlocks, sizeUsedBlocks : LONGINT;
+		VAR nofUsedBlocks, sizeUsedBlocks :SIZE;
 
-			PROCEDURE ShowBlock(CONST name : ARRAY OF CHAR; nofBlocks: LONGINT; size: SIZE; totalNofBlocks: LONGINT; totalSize : SIZE; out : Streams.Writer);
+			PROCEDURE ShowBlock(CONST name : ARRAY OF CHAR; nofBlocks: SIZE; size: SIZE; totalNofBlocks: SIZE; totalSize : SIZE; out : Streams.Writer);
 			BEGIN
 				out.Int(nofBlocks, 8); out.Char(" "); ShowPercent(nofBlocks, totalNofBlocks, out); out.Char(" ");
 				out.String(name);
@@ -777,7 +777,7 @@ BEGIN
 	END
 END WriteType;
 
-PROCEDURE GetName(adr: LONGINT; VAR name: ARRAY OF CHAR);
+PROCEDURE GetName(adr: ADDRESS; VAR name: ARRAY OF CHAR);
 VAR  m : Modules.Module;  t : Modules.TypeDesc;
 BEGIN
 	Modules.ThisTypeByAdr(adr, m, t);

+ 36 - 22
source/Release.Tool

@@ -196,12 +196,20 @@ BUILDS
 	}
 	WinAosNewObjectFile
 	{
-		INCLUDE "WIN iWIN WINGEN UNCOOP"
+		INCLUDE "WIN iWIN WINGEN WINGEN32 UNCOOP UNCOOP32"
 		COMPILER "Compiler.Compile"
 		COMPILEOPTIONS "-p=Win32G"
 		EXCLUDEPACKAGES ""
 		DISABLED "FALSE"
 	}
+	WinAosG64
+	{
+		INCLUDE "WIN iWIN WINGEN WINGEN64 UNCOOP UNCOOP64"
+		COMPILER "Compiler.Compile"
+		COMPILEOPTIONS "-p=Win64G"
+		EXCLUDEPACKAGES ""
+		DISABLED "FALSE"
+	}
 	A2_64 {
 		INCLUDE "NATIVE NATIVEORIG AMD64 AMD64ORIG UNCOOP"
 		COMPILER "Compiler.Compile"
@@ -349,7 +357,8 @@ PACKAGE Kernel ARCHIVE "Kernel.zip" SOURCE "KernelSrc.zip" DESCRIPTION "A2 Kerne
 # Active Oberon run-time
 
 	 # Runtime support for HUGEINT and strings
-	UNCOOP { Runtime.Mod }
+	UNCOOP32 { Runtime.Mod }
+	UNCOOP64 { AMD64.Runtime.Mod }
 	I386COOP { I386.CPU.Mod }
 	RPICOOP { RPI.CPU.Mod }
 	ZYNQCOOP { Zynq.CPU.Mod }
@@ -379,12 +388,14 @@ PACKAGE Kernel ARCHIVE "Kernel.zip" SOURCE "KernelSrc.zip" DESCRIPTION "A2 Kerne
 	SOLARIS { Solaris.I386.Unix.Mod }
 	
 	WINORIG { Win32.Kernel32.Mod}
-	WINGEN {Generic.Win32.Kernel32.Mod}
+	WINGEN32 {Generic.Win32.Kernel32.Mod}
+	WINGEN64 {Generic.Win64.Kernel32.Mod}
 
 	I386ORIG { I386.Machine.Mod }
 	I386GEN { Generic.I386.Machine.Mod }
 	AMD64 { AMD64.Machine.Mod }
-	WINORIG, WINGEN {Win32.Machine.Mod }
+	WINORIG, WINGEN32 {Win32.Machine.Mod }
+	WINGEN64 {Win64.Machine.Mod}
 	COOP { Mutexes.Mod }
 	I386COOP { Coop.I386.Machine.Mod }
 	RPICOOP, ZYNQCOOP { Coop.ARM.Machine.Mod }
@@ -401,7 +412,9 @@ PACKAGE Kernel ARCHIVE "Kernel.zip" SOURCE "KernelSrc.zip" DESCRIPTION "A2 Kerne
 	COOP { Coop.Modules.Mod GarbageCollector.Mod }
 
 	NATIVEORIG, NATIVEGEN { Objects.Mod Kernel.Mod }
-	WINORIG, WINGEN { Win32.Objects.Mod Win32.Kernel.Mod }
+	WINORIG, WINGEN32 { Win32.Objects.Mod }
+	WINGEN64 {WIn64.Objects.Mod}
+	WINGEN{Win32.Kernel.Mod}
 	UNIX { Unix.Objects.Mod Unix.Kernel.Mod }
 	UNIXG { Generic.Unix.Objects.Mod Unix.Kernel.Mod }
 	COOP { Coop.Objects.Mod Coop.Kernel.Mod }
@@ -418,8 +431,8 @@ PACKAGE System ARCHIVE "System.zip" SOURCE "SystemSrc.zip" DESCRIPTION "System"
 	Plugins.Mod Streams.Mod Pipes.Mod Commands.Mod
 	In.Mod Out.Mod
 
-	I386, WIN, UNIX32, UNIXG32 { I386.Reals.Mod }
-	AMD64, UNIX64 { AMD64.Reals.Mod }
+	I386, WINORIG, WINGEN32, UNIX32, UNIXG32 { I386.Reals.Mod }
+	AMD64, UNIX64, WINGEN64 { AMD64.Reals.Mod }
 	ARM { ARM.Reals.Mod }
 
 	# default trap handling
@@ -430,7 +443,8 @@ PACKAGE System ARCHIVE "System.zip" SOURCE "SystemSrc.zip" DESCRIPTION "System"
 	NATIVEORIG, NATIVEGEN { Traps.Mod }
 	AMD64 { AMD64.Traps.Mod }
 	ARM { ARM.Traps.Mod }
-	WINORIG, WINGEN {  Win32.Traps.Mod }
+	WINORIG, WINGEN32 {  Win32.Traps.Mod }
+	WINGEN64 {Win64.Traps.Mod}
 	UNIX { Unix.StdIO.Mod Unix.Traps.Mod }
 	UNIXG { Unix.StdIO.Mod Generic.Unix.Traps.Mod }
 	COOP { Coop.Traps.Mod }
@@ -690,13 +704,13 @@ PACKAGE Compiler ARCHIVE "Compiler.zip" SOURCE "CompilerSrc.zip" DESCRIPTION "Ac
 	FoxProfiler.Mod
 
 	# Runtime support for math oberon (Move to runtime package? *)
-	I386, WIN, UNIX32,UNIXG32 { XMM.I386.Math.Mod XMM.I386.MathL.Mod }
+	I386, WINORIG, WINGEN32, UNIX32,UNIXG32 { XMM.I386.Math.Mod XMM.I386.MathL.Mod }
 	#FPU32 { I386.Math.Mod I386.MathL.Mod }
-	AMD64, UNIX64 { XMM.AMD64.Math.Mod XMM.AMD64.MathL.Mod }
+	AMD64, UNIX64, WINGEN64 { XMM.AMD64.Math.Mod XMM.AMD64.MathL.Mod }
 	#FPU64 { AMD64.Math.Mod AMD64.MathL.Mod }
 	ComplexNumbers.Mod
 	FoxArrayBase.Mod
-	I386, WIN, UNIX32,UNIXG32 { I386.FoxArrayBaseOptimized.Mod }
+	I386, WINORIG, WINGEN32, UNIX32,UNIXG32 { I386.FoxArrayBaseOptimized.Mod }
 END
 
 PACKAGE ApplicationsMini ARCHIVE "ApplicationsMini.zip" SOURCE "ApplicationsMiniSrc.zip" DESCRIPTION "Minimal applications set"
@@ -719,8 +733,8 @@ PACKAGE ApplicationsMini ARCHIVE "ApplicationsMini.zip" SOURCE "ApplicationsMini
 		PCITools.Mod pci.ids # Automatic HW detection
 	}
 
-	I386, WIN, UNIX32,UNIXG32 { XMM.I386.Math.Mod XMM.I386.MathL.Mod }
-	AMD64, UNIX64 { XMM.AMD64.Math.Mod XMM.AMD64.MathL.Mod }
+	I386, WINORIG, WINGEN32, UNIX32,UNIXG32 { XMM.I386.Math.Mod XMM.I386.MathL.Mod }
+	AMD64, UNIX64, WINGEN64 { XMM.AMD64.Math.Mod XMM.AMD64.MathL.Mod }
 	#FPU32 { I386.Math.Mod I386.MathL.Mod }
 	#FPU64 { AMD64.Math.Mod AMD64.MathL.Mod }
 
@@ -735,8 +749,8 @@ PACKAGE ApplicationsMini ARCHIVE "ApplicationsMini.zip" SOURCE "ApplicationsMini
 	CLUTs.Mod AosDefault.Pal
 
 	# raster images (eos)
-	I386, WIN, UNIX32,UNIXG32 { I386.Raster.Mod }
-	AMD64, UNIX64 { AMD64.Raster.Mod }
+	I386, WINORIG, WINGEN32, UNIX32,UNIXG32 { I386.Raster.Mod }
+	AMD64, UNIX64, WINGEN64 { AMD64.Raster.Mod }
 
 	Localization.Mod
 	Archives.Mod
@@ -768,8 +782,8 @@ PACKAGE ApplicationsMini ARCHIVE "ApplicationsMini.zip" SOURCE "ApplicationsMini
 	UnicodeBidirectionality.Mod
 
 	# Move to graphical package!!
-	I386, WIN, UNIX32,UNIXG32 { I386.WMRasterScale.Mod }
-	AMD64, UNIX64 { AMD64.WMRasterScale.Mod }
+	I386, WINORIG, WINGEN32, UNIX32,UNIXG32 { I386.WMRasterScale.Mod }
+	AMD64, UNIX64, WINGEN64 { AMD64.WMRasterScale.Mod }
 
 	WMGraphics.Mod
 	WMGraphicsSmooth.Mod
@@ -798,7 +812,7 @@ PACKAGE ApplicationsMini ARCHIVE "ApplicationsMini.zip" SOURCE "ApplicationsMini
 	PCDebug.Mod PCM.Mod PCS.Mod PCT.Mod PCBT.Mod 	# prk
 	PCLIR.Mod PCO.Mod PCG386.Mod PCC.Mod PCV.Mod PCArrays.Mod
 	PCB.Mod PCP.Mod PCA386.Mod PCOM.Mod PCOF.Mod PCOFPE.Mod PC.Mod
-	I386,WIN { ArrayBase.Mod I386.ArrayBaseOptimized.Mod }
+	I386,WINORIG,WINGEN32 { ArrayBase.Mod I386.ArrayBaseOptimized.Mod }
 	PCOARM.Mod PCARMCP.Mod PCARMRegisters.Mod	# ARM Backend (be)
 	PCAARM.Mod PCGARM.Mod
 	ASMAMD64.Mod PCAAMD64.Mod PCGAMD64.Mod	# AMD64 Backend
@@ -866,8 +880,8 @@ PACKAGE Applications ARCHIVE "Applications.zip" SOURCE "ApplicationsSrc.zip" DES
 
 	Fido.Mod
 
-	I386, WIN, UNIX32,UNIXG32 { I386.CPUID.Mod }
-	AMD64, UNIX64 { AMD64.CPUID.Mod }
+	I386, WINORIG, WINGEN32, UNIX32,UNIXG32 { I386.CPUID.Mod }
+	AMD64, UNIX64, WINGEN64 { AMD64.CPUID.Mod }
 
 	A2Sequencers.Mod
 
@@ -1246,8 +1260,8 @@ PACKAGE GuiApplications ARCHIVE "GuiApplications.zip" SOURCE "GuiApplicationsSrc
 		TVRemoteControl.Mod TV.Tool
 	}
 
-	I386, WIN, UNIX32,UNIXG32 { I386.WMTransitions.Mod }
-	AMD64, UNIX64 { AMD64.WMTransitions.Mod }
+	I386, WINORIG, WINGEN32, UNIX32,UNIXG32 { I386.WMTransitions.Mod }
+	AMD64, UNIX64, WINGEN64 { AMD64.WMTransitions.Mod }
 	MediaPlayer.Mod Presentation.Mod
 	MP3Player.Mod WMPlayer.Mod
 	WAVRecorder.Mod

+ 180 - 180
source/Win32.ODBC.Mod

@@ -24,17 +24,17 @@ CONST
 TYPE
 	HENV = POINTER TO HENVDesc;
 	HENVDesc = RECORD
-			henv: LONGINT
+			henv: Kernel32.HANDLE;
 		END;
 
 	HDBC* = POINTER TO HDBCDesc;
 	HDBCDesc* = RECORD
-			hdbc: LONGINT
+			hdbc: Kernel32.HANDLE;
 		END;
 
 	HSTMT* = POINTER TO HSTMTDesc;
 	HSTMTDesc* = RECORD
-			hstmt: LONGINT
+			hstmt: Kernel32.HANDLE;
 		END;
 
 (*
@@ -44,7 +44,7 @@ TYPE
 *)
 
 VAR
-	lib: LONGINT;
+	lib: ADDRESS;
 	env: HENV;
 
 	res1*: INTEGER;
@@ -53,390 +53,390 @@ VAR
 (*	Core Functions Prototypes	*)
 
 	SQLAllocConnect: PROCEDURE {WINAPI} (
-		henv: LONGINT;
-		hdbc: LONGINT): INTEGER;
+		henv: Kernel32.HANDLE;
+		hdbc: ADDRESS): INTEGER;
 
 	SQLAllocEnv: PROCEDURE {WINAPI} (
-		henv: LONGINT): INTEGER;
+		henv: Kernel32.HANDLE): INTEGER;
 
 	SQLAllocStmt: PROCEDURE {WINAPI} (
-		hdbc: LONGINT;
-		hstmt: LONGINT): INTEGER;
+		hdbc: ADDRESS;
+		hstmt: Kernel32.HANDLE): INTEGER;
 
 	SQLBindCol: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: ADDRESS;
 		icol: INTEGER;
 		fcType: INTEGER;
-		rgbValue: LONGINT;
+		rgbValue: ADDRESS;
 		cbValueMax: LONGINT;
-		pcbValue: LONGINT): INTEGER;
+		pcbValue: ADDRESS): INTEGER;
 
 	SQLCancel: PROCEDURE {WINAPI} (
-		hstmt: LONGINT): INTEGER;
+		hstmt: ADDRESS): INTEGER;
 
 	SQLColAttributes: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: ADDRESS;
 		icol: INTEGER;
 		fDescType: INTEGER;
-		rgbDesc: LONGINT;
+		rgbDesc: ADDRESS;
 		cbDescMax: INTEGER;
-		pcbDesc: LONGINT;
-		pfDesc: LONGINT): INTEGER;
+		pcbDesc: ADDRESS;
+		pfDesc: ADDRESS): INTEGER;
 
 	SQLConnect: PROCEDURE {WINAPI} (
-		hdbc: LONGINT;
-		DSN: LONGINT;
+		hdbc: ADDRESS;
+		DSN: ADDRESS;
 		DSNMax: INTEGER;
-		UID: LONGINT;
+		UID: ADDRESS;
 		UIDMax: INTEGER;
-		AuthStr: LONGINT;
+		AuthStr: ADDRESS;
 		AuthStrMax: INTEGER): INTEGER;
 
 	SQLDescribeCol: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: ADDRESS;
 		icol: INTEGER;
-		szColName: LONGINT;
+		szColName: ADDRESS;
 		cbColNameMax: INTEGER;
-		pcbColName: LONGINT;
-		pfSqlType: LONGINT;
-		pcbColDef: LONGINT;
-		pibScale: LONGINT;
-		pfNullable: LONGINT): INTEGER;
+		pcbColName: ADDRESS;
+		pfSqlType: ADDRESS;
+		pcbColDef: ADDRESS;
+		pibScale: ADDRESS;
+		pfNullable: ADDRESS): INTEGER;
 
 	SQLDisconnect: PROCEDURE {WINAPI} (
-		hdbc: LONGINT): INTEGER;
+		hdbc: Kernel32.HANDLE): INTEGER;
 
 	SQLError: PROCEDURE {WINAPI} (
-		henv: LONGINT;
-		hdbc: LONGINT;
-		hstmt: LONGINT;
-		szSqlState: LONGINT;
-		pfNativeError: LONGINT;
-		szErrorMessage: LONGINT;
+		henv: ADDRESS;
+		hdbc: Kernel32.HANDLE;
+		hstmt: Kernel32.HANDLE;
+		szSqlState: ADDRESS;
+		pfNativeError: ADDRESS;
+		szErrorMessage: ADDRESS;
 		cbErrorMessage: INTEGER;
-		pcbErrorMessage: LONGINT): INTEGER;
+		pcbErrorMessage: ADDRESS): INTEGER;
 
 	SQLExecDirect: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		szSqlStr: LONGINT;
+		hstmt: Kernel32.HANDLE;
+		szSqlStr: ADDRESS;
 		cbSqlStr: INTEGER): INTEGER;
 
 	SQLExecute: PROCEDURE {WINAPI} (
-		hstmt: LONGINT): INTEGER;
+		hstmt: Kernel32.HANDLE): INTEGER;
 
 	SQLFetch: PROCEDURE {WINAPI} (
-		hstmt: LONGINT): INTEGER;
+		hstmt: Kernel32.HANDLE): INTEGER;
 
 	SQLFreeConnect: PROCEDURE {WINAPI} (
-		hdbc: LONGINT): INTEGER;
+		hdbc: Kernel32.HANDLE): INTEGER;
 
 	SQLFreeEnv: PROCEDURE {WINAPI} (
-		henv: LONGINT): INTEGER;
+		henv: ADDRESS): INTEGER;
 
 	SQLFreeStmt: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: Kernel32.HANDLE;
 		fOption: INTEGER): INTEGER;
 
 	SQLGetCursorName: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		szCursor: LONGINT;
+		hstmt: Kernel32.HANDLE;
+		szCursor: ADDRESS;
 		cbCursorMax: INTEGER;
-		pcbCursor: LONGINT): INTEGER;
+		pcbCursor: ADDRESS): INTEGER;
 
 	SQLNumResultCols: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		pccol: LONGINT): INTEGER;
+		hstmt: Kernel32.HANDLE;
+		pccol: ADDRESS): INTEGER;
 
 	SQLPrepare: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		szSqlStr: LONGINT;
-		cbSqlStr: LONGINT): INTEGER;
+		hstmt: Kernel32.HANDLE;
+		szSqlStr: ADDRESS;
+		cbSqlStr: ADDRESS): INTEGER;
 
 	SQLRowCount: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		pcrow: LONGINT): INTEGER;
+		hstmt: Kernel32.HANDLE;
+		pcrow: ADDRESS): INTEGER;
 
 	SQLSetCursorName: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		szCursor: LONGINT;
+		hstmt: Kernel32.HANDLE;
+		szCursor: ADDRESS;
 		cbCursor: INTEGER): INTEGER;
 
 	SQLTransact: PROCEDURE {WINAPI} (
-		henv: LONGINT;
-		hdbc: LONGINT;
+		henv: ADDRESS;
+		hdbc: Kernel32.HANDLE;
 		fType: INTEGER): INTEGER;
 
 (*	Level 1 Functions	*)
 
 	SQLColumns: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		tableQualifier: LONGINT;
+		hstmt: Kernel32.HANDLE;
+		tableQualifier: ADDRESS;
 		qualLen: INTEGER;
-		tableOwner: LONGINT;
+		tableOwner: ADDRESS;
 		ownerLen: INTEGER;
-		tableName: LONGINT;
+		tableName: ADDRESS;
 		nameLen: INTEGER;
-		columnName: LONGINT;
+		columnName: ADDRESS;
 		colNameLen: INTEGER): INTEGER;
 
 	SQLDriverConnect: PROCEDURE {WINAPI} (
-		hdbc: LONGINT;
-		hwnd: LONGINT;
-		connStrIn: LONGINT;
+		hdbc: Kernel32.HANDLE;
+		hwnd: ADDRESS;
+		connStrIn: ADDRESS;
 		connStrInLen: INTEGER;
-		connStrOut: LONGINT;
+		connStrOut: ADDRESS;
 		connStrOutMaxSize: INTEGER;
-		connStrOutActSize: LONGINT;	(* address of integer containig result len *)
+		connStrOutActSize: ADDRESS;	(* address of integer containig result len *)
 		driverCompletion: INTEGER): INTEGER;
 
 	SQLGetConnectOption: PROCEDURE {WINAPI} (
-		hdbc: LONGINT;
+		hdbc: Kernel32.HANDLE;
 		whatOption: INTEGER;
-		option: LONGINT): INTEGER;
+		option: ADDRESS): INTEGER;
 
 	SQLGetData: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: Kernel32.HANDLE;
 		col: INTEGER;
 		resType: INTEGER;
-		resValue: LONGINT;
+		resValue: ADDRESS;
 		resMaxSize: LONGINT;
-		resActSize: LONGINT): INTEGER;	(* address of longint containing result len *)
+		resActSize: ADDRESS): INTEGER;	(* address of longint containing result len *)
 
 	SQLGetFunctions: PROCEDURE {WINAPI} (
-		hdbc: LONGINT;
+		hdbc: Kernel32.HANDLE;
 		whichFunction: INTEGER;
-		functExists: LONGINT): INTEGER;
+		functExists: ADDRESS): INTEGER;
 
 	SQLGetInfo: PROCEDURE {WINAPI} (
-		hdbc: LONGINT;
+		hdbc: Kernel32.HANDLE;
 		infoType: INTEGER;
-		resInfo: LONGINT;
+		resInfo: ADDRESS;
 		resInfoMaxSize: INTEGER;
-		resInfoActSize: LONGINT): INTEGER;	(* address of integer containing result len *)
+		resInfoActSize: ADDRESS): INTEGER;	(* address of integer containing result len *)
 
 	SQLGetStmtOption: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: Kernel32.HANDLE;
 		whichOption: INTEGER;
-		option: LONGINT): INTEGER;
+		option: ADDRESS): INTEGER;
 
 	SQLGetTypeInfo: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: Kernel32.HANDLE;
 		whichType: INTEGER): INTEGER;
 
 	SQLParamData: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		dataAdr: LONGINT): INTEGER;
+		hstmt: Kernel32.HANDLE;
+		dataAdr: ADDRESS): INTEGER;
 
 	SQLPutData: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		dataAdr: LONGINT;
+		hstmt: Kernel32.HANDLE;
+		dataAdr: ADDRESS;
 		dataSize: LONGINT): INTEGER;
 
 	SQLSetConnectOption: PROCEDURE {WINAPI} (
-		hdbc: LONGINT;
+		hdbc: Kernel32.HANDLE;
 		whichOption: INTEGER;
-		option: LONGINT): INTEGER;
+		option: ADDRESS): INTEGER;
 
 	SQLSetStmtOption: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: Kernel32.HANDLE;
 		whichOption: INTEGER;
-		option: LONGINT): INTEGER;
+		option: ADDRESS): INTEGER;
 
 	SQLSpecialColumns: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: Kernel32.HANDLE;
 		whichColType: INTEGER;
-		tableQualifier: LONGINT;
+		tableQualifier: ADDRESS;
 		tabelQualifierLen: INTEGER;
-		tableOwner: LONGINT;
+		tableOwner: ADDRESS;
 		tableOwnerLen: INTEGER;
-		tableName: LONGINT;
+		tableName: ADDRESS;
 		tableNameLen: INTEGER;
 		scope: INTEGER;
 		nullableCols: INTEGER): INTEGER;
 
 	SQLStatistics: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		tableQualifier: LONGINT;
+		hstmt: Kernel32.HANDLE;
+		tableQualifier: ADDRESS;
 		tableQualifierLen: INTEGER;
-		tableOwner: LONGINT;
+		tableOwner: ADDRESS;
 		tableOwnerLen: INTEGER;
-		tableName: LONGINT;
+		tableName: ADDRESS;
 		tableNameLen: INTEGER;
 		indexType: INTEGER;
 		accuracy: INTEGER): INTEGER;
 
 	SQLTables: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		tableQualifier: LONGINT;
+		hstmt: Kernel32.HANDLE;
+		tableQualifier: ADDRESS;
 		tableQualifierLen: INTEGER;
-		tableOwner: LONGINT;
+		tableOwner: ADDRESS;
 		tableOwnerLen: INTEGER;
-		tableName: LONGINT;
+		tableName: ADDRESS;
 		tableNameLen: INTEGER;
-		tableType: LONGINT;
+		tableType: ADDRESS;
 		tableTypeLen: INTEGER): INTEGER;
 
 (*	Level 2 Functions	*)
 
 	SQLBrowseConnect: PROCEDURE {WINAPI} (
-		hdbc: LONGINT;
-		connStrIn: LONGINT;
+		hdbc: ADDRESS;
+		connStrIn: ADDRESS;
 		connStrInLen: INTEGER;
-		connStrOut: LONGINT;
+		connStrOut: ADDRESS;
 		connStrOutMaxLen: INTEGER;
-		connStrOutActLen: LONGINT): INTEGER;	(* address of integer *)
+		connStrOutActLen: ADDRESS): INTEGER;	(* address of integer *)
 
 	SQLColumnPrivileges: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		tableQualifier: LONGINT;
+		hstmt: ADDRESS;
+		tableQualifier: ADDRESS;
 		tableQualifierLen: INTEGER;
-		tableOwner: LONGINT;
+		tableOwner: ADDRESS;
 		tableOwnerLen: INTEGER;
-		tableName: LONGINT;
+		tableName: ADDRESS;
 		tableNameLen: INTEGER;
-		columnName: LONGINT;
+		columnName: ADDRESS;
 		columnNameLen: INTEGER): INTEGER;
 
 	SQLDataSources: PROCEDURE {WINAPI} (
-		henv: LONGINT;
+		henv: ADDRESS;
 		direction: INTEGER;
-		dataSourceName: LONGINT;
+		dataSourceName: ADDRESS;
 		dataSourceNameMaxLen: INTEGER;
-		dataSourceNameActLen: LONGINT;	(* address of integer *)
-		description: LONGINT;
+		dataSourceNameActLen: ADDRESS;	(* address of integer *)
+		description: ADDRESS;
 		descriptionMaxLen: INTEGER;
-		descriptionActLen: LONGINT): INTEGER;	(* address of integer *)
+		descriptionActLen: ADDRESS): INTEGER;	(* address of integer *)
 
 	SQLDescribeParam: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: Kernel32.HANDLE;
 		par: INTEGER;
-		sqlType: LONGINT;	(* address of integer *)
-		colPrecision: LONGINT;	(* address of longint *)
-		colScale: LONGINT;	(* address of integer *)
-		colNullable: LONGINT): INTEGER;	(* address of integer *)
+		sqlType: ADDRESS;	(* address of integer *)
+		colPrecision: ADDRESS;	(* address of longint *)
+		colScale: ADDRESS;	(* address of integer *)
+		colNullable: ADDRESS): INTEGER;	(* address of integer *)
 
 	SQLExtendedFetch: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: Kernel32.HANDLE;
 		fetchType: INTEGER;
 		rowToFetch: LONGINT;
-		numFetchedRows: LONGINT;	(* address of longint *)
-		rowStatus: LONGINT): INTEGER;	(* address of array of integer *)
+		numFetchedRows: ADDRESS;	(* address of longint *)
+		rowStatus: ADDRESS): INTEGER;	(* address of array of integer *)
 
 	SQLForeignKeys: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		primKeyTabQualifier: LONGINT;
+		hstmt: Kernel32.HANDLE;
+		primKeyTabQualifier: ADDRESS;
 		primKeyTabQualifierLen: INTEGER;
-		primKeyTabOwner: LONGINT;
+		primKeyTabOwner: ADDRESS;
 		primKeyTabOwnerLen: INTEGER;
-		primKeyTabName: LONGINT;
+		primKeyTabName: ADDRESS;
 		primKeyTabNameLen: INTEGER;
-		forKeyTabQualifier: LONGINT;
+		forKeyTabQualifier: ADDRESS;
 		forKeyTabQualifierLen: INTEGER;
-		forKeyTabOwner: LONGINT;
+		forKeyTabOwner: ADDRESS;
 		forKeyTabOwnerLen: INTEGER;
-		forKeyTabName: LONGINT;
+		forKeyTabName: ADDRESS;
 		forKeyTabNameLen: INTEGER): INTEGER;
 
 	SQLMoreResults: PROCEDURE {WINAPI} (
-		hstmt: LONGINT): INTEGER;
+		hstmt: Kernel32.HANDLE): INTEGER;
 
 	SQLNativeSql: PROCEDURE {WINAPI} (
-		hdbc: LONGINT;
-		sqlStrIn: LONGINT;
+		hdbc: Kernel32.HANDLE;
+		sqlStrIn: ADDRESS;
 		sqlStrInLen: LONGINT;
-		sqlStrOut: LONGINT;
+		sqlStrOut: ADDRESS;
 		sqlStrOutMaxLen: LONGINT;
-		sqlStrOutActLen: LONGINT): INTEGER;	(* address of longint *)
+		sqlStrOutActLen: ADDRESS): INTEGER;	(* address of longint *)
 
 	SQLNumParams: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		numParams: LONGINT): INTEGER;	(* address of integer *)
+		hstmt: Kernel32.HANDLE;
+		numParams: ADDRESS): INTEGER;	(* address of integer *)
 
 	SQLParamOptions: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: Kernel32.HANDLE;
 		numRows: LONGINT;
-		curRow: LONGINT): INTEGER;	(* address of longint *)
+		curRow: ADDRESS): INTEGER;	(* address of longint *)
 
 	SQLPrimaryKeys: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		tableQualifier: LONGINT;
+		hstmt: Kernel32.HANDLE;
+		tableQualifier: ADDRESS;
 		tableQualifierLen: INTEGER;
-		tableOwner: LONGINT;
+		tableOwner: ADDRESS;
 		tableOwnerLen: INTEGER;
-		tableName: LONGINT;
+		tableName: ADDRESS;
 		tableNameLen: INTEGER): INTEGER;
 
 	SQLProcedureColumns: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		procQualifier: LONGINT;
+		hstmt: Kernel32.HANDLE;
+		procQualifier: ADDRESS;
 		procQualifierLen: INTEGER;
-		procOwner: LONGINT;
+		procOwner: ADDRESS;
 		procOwnerLen: INTEGER;
-		procName: LONGINT;
+		procName: ADDRESS;
 		procNameLen: INTEGER;
-		columnName: LONGINT;
+		columnName: ADDRESS;
 		columnNameLen: INTEGER): INTEGER;
 
 	SQLProcedures: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		procQualifier: LONGINT;
+		hstmt: Kernel32.HANDLE;
+		procQualifier: ADDRESS;
 		procQualifierLen: INTEGER;
-		procOwner: LONGINT;
+		procOwner: ADDRESS;
 		procOwnerLen: INTEGER;
-		procName: LONGINT;
+		procName: ADDRESS;
 		procNameLen: INTEGER): INTEGER;
 
 	SQLSetPos: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: Kernel32.HANDLE;
 		row: INTEGER;
 		op: INTEGER;
 		lock: INTEGER): INTEGER;
 
 	SQLTablePrivileges: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
-		tableQualifier: LONGINT;
+		hstmt: Kernel32.HANDLE;
+		tableQualifier: ADDRESS;
 		tableQualifierLen: INTEGER;
-		tableOwner: LONGINT;
+		tableOwner: ADDRESS;
 		tableOwnerLen: INTEGER;
-		tableName: LONGINT;
+		tableName: ADDRESS;
 		tableNameLen: INTEGER): INTEGER;
 
 	SQLDrivers: PROCEDURE {WINAPI} (
-		henv: LONGINT;
+		henv: ADDRESS;
 		direction: INTEGER;
-		driverDesc: LONGINT;
+		driverDesc: ADDRESS;
 		driverDescMaxLen: INTEGER;
-		driverDescActLen: LONGINT;	(* address of integer *)
-		driverAttributes: LONGINT;
+		driverDescActLen: ADDRESS;	(* address of integer *)
+		driverAttributes: ADDRESS;
 		driverAttributesMaxLen: INTEGER;
-		driverAttributesActLen: LONGINT): INTEGER;	(* address of integer *)
+		driverAttributesActLen: ADDRESS): INTEGER;	(* address of integer *)
 
 	SQLBindParameter: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: ADDRESS;
 		parNum: INTEGER;
 		paramType: INTEGER;
 		cType: INTEGER;
 		sqlType: INTEGER;
 		colPrec: LONGINT;
 		colScale: INTEGER;
-		inOutBuff: LONGINT;
+		inOutBuff: ADDRESS;
 		inOutBuffMaxLen: LONGINT;
-		inOutBuffActLen: LONGINT): INTEGER;	(* address of longint *)
+		inOutBuffActLen: ADDRESS): INTEGER;	(* address of longint *)
 
 	(* Level 3 functions *)
 	SQLFetchScroll: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: ADDRESS;
 		fetchorientation: INTEGER;
 		fetchoffset: LONGINT): INTEGER;
 
 	SQLSetStmtAttr: PROCEDURE {WINAPI} (
-		hstmt: LONGINT;
+		hstmt: ADDRESS;
 		attribute: LONGINT;
 		value: LONGINT;
 		stringlength: LONGINT): INTEGER;
 
 	SQLSetConnectAttr: PROCEDURE {WINAPI} (
-		hdbc: LONGINT;
+		hdbc: ADDRESS;
 		attribute: LONGINT;
 		valuePtr: LONGINT;
 		stringLength: LONGINT): INTEGER;
@@ -479,7 +479,7 @@ BEGIN
 	res:= SQLCancel(hstmt.hstmt);
 END Cancel;
 
-PROCEDURE ColAttributes*(hstmt: HSTMT; col, fDescType: INTEGER; VAR rgbDesc: ARRAY OF CHAR; VAR pfDesc: LONGINT;
+PROCEDURE ColAttributes*(hstmt: HSTMT; col, fDescType: INTEGER; VAR rgbDesc: ARRAY OF CHAR; VAR pfDesc: ADDRESS;
 VAR res: INTEGER);
 	VAR DescLen: INTEGER;
 BEGIN
@@ -599,7 +599,7 @@ END Rollback;
 (*	-------------------------- interface to level 1 functions --------------------------	*)
 
 PROCEDURE Columns*(hstmt: HSTMT; tabQualifier, tabOwner, tabName, colName: ARRAY OF CHAR; VAR res: INTEGER): INTEGER;
-	VAR qualAdr, ownAdr, nameAdr, colAdr: LONGINT; qualLen, ownLen, nameLen, colLen: INTEGER;
+	VAR qualAdr, ownAdr, nameAdr, colAdr: ADDRESS; qualLen, ownLen, nameLen, colLen: INTEGER;
 BEGIN
 	(* should be possible to pass NIL for the 4 arrays *)
 	IF (LEN(tabQualifier) = 1) & (tabQualifier[0] = 1X) THEN qualAdr:= 0; qualLen:= 0
@@ -678,7 +678,7 @@ END SetStmtOption;
 
 PROCEDURE SpecialColumns*(hstmt: HSTMT; colType: INTEGER; tabQualifier, tabOwner, tabName: ARRAY OF CHAR;
 scope: INTEGER; nullables: BOOLEAN; VAR res: INTEGER);
-	VAR nulls: INTEGER; qualAdr, ownAdr, nameAdr: LONGINT; qualLen, ownLen, nameLen: INTEGER;
+	VAR nulls: INTEGER; qualAdr, ownAdr, nameAdr: ADDRESS; qualLen, ownLen, nameLen: INTEGER;
 BEGIN
 	IF nullables THEN nulls:= 1 ELSE nulls:= 0 END;
 	(* should be possible to pass NIL for the 3 arrays *)
@@ -694,7 +694,7 @@ END SpecialColumns;
 
 PROCEDURE  Statistics*(hstmt: HSTMT; tabQualifier, tabOwner, tabName: ARRAY OF CHAR; uniqueIndexes,
 accurate: BOOLEAN; VAR res: INTEGER);
-	VAR indexType, accuracy: INTEGER; qualAdr, ownAdr, nameAdr: LONGINT; qualLen, ownLen, nameLen: INTEGER;
+	VAR indexType, accuracy: INTEGER; qualAdr, ownAdr, nameAdr: ADDRESS; qualLen, ownLen, nameLen: INTEGER;
 BEGIN
 	IF uniqueIndexes THEN indexType:= 0 ELSE indexType:= 1 END;
 	IF accurate THEN accuracy:= 1 ELSE accuracy:= 0 END;
@@ -710,7 +710,7 @@ BEGIN
 END Statistics;
 
 PROCEDURE Tables*(hstmt: HSTMT; tabQualifier, tabOwner, tabName, tabType: ARRAY OF CHAR; VAR res: INTEGER);
-	VAR qualAdr, ownAdr, nameAdr, typeAdr: LONGINT; qualLen, ownLen, nameLen, typeLen: INTEGER;
+	VAR qualAdr, ownAdr, nameAdr, typeAdr: ADDRESS; qualLen, ownLen, nameLen, typeLen: INTEGER;
 BEGIN
 	(* should be possible to pass NIL for the 4 tab... arrays *)
 	IF (LEN(tabQualifier) = 1) & (tabQualifier[0] = 1X) THEN qualAdr:= 0; qualLen:= 0
@@ -734,7 +734,7 @@ BEGIN
 END BrowseConnect;
 
 PROCEDURE ColumnPrivileges*(hstmt: HSTMT; tabQualifier, tabOwner, tabName, colName: ARRAY OF CHAR; VAR res: INTEGER);
-	VAR qualAdr, ownAdr, nameAdr, colAdr: LONGINT; qualLen, ownLen, nameLen, colLen: INTEGER;
+	VAR qualAdr, ownAdr, nameAdr, colAdr: ADDRESS; qualLen, ownLen, nameLen, colLen: INTEGER;
 BEGIN
 	(* should be possible to pass NIL for the 4 arrays *)
 	IF (LEN(tabQualifier) = 1) & (tabQualifier[0] = 1X) THEN qualAdr:= 0; qualLen:= 0
@@ -779,8 +779,8 @@ END SetStmtAttr;
 
 PROCEDURE ForeignKeys*(hstmt: HSTMT; primKeyTabQualifier, primKeyTabOwner, primKeyTabName, forKeyTabQualifier,
 forKeyTabOwner, forKeyTabName: ARRAY OF CHAR; VAR res: INTEGER);
-	VAR pQualAdr, pOwnAdr, pNameAdr: LONGINT; pQualLen, pOwnLen, pNameLen: INTEGER;
-		fQualAdr, fOwnAdr, fNameAdr: LONGINT; fQualLen, fOwnLen, fNameLen: INTEGER;
+	VAR pQualAdr, pOwnAdr, pNameAdr: ADDRESS; pQualLen, pOwnLen, pNameLen: INTEGER;
+		fQualAdr, fOwnAdr, fNameAdr: ADDRESS; fQualLen, fOwnLen, fNameLen: INTEGER;
 BEGIN
 	(* should be possible to pass NIL for the 6 arrays *)
 	IF (LEN(primKeyTabQualifier) = 1) & (primKeyTabQualifier[0] = 1X) THEN pQualAdr:= 0; pQualLen:= 0
@@ -827,7 +827,7 @@ BEGIN
 END ParamOptions;
 
 PROCEDURE PrimaryKeys*(hstmt: HSTMT; tabQualifier, tabOwner, tabName: ARRAY OF CHAR; VAR res: INTEGER);
-	VAR qualAdr, ownAdr, nameAdr: LONGINT; qualLen, ownLen, nameLen: INTEGER;
+	VAR qualAdr, ownAdr, nameAdr: ADDRESS; qualLen, ownLen, nameLen: INTEGER;
 BEGIN
 	(* should be possible to pass NIL for the 3 arrays *)
 	IF (LEN(tabQualifier) = 1) & (tabQualifier[0] = 1X) THEN qualAdr:= 0; qualLen:= 0
@@ -841,7 +841,7 @@ BEGIN
 END PrimaryKeys;
 
 PROCEDURE ProcedureColumns*(hstmt: HSTMT; procQualifier, procOwner, procName, colName: ARRAY OF CHAR; VAR res: INTEGER);
-	VAR qualAdr, ownAdr, nameAdr, colAdr: LONGINT; qualLen, ownLen, nameLen, colLen: INTEGER;
+	VAR qualAdr, ownAdr, nameAdr, colAdr: ADDRESS; qualLen, ownLen, nameLen, colLen: INTEGER;
 BEGIN
 	(* should be possible to pass NIL for the 4 arrays *)
 	IF (LEN(procQualifier) = 1) & (procQualifier[0] = 1X) THEN qualAdr:= 0; qualLen:= 0
@@ -857,7 +857,7 @@ BEGIN
 END ProcedureColumns;
 
 PROCEDURE Procedures*(hstmt: HSTMT; procQualifier, procOwner, procName: ARRAY OF CHAR; VAR res: INTEGER);
-	VAR qualAdr, ownAdr, nameAdr: LONGINT; qualLen, ownLen, nameLen: INTEGER;
+	VAR qualAdr, ownAdr, nameAdr: ADDRESS; qualLen, ownLen, nameLen: INTEGER;
 BEGIN
 	(* should be possible to pass NIL for the 3 arrays *)
 	IF (LEN(procQualifier) = 1) & (procQualifier[0] = 1X) THEN qualAdr:= 0; qualLen:= 0
@@ -876,7 +876,7 @@ BEGIN
 END SetPos;
 
 PROCEDURE TablePrivileges*(hstmt: HSTMT; tabQualifier, tabOwner, tabName: ARRAY OF CHAR; VAR res: INTEGER);
-	VAR qualAdr, ownAdr, nameAdr: LONGINT; qualLen, ownLen, nameLen: INTEGER;
+	VAR qualAdr, ownAdr, nameAdr: ADDRESS; qualLen, ownLen, nameLen: INTEGER;
 BEGIN
 	(* should be possible to pass NIL for the 3 arrays *)
 	IF (LEN(tabQualifier) = 1) & (tabQualifier[0] = 1X) THEN qualAdr:= 0; qualLen:= 0

+ 1 - 1
source/Win64.Machine.Mod

@@ -45,7 +45,7 @@ CONST
 	EndBlockOfs = 38H;	(* cf. Linker0 *)
 	MemoryBlockOfs = BlockHeaderSize + RecordDescSize + BlockHeaderSize; (* memory block (including header) starts at offset HeaderSize *)
 
-	MemBlockSize = 32*1024*1024; (* must be multiple of StaticBlockSize *)
+	MemBlockSize = 128*1024*1024; (* must be multiple of StaticBlockSize *)
 	MinMemBlockSize = 4*1024*1024;
 
 	NilVal = 0;