diff options
-rw-r--r-- | main.asm | 24 |
1 files changed, 7 insertions, 17 deletions
@@ -1,5 +1,6 @@ %include "sys.inc" %include "alloc.inc" +%include "linked_list.inc" ;; TODO: Monad bind functions need to return a monad %include "monad.inc" %include "lstring.inc" @@ -10,7 +11,7 @@ section .data make_lstring test_lstring, "LString Test: Ok",10 - m_make test_lstring, test_lstring_len_b, 1 + m_make test_lstring, test_lstring_len, 1 make_zstring test_zstring, "ZString Test: Ok",10 m_make test_zstring, test_zstring, 1 @@ -29,7 +30,7 @@ _TEST: dq "kO" make_fbuffer "input.txt", test_file, FBUF_DEFAULT_SIZE - m_make test_file, test_file_filedata, 1 + m_make test_file, test_file_filedata, 1 global _main @@ -70,21 +71,6 @@ _main: m_bind data_to_zstring_mh m_call print_zstring - ;; m_call ffopen, rel m_test_file - ;; flen test_file - ;; push rax - ;; m_return rel m_test_mdots - ;; m_bind data_to_zstring_md - ;; m_call print_zstring - ;; pop rax - ;; cmp rax, FBUF_DEFAULT_SIZE - ;; ja .error.exit - ;; fbegin test_file - ;; fread test_file - ;; fclose test_file - - ;; m_call print_filedata, rel m_test_file - alloc FBUF_ALLOC_SIZE mov rbx, rax m_call ffopen, rel m_test_file @@ -104,6 +90,10 @@ _main: fclose test_file mov rax, [rel test_file_filedata + buffer] + mov rcx, 0 + add rax, 54 + mov [rax], rcx + mov rax, [rel test_file_filedata + buffer] call print_zstring free rbx, FBUF_ALLOC_SIZE |