1
0
mirror of https://gitlab.os-k.eu/os-k-team/kvisc.git synced 2023-08-25 14:05:46 +02:00
kvisc/vm/in/LOGIC

72 lines
1.1 KiB
Plaintext
Raw Normal View History

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
#
test rim rim
#
# 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 18:41:05 +02:00
not rm rim
2019-06-23 12:40:18 +02:00
#
# Bitwise OR operation
#
# $1 = $1 OR $2
#
# Clears OF and CF
# Sets ZF and SF according to the result
#
or rm rim
orf rm rim
#
# Bitwise AND operation
#
# $1 = $1 AND $2
#
# Clears OF and CF
# Sets ZF and SF according to the result
#
and rm rim
andf rm rim
#
# Bitwise XOR operation
#
# $1 = $1 XOR $2
#
# Clears OF and CF
# Sets ZF and SF according to the result
#
xor rm rim
xorf rm rim
# To document
2019-06-23 20:56:04 +02:00
2019-06-23 12:40:18 +02:00
shl rm rim
shr rm rim
shlf rm rim
shrf rm rim
2019-06-23 20:56:04 +02:00
sal rm rim
sar rm rim
salf rm rim
sarf rm rim