views:

73

answers:

3

I have long been a fan of William Gibson, but it's clear that he doesn't have much tech savvy - no harm in that, maybe just kuddos that he learned a few buzzwords and wrote some awesome books.

But, "count zero interrupt" just sticks in my craw ...

"On receiving an interrupt, decrement the counter to zero." 
(The term "count zero interrupt" or CZI could be found in the book:
 Programming The Z80 by Rodney Zaks, 1982.)

I know, I know that decrement just means make less but something in me cries out that it means make smaller by one unless explicitly stated and that decrement the counter to zero is just plain bad code-jargon. Why not (re)set the counter to zer0?

I can't blame Gibson for quoting this, but somehow it just spoils a whole book for me (and one of his earlier, so, by definion, better, books at that).

Or do I just have too much time on my hands and <coder-fuel> in my veins?

This *bugs* me !!

And it is not, repeat *NOT*, a criticism of Gibson, so please don't downvote me ;-)

+1  A: 

I could make up something about how "decrement to zero" makes sense because it describes a decrement that moves towards zero, as opposed to towards negative infinity.

But I think when they say "the alleged computer programming term count zero interrupt", the important word is "alleged".

Ken
+1 Despite "alleged" they quote a seemingly concrete source. To me "decement" in s/w or f/w terms means "reduce by one, unless otherwise stated". So, decrementing 1 gives 0, but decrementing X gives X-1, if you want to (re)set to zero, then state so. But, YMMV
Mawg
+1  A: 

Citation needed.

You can download the classic Zaks book from z80.info. Unfortunately it is a purely scanned-image PDF, so it's not searchable, but I cannot locate the alleged-quote text or the term ‘count zero’. This is the Third Edition, from 1980-1981; I can't find any record of a new edition being published in 1982.

The nearest thing to the quote seems to me to be the hardware timer (described on page 466), in which the timer register is constantly decremented (in the conventional sense of decreasing by one), and triggers a interrupt when it hits zero. This is the other way round to how the quote has it with the interrupt causing the register to be set to zero, but a “count zero interrupt” would be a reasonable way to describe it, if not one that anyone actually ever used.

I suspect Gibson is using artistic licence even on his epigraphs.

bobince
+1 wow! great research, thanks.
Mawg
A: 

Decrement does not mean to reduce by one, it means to reduce by some amount. For example;

for(int i=100; i>=0; i=i-5)
{
 // Do something
}

So, "decrement the counter to zero" is totally valid.

C.McAtackney
Yes, I know that. In fact, I said so. Next ....
Mawg
My point was that even in a software development context, it is NOT the "convention" that to decrement means to make less by one, never mind the general sense of the word.There are endless programming scenarios in which one would want to jump through values in steps bigger than one (hence the example using *code*).BTW - Thanks for the down vote on a totally subjective question. Nice to see that other people's opinions are welcome.
C.McAtackney
+1 (and soem padding to make up 15 chars)
Mawg