summaryrefslogtreecommitdiff
path: root/twasm/asm/main.asm
diff options
context:
space:
mode:
authorandromeda <andromeda@lenovo>2026-03-12 14:03:46 +0100
committerandromeda <andromeda@lenovo>2026-03-12 14:03:46 +0100
commitc003e63d62a72c997151851fdcf999c22fd4bb1e (patch)
treebd378f29ad8425acdd13f6c245e23b52aadd83a8 /twasm/asm/main.asm
parente775b05f85f689c22dac731e42f1540ca8b2e60c (diff)
remove unused code
Diffstat (limited to 'twasm/asm/main.asm')
-rw-r--r--twasm/asm/main.asm65
1 files changed, 0 insertions, 65 deletions
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
@@ -696,71 +696,6 @@ identify_next_token:
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
; ------------------------------------------------------------------------------