:

[p1..q1, p2..q2, ...pn..qn], pi..qi- i-

i1, i2, ...in [12]:

& [i1, i2, ...in] = +

-
, Hi - i- .

:

Hn = sizeof ();

Hn-1 = Hn * (qn

- pn +1);

...

H1 = H2 * (q2

- p2 + 1).

, , 0.

1. :

int x[3][4][5][6];

...

x[i][j][k][l]=i+j+k+l;

x dd (3*4*5*6) dup (?)

i dd 1

j dd 2

k dd 3

l dd 4

hl equ 4

hk equ 6*hl

hj equ 5*hk

hi equ 4*hj

...

mov eax, [i]

imul eax, hi

mov ebx, [j]

imul ebx, hj

add eax, ebx

mov ebx, [k]

imul ebx, [hk]

add eax, ebx

mov ebx, [l]

mov ecx, [i]

add ecx, [j]

add ecx, [k]

add ecx, [l]

mov [x+eax+ebx*4], ecx

, , , .