Question: - - - - - - - - - - - - - - - - - - - - - - - - -
;Name: generateTemperatures
;parameters: tempArray referenceoutput
;MINTEMP, MAXTEMP, DAYSMEASURED, TEMPSPERDAY will be used as globals within this procedure.
;Randomly generate temperatures within the range and stores them in tempArray
;preconditions:
;postconditions:
;receives:
;returns: tempArray
;
generateTemperatures PROC
PUSHAD
PUSH EBP
MOV EBP, ESP
; EBPaddress of ARRAYSIZE
; EBPaddress of OFFSET tempArray
; EBPreturn address
; EBPold ebp
MOV EDI, EBP
MOV EBX, EBP
MOV ECX,
generateLoop:
MOV EAX, ECX
MUL EAX
CALL RandomRange
MOV EDIEAX
ADD EDI,
INC ECX
CMP ECX, EBX
JBE generateLoop
POP EBP
POPAD
RET
generateTemperatures ENDP
this procedure not working and I keep getting the attached error. how can I fix it to function correctly
iMicrosoft Visual Studio Debug Console
Welcome to Chaotic Temperature Statistics Programmed by Nicole
This program generates a series of temperature readings, X per day for Y days, depending on constants, and performs some basic statistics on them: daily high and low and average high and low temps. It then prints these results, with descriptive titles.
C: CSProject DebugProjectexe process exited with code xcPress any key to close this window
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
