home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / arch / 11568 < prev    next >
Encoding:
Internet Message Format  |  1992-12-11  |  1.6 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!spool.mu.edu!olivea!sgigate!sgi!mips!vermont.mti.sgi.com!jackc
  2. From: jackc@vermont.mti.sgi.com (Jack Choquette)
  3. Newsgroups: comp.arch
  4. Subject: Re: Any use for Branch if Even/Odd ?
  5. Message-ID: <lihth9INNbpo@spim.mti.sgi.com>
  6. Date: 11 Dec 92 20:12:25 GMT
  7. References: <endecotp.723992157@cs.man.ac.uk> <1g8ub1INN8it@agate.berkeley.edu> <GJR.92Dec10233620@chamarti.ai.mit.edu>
  8. Organization: Mips Technologies, Inc.
  9. Lines: 24
  10. NNTP-Posting-Host: vermont.mti.sgi.com
  11.  
  12. In article <GJR.92Dec10233620@chamarti.ai.mit.edu>, gjr@zurich.ai.mit.edu (Guillermo J. Rozas) writes:
  13. |> In article <1g8ub1INN8it@agate.berkeley.edu> jbuck@forney.berkeley.edu (Joe Buck) writes:
  14. |> 
  15. |> |   From: jbuck@forney.berkeley.edu (Joe Buck)
  16. |> |   Newsgroups: comp.arch
  17. |> |   Date: 11 Dec 1992 02:27:45 GMT
  18. |> |
  19. |> |   They are used heavily in VMS, since it encodes error status returns
  20. |> |   that way (the LSB determines whether there is an error or not).  The
  21. |> |   Vax had an instruction that could do this, so so must the Alpha for
  22. |> |   efficient VMS implementatation.
  23. |> 
  24. |> Isn't this in fact how booleans are represented in BLISS, the language
  25. |> in which a lot of VMS was/is written?
  26.  
  27.  
  28. Since many programs use boolean variables for control flow but use integers
  29. as the boolean variable, I could see how this could be useful.  However,
  30. if a int value is being used as a single boolean variable it would make
  31. more sense to use/have an instruction like branch on zero.  It's more general
  32. purpose and useful.  You can use it to test boolean values as well as
  33. count down (to zero) loops.
  34.  
  35. /jack
  36.