Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Duff Device reference ...

Reply
Thread Tools

Duff Device reference ...

 
 
Jamie Risk
Guest
Posts: n/a
 
      10-16-2004
In Tom's original post (see http://www.lysator.liu.se/c/duffs-device.html)
discussing "Duff's Device" he refers to "another revolting way to use
swtiches to implement interrupt driven state machines".

My state machine may be considered revolting, and I was wondering if anyone
could point me to state machine example source he was referring to.


 
Reply With Quote
 
 
 
 
Michael Wojcik
Guest
Posts: n/a
 
      10-20-2004

In article <(E-Mail Removed)>, "Jamie Risk" <(E-Mail Removed)> writes:
> In Tom's original post (see http://www.lysator.liu.se/c/duffs-device.html)
> discussing "Duff's Device" he refers to "another revolting way to use
> swtiches to implement interrupt driven state machines".
>
> My state machine may be considered revolting, and I was wondering if anyone
> could point me to state machine example source he was referring to.


What Tom actually wrote was "I have another revolting way to use
switches to implement interrupt driven state machines but it's too
horrid to go into". I take that to mean that while he had conceived
of this "revolting" method, and perhaps implemented it somewhere, he
didn't want to document it for posterity. Considering the
controversy that Duff's Device caused, and the amount of silly email
he'd apparently received on the subject, I can't say I blame him.

In other words, we're probably stuck with guessing, unless someone
can coax Tom into revealing it.

(A loop around a switch is a pretty standard way of doing small state
machines in C, so I imagine Tom's talking about something rather more
bizarre. If he thinks it's odder than Duff's Device it might be a
fine spectacle indeed.)

--
Michael Wojcik http://www.velocityreviews.com/forums/(E-Mail Removed)

Viewers are bugs for famous brands.
-- unknown subtitler, Jackie Chan's _Thunderbolt_
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how does duff's device work? yawnmoth C Programming 7 11-09-2008 12:18 PM
optimizing the switch statement in Duff's Device (casting a label, label abuse) anon.asdf@gmail.com C Programming 10 10-11-2007 03:59 PM
Duff's Device Hallvard B Furuseth C Programming 11 10-03-2006 07:17 PM
duff's device / loop unriolling Jan Richter C Programming 19 08-29-2005 05:14 PM
A small question about Duff's Device Christopher Benson-Manica C Programming 2 10-21-2004 09:11 PM



Advertisments