diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-12-07 18:07:22 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-12-07 18:07:22 +0100 |
| commit | 4c7ea58f5d5e495e8da6cfc7e1d52a3dfcf5a893 (patch) | |
| tree | 40c91fce5ac9e622e49515608033f8c98af5a8f1 /dev/ZKAKit/HALKit/AMD64/HalCommonAPI.asm | |
| parent | 63be0a396d95db7b629ffe64dcc543e251936b36 (diff) | |
IMPL: New I/O functions from assembly, still working on #8 issue.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKAKit/HALKit/AMD64/HalCommonAPI.asm')
| -rw-r--r-- | dev/ZKAKit/HALKit/AMD64/HalCommonAPI.asm | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/dev/ZKAKit/HALKit/AMD64/HalCommonAPI.asm b/dev/ZKAKit/HALKit/AMD64/HalCommonAPI.asm index 77931d0e..6e463e98 100644 --- a/dev/ZKAKit/HALKit/AMD64/HalCommonAPI.asm +++ b/dev/ZKAKit/HALKit/AMD64/HalCommonAPI.asm @@ -7,4 +7,47 @@ ;; * ======================================================== ;; */ -section .text
\ No newline at end of file +section .text + +extern rt_wait_400ns + +global rt_out8 +global rt_out16 +global rt_out32 + +global rt_in8 +global rt_in16 +global rt_in32 + +rt_out8: + mov al, dl + mov dx, cx + out dx, al + ret + +rt_out16: + mov ax, dx + mov dx, cx + out dx, ax + ret + +rt_out32: + mov eax, edx + mov edx, ecx + out dx, eax + ret + +rt_in8: + mov dx, cx + in al, dx + ret + +rt_in16: + mov edx, ecx + in ax, dx + ret + +rt_in32: + mov rdx, rcx + in eax, dx + ret |
