diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-11-13 11:27:39 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-11-13 11:27:39 +0100 |
commit | 97b8d5bb3c9fd96251e89539d122d2331a2a7925 (patch) | |
tree | d72aca2bb0a2ea3b7d5933c1c68097ed0840002a /asm/intel64/trivials.h | |
parent | 387af55e498970975d77291374e2f5be12a040bd (diff) |
Add system tests, implement syscall
Diffstat (limited to 'asm/intel64/trivials.h')
-rw-r--r-- | asm/intel64/trivials.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/asm/intel64/trivials.h b/asm/intel64/trivials.h new file mode 100644 index 0000000..72ea3f8 --- /dev/null +++ b/asm/intel64/trivials.h @@ -0,0 +1,24 @@ +// Trivial Operations, without arguments + +#pragma once + +#include <asm/chunk.h> + +// No Operation +class Op_nop: public OpSimple +{ +public: Op_nop() : OpSimple({ 0x90 }) {} +}; + +// Return from procedure +class Op_ret: public OpSimple +{ +public: Op_ret() : OpSimple({ 0xC3 }) {} // near return; TODO: far return is 0xCB +}; + +// Syscall +class Op_syscall: public OpSimple +{ +public: Op_syscall() : OpSimple({ 0x0F, 0x05 }) {} +}; + |