1
0
mirror of https://gitlab.os-k.eu/os-k-team/kvisc.git synced 2023-08-25 14:05:46 +02:00
kvisc/pc/instrs/INSTRS
2019-05-30 20:35:10 +02:00

388 lines
3.2 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 r
not m
cnotz r
cnotz m
cnotnz r
cnotnz m
and r r
and r i
and r m
and m r
and m i
and m m
candz r r
candz r i
candz r m
candz m r
candz m i
candz m m
candnz r r
candnz r i
candnz r m
candnz m r
candnz m i
candnz m m
or r r
or r i
or r m
or m r
or m i
or m m
corz r r
corz r i
corz r m
corz m r
corz m i
corz m m
cornz r r
cornz r i
cornz r m
cornz m r
cornz m i
cornz m m
xor r r
xor r i
xor r m
xor m r
xor m i
xor m m
cxorz r r
cxorz r i
cxorz r m
cxorz m r
cxorz m i
cxorz m m
cxornz r r
cxornz r i
cxornz r m
cxornz m r
cxornz m i
cxornz m m
# shift left logical
shl r r
shl r i
shl r m
shl m r
shl m i
shl m m
cshlz r r
cshlz r i
cshlz r m
cshlz m r
cshlz m i
cshlz m m
cshlnz r r
cshlnz r i
cshlnz r m
cshlnz m r
cshlnz m i
cshlnz m m
# shift right logical
shr r r
shr r i
shr r m
shr m r
shr m i
shr m m
cshrz r r
cshrz r i
cshrz r m
cshrz m r
cshrz m i
cshrz m m
cshrnz r r
cshrnz r i
cshrnz r m
cshrnz m r
cshrnz m i
cshrnz m m
#
# Unsigned arithmetic instructions
#
add r r
add r i
add r m
add m r
add m i
add m m
caddz r r
caddz r i
caddz r m
caddz m r
caddz m i
caddz m m
caddnz r r
caddnz r i
caddnz r m
caddnz m r
caddnz m i
caddnz m m
sub r r
sub r i
sub r m
sub m r
sub m i
sub m m
csubz r r
csubz r i
csubz r m
csubz m r
csubz m i
csubz m m
csubnz r r
csubnz r i
csubnz r m
csubnz m r
csubnz m i
csubnz m m
# rdx = hi(rax * $0)
# rax = lo(rax * $0)
mul r
mul i
cmulz r
cmulz i
cmulnz r
cmulnz i
# rdx = rax % $0
# rax = rax / $0
div r
div i
cdivz r
cdivz i
cdivnz r
cdivnz i
inc r
inc m
cincz r
cincz m
cincnz r
cincnz m
dec r
dec m
cdecz r
cdecz m
cdecnz r
cdecnz m
#
# Comparison instruction
#
# Affects ZF and CF
cmp r r
cmp r i
cmp r m
cmp i r
cmp i i
cmp i m
cmp m r
cmp m i
cmp m m
# Only affects ZF
test r r
test r i
test r m
test i r
test i i
test i m
test m r
test m i
test m m
#
# Jump instructions
#
jmp r
jmp i
cjmpz r
cjmpz i
cjmpnz r
cjmpnz i
cjmpa r
cjmpa i
cjmpae r
cjmpae i
cjmpb r
cjmpb i
cjmpbe r
cjmpbe i
jcxz r
jcxz i
jcxnz r
jcxnz i
loop r
loop i
cloopz r
cloopz i
cloopnz r
cloopnz i
#
# Movement instructions
#
mov r r
mov r i
mov r m
mov m r
mov m i
mov m m
cmovz r r
cmovz r i
cmovz r m
cmovz m r
cmovz m i
cmovz m m
cmovnz r r
cmovnz r i
cmovnz r m
cmovnz m r
cmovnz m i
cmovnz m m
xchg r r
xchg r i
xchg r m
xchg m r
xchg m i
xchg m m
cxchgz r r
cxchgz r i
cxchgz r m
cxchgz m r
cxchgz m i
cxchgz m m
cxchgnz r r
cxchgnz r i
cxchgnz r m
cxchgnz m r
cxchgnz m i
cxchgnz m m
lea r m
lea m m
cleaz r m
cleaz m m
cleanz r m
cleanz m m
#
# Stack manipulation instructions
#
push i
push r
push m
cpushz i
cpushz r
cpushz m
cpushnz i
cpushnz r
cpushnz m
pop r
pop m
cpopz r
cpopz m
cpopnz r
cpopnz m
call r
call i
call m
ccallz r
ccallz i
ccallz m
ccallnz r
ccallnz i
ccallnz m
ret
cretz
cretnz
# push rbp
# mov rbp, rsp
enter
# mov rbp, [rsp+8]
# add rsp, 8
leave
cleavez
cleavenz
pushf
#
# Supervisor only instructions
#
popf
cli
sti
#
# Misc. instructions
#
# Prints a character on the screen
prn r
prn i
prn m
#
# Debugging instructions
#
break
cbreakz
cbreaknz