🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2367

Re: TopSpeed 3.0 First Impressions

#2367
From: Tom Almy
Date: Mon, 24 Jun 1991 15:30
62 lines
2522 bytes
In article <56F0AA44FD1F400E38@EMBL-Heidelberg.DE> Modula2 List <INFO-M2%UCF1VM.BITNET@ucf1vm.cc.ucf.edu> writes:
>In a previous posting, Tom Almy tried to compare JPI's speed of String-
>output to textfiles in M2 and C.
>[...]
>The 6.81 seconds are not a misprint but Tom's error.
>
Thanks for pointing out my mistake. I typically statically allocate the
buffer, but wanted to dynamically allocate it so as to be as much like the
C version as possible.

After correcting the program, results were:

Language	Size	Speed	
Modula-2 Nobuf	5620	 1.64
Modula-2 Buf	6525	 0.87
C Nobuf		4654	12.58
C Buffered	4750	 0.93

Making Modula-2 consistantly faster, but larger (at least for small programs).
**********************

On another note:

Concerning the crashing problem when graphics were used with my TSENG-4000
based system, I discovered the bug in graph.mod (thank God I've got the
source kit!). It was correct in version 2, and they broke it in version 3:

In procedure SetVideoMode:


        IF (Mode >= 13) AND (Mode < 19) THEN
            R.AX := 1002H;
            R.ES := Seg(PalRegs);
            R.DX := Ofs(PalRegs);
            Lib.Intr(R, 10H);
            n := 0;
            WHILE n < 16 DO
                R.AX:=1010H;	(* WAS R.AL = 010H; *)
                R.BX:=n;
                R.DH:=SHORTCARD(PalCols[n]);
                R.CH:=SHORTCARD(LONGCARD(LongSet(PalCols[n])*LongSet(0FF00H))>>8);
                R.CL:=SHORTCARD(LONGCARD(LongSet(PalCols[n])*LongSet(0FF0000H))>>16);
                Lib.Intr(R, 10H);
                INC(n);
            END;
        END;

They made the invalid assumption that AH would not be changed across the 
interrupt call.

I'll give JPI a call on this one.

Conclusion: I could be happier, but it does all work. I'll cut back on 
disk space by eliminating lots of the various memory model libraries and
by archiving the source files.



-- 
Tom Almy
toma@sail.labs.tek.com
Standard Disclaimers Apply
Technical Details
Message-ID: <9782@sail.LABS.TEK.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!uunet!zephyr.ens.tek.com!tekgen!sail!toma
References: <56F0AA44FD1F400E38@EMBL-Heidelberg.DE>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!uunet!zephyr.ens.tek.com!tekgen!sail!toma
From: toma@sail.LABS.TEK.COM (Tom Almy)
Newsgroups: comp.lang.modula2
Subject: Re: TopSpeed 3.0 First Impressions
Message-ID: <9782@sail.LABS.TEK.COM>
Date: 24 Jun 91 15:30:58 GMT
Article-I.D.: sail.9782
References: <56F0AA44FD1F400E38@EMBL-Heidelberg.DE>
Reply-To: toma@sail.LABS.TEK.COM (Tom Almy)
Organization: Tektronix, Inc., Beaverton,  OR.
Lines: 62