Category : Files from Magazines
Archive   : MAY91.ZIP
Filename : 2N05021A
var
theTime: longint; (* keep time in 60ths of a second *)
value: longint;
i: integer;
(* Here is a crude high-level language function to change
byte order *)
(* no effort at optimization has been taken *)
function FlipOrder (n: longint): longint;
var
result: longint;
begin
FlipOrder := BSL(BAND(n, $000000FF), 24) + BAND(BSL(n, 8),
$00FF0000) +
BitAnd(BSR(n, 8), $0000FF00) + BitAnd(BSR(n, 24), $000000FF);
end;
begin
ShowText;
value := $01020304;
theTime := TickCount;
for i := 0 to 9999 do
begin
value := FlipOrder(value);
end;
theTime := TickCount - theTime;
writeln('Time per flip =', (theTime / 60.0) / 10000.0 : 12 : 6);
readln;
end.
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
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/