X-Git-Url: https://git.danieliu.xyz/?p=sped.git;a=blobdiff_plain;f=repl.asm;h=738da942ffcbbcf086f17118d0abda22af7b0165;hp=3c7f429a9573deace3750cbfe4961eb891e69362;hb=6cf67300c03d92a9cc0c5888b33cdb21a852eb69;hpb=89732d399de9007aaf2894b0c637e8cfb9ed47ac diff --git a/repl.asm b/repl.asm index 3c7f429..738da94 100644 --- a/repl.asm +++ b/repl.asm @@ -1,11 +1,14 @@ -%include "fileutils.S" - extern printf extern fflush extern stdout extern free +extern readLine +extern writeFile +extern shiftLeft +extern shiftRight + global repl section .data @@ -190,8 +193,16 @@ repl: mov eax, DWORD [ebp-CMDSTR] cmp BYTE [eax], 'd' jne _repl_cmd_delete_end - + ; check to make sure we don't have only one line + + ; delete the line + push DWORD [buffer] + push DWORD [buffer_lines] + push DWORD [cur_line] + call shiftLeft + + sub DWORD [buffer_lines], 1 jmp _repl_continue _repl_cmd_delete_end: