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/MISC
2019-06-23 12:40:18 +02:00

84 lines
1.6 KiB
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.
#---------------------------------------------------------------------------#
# Misc. instructions #
#---------------------------------------------------------------------------#
#
# Do nothing (NOOP)
#
# (nothing)
#
# Throws:
# (nothing)
#
# Preserves all flags
#
nop
#
# Pause the CPU for a very short amount of time (PAUSE)
# Used in spin-like loops
#
pause
#
# Pause the CPU for a relatively long time (XPAUSE)
#
# Throws:
# #SYS if not in supervisor mode
#
xpause
#
# Get timestamp in seconds
#
time rm
#
# Get timestamp in µseconds
#
utime rm
#
# CPU Identification Number
#
# Does nothing (for now)
#
cpuid
#---------------------------------------------------------------------------#
# Clean-up misc. instructions #
#---------------------------------------------------------------------------#
#
# Clear base volatile registers (CLR)
#
# RAX = RBX = RCX = RDX = 0
# RSX = RBI = RDI = RSI = 0
#
clr
#
# Clear argument registers (CLA)
#
# AX0 = AX1 = AX2 = AX3 = 0
# AX4 = AX5 = AX6 = AX7 = 0
#
cla
#---------------------------------------------------------------------------#
# Byte-wise / bit-wise manipulation instructions #
#---------------------------------------------------------------------------#
#
# Byte/word/dword swap (xSWAP)
#
# Change endianness
#
bswap rm rim
wswap rm rim
dswap rm rim