From c003e63d62a72c997151851fdcf999c22fd4bb1e Mon Sep 17 00:00:00 2001 From: andromeda Date: Thu, 12 Mar 2026 14:03:46 +0100 Subject: remove unused code --- twasm/asm/main.asm | 65 ------------------------------------------------------ 1 file changed, 65 deletions(-) (limited to 'twasm/asm/main.asm') diff --git a/twasm/asm/main.asm b/twasm/asm/main.asm index fa5c3af..7224b01 100644 --- a/twasm/asm/main.asm +++ b/twasm/asm/main.asm @@ -695,71 +695,6 @@ identify_next_token: mov rdx, rsi ; length ret -; ------------------------------------------------------------------------------ -; copy_token -; -; description: -; copies a token from one spot in memory to another -; -; parameters: -; rdi -> start of buffer to be read -; rsi -> start of buffer to be written -; -; returned: -; rax -> last byte read -; rdx -> last byte written -; ------------------------------------------------------------------------------ - -copy_token: - .loop: - mov dl, [rdi] ; move bit to compare to current byte in read buffer - - push rdi ; push incrementors to call elemb - push rsi ; - - mov rdi, 8 ; length of terminator list - mov rsi, token_terminator_8 ; start of terminator list - ; dl set before pushing rdi - call elemb - - pop rsi ; - pop rdi ; pop incrementors after call - - cmp rax, 1 ; check if the next character is a token terminator - je .break ; > if so, break the function - - ; rdi and rsi set from previous loop iteration - call copy_byte ; if not, copy the current byte in read buffer - - inc rdi ; read pointer - inc rsi ; write pointer - jmp .loop - - .break: - mov rax, rdi ; -> last byte read - mov rdx, rsi ; -> last byte written - ret - -; ------------------------------------------------------------------------------ -; copy_byte -; -; description: -; copies a byte from one spot in memory to another -; -; parameters: -; rdi -> word to be read -; rsi -> word to be written -; -; returned: -; al = byte that was read; the rest of rax is zeroed -; ------------------------------------------------------------------------------ - -copy_byte: - xor eax, eax ; zero out so it returns fine - mov al, [rdi] - mov [rsi], al - ret - ; ------------------------------------------------------------------------------ ; utilities ; ------------------------------------------------------------------------------ -- cgit v1.3.1