remove unused code

This commit is contained in:
andromeda
2026-03-12 14:03:46 +01:00
parent e775b05f85
commit c003e63d62
2 changed files with 0 additions and 159 deletions

View File

@@ -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
; ------------------------------------------------------------------------------