Question: Why is MASM printing this in reverse order? . data ; ( insert variable definitions here ) intro _ 1 BYTE Welcome to Chaotic Temperature
Why is MASM printing this in reverse order?
data
; insert variable definitions here
intro BYTE "Welcome to Chaotic Temperature Statistics Programmed by Nicole",
intro BYTE "This program generates a series of temperature readings, X per day for Y days,",
intro BYTE "depending on constants, and performs some basic statistics on them: daily high and low",
intro BYTE "and average high and low temps. It then prints these results, with descriptive titles.",
code
main PROC
PUSH OFFSET intro
PUSH OFFSET intro ;greeting and explanation
PUSH OFFSET intro
PUSH OFFSET intro
call printGreeting
call generateTemperatures
call findDailyHighs
call findDailyLows
call calcAverageLowHighTemps
call displayTempArray
call displayTempWithString
Invoke ExitProcess,
main ENDP
;
;Name: printGreeting
;Procedure to introduce the program & programmer
;preconditions: intros are described
;postconditions: EDX changed
;receives:
;returns:
;
printGreeting PROC ;introduce programmer
PUSH EBP
MOV EBP, ESP
; EBP address of OFFSET intro
; EBP address of OFFSET intro
; EBP address of OFFSET intro
; EBP address of OFFSET intro
; EBP return address
; EBP old ebp
MOV EDX, EBP
CALL WriteString
MOV EDX, EBP
CALL WriteString
MOV EDX, EBP
CALL WriteString
MOV EDX, EBP
CALL WriteString
POP EBP
RET
printGreeting ENDP
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
