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/JMP
2019-08-14 09:52:39 +02:00

66 lines
884 B
Plaintext

# 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
#
# RIP = $1
#
jmp 1
jraxz 1
jrcxz 1
jraxnz 1
jrcxnz 1
#
# RCX-dependent jump (LOOP) instruction
#
# IF (RCX > 0) THEN
# RCX = RCX - 1
# RIP = $1
# FI
#
loop 1
#
# Conditional absolute jumps (branches) (BCH)
#
# IF (COND) THEN
# RIP = $3
# 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