[Coco] replicating bitwise operators in BASIC

lost lost at l-w.ca
Fri Sep 9 01:19:31 EDT 2016

If you look closely at the color basic ROM code, you'll notice that AND, OR, and NOT actually are bitwise operations and the values returned by the comparison operators are carefully chosen so that works for boolean expressions.
-------- Original message --------From: Brett Gordon <beretta42 at gmail.com> Date: 2016-09-08  9:54 PM  (GMT-07:00) To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com> Subject: [Coco] replicating bitwise operators in BASIC 
BASIC gurus:

In noodling with Jim's test code for the CoCoNIC, I realized the lack of
bitwise AND, XOR, OR, etc. in coco BASIC.  What's the orthodox way of
replicating these operators that are so customary in other languages?  I
remember loads of head scratching in Lua, which like our BASIC, also lacks
basic bitwise functions and converts all numbers to floats.


Coco mailing list
Coco at maltedmedia.com

More information about the Coco mailing list