home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!stanford.edu!snorkelwacker.mit.edu!ai-lab!zurich.ai.mit.edu!gjr
- From: gjr@zurich.ai.mit.edu (Guillermo J. Rozas)
- Newsgroups: comp.arch
- Subject: Re: Any use for Branch if Even/Odd ?
- Date: 11 Dec 92 23:07:51
- Organization: M.I.T. Artificial Intelligence Lab.
- Lines: 18
- Message-ID: <GJR.92Dec11230751@chamarti.ai.mit.edu>
- References: <endecotp.723992157@cs.man.ac.uk> <1g8ub1INN8it@agate.berkeley.edu>
- <GJR.92Dec10233620@chamarti.ai.mit.edu> <lihth9INNbpo@spim.mti.sgi.com>
- Reply-To: gjr@zurich.ai.mit.edu
- NNTP-Posting-Host: chamartin.ai.mit.edu
- In-reply-to: jackc@vermont.mti.sgi.com's message of 11 Dec 92 20:12:25 GMT
-
- In article <lihth9INNbpo@spim.mti.sgi.com> jackc@vermont.mti.sgi.com (Jack Choquette) writes:
-
- | |> Isn't this in fact how booleans are represented in BLISS, the language
- | |> in which a lot of VMS was/is written?
- |
- |
- | Since many programs use boolean variables for control flow but use integers
- | as the boolean variable, I could see how this could be useful. However,
- | if a int value is being used as a single boolean variable it would make
- | more sense to use/have an instruction like branch on zero. It's more general
- | purpose and useful. You can use it to test boolean values as well as
- | count down (to zero) loops.
-
- The alpha has those too, but that is not the issue. If I remember
- correctly, all odd integer values were considered true in BLISS, and
- all even values false. Using test-for-zero for boolean tests only
- works if zero is the unique representation for one of the boolean
- values (as in C), but this is neither inherent nor clearly superior.
-