X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=wordlists.asm;h=1604168c5bb754c7f6122cfb1bcacc9ffa6b8692;hb=3615a7d1910cea3c791916293b06b757c2879be9;hp=0ee7aecedb83c134e75a86d0f82f30661015a27b;hpb=39427aee877cab09feea798b146e06dc7bfc25cc;p=rrq%2Frrqforth.git diff --git a/wordlists.asm b/wordlists.asm index 0ee7aec..1604168 100644 --- a/wordlists.asm +++ b/wordlists.asm @@ -88,12 +88,20 @@ p_strlen_LOOP: 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: + rep movsb - dec rcx - jg p_strncpy_LOOP p_strncpy_END: + cld ; Restore default direction as incrementing popr rsi next