diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2023-08-31 01:00:44 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2023-08-31 01:00:44 -0400 |
commit | 3bfdbd26958e3b8193500dd5fad8dcd58c5a8457 (patch) | |
tree | 59329ed9c362afc504d20f38a51e95bf93704202 /tnslc/copy.tnsl | |
parent | 346bc784bedcd00ca8037b5c5a4194c0af9757fb (diff) |
Updates to include new c_wrap
Diffstat (limited to 'tnslc/copy.tnsl')
-rw-r--r-- | tnslc/copy.tnsl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tnslc/copy.tnsl b/tnslc/copy.tnsl index 636a773..0050d1a 100644 --- a/tnslc/copy.tnsl +++ b/tnslc/copy.tnsl @@ -1,4 +1,4 @@ -:include "c_wrap.tnsl" +:include "c_wrap_linux.tnsl" # :include "utils.tnsl" @@ -7,8 +7,8 @@ # Proof of concept copy program /; main (int argc, ~~uint8 argv) [int] - asm "mov r8, rcx" - asm "mov r9, rdx" + asm "mov r8, rdi" + asm "mov r9, rsi" /; if (argc < 3) _printf(~wrong_args{0}) @@ -23,9 +23,8 @@ uint8 buf = 0 int read_count = 0 - int tries = 0 /; loop - _read_byte(read_handle, ~buf, ~read_count) + read_count = _read_byte(read_handle, ~buf) /; if (read_count == 0) break ;/ |