a×rn-1 + ... + a×r3 + a×r2 + a×r1 + a = 3×23 + 3×22 + 3×21 + 3
INCLUDE Irvine32.inc a = 3 r = 2 n = 4 ; n > 1 .data result SDWORD 0 count DWORD ? r1 SDWORD ? prod SDWORD ? .code main PROC mov ecx, n dec ecx L1: mov count, ecx call calc
INCLUDE Irvine32.inc a = 3 r = 2 n = 4 ; n > 1 .data count DWORD ? prod SDWORD ? .code main PROC LOCAL var:SDWORD mov var, 0 mov ecx, n dec ecx L1: mov count, ecx call calc