subject

Ihave the assembly for the max. can someone change the variables of it and make it min. i mean, the assembly for finding the min of the flaoting points.
.686
.model flat
.code
_max proc ; name of fucntion
start:
push ebp ; save caller frame pointer
mov ebp, esp ; establish current frame pointer
mov ebx, [ebp+8] ; store address of first array element into ebx
mov ecx, [ebp+12] ; store the size of array into ecx
xor edx, edx ; initialize loop counter edx to zero
fld dword ptr[ebx] ; load first array element arrary onto st(0)
inc edx ; increment loop counter in edx
loopmax:
fld dword ptr[ebx+edx*4] ; load next array element onto st(1)
fcom st(1) ; compare st(0) with st(1)
fstsw ax ; copy the status word containing the result to ax
fwait ; insure the previous instruction is completed
sahf ; transfer the condition codes to the cpu's flag register
ja looknext ; if st(0) > st(1) jump to looknext to continue with next array element
fcomp ; pop st(0) because new maximum is in st(1)
; after pop, the new max is again in st(0)
looknext:
inc edx ; increment counter in edx
cmp ecx, edx ; compare array size in ecx with loop counter in edx
jg loopmax ; if ecx > edx then jump to loopmax
pop ebp ; restore caller frame pointer
ret ; return contents of st(0)_max endp
end

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:00
Assume that you have an array of integers named a. which of these code segments print the same results? int i = 1; while(i < a.length) { system.out.println(a[i]); i++; } int i; for (i = 0; i < a.length; i++) { system.out.println(a[i]); } for (int i : a) { system.out.println(i); } i and ii only ii and iii only i and iii only all three print the same results. all three print different results.
Answers: 3
question
Computers and Technology, 22.06.2019 10:00
Businesses allocate resources for their best and most productive uses. the more a resource, the more costly it will be. a manufacturer that requires scarce and costly resources is likely to charge for its products.
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Stops: using the information learned in this course, explain three things you will not do when driving. a. b. c. explain why you will not do these things when driving. starts: using the information learned in this course, explain three things you will do when driving. a. b. c. explain why you will do these particular things when driving. explain one thing you will stop doing as a passenger. explain one thing you will start doing as a passenger.
Answers: 3
question
Computers and Technology, 23.06.2019 14:00
How are stop motion special effects in animated films created
Answers: 1
You know the right answer?
Ihave the assembly for the max. can someone change the variables of it and make it min. i mean, the...
Questions
question
Mathematics, 04.02.2020 06:46
question
Geography, 04.02.2020 06:47
question
Mathematics, 04.02.2020 06:47
Questions on the website: 13722367