From b6b8e35916fbe7425ff73182006e871d13c012bb Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 15 Jul 2019 03:42:22 +0100 Subject: 80 rounds working --- sha1/msauth.asm | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'sha1') 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 -- cgit v1.2.3