a-conjecture-of-mine

An exercise on polyglossy: the same problem solved on multiple languages

Commit
91b1955d7fe4b10952f571b5b58b6153471ce1dc
Parent
0c1f58d744e493a5a9519edd4620b53942883745
Author
Gark Garcia <37553739+GarkGarcia@users.noreply.github.com>
Date

Merge branch 'master' of https://github.com/GarkGarcia/A-Conjecture-of-Mine

Diffstat

1 file changed, 13 insertions, 0 deletions

Status File Name N° Changes Insertions Deletions
Modified hla/conjecture.hla 13 13 0
diff --git a/hla/conjecture.hla b/hla/conjecture.hla
@@ -1,6 +1,7 @@
 program conjecture;
 
 	#includeonce( "stdlib.hhf" )
+	#includeonce( "w32\win32.hhf")
 	
 	?@nodisplay := true;
 	?@noalignstack := true;
@@ -16,6 +17,8 @@ storage
 	sumAB		:uns32;
 	sumA		:uns32;
 	sumB		:uns32;
+	timeStart	:dword;
+	timeEnd		:dword;
 	
 static
 	err			:boolean := false;
@@ -59,7 +62,10 @@ begin conjecture;
 	endfor;
 	
 	
+	
 	stdout.put ("Loading ..." nl );
+	w.GetTickCount();
+	mov( eax, timeStart );
 	
 	for( xor(esi, esi); esi <= max; inc( esi ) ) do
 		
@@ -110,7 +116,14 @@ begin conjecture;
 	// if we get here, we looped through all the values and the
 	// conjecture is proved.
 	if( !err ) then
+		
+		w.GetTickCount();
+		mov( eax, timeEnd );
+		mov( timeEnd, eax );
+		sub( timeStart, eax );
+		stdout.put("Loaded in : ", (type uns32 eax), "ms,  [1 Thread, no preprocessing]", nl);		
 		stdout.put ("The conjecture is proved for all natural numbers smaller or equals to ", max, "!", nl );
+
 	endif;
 
 end conjecture;