Write to program to perform the followings You can use the i

Write to program to perform the followings. You can use the instructions bne and decb. A. Clear accumulator B B. add 5 to B 100 times. Write a program to determine that the memory location $0500 contains the value 1. If so put the value $99 in it. Write a program to reset contents of 100 memory locations starting at address $0100.

Solution

1.

CLRB

LDAA #$100

LOOP:

ADDB #$5

DECA

BNE LOOP

2.

LDDB #$0100 #load the starting address to Acc B
LDX #$100 # count is loaded in index register

LOOP:
   CLRB # clear the current memory location
   INCB

DEX # decrement Index register
BNE X, LOOP: # if not equal to zero then loop

 Write to program to perform the followings. You can use the instructions bne and decb. A. Clear accumulator B B. add 5 to B 100 times. Write a program to deter

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site