mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
82 lines
1.8 KiB
Plaintext
82 lines
1.8 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.
|
|
|
|
#---------------------------------------------------------------------------#
|
|
# Debugging instructions #
|
|
#---------------------------------------------------------------------------#
|
|
|
|
#
|
|
# Breakpoint instruction (BREAK)
|
|
#
|
|
# (cause register dump on standard error)
|
|
# (wait for user input before proceeeding)
|
|
#
|
|
break 0
|
|
|
|
#
|
|
# Toggles instruction dumping (DUMP)
|
|
#
|
|
# (toggles instruction dumping)
|
|
#
|
|
dump 0
|
|
|
|
#---------------------------------------------------------------------------#
|
|
# Misc. instructions #
|
|
#---------------------------------------------------------------------------#
|
|
|
|
#
|
|
# Throws #UDF ("undefined behaviour")
|
|
#
|
|
udf 0
|
|
|
|
#
|
|
# Pause the CPU for a very short amount of time (PAUSE)
|
|
# Used in spin-type loops
|
|
#
|
|
pause 0
|
|
|
|
#
|
|
# Get timestamp in µseconds
|
|
#
|
|
utime 1
|
|
|
|
#
|
|
# $1 = seconds since start of month
|
|
# $2 = current month
|
|
# $3 = current year
|
|
#
|
|
ytime 0
|
|
|
|
#
|
|
# Clear all GPR registers except RBP/RSP
|
|
#
|
|
cls 0
|
|
|
|
#---------------------------------------------------------------------------#
|
|
# Byte-wise / bit-wise manipulation instructions #
|
|
#---------------------------------------------------------------------------#
|
|
|
|
#
|
|
# Byte/word/dword swap (xSWAP)
|
|
#
|
|
# Change endianness
|
|
#
|
|
bswap 2
|
|
wswap 2
|
|
dswap 2
|
|
|
|
#---------------------------------------------------------------------------#
|
|
# I/O instructions #
|
|
#---------------------------------------------------------------------------#
|
|
|
|
#
|
|
# Send a character to standard output (PRN)
|
|
#
|
|
prn 1
|
|
|
|
#
|
|
# Scan a character from standard input (SCAN)
|
|
#
|
|
scan 1
|
|
|