diff options
| author | mithe24 <mithe24@student.sdu.dk> | 2025-10-29 20:24:10 +0100 |
|---|---|---|
| committer | mithe24 <mithe24@student.sdu.dk> | 2025-10-29 22:01:36 +0100 |
| commit | 584ece84d95bd6738b78450e626084f934865c86 (patch) | |
| tree | 0b1a44daa3d68980bf52267b550884f29f4335cc /src/lib | |
| parent | 4574728416114e3fdcdb82b2850c9cefc01f531a (diff) | |
| download | sorter-584ece84d95bd6738b78450e626084f934865c86.tar.gz sorter-584ece84d95bd6738b78450e626084f934865c86.zip | |
fix comment
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/int2str.s | 8 |
1 files 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 |