home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
EDUCATIN
/
K-CHING.LBR
/
TRILOGY.DZC
/
TRILOGY.DOC
Wrap
Text File
|
2000-06-30
|
2KB
|
38 lines
I'm really pleased to see all the CP/M stuff on TABBS. I'm
currently posting original items in Downloads, continuing the
CP/M tradition of putting things in the P.D.
Many of these are written specificly for the KAYPRO, but the
source should be valid if once you recompile it. My latest
project has been a small program to perform "tri-logical"
operations -- like Boolean arithmetic but in base 3
instead of binary.
In this system,TRUE/FALSE (ON/OFF) are joined by a third
state: MAYBE. Consider this propostion:
(EATS GRASS) AND (SAYS MOO) --> (IS A COW)
The truth-table for this situation is that of the AND
operator. The corresponding tri-logic operation, &, is a little
more complex.
& | R O G
--+------
R | R R R
O | R O O
G | R O G
[ROG] stands for a traffic light or NO,MAYBE,YES. thus:
1] (EATS GRASS)yes & (SAYS MOO)maybe --> (IS A COW)maybe
2] or "(EATS GRASS)R (SAYS MOO)O &." --> [red] ...et cetera.
Just remember to use Reverse Polish Notation, as in [2], which
Trilogy Interpreter will execute if entered as shown in "".
If this program doesn't behave on your screen, try running
TRINSTAL.COM first. (Be sure to include the DTA and MSG files
too.) But there are no machine specific codes in this program,
so LF/CR is likely to be the only reason for TRINSTAL.
,,, jeff