X-Git-Url: https://git.danieliu.xyz/?p=sped.git;a=blobdiff_plain;f=sped.asm;h=e0920a1712b6c5af80784a4995d2eb9073796ef2;hp=a14dbd4867bbad6ea69eedc36680cd8a7bb01e19;hb=HEAD;hpb=89732d399de9007aaf2894b0c637e8cfb9ed47ac diff --git a/sped.asm b/sped.asm index a14dbd4..e0920a1 100644 --- a/sped.asm +++ b/sped.asm @@ -1,26 +1,20 @@ ; sped - the stupidly pointless editor ; written by pinosaur +; sped.asm: main file -%include "fileutils.S" -%include "repl.S" +%include "macros.S" extern printf -global main +extern readFile +extern repl -; macros -%macro write_str 2 - mov eax, 4 - mov ebx, 1 - mov ecx, %1 - mov edx, %2 - int 0x80 -%endmacro +global main section .data banner_str db `SPED - the stupidly pointless editor\n`, 0x00 - nofile_str db `no file provided\n`, 0x00 - readlines_str db `opened file with %i lines\n`, 0x00 + nofile_str db `no file provided.\n`, 0x00 + readlines_str db `opened file with %i lines.\n`, 0x00 section .text main: