Hmmmm....
Der C++-Compiler berechnet das statische Array völlig korrekt. Aber bein dynamischen Zielarray scheint er nichts zu raffen
Code:
;
; for (int j=0; j<30; j++) {
;
?debug L 92
xor cx,cx
jmp short @4@142
@4@86:
;
; arraydyn[i][j]=arrayst[i][j]*123;
;
?debug L 93
mov bx,si
imul bx,bx,60
mov ax,cx
add ax,ax
add bx,ax
lea ax,word ptr [bp-6014]
add bx,ax
mov ax,word ptr ss:[bx]
imul ax,ax,123
mov dx,si
shl dx,2
les bx,dword ptr [bp-4]
add bx,dx
les bx,dword ptr es:[bx]
mov dx,cx
add dx,dx
add bx,dx
mov word ptr es:[bx],ax
?debug L 92
inc cx
@4@142:
cmp cx,30
jl short @4@86
Skandalös ist, dass der Compiler nicht mal ne Warnung oder sowas auslöst.
Ich geh nochmal in mich.
Viele Grüße
Wolfgang
Lesezeichen