This is what I'm trying to do:
Code: Select all
ASM
mov ecx, [dwNumLongs]
mov esi, [dwInptr]
L31: lodsd ' load EAX with contents of address pointed to by ESI - ESI increments by 4
shl eax, 1 ' shift EAX left 1 bit
jnc L30
inc [dwSumOne32(31)]
L30: shl eax, 1
jnc L29
inc [dwSumOne32(30)]
L29: shl eax, 1
jnc L28
inc [dwSumOne32(29)]
L28: shl eax, 1
jnc L27
inc [dwSumOne32(28)]
L27: shl eax, 1
jnc L26
inc [dwSumOne32(27)]
L26: shl eax, 1
jnc L25
inc [dwSumOne32(26)]
L25: shl eax, 1
jnc L24
inc [dwSumOne32(25)]
L24: shl eax, 1
jnc L23
inc [dwSumOne32(24)]
L23: shl eax, 1
jnc L22
inc [dwSumOne32(23)]
L22: shl eax, 1
jnc L21
inc [dwSumOne32(22)]
L21: shl eax, 1
jnc L20
inc [dwSumOne32(21)]
L20: shl eax, 1
jnc L19
inc [dwSumOne32(20)]
L19: shl eax, 1
jnc L18
inc [dwSumOne32(19)]
L18: shl eax, 1
jnc L17
inc [dwSumOne32(18)]
L17: shl eax, 1
jnc L16
inc [dwSumOne32(17)]
L16: shl eax, 1
jnc L15
inc [dwSumOne32(16)]
L15: shl eax, 1
jnc L14
inc [dwSumOne32(15)]
L14: shl eax, 1
jnc L13
inc [dwSumOne32(14)]
L13: shl eax, 1
jnc L12
inc [dwSumOne32(13)]
L12: shl eax, 1
jnc L11
inc [dwSumOne32(12)]
L11: shl eax, 1
jnc L10
inc [dwSumOne32(11)]
L10: shl eax, 1
jnc L09
inc [dwSumOne32(10)]
L09: shl eax, 1
jnc L08
inc [dwSumOne32(9)]
L08: shl eax, 1
jnc L07
inc [dwSumOne32(8)]
L07: shl eax, 1
jnc L06
inc [dwSumOne32(7)]
L06: shl eax, 1
jnc L05
inc [dwSumOne32(6)]
L05: shl eax, 1
jnc L04
inc [dwSumOne32(5)]
L04: shl eax, 1
jnc L03
inc [dwSumOne32(4)]
L03: shl eax, 1
jnc L02
inc [dwSumOne32(3)]
L02: shl eax, 1
jnc L01
inc [dwSumOne32(2)]
L01: shl eax, 1
jnc L00
inc [dwSumOne32(1)]
L00: shl eax, 1
jnc L31
inc [dwSumOne32(0)]
dec ecx ' decrement ECX
jg L31 ' jump to L31 if greater than 0
End ASM
The compiler doesn't appear to resolve "dwSumOne32(n)" for any op code.