summaryrefslogtreecommitdiffstats
path: root/sha1/msauth.asm
diff options
context:
space:
mode:
Diffstat (limited to 'sha1/msauth.asm')
-rw-r--r--sha1/msauth.asm31
1 files changed, 17 insertions, 14 deletions
diff --git a/sha1/msauth.asm b/sha1/msauth.asm
index 6f16b03..20523ae 100644
--- a/sha1/msauth.asm
+++ b/sha1/msauth.asm
@@ -102,10 +102,10 @@ sha1_copy_h_to_ae_loop:
bne sha1_copy_h_to_ae_loop
lda #0
- sta idx
sha1_loop:
; a contains idx
+ sta idx
cmp #20
bhs sha1_k2
lda #(K1-base)
@@ -220,19 +220,6 @@ sha1_shuffle:
lda #(T1-base)
jsr add4 ; A=A+T1
- ldx #0
-sha1_add0:
- clc
-sha1_add1:
- lda VA,x
- adc H,x
- sta VA,x
- incx
- txa
- and #3
- bne sha1_add1
- cpx #20
- bne sha1_add0
lda idx
add #1
@@ -240,6 +227,22 @@ sha1_add1:
bhs sha1_done
jmp sha1_loop
sha1_done:
+
+
+ ldx #0
+sha1_add0:
+ clc
+sha1_add1:
+ lda VA,x
+ adc H,x
+ sta VA,x
+ incx
+ txa
+ and #3
+ bne sha1_add1
+ cpx #20
+ bne sha1_add0
+
rts