Show your support by donating any amount. (Note: We are still technically a for-profit company, so your
contribution is not tax-deductible.)
PayPal Acct:
Feedback:
Donate to VoyForums (PayPal):
[ Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time ] |
¼g¤@Óµ{¦¡¥hpºâ¤U¤è°}¦C¤¤¦¨ÁZªºÁ`¥§¡¡A
1.µ²ªGn¥|±Ë¤¤J
2.IDµ¥©ó0®Éµ²§ô
Student dw 100 dup(6 dup (0))
¤»ÓÄæ¦ì ¡G ID, exam1, exam2, exam3, exam4, average
Answer:
ID equ word ptr [student + si]
exam1 equ word ptr [student + 2 + si]
exam2 equ word ptr [student + 4 + si]
exam3 equ word ptr [student + 6 + si]
exam4 equ word ptr [student + 8 + si]
Average equ word ptr [student + 10 + si]
xor si, si ;si = 0
mov bl, 4 ;four exams
Next_Student:
cmp ID, 0
je Done
xor ax, ax ;ax = 0
add ax, exam1
add ax, exam2
add ax, exam3
add ax, exam4
div bl ;div 4 to get average
;Remainder > 4, average++
cmp ah, 2 ;ª`·N¬O2
jb skip
inc al
Skip:
xor ah, ah
mov Average, ax
add si, 12
jmp Next_Student
Done:
[
Next Thread |
Previous Thread |
Next Message |
Previous Message
]