From 584ece84d95bd6738b78450e626084f934865c86 Mon Sep 17 00:00:00 2001 From: mithe24 Date: Wed, 29 Oct 2025 20:24:10 +0100 Subject: fix comment --- src/lib/int2str.s | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/int2str.s b/src/lib/int2str.s index 1e9801b..0acf4b8 100644 --- a/src/lib/int2str.s +++ b/src/lib/int2str.s @@ -62,6 +62,7 @@ int2str: # shift string to leftmost in buffer if not already there cmpq %rax, %r9 je .done # already leftmost + cld # Clear direction flag (forward copy) movq %rdx, %rcx # rcx = length of string movq %rax, %rsi # rsi = source :: start of string movq %r9, %rdi # rdi = destination :: original buff start @@ -69,9 +70,10 @@ int2str: # Found this online. It's a way to copy down values in memoery. # movbs = Move String Byte.. # It copies 1 byte from memoery to memoery and - # incrementing destination and incrementing source. - # Source :: %rsi - # Dest :: %rdi + # incrementing each pointer. + # Source :: %rsi + # Dest :: %rdi + # Direction Flag :: DF ~ 0 for inc and 1 dec # rep = repeat wow. # It's a prefix that repeats an isntructution rcx times # https://stackoverflow.com/questions/27804852/assembly-rep-movs-mechanism -- cgit v1.2.3-70-g09d2