kvisc/vm/in/JUMPS

44 lines
829 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 #
#---------------------------------------------------------------------------#
#
# Absolute jump (JMP) instruction
#
# RIP = $1
#
j ri
jmp ri
#
# RCX-dependent absolute jump (LOOP) instruction
#
# IF (RCX > 0) THEN
# RCX = RCX - 1
# RIP = $1
# FI
#
loop ri
#
# Relative jump (BCH) instruction ("branch")
#
# RIP = RIP + $1
#
b ri
bch ri
#
# RCX-dependent relative jump (BOOP) instruction
#
# IF (RCX > 0) THEN
# RCX = RCX - 1
# RIP = RIP + $1
# FI
#
boop ri