Category : Pascal Source Code
Archive   : CMPLTPAS.ZIP
Filename : FASTINX.PAS

 
Output of file : FASTINX.PAS contained in archive : CMPLTPAS.ZIP
PROGRAM FastIncrement;

USES Crt;

TYPE
IntArray = ARRAY[0..16000] OF Integer;

VAR
I : Integer;
Scores : IntArray;


PROCEDURE Increment(VAR Scores : IntArray;
ByHowMuch : Integer);

BEGIN
INLINE($C4/$BE/Scores/ {LES DI,[BP+]}
$B9/$80/$3E/ {MOV CX,16000}
$8B/$9E/ByHowMuch/ {MOV BX,ByHowMuch}
$26/$01/$1D/ {ADD ES:[DI],BX}
$47/ {INC DI}
$47/ {INC DI}
$E2/$FA); {LOOP -6}

END;


BEGIN
ClrScr;
{ First, zero out the array: }
FillChar(Scores,SizeOf(Scores),Chr(0));
FOR I := 0 TO 10 DO
Writeln(Scores[I]); { Show first ten values }
Readln;
Increment(Scores,72); { Increment the array }
FOR I := 0 TO 10 DO
Writeln(Scores[I]); { Show first ten values again }
Readln
END.


  3 Responses to “Category : Pascal Source Code
Archive   : CMPLTPAS.ZIP
Filename : FASTINX.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/