mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
99 lines
2.0 KiB
Plaintext
99 lines
2.0 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
|
|
|
|
#
|
|
# Toggles instruction dumping (DUMP)
|
|
#
|
|
# (toggles instruction dumping)
|
|
#
|
|
dump
|
|
|
|
#---------------------------------------------------------------------------#
|
|
# Misc. instructions #
|
|
#---------------------------------------------------------------------------#
|
|
|
|
#
|
|
# Pause the CPU for a very short amount of time (PAUSE)
|
|
# Used in spin-type loops
|
|
#
|
|
pause
|
|
|
|
#
|
|
# Throw #OVF when RFX.OF=1 (INTO)
|
|
#
|
|
into
|
|
|
|
#
|
|
# Get timestamp in µseconds
|
|
#
|
|
utime r r
|
|
|
|
#
|
|
# $1 = seconds since start of month
|
|
# $2 = current month
|
|
# $3 = current year
|
|
#
|
|
ytime r r r
|
|
|
|
#
|
|
# Clear all GPR registers except RBP/RSP
|
|
#
|
|
cls
|
|
|
|
#---------------------------------------------------------------------------#
|
|
# Byte-wise / bit-wise manipulation instructions #
|
|
#---------------------------------------------------------------------------#
|
|
|
|
#
|
|
# Byte/word/dword swap (xSWAP)
|
|
#
|
|
# Change endianness
|
|
#
|
|
bswap r r
|
|
wswap r r
|
|
dswap r r
|
|
|
|
#---------------------------------------------------------------------------#
|
|
# I/O instructions #
|
|
#---------------------------------------------------------------------------#
|
|
|
|
#
|
|
# Send a character to standard output (PRN)
|
|
#
|
|
prn ri
|
|
|
|
#
|
|
# Print a string to standard output (PRN)
|
|
#
|
|
# COMPARE([%1], 0)
|
|
#
|
|
# IF (ZF == 0) THEN
|
|
# PRN([%1])
|
|
# IF (DF == 0) THEN
|
|
# %1 = %1 + 1
|
|
# ELSE
|
|
# %1 = %1 - 1
|
|
# FI
|
|
# FI
|
|
#
|
|
#
|
|
prns r
|
|
|
|
#
|
|
# Scan a character from standard input (SCAN)
|
|
#
|
|
scan r
|
|
|