2019-06-23 12:40:18 +02:00
|
|
|
# The OS/K Team licenses this file to you under the MIT license.
|
|
|
|
# See the LICENSE file in the project root for more information.
|
|
|
|
|
|
|
|
#---------------------------------------------------------------------------#
|
|
|
|
# Logical instructions #
|
|
|
|
#---------------------------------------------------------------------------#
|
|
|
|
|
|
|
|
#
|
|
|
|
# TEST Comparison instruction
|
|
|
|
#
|
|
|
|
# $1 AND $2
|
|
|
|
#
|
|
|
|
# Clears OF and CF
|
|
|
|
# Sets ZF and SF according to the result
|
|
|
|
#
|
2019-07-04 20:33:49 +02:00
|
|
|
test r ri
|
2019-06-23 12:40:18 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Bitwise NOT operation
|
|
|
|
#
|
2019-07-04 18:41:05 +02:00
|
|
|
# $1 = NOT($2)
|
2019-06-23 12:40:18 +02:00
|
|
|
#
|
|
|
|
# Preserves all flags
|
|
|
|
#
|
2019-07-04 20:33:49 +02:00
|
|
|
not r r
|
2019-06-23 12:40:18 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Bitwise OR operation
|
|
|
|
#
|
2019-07-04 20:33:49 +02:00
|
|
|
# $dest = $src1 OR $src2
|
2019-06-23 12:40:18 +02:00
|
|
|
#
|
2019-07-05 14:06:14 +02:00
|
|
|
# Preserves all flags
|
2019-06-23 12:40:18 +02:00
|
|
|
#
|
2019-07-04 20:33:49 +02:00
|
|
|
or r ri
|
|
|
|
or r r ri
|
|
|
|
or m ri
|
|
|
|
or m r ri
|
|
|
|
|
|
|
|
# $dest = $src1 OR NOT($src2)
|
|
|
|
orn r ri
|
|
|
|
orn r r ri
|
|
|
|
|
|
|
|
# $dest = NOT($src1 OR $src2)
|
|
|
|
nor r ri
|
|
|
|
nor r r ri
|
2019-06-23 12:40:18 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Bitwise AND operation
|
|
|
|
#
|
2019-07-04 20:33:49 +02:00
|
|
|
# $dest = $src1 AND $src2
|
2019-06-23 12:40:18 +02:00
|
|
|
#
|
2019-07-05 14:06:14 +02:00
|
|
|
# Preserves all flags
|
2019-06-23 12:40:18 +02:00
|
|
|
#
|
2019-07-04 20:33:49 +02:00
|
|
|
and r rim
|
|
|
|
and r r rim
|
|
|
|
and m ri
|
|
|
|
and m r ri
|
|
|
|
|
|
|
|
# $dest = $src1 AND NOT($src2)
|
|
|
|
andn r ri
|
|
|
|
andn r r ri
|
|
|
|
|
|
|
|
# $dest = NOT($src1 AND $src2)
|
|
|
|
nand r ri
|
|
|
|
nand r r ri
|
2019-06-23 12:40:18 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Bitwise XOR operation
|
|
|
|
#
|
2019-07-04 20:33:49 +02:00
|
|
|
# $dest = $src1 XOR $src2
|
2019-06-23 12:40:18 +02:00
|
|
|
#
|
2019-07-05 14:06:14 +02:00
|
|
|
# Preserves all flags
|
2019-06-23 12:40:18 +02:00
|
|
|
#
|
2019-07-04 20:33:49 +02:00
|
|
|
xor r rim
|
|
|
|
xor r r rim
|
|
|
|
xor m ri
|
|
|
|
xor m r ri
|
|
|
|
|
|
|
|
# $dest = $src1 XOR NOT($src2)
|
|
|
|
xorn r ri
|
|
|
|
xorn r r ri
|
|
|
|
|
|
|
|
# $dest = NOT($src1 XOR $src2)
|
|
|
|
xnor r ri
|
|
|
|
xnor r r ri
|
2019-06-23 12:40:18 +02:00
|
|
|
|
|
|
|
# To document
|
2019-06-23 20:56:04 +02:00
|
|
|
|
2019-07-05 14:06:14 +02:00
|
|
|
shl r ri
|
|
|
|
shl r r ri
|
2019-07-04 20:33:49 +02:00
|
|
|
shl m ri
|
2019-07-05 14:06:14 +02:00
|
|
|
shl m r ri
|
2019-07-04 20:33:49 +02:00
|
|
|
|
2019-07-05 14:06:14 +02:00
|
|
|
shr r ri
|
|
|
|
shr r r ri
|
2019-07-04 20:33:49 +02:00
|
|
|
shr m ri
|
2019-07-05 14:06:14 +02:00
|
|
|
shr m r ri
|
2019-07-04 20:33:49 +02:00
|
|
|
|
2019-07-05 14:06:14 +02:00
|
|
|
sal r ri
|
|
|
|
sal r r ri
|
2019-07-04 20:33:49 +02:00
|
|
|
sal m ri
|
2019-07-05 14:06:14 +02:00
|
|
|
sal m r ri
|
2019-06-23 12:40:18 +02:00
|
|
|
|
2019-07-05 14:06:14 +02:00
|
|
|
sar r ri
|
|
|
|
sar r r ri
|
2019-07-04 20:33:49 +02:00
|
|
|
sar m ri
|
2019-07-05 14:06:14 +02:00
|
|
|
sar m r ri
|
2019-06-23 20:56:04 +02:00
|
|
|
|