;Generated by ArithmeticExpressionCompiler ( https://flatassembler.github.io/compiler.html ) run in NodeJS. ;;HybridSort algoritam - kombinacija QuickSort algoritma i MergeSort algoritma. ;AsmStart ;Inline assembly begins. ispisPoruka=1 macro staviIntNaSistemskiStog x ;"x" treba biti pokazivac na 32-bitni decimalni broj ("float"), kojeg ce ova makro-naredba pretvoriti u 32-bitni cijeli broj ("int") i staviti na sistemski stog. { sub esp,4 fld dword [x] fistp dword [esp] } macro staviPokazivacNaSistemskiStog x { sub esp,4 lea ebx,[x] mov [esp],ebx } macro staviStringNaSistemskiStog x { sub esp,4 mov dword [esp],x } format PE console ;"PE" je 32-bitna Windowsova ".EXE" datoteka (to nije sve sto FlatAssembler moze stvarati). entry start include 'win32a.inc' ;FlatAssemblerove naredbe za upravljanje DLL-ovima (ovdje se koriste za pozivanje C-ovih funkcija iz MSVCRT-a). section '.text' code executable start: if ispisPoruka=1 jmp velicinaUnosa$ velicinaUnosa db "Unesite koliko cete brojeva unijeti.",10,0 velicinaUnosa$: staviStringNaSistemskiStog velicinaUnosa call [printf] end if staviPokazivacNaSistemskiStog n jmp znakZaFloat$ znakZaFloat db "%f",0 znakZaFloat$: staviStringNaSistemskiStog znakZaFloat call [scanf] if ispisPoruka=1 jmp pitajZaUnos$ pitajZaUnos db "Unesite te brojeve:",10,0 pitajZaUnos$: staviStringNaSistemskiStog pitajZaUnos call [printf] end if ;AsmEnd ;Inline assembly ended. ;i:=0 ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "0" to the FPU stack... mov dword [result],0x0 ;IEEE754 hex of 0 fld dword [result] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [i],edx ;brojac:=0 ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "0" to the FPU stack... mov dword [result],0x0 ;IEEE754 hex of 0 fld dword [result] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [brojac],edx ;vrhStoga:=0 ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "0" to the FPU stack... mov dword [result],0x0 ;IEEE754 hex of 0 fld dword [result] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [vrhStoga],edx ;While i0 ;Initializing the FPU stack... finit ;Type of the directive: beginning of the while-loop ;Marking where the evaluation of the expression begins (because it needs to be repeated once we come to the end of the loop). WhileLabel388282: ;Evaluating the expression after the "While" keyword ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Pushing "0" to the FPU stack... mov dword [result],0x0 ;IEEE754 hex of 0 fld dword [result] ;Pushing "(> vrhStoga 0)" to the FPU stack... fcomip st1 fstp dword [result] jnb secondOperandOfTheComparisonIsGreaterOrEqualLabel182773 fld1 jmp endOfTheGreaterThanComparisonLabel52454 secondOperandOfTheComparisonIsGreaterOrEqualLabel182773: fldz endOfTheGreaterThanComparisonLabel52454: ;Comparing the expression to 0... fistp dword [result] mov eax, dword [result] test eax,eax ;Branching based on whether it is 0... je EndWhileLabel684592 ;gornjaGranica:=stogSGornjimGranicama(vrhStoga) ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Pushing "(stogSGornjimGranicama vrhStoga)" to the FPU stack... fistp dword [result] mov ebx, dword [result] fld dword [stogSGornjimGranicama+4*ebx] ;In case the program is supposed to be 16-bit, simply replace 'ebx' with 'bx'. In case it's 64-bit, replace the 'mov' in the last directive with 'movsx' and 'ebx' with 'rbx' in both this and the last directive. ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [gornjaGranica],edx ;donjaGranica:=stogSDonjimGranicama(vrhStoga) ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Pushing "(stogSDonjimGranicama vrhStoga)" to the FPU stack... fistp dword [result] mov ebx, dword [result] fld dword [stogSDonjimGranicama+4*ebx] ;In case the program is supposed to be 16-bit, simply replace 'ebx' with 'bx'. In case it's 64-bit, replace the 'mov' in the last directive with 'movsx' and 'ebx' with 'rbx' in both this and the last directive. ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [donjaGranica],edx ;vrhStoga:=vrhStoga-1 ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Pushing "1" to the FPU stack... mov dword [result],0x3f800000 ;IEEE754 hex of 1 fld dword [result] ;Pushing "(- vrhStoga 1)" to the FPU stack... fsubp ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [vrhStoga],edx ;gdjeJePivot:=donjaGranica ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "donjaGranica" to the FPU stack... fld dword [donjaGranica] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [gdjeJePivot],edx ;i:=donjaGranica+1 ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "donjaGranica" to the FPU stack... fld dword [donjaGranica] ;Pushing "1" to the FPU stack... mov dword [result],0x3f800000 ;IEEE754 hex of 1 fld dword [result] ;Pushing "(+ donjaGranica 1)" to the FPU stack... faddp ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [i],edx ;While idonjaGranica+1 ;Initializing the FPU stack... finit ;Type of the directive is: if-statement. ;Calculating the expression... ;Pushing "donjaGranica" to the FPU stack... fld dword [donjaGranica] ;Pushing "1" to the FPU stack... mov dword [result],0x3f800000 ;IEEE754 hex of 1 fld dword [result] ;Pushing "(+ donjaGranica 1)" to the FPU stack... faddp ;Pushing "gdjeJePivot" to the FPU stack... fld dword [gdjeJePivot] ;Pushing "(> (+ donjaGranica 1) gdjeJePivot)" to the FPU stack... fxch fcomip st1 fstp dword [result] jnb secondOperandOfTheComparisonIsGreaterOrEqualLabel178924 fld1 jmp endOfTheGreaterThanComparisonLabel139137 secondOperandOfTheComparisonIsGreaterOrEqualLabel178924: fldz endOfTheGreaterThanComparisonLabel139137: ;Comparing the just-calculated expression with 0... fistp dword [result] mov eax, dword [result] test eax,eax ;Branching based on whether the expression is 0... jz ElseLabel823723 ;vrhStoga:=vrhStoga+1 ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Pushing "1" to the FPU stack... mov dword [result],0x3f800000 ;IEEE754 hex of 1 fld dword [result] ;Pushing "(+ vrhStoga 1)" to the FPU stack... faddp ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [vrhStoga],edx ;stogSDonjimGranicama(vrhStoga):=donjaGranica ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "donjaGranica" to the FPU stack... fld dword [donjaGranica] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Calculating the l-value... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Moving the pointer from "st0" to "ebx". fistp dword [result] mov ebx, dword [result] ;Storing the r-value (now in "edx") where "ebx" points to. mov dword [stogSDonjimGranicama+4*ebx],edx ;stogSGornjimGranicama(vrhStoga):=gdjeJePivot ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "gdjeJePivot" to the FPU stack... fld dword [gdjeJePivot] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Calculating the l-value... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Moving the pointer from "st0" to "ebx". fistp dword [result] mov ebx, dword [result] ;Storing the r-value (now in "edx") where "ebx" points to. mov dword [stogSGornjimGranicama+4*ebx],edx ;EndIf ;Initializing the FPU stack... finit ;Type of the directive is: EndIf-statement. ElseLabel823723: EndIfLabel847028: ;testZaPreljev:=brojac+najmanjiCijeliBrojKojiSeMozeDodatiNaBrojac ;Potrebna je posebna varijabla za to jer FPU interno radi s 80-bitnim brojevima, a CPU s 32-bitnim. Izgubio sam hrpu vremena da to shvatim. ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "brojac" to the FPU stack... fld dword [brojac] ;Pushing "najmanjiCijeliBrojKojiSeMozeDodatiNaBrojac" to the FPU stack... fld dword [najmanjiCijeliBrojKojiSeMozeDodatiNaBrojac] ;Pushing "(+ brojac najmanjiCijeliBrojKojiSeMozeDodatiNaBrojac)" to the FPU stack... faddp ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [testZaPreljev],edx ;If not(testZaPreljev>brojac) ;Initializing the FPU stack... finit ;Type of the directive is: if-statement. ;Calculating the expression... ;Pushing "testZaPreljev" to the FPU stack... fld dword [testZaPreljev] ;Pushing "brojac" to the FPU stack... fld dword [brojac] ;Pushing "(> testZaPreljev brojac)" to the FPU stack... fcomip st1 fstp dword [result] jnb secondOperandOfTheComparisonIsGreaterOrEqualLabel848246 fld1 jmp endOfTheGreaterThanComparisonLabel346822 secondOperandOfTheComparisonIsGreaterOrEqualLabel848246: fldz endOfTheGreaterThanComparisonLabel346822: ;Pushing "(not (> testZaPreljev brojac))" to the FPU stack... fld1 fxch fsubp ;Comparing the just-calculated expression with 0... fistp dword [result] mov eax, dword [result] test eax,eax ;Branching based on whether the expression is 0... jz ElseLabel448386 ;najmanjiCijeliBrojKojiSeMozeDodatiNaBrojac:=najmanjiCijeliBrojKojiSeMozeDodatiNaBrojac*2 ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "najmanjiCijeliBrojKojiSeMozeDodatiNaBrojac" to the FPU stack... fld dword [najmanjiCijeliBrojKojiSeMozeDodatiNaBrojac] ;Pushing "2" to the FPU stack... mov dword [result],0x40000000 ;IEEE754 hex of 2 fld dword [result] ;Pushing "(* najmanjiCijeliBrojKojiSeMozeDodatiNaBrojac 2)" to the FPU stack... fmulp ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [najmanjiCijeliBrojKojiSeMozeDodatiNaBrojac],edx ;AsmStart ;Inline assembly begins. if ispisPoruka=1 jmp izvjesceOpreljevu$ izvjesceOpreljevu db "Upozorenje: Brojac mozda nece sadrzavati tocan rezultat, dogodio se preljev na %d. iteraciji." db " Najveca ocekivana pogreska za ovaj preljev je %d krivo prebrojanih izvrsavanja unutarnje petlje.",10,0 izvjesceOpreljevu$: fld dword [gornjaGranica] fld dword [donjaGranica] fsubp fabs fistp dword [esp+4] fld dword [brojac] fistp dword [esp] invoke printf,izvjesceOpreljevu end if ;AsmEnd ;Inline assembly ended. ;EndIf ;Initializing the FPU stack... finit ;Type of the directive is: EndIf-statement. ElseLabel448386: EndIfLabel432685: ;EndWhile ;Initializing the FPU stack... finit ;Type of the directive: end of the while-loop. jmp WhileLabel388282 EndWhileLabel684592: ;Else ;Initializing the FPU stack... finit ;Type of the directive: Else-statement. jmp EndIfLabel107813 ElseLabel739335: ;AsmStart ;Inline assembly begins. if ispisPoruka=1 jmp radimoMergeSort$ radimoMergeSort db "Primijenit cemo MergeSort algoritam.",10,0 radimoMergeSort$: invoke printf,radimoMergeSort end if ;AsmEnd ;Inline assembly ended. ;vrhStoga:=vrhStoga+1 ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Pushing "1" to the FPU stack... mov dword [result],0x3f800000 ;IEEE754 hex of 1 fld dword [result] ;Pushing "(+ vrhStoga 1)" to the FPU stack... faddp ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [vrhStoga],edx ;stogSDonjimGranicama(vrhStoga):=0 ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "0" to the FPU stack... mov dword [result],0x0 ;IEEE754 hex of 0 fld dword [result] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Calculating the l-value... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Moving the pointer from "st0" to "ebx". fistp dword [result] mov ebx, dword [result] ;Storing the r-value (now in "edx") where "ebx" points to. mov dword [stogSDonjimGranicama+4*ebx],edx ;stogSGornjimGranicama(vrhStoga):=n ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "n" to the FPU stack... fld dword [n] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Calculating the l-value... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Moving the pointer from "st0" to "ebx". fistp dword [result] mov ebx, dword [result] ;Storing the r-value (now in "edx") where "ebx" points to. mov dword [stogSGornjimGranicama+4*ebx],edx ;stogSPodacimaTrebaLiPetljaRazdvajatiIliSpajatiNizove(vrhStoga):=razdvajati ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "razdvajati" to the FPU stack... fld dword [razdvajati] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Calculating the l-value... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Moving the pointer from "st0" to "ebx". fistp dword [result] mov ebx, dword [result] ;Storing the r-value (now in "edx") where "ebx" points to. mov dword [stogSPodacimaTrebaLiPetljaRazdvajatiIliSpajatiNizove+4*ebx],edx ;While vrhStoga>0 ;Initializing the FPU stack... finit ;Type of the directive: beginning of the while-loop ;Marking where the evaluation of the expression begins (because it needs to be repeated once we come to the end of the loop). WhileLabel727830: ;Evaluating the expression after the "While" keyword ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Pushing "0" to the FPU stack... mov dword [result],0x0 ;IEEE754 hex of 0 fld dword [result] ;Pushing "(> vrhStoga 0)" to the FPU stack... fcomip st1 fstp dword [result] jnb secondOperandOfTheComparisonIsGreaterOrEqualLabel294224 fld1 jmp endOfTheGreaterThanComparisonLabel672299 secondOperandOfTheComparisonIsGreaterOrEqualLabel294224: fldz endOfTheGreaterThanComparisonLabel672299: ;Comparing the expression to 0... fistp dword [result] mov eax, dword [result] test eax,eax ;Branching based on whether it is 0... je EndWhileLabel514323 ;gornjaGranica:=stogSGornjimGranicama(vrhStoga) ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Pushing "(stogSGornjimGranicama vrhStoga)" to the FPU stack... fistp dword [result] mov ebx, dword [result] fld dword [stogSGornjimGranicama+4*ebx] ;In case the program is supposed to be 16-bit, simply replace 'ebx' with 'bx'. In case it's 64-bit, replace the 'mov' in the last directive with 'movsx' and 'ebx' with 'rbx' in both this and the last directive. ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [gornjaGranica],edx ;donjaGranica:=stogSDonjimGranicama(vrhStoga) ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Pushing "(stogSDonjimGranicama vrhStoga)" to the FPU stack... fistp dword [result] mov ebx, dword [result] fld dword [stogSDonjimGranicama+4*ebx] ;In case the program is supposed to be 16-bit, simply replace 'ebx' with 'bx'. In case it's 64-bit, replace the 'mov' in the last directive with 'movsx' and 'ebx' with 'rbx' in both this and the last directive. ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [donjaGranica],edx ;trebaLiSpajatiIliRazdvajati:=stogSPodacimaTrebaLiPetljaRazdvajatiIliSpajatiNizove(vrhStoga) ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Pushing "(stogSPodacimaTrebaLiPetljaRazdvajatiIliSpajatiNizove vrhStoga)" to the FPU stack... fistp dword [result] mov ebx, dword [result] fld dword [stogSPodacimaTrebaLiPetljaRazdvajatiIliSpajatiNizove+4*ebx] ;In case the program is supposed to be 16-bit, simply replace 'ebx' with 'bx'. In case it's 64-bit, replace the 'mov' in the last directive with 'movsx' and 'ebx' with 'rbx' in both this and the last directive. ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [trebaLiSpajatiIliRazdvajati],edx ;vrhStoga:=vrhStoga-1 ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Pushing "1" to the FPU stack... mov dword [result],0x3f800000 ;IEEE754 hex of 1 fld dword [result] ;Pushing "(- vrhStoga 1)" to the FPU stack... fsubp ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [vrhStoga],edx ;sredinaNiza:=(donjaGranica+gornjaGranica)/2 ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "donjaGranica" to the FPU stack... fld dword [donjaGranica] ;Pushing "gornjaGranica" to the FPU stack... fld dword [gornjaGranica] ;Pushing "(+ donjaGranica gornjaGranica)" to the FPU stack... faddp ;Pushing "2" to the FPU stack... mov dword [result],0x40000000 ;IEEE754 hex of 2 fld dword [result] ;Pushing "(/ (+ donjaGranica gornjaGranica) 2)" to the FPU stack... fdivp ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [sredinaNiza],edx ;sredinaNiza:=sredinaNiza-mod(sredinaNiza,1) ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "sredinaNiza" to the FPU stack... fld dword [sredinaNiza] ;Pushing "1" to the FPU stack... mov dword [result],0x3f800000 ;IEEE754 hex of 1 fld dword [result] ;Pushing "(mod sredinaNiza 1)" to the FPU stack... fxch fprem fxch fstp dword [result] ;Pushing "sredinaNiza" to the FPU stack... fld dword [sredinaNiza] ;Pushing "(- (mod sredinaNiza 1) sredinaNiza)" to the FPU stack... fxch fsubp ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [sredinaNiza],edx ;If trebaLiSpajatiIliRazdvajati=razdvajati ;Razdvoji niz original(donjaGranica..gornjaGranica-1) na original(donjaGranica..sredinaNiza-1) i original(sredinaNiza..gornjaGranica-1). ;Initializing the FPU stack... finit ;Type of the directive is: if-statement. ;Calculating the expression... ;Pushing "trebaLiSpajatiIliRazdvajati" to the FPU stack... fld dword [trebaLiSpajatiIliRazdvajati] ;Pushing "razdvajati" to the FPU stack... fld dword [razdvajati] ;Pushing "(= trebaLiSpajatiIliRazdvajati razdvajati)" to the FPU stack... fcomip st1 fstp dword [result] jne operandsOfTheEqualityOperatorAreNotEqualLabel118618 fld1 jmp endOfTheEqualityOperatorLabel131994 operandsOfTheEqualityOperatorAreNotEqualLabel118618: fldz endOfTheEqualityOperatorLabel131994: ;Comparing the just-calculated expression with 0... fistp dword [result] mov eax, dword [result] test eax,eax ;Branching based on whether the expression is 0... jz ElseLabel129280 ;If gornjaGranica-donjaGranica>1 ;Niz velicine 0 ili 1 vec je poredan i ne radimo nista dalje. ;Initializing the FPU stack... finit ;Type of the directive is: if-statement. ;Calculating the expression... ;Pushing "gornjaGranica" to the FPU stack... fld dword [gornjaGranica] ;Pushing "donjaGranica" to the FPU stack... fld dword [donjaGranica] ;Pushing "(- gornjaGranica donjaGranica)" to the FPU stack... fsubp ;Pushing "1" to the FPU stack... mov dword [result],0x3f800000 ;IEEE754 hex of 1 fld dword [result] ;Pushing "(> (- gornjaGranica donjaGranica) 1)" to the FPU stack... fcomip st1 fstp dword [result] jnb secondOperandOfTheComparisonIsGreaterOrEqualLabel143778 fld1 jmp endOfTheGreaterThanComparisonLabel372868 secondOperandOfTheComparisonIsGreaterOrEqualLabel143778: fldz endOfTheGreaterThanComparisonLabel372868: ;Comparing the just-calculated expression with 0... fistp dword [result] mov eax, dword [result] test eax,eax ;Branching based on whether the expression is 0... jz ElseLabel422922 ;vrhStoga:=vrhStoga+1 ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Pushing "1" to the FPU stack... mov dword [result],0x3f800000 ;IEEE754 hex of 1 fld dword [result] ;Pushing "(+ vrhStoga 1)" to the FPU stack... faddp ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [vrhStoga],edx ;stogSDonjimGranicama(vrhStoga):=donjaGranica ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "donjaGranica" to the FPU stack... fld dword [donjaGranica] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Calculating the l-value... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Moving the pointer from "st0" to "ebx". fistp dword [result] mov ebx, dword [result] ;Storing the r-value (now in "edx") where "ebx" points to. mov dword [stogSDonjimGranicama+4*ebx],edx ;stogSGornjimGranicama(vrhStoga):=gornjaGranica ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "gornjaGranica" to the FPU stack... fld dword [gornjaGranica] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Calculating the l-value... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Moving the pointer from "st0" to "ebx". fistp dword [result] mov ebx, dword [result] ;Storing the r-value (now in "edx") where "ebx" points to. mov dword [stogSGornjimGranicama+4*ebx],edx ;stogSPodacimaTrebaLiPetljaRazdvajatiIliSpajatiNizove(vrhStoga):=spajati ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "spajati" to the FPU stack... fld dword [spajati] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Calculating the l-value... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Moving the pointer from "st0" to "ebx". fistp dword [result] mov ebx, dword [result] ;Storing the r-value (now in "edx") where "ebx" points to. mov dword [stogSPodacimaTrebaLiPetljaRazdvajatiIliSpajatiNizove+4*ebx],edx ;;Stavljamo naputak za spajanje nizova prvog na stog kako bi on onda bio zadnji izvaden iz njega. ;The entire line is a comment, moving on... ;vrhStoga:=vrhStoga+1 ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Pushing "1" to the FPU stack... mov dword [result],0x3f800000 ;IEEE754 hex of 1 fld dword [result] ;Pushing "(+ vrhStoga 1)" to the FPU stack... faddp ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [vrhStoga],edx ;stogSDonjimGranicama(vrhStoga):=donjaGranica ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "donjaGranica" to the FPU stack... fld dword [donjaGranica] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Calculating the l-value... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Moving the pointer from "st0" to "ebx". fistp dword [result] mov ebx, dword [result] ;Storing the r-value (now in "edx") where "ebx" points to. mov dword [stogSDonjimGranicama+4*ebx],edx ;stogSGornjimGranicama(vrhStoga):=sredinaNiza ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "sredinaNiza" to the FPU stack... fld dword [sredinaNiza] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Calculating the l-value... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Moving the pointer from "st0" to "ebx". fistp dword [result] mov ebx, dword [result] ;Storing the r-value (now in "edx") where "ebx" points to. mov dword [stogSGornjimGranicama+4*ebx],edx ;stogSPodacimaTrebaLiPetljaRazdvajatiIliSpajatiNizove(vrhStoga):=razdvajati ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "razdvajati" to the FPU stack... fld dword [razdvajati] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Calculating the l-value... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Moving the pointer from "st0" to "ebx". fistp dword [result] mov ebx, dword [result] ;Storing the r-value (now in "edx") where "ebx" points to. mov dword [stogSPodacimaTrebaLiPetljaRazdvajatiIliSpajatiNizove+4*ebx],edx ;vrhStoga:=vrhStoga+1 ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Pushing "1" to the FPU stack... mov dword [result],0x3f800000 ;IEEE754 hex of 1 fld dword [result] ;Pushing "(+ vrhStoga 1)" to the FPU stack... faddp ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [vrhStoga],edx ;stogSDonjimGranicama(vrhStoga):=sredinaNiza ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "sredinaNiza" to the FPU stack... fld dword [sredinaNiza] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Calculating the l-value... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Moving the pointer from "st0" to "ebx". fistp dword [result] mov ebx, dword [result] ;Storing the r-value (now in "edx") where "ebx" points to. mov dword [stogSDonjimGranicama+4*ebx],edx ;stogSGornjimGranicama(vrhStoga):=gornjaGranica ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "gornjaGranica" to the FPU stack... fld dword [gornjaGranica] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Calculating the l-value... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Moving the pointer from "st0" to "ebx". fistp dword [result] mov ebx, dword [result] ;Storing the r-value (now in "edx") where "ebx" points to. mov dword [stogSGornjimGranicama+4*ebx],edx ;stogSPodacimaTrebaLiPetljaRazdvajatiIliSpajatiNizove(vrhStoga):=razdvajati ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "razdvajati" to the FPU stack... fld dword [razdvajati] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Calculating the l-value... ;Pushing "vrhStoga" to the FPU stack... fld dword [vrhStoga] ;Moving the pointer from "st0" to "ebx". fistp dword [result] mov ebx, dword [result] ;Storing the r-value (now in "edx") where "ebx" points to. mov dword [stogSPodacimaTrebaLiPetljaRazdvajatiIliSpajatiNizove+4*ebx],edx ;EndIf ;Initializing the FPU stack... finit ;Type of the directive is: EndIf-statement. ElseLabel422922: EndIfLabel510647: ;Else ;Spoji vec poredane nizove original(donjaGranica..sredinaNiza-1) i original(sredinaNiza..gornjaGranica-1) u novi poredani niz original(donjaGranica..gornjaGranica-1). ;Initializing the FPU stack... finit ;Type of the directive: Else-statement. jmp EndIfLabel744549 ElseLabel129280: ;i:=donjaGranica ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "donjaGranica" to the FPU stack... fld dword [donjaGranica] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [i],edx ;gdjeSmoUPrvomNizu:=donjaGranica ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "donjaGranica" to the FPU stack... fld dword [donjaGranica] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [gdjeSmoUPrvomNizu],edx ;gdjeSmoUDrugomNizu:=sredinaNiza ;Initializing the FPU stack... finit ;Type of the directive is: assignment. ;Calculating the rvalue... ;Pushing "sredinaNiza" to the FPU stack... fld dword [sredinaNiza] ;Storing the top of the FPU stack into "edx". fstp dword [result] mov edx, dword [result] ;Storing the r-value (now in "edx") into the variable. mov dword [gdjeSmoUDrugomNizu],edx ;While i