kvisc/vm/in/JMP

66 lines
884 B
Plaintext
Raw Normal View History

2019-08-14 09:52:39 +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.
#---------------------------------------------------------------------------#
# Jump instructions #
#---------------------------------------------------------------------------#
#
# Jump (JMP) instruction
#
2019-09-08 19:04:07 +02:00
# EIP = $1
2019-08-14 09:52:39 +02:00
#
jmp 1
2019-09-08 19:04:07 +02:00
jeaxz 1
jecxz 1
2019-08-14 09:52:39 +02:00
2019-09-08 19:04:07 +02:00
jeaxnz 1
jecxnz 1
2019-08-14 09:52:39 +02:00
#
2019-09-08 19:04:07 +02:00
# ECX-dependent jump (LOOP) instruction
2019-08-14 09:52:39 +02:00
#
2019-09-08 19:04:07 +02:00
# IF (ECX > 0) THEN
# ECX = ECX - 1
# EIP = $1
2019-08-14 09:52:39 +02:00
# FI
#
loop 1
#
# Conditional absolute jumps (branches) (BCH)
#
# IF (COND) THEN
2019-09-08 19:04:07 +02:00
# EIP = $3
2019-08-14 09:52:39 +02:00
# FI
#
# reg == 0
bzr 2
# reg != 0
bnz 2
# (s)reg < 0
bltz 2
# r1 == r2
beq 3
# r1 != r2
bne 3
# (s)r1 < (s)r2
blt 3
# r1 < r2
bltu 3
# (s)r1 <= (s)r2
blte 3
# r1 <= r2
blteu 3