a_rishi
Newbie level 2
- Joined
- May 1, 2015
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 19
Hi Everybody
Could you please help me;
I need to add even numbers and odd numbers separately and store the result in the Even sum and Odd sum register respectively.
I'm trying a code as follow. I'm a complete novice in microprocessor.
Please help to complete and correct the errors. Thanks in advance
Could you please help me;
I need to add even numbers and odd numbers separately and store the result in the Even sum and Odd sum register respectively.
I'm trying a code as follow. I'm a complete novice in microprocessor.
Code ASM - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 . model small .data ARRAY dB 45H, 07H, 61H, 47H, 17H, 16H, 08H, 55H, 63H, 74H Even Sum dB ? Odd Sum dB ? .Code START: MOV AX, @data MOV DS, AX MOV DI, 00H MOV DI,00H MOV CL, 0AH LABEL: MOV BL, ARRAY [DI] MOV AL,BL RCR AL,1 JNC EV INC DI DEC CL JC OD END LABEL END EV: MOV AL, DL MOV Sum, DH END EV END
Please help to complete and correct the errors. Thanks in advance
Last edited by a moderator: