Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <random>
- #include <iostream>
- #include <bitset>
- #include <string>
- const int sizeSeq = 4;
- int main()
- {
- //счетчики (НЕ ТРОГАТЬ!)
- //задай sizeSeq - размер матрицы
- int i = 0;
- int j = 0;
- _asm
- {
- LEA edi, m;
- forRow:
- //For loop
- mov eax, i;
- cmp eax, sizeSeq;
- JE end;
- //---body---//
- //---end---//
- mov j, 0;
- forCol:
- //For loop
- mov eax, j;
- cmp eax, sizeSeq;
- JE endIter;
- mov ebx, j;
- imul ebx, 4;
- //---body---//
- //-------------------
- //ebx is second index
- //edi is the first
- //[edi][ebx] <==> matrix[edi][ebx]
- //using eax as bool var
- //edx is result to save in matrix
- //-------------------
- //---end---//
- inc j;
- JMP forCol;
- endIter:
- mov eax, sizeSeq;
- imul eax, 4;
- add edi, eax;
- inc i;
- JMP forRow;
- end:
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement