Question: ? s t a r t : ; M a t h i n p u t l e a dx , [ prompt 1

?start:
;Mathinput
leadx,[prompt1]
movah,09h
int21h
leasi,[math_grades]
callinput_grades
;Scienceinput
leadx,[prompt2]
movah,09h
int21h
leasi,[science_grades]
callinput_grades
;Englishinput
leadx,[prompt3]
movah,09h
int21h
leasi,[english_grades]
callinput_grades
;Displayreportheader
leadx,[report_header]
movah,09h
int21h
leadx,[newline]
movah,09h
int21h
leadx,[report_line]
movah,09h
int21h
leadx,[newline]
movah,09h
int21h
;Displaycourseheaders
leadx,[course_headers]
movah,09h
int21h
leadx,[newline]
movah,09h
int21h
leadx,[report_line]
movah,09h
int21h
leadx,[newline]
movah,09h
int21h
;ProcessanddisplayMathdegrees
leasi,[math_grades]
leadi,[math_degrees+1]
callcategorize_degrees
calldisplay_degrees
;ProcessanddisplaySciencedegrees
leasi,[science_grades]
leadi,[science_degrees+1]
callcategorize_degrees
calldisplay_degrees
;ProcessanddisplayEnglishdegrees
leasi,[english_grades]
leadi,[english_degrees+1]
callcategorize_degrees
calldisplay_degrees
;Exittheprogram
movah,4Ch
int21h
input_grades:
xorcx,cx;Initializecounter
input_loop:
movah,01h;Readcharacterfromstandardinput
int21h
cmpal,13;Checkifit'sEnter
jeinput_done
mov[si],al;Storethecharacterinthebuffer
incsi
inccx
cmpcx,30;Checkif30charactersareentered
jeinput_done
jmpinput_loop
input_done:
ret
categorize_degrees:
xorcx,cx;C

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!