projects
/
rrq
/
rrqforth.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make strncmp direction safe
[rrq/rrqforth.git]
/
wordlists.asm
diff --git
a/wordlists.asm
b/wordlists.asm
index 0ee7aecedb83c134e75a86d0f82f30661015a27b..1604168c5bb754c7f6122cfb1bcacc9ffa6b8692 100644
(file)
--- a/
wordlists.asm
+++ b/
wordlists.asm
@@
-88,12
+88,20
@@
p_strlen_LOOP:
pop rsi
cmp rcx,0
jle p_strncpy_END
pop rsi
cmp rcx,0
jle p_strncpy_END
- cld
+ cmp rdi,rsi
+ je p_strncpy_END
+ jl p_strncpy_LOOP
+ ;; copy down
+ std ; Direction is decrementing
+ add rdi,rcx
+ dec rdi
+ add rsi,rcx
+ dec rsi
p_strncpy_LOOP:
p_strncpy_LOOP:
+ rep
movsb
movsb
- dec rcx
- jg p_strncpy_LOOP
p_strncpy_END:
p_strncpy_END:
+ cld ; Restore default direction as incrementing
popr rsi
next
popr rsi
next