Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INCLUDE Irvine32.inc
- .data
- matrix DWORD 5,3,4,8,5,5,8,7,3,1,0,9,8,7,5,6
- ans DWORD ?
- firstNum DWORD ?
- secNum DWORD ?
- thirdNum DWORD ?
- fourthNum DWORD ?
- .code
- main PROC
- mov esi , offset [matrix]
- mov ans , 0
- mov firstNum , 0
- mov secNum , 5
- mov thirdNum , 10
- mov fourthNum , 15
- call AddToDeter
- add thirdNum , 1 ;11
- sub fourthNum , 1 ; 14
- call subFromDeter
- add secNum , 1
- mov thirdNum , 9
- add fourthNum , 1
- call subFromDeter
- mov thirdNum , 11
- mov fourthNum , 13
- call AddToDeter
- add secNum , 1
- mov thirdNum , 9
- add fourthNum , 1
- call AddToDeter
- mov thirdNum ,10
- mov fourthNum , 13
- call subFromDeter
- add firstNum , 1
- mov secNum , 4
- mov thirdNum , 10
- mov fourthNum , 15
- call subFromDeter
- add thirdNum , 1
- sub fourthNum , 1
- call AddToDeter
- mov secNum , 6
- mov thirdNum , 8
- mov fourthNum , 15
- call AddToDeter
- mov thirdNum , 11
- mov fourthNum , 12
- call subFromDeter
- add secNum,1
- mov thirdNum,8
- mov fourthNum , 14
- call subFromDeter
- mov thirdNum , 10
- mov fourthNum , 12
- call AddToDeter
- add firstNum,1
- mov secNum, 4
- mov thirdNum , 9
- mov fourthNum , 15
- call AddToDeter
- mov thirdNum, 11
- mov fourthNum , 13
- call subFromDeter
- mov secNum , 5
- mov thirdNum , 8
- mov fourthNum , 15
- call subFromDeter
- mov thirdNum , 11
- mov fourthNum , 12
- call AddToDeter
- mov secNum , 7
- mov thirdNum , 9
- mov fourthNum , 13
- call AddToDeter
- add thirdNum , 1
- sub fourthNum , 1
- call subFromDeter
- add firstNum , 1
- mov secNum , 4
- mov thirdNum , 9
- mov fourthNum , 14
- call subFromDeter
- add thirdNum , 1
- sub fourthNum , 1
- call AddToDeter
- add secNum , 1
- mov thirdNum , 8
- mov fourthNum , 14
- call AddToDeter
- mov thirdNum , 10
- mov fourthNum , 12
- call subFromDeter
- add secNum , 1
- mov thirdNum , 8
- mov fourthNum , 13
- call subFromDeter
- add thirdNum , 1
- sub fourthNum ,1
- call AddToDeter
- exit
- main ENDP
- AddToDeter PROC USES eax esi ecx
- mov eax , type matrix
- mul firstNum
- mov esi , offset [matrix]
- add esi , eax
- mov eax ,1
- mul dword ptr [esi]
- push eax
- mov eax , type matrix
- mul secNum
- mov esi , offset [matrix]
- add esi , eax
- pop eax
- mul dword ptr [esi]
- push eax
- mov eax , type matrix
- mul thirdNum
- mov esi , offset [matrix]
- add esi , eax
- pop eax
- mul dword ptr [esi]
- push eax
- mov eax , type matrix
- mul fourthNum
- mov esi , offset [matrix]
- add esi , eax
- pop eax
- mul dword ptr [esi]
- add ans , eax
- mov eax , ans
- call writeint
- ret
- AddToDeter ENDP
- subFromDeter PROC USES eax esi ecx
- mov eax , type matrix
- mul firstNum
- mov esi , offset [matrix]
- add esi , eax
- mov eax ,1
- mul dword ptr [esi]
- push eax
- mov eax , type matrix
- mul secNum
- mov esi , offset [matrix]
- add esi , eax
- pop eax
- mul dword ptr [esi]
- push eax
- mov eax , type matrix
- mul thirdNum
- mov esi , offset [matrix]
- add esi , eax
- pop eax
- mul dword ptr [esi]
- push eax
- mov eax , type matrix
- mul fourthNum
- mov esi , offset [matrix]
- add esi , eax
- pop eax
- mul dword ptr [esi]
- sub ans , eax
- mov eax , ans
- call writeint
- ret
- subFromDeter ENDP
- END main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement