From fd5dc45ff3af55a3e497f1a1f703e2cbb5d23300 Mon Sep 17 00:00:00 2001 From: julianb0 Date: Thu, 30 May 2019 18:36:06 +0200 Subject: [PATCH] dos --- dos/str/strrev.k | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dos/str/strrev.k b/dos/str/strrev.k index 246d212..be2ff88 100644 --- a/dos/str/strrev.k +++ b/dos/str/strrev.k @@ -9,6 +9,9 @@ strrev: cmovz b[ax0], 0 jz .4 + ; save str's location + mov rdx, ax1 + .1: test b[ax1+1], b[ax1+1] jz .2 @@ -19,8 +22,8 @@ strrev: .2: mov b[ax0], b[ax1] - test b[ax1], b[ax1] - jz .3 + cmp ax1, rdx + je .3 inc ax0 dec ax1