skeet123 0 Unverified User

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.