home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
pocketbk
/
developmen
/
oplexamp
/
AND.OPL
< prev
next >
Wrap
Text File
|
1994-02-06
|
620b
|
23 lines
==========
psion/opl #992, from mrudin, 502 chars, Feb 6 17:32 94
Comment to 991.
----------
How do you get overflow, Steve? Could you post an example, because AND
seems OK for me (Series 3) on negative 16-bit integers.
However, the bitwise combinatorial functions can be done like this:
and&=&cbc323 REM and ax,bx; retf
or& =&cbc30b REM or ax,bx; retf
xor&=&cbc333 REM xor ax,bx; retf
i%=USR(ADDR(xor&),val1%,val2%,0,0)
etc.
The xor should be the most use I guess, as OPL doesn't provide it at all.
I'd be interested to see if the above generates an overflow in your
example.
Mike.