🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.intel
Article #1925

Re: PLM vs. C for 80286/80386

#1925
From: Guy Harris
Date: Tue, 06 Jun 1989 23:44
10 lines
1021 bytes
>For instance if you want a CASE driven state machine in a critical
>interrupt handler, PL/M implements DO CASE as a jump indirect indexed
>off a short array of offsets, e.g. JMP CASETBL[BX]. C on the other hand
>does 'switch' as a full if-then/elseif-then/elseif-then... series.

I sincerely hope Intel's C compiler does not do so for *all* "switch"
statements; any competent C compiler can and will turn a "dense"
"switch" statement - i.e., one where the cases form a reasonably tight
range - into an indexded jump.  (The definition of "dense" varies from
compiler to compiler.)
Technical Details
Message-ID: <1765@auspex.auspex.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!auspex!guy
References: <598@philtis.UUCP> <14381@bfmny0.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!auspex!guy
From: guy@auspex.auspex.com (Guy Harris)
Newsgroups: comp.sys.intel
Subject: Re: PLM vs. C for 80286/80386
Keywords: PLM C
Message-ID: <1765@auspex.auspex.com>
Date: 6 Jun 89 23:44:08 GMT
References: <598@philtis.UUCP> <14381@bfmny0.UUCP>
Reply-To: guy@auspex.auspex.com (Guy Harris)
Organization: Auspex Systems, Santa Clara
Lines: 10