7.2 - 2


Mov esi, [f1]

Mov edi, [f2]

Mov ecx, [len]

Shr ecx, 2

Jecxz m1

cld

cmp esi, edi

ja short m2

je break

mov esi, eax

dec esi

add edi, [len]

dec edi

std

m2:

rep movsd

break:

cld

2. .

Str1 db This is string,0

cld

mov esi, offset str1

mov edi, offset str1

for1:

lodsb

test al, al

je short break

cmp al, a

jb notl

cmp al, z

ja notl

add al, A a

notl:

stosb

jmp for1

break:

cld

3. . >0, , 0, <0, . n 32- , .

X dd , ., .

Y dd , ,

N dd (Y X)/4

Res dd ?

sub eax, eax

mov ecx, [N]

lea esi , [X+ecx*4-4]

lea edi , [Y+ecx*4-4]

std

repe cmpsd

jecxz m1

jb letter

mov eax, 1

jmp short m1

letter: mov eax, -1

m1:

cld

4.

1

While (){

If ( )

;

Else

Break;

}

mov ecx, [n]

cld

sub eax, eax

mov edi, offset x

for1:

repne scasd

jecxz break

mov [dword ptr edi-4], -1

jmp for1