diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2020-10-16 12:45:33 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2020-10-16 12:45:33 +0300 |
commit | 405c4f104975e5456ce6b28ad31fd996d3f4b657 (patch) | |
tree | 53a1b855c068c41b73ee0560d5e664d56923d63b /ia32/syscall.sts | |
download | cryptrobber-405c4f104975e5456ce6b28ad31fd996d3f4b657.tar cryptrobber-405c4f104975e5456ce6b28ad31fd996d3f4b657.tar.xz cryptrobber-405c4f104975e5456ce6b28ad31fd996d3f4b657.zip |
Initial
Diffstat (limited to 'ia32/syscall.sts')
-rw-r--r-- | ia32/syscall.sts | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/ia32/syscall.sts b/ia32/syscall.sts new file mode 100644 index 0000000..58a6ffd --- /dev/null +++ b/ia32/syscall.sts @@ -0,0 +1,50 @@ +defasm quit +; mov eax, 1 +# b8 ?' # 1 ?. +; xor ebx, ebx +# 31 ?' # db ?' +; int 0x80 +# cd ?' # 80 ?' + +_data_segment ?choose +?$ ?? _io_buffer +# 0 ?' +_code_segment ?choose + +defasm key +; mov eax, 3 +# b8 ?' # 3 ?. +; xor ebx, ebx +# 31 ?' # db ?' +; mov ecx, _io_buffer +# b9 ?' _io_buffer ?. +; mov edx, 1 +# ba ?' # 1 ?. +; int 0x80 +# cd ?' # 80 ?' +; xor ebx, ebx +# 31 ?' # db ?' +; mov bl, [_io_buffer] +# 8a ?' # 1d ?' _io_buffer ?. +; push ebx +# 53 ?' +; push eax +# 50 ?' +next + +defasm emit +; pop eax +# 58 ?' +; mov [_io_buffer], al +# a2 ?' _io_buffer ?. +; mov eax, 4 +# b8 ?' # 4 ?. +; mov ebx, 1 +# bb ?' # 1 ?. +; mov ecx, _io_buffer +# b9 ?' _io_buffer ?. +; mov edx, 1 +# ba ?' # 1 ?. +; int 0x80 +# cd ?' # 80 ?' +next |