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/INSTRS
2019-06-05 22:59:32 +02:00

215 lines
1.9 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.
stop
nop
#
# Logical instructions
#
not rm
and rm rim
or rm rim
xor rm rim
shl rm rim
shr rm rim
cnotz rm
candz rm rim
corz rm rim
cxorz rm rim
cshlz rm rim
cshrz rm rim
cnotnz rm
candnz rm rim
cornz rm rim
cxornz rm rim
cshlnz rm rim
cshrnz rm rim
#
# Unsigned arithmetic instructions
#
# mul:
# rdx = hi(rax * $0)
# rax = lo(rax * $0)
# div:
# rdx = rax % $0
# rax = rax / $0
sgn rm rim
inc rm
dec rm
add rm rim
sub rm rim
mul rm rim
mul2 rim
div rm rim
div2 rim
mod rm rim
csgnz rm rim
caddz rm rim
csubz rm rim
cmulz rim
cdivz rim
cincz rm
cdecz rm
csgnnz rm rim
caddnz rm rim
csubnz rm rim
cmulnz rim
cdivnz rim
cincnz rm
cdecnz rm
#
# Comparison instruction
#
cmp rim rim
cmpb rim rim
cmpw rim rim
cmpl rim rim
cmpt rim rim
test rim rim
testb rim rim
testw rim rim
testl rim rim
testt rim rim
#
# Jump instructions
#
jmp ri
cjmpz ri
cjmpnz ri
cjmpa ri
cjmpae ri
cjmpb ri
cjmpbe ri
jcxz ri
jcxnz ri
loop ri
cloopz ri
cloopnz ri
#
# Movement instructions
#
lea rm m
mov rm rim
xchg rm rim
cmpxchg rm rim
cleaz rm m
cmovz rm rim
cxchgz rm rim
ccmpxchgz rm rim
cleanz rm m
cmovnz rm rim
cxchgnz rm rim
ccmpxchgnz rm rim
movb rm rim
movw rm rim
movl rm rim
movt rm rim
cmovbz rm rim
cmovwz rm rim
cmovlz rm rim
cmovtz rm rim
cmovbnz rm rim
cmovwnz rm rim
cmovlnz rm rim
cmovtnz rm rim
#
# Stack manipulation instructions
#
push rim
call rim
pop rm
ret
cpushz rim
ccallz rim
cpopz rm
cretz
cpushnz rim
ccallnz rim
cpopnz rm
cretnz
# push rbp
# mov rbp, rsp
enter
# add rsp, 8
# mov rbp, [rsp]
leave
cleavez
cleavenz
pushf
#
# Supervisor only instructions
#
popf
cli
sti
devctl rim rim
iocall rim rim
#
# Misc. instructions
#
# Clear rax...rsi
clr
# Clear ax0...ax7
cla
# Clear nx0...nx7
cln
# Print a character on the screen
prn rim
#
# Debugging instructions
#
break
cbreakz
cbreaknz
step rim