Please support our Assembly advertiser: Programming Forums
Views: 1000 | Replies: 0
![]() |
•
•
Join Date: Nov 2004
Posts: 20
Reputation:
Rep Power: 0
Solved Threads: 0
I am having trouble trying to get this machine language program to work with pep/8. Write a machine language program to input two one-digit numbers from the user, add them, and output the one-digit sum. Beacuse this program is at the machine language level you only should use character input, which is why theis question only requires single-digit numbers.
49 00 11 ; input first num
79 00 13 ; add the first and second num
A1 00 15 ;convert the sum to character
F1 00 10 ; store the character
51 00 10 ; output the character
00 ; stop
49 00 11 79 00 13 A1 00 15 F1 00 10 51 00 10 00 00 00 zz
49 00 11 ; input first num
79 00 13 ; add the first and second num
A1 00 15 ;convert the sum to character
F1 00 10 ; store the character
51 00 10 ; output the character
00 ; stop
49 00 11 79 00 13 A1 00 15 F1 00 10 51 00 10 00 00 00 zz
Last edited by WaltP : Mar 21st, 2007 at 3:45 am. Reason: Remove the gawdawful color tag
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode