kvisc/vm/in/MISC

82 lines
1.8 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.
2019-07-17 20:26:03 +02:00
#---------------------------------------------------------------------------#
# Debugging instructions #
#---------------------------------------------------------------------------#
#
# Breakpoint instruction (BREAK)
#
# (cause register dump on standard error)
# (wait for user input before proceeeding)
#
2019-08-16 13:29:38 +02:00
break 0
2019-07-17 20:26:03 +02:00
#
2019-07-17 22:40:13 +02:00
# Toggles instruction dumping (DUMP)
2019-07-17 20:26:03 +02:00
#
2019-07-17 22:40:13 +02:00
# (toggles instruction dumping)
2019-07-17 20:26:03 +02:00
#
2019-08-16 13:29:38 +02:00
dump 0
2019-07-17 20:26:03 +02:00
2019-06-23 12:40:18 +02:00
#---------------------------------------------------------------------------#
# Misc. instructions #
#---------------------------------------------------------------------------#
2019-08-06 22:47:39 +02:00
#
# Throws #UDF ("undefined behaviour")
#
2019-08-16 13:29:38 +02:00
udf 0
2019-08-06 22:47:39 +02:00
2019-06-23 12:40:18 +02:00
#
# Pause the CPU for a very short amount of time (PAUSE)
2019-07-18 22:49:31 +02:00
# Used in spin-type loops
2019-06-23 12:40:18 +02:00
#
2019-08-16 13:29:38 +02:00
pause 0
2019-06-23 12:40:18 +02:00
#
2019-07-18 22:49:31 +02:00
# Get timestamp in µseconds
2019-06-23 12:40:18 +02:00
#
2019-08-08 18:39:12 +02:00
utime 1
2019-06-23 12:40:18 +02:00
2019-07-11 18:34:21 +02:00
#
# $1 = seconds since start of month
# $2 = current month
# $3 = current year
#
2019-08-14 20:23:05 +02:00
ytime 0
2019-07-11 18:34:21 +02:00
2019-06-23 12:40:18 +02:00
#
2019-07-10 17:17:45 +02:00
# Clear all GPR registers except RBP/RSP
2019-06-23 12:40:18 +02:00
#
2019-08-16 13:29:38 +02:00
cls 0
2019-07-10 17:17:45 +02:00
2019-06-23 12:40:18 +02:00
#---------------------------------------------------------------------------#
# Byte-wise / bit-wise manipulation instructions #
#---------------------------------------------------------------------------#
#
# Byte/word/dword swap (xSWAP)
#
# Change endianness
#
2019-08-03 17:41:44 +02:00
bswap 2
wswap 2
dswap 2
2019-06-23 12:40:18 +02:00
2019-07-17 20:26:03 +02:00
#---------------------------------------------------------------------------#
# I/O instructions #
#---------------------------------------------------------------------------#
#
# Send a character to standard output (PRN)
#
2019-08-03 17:41:44 +02:00
prn 1
2019-07-17 20:26:03 +02:00
#
# Scan a character from standard input (SCAN)
#
2019-08-03 17:41:44 +02:00
scan 1
2019-07-17 20:26:03 +02:00