LAB - NO-1: Task 1
LAB - NO-1: Task 1
LAB.NO-1
TASK 1:
Write a program to move a value 99h (hex) to accumulator (a).And from the accumulator
you have to move it to r0 to r7 registers. With the help of simulator see the steps of a program
and examine the register.
PROGRAM:
org 00h
mov a,#99h
mov r0,a
mov r1,a
mov r2,a
mov r3,a
mov r4,a
mov r5,a
mov r6,a
mov r7,a
end
RESULTS:
a = 0x99
r0 = 0x99
r1 = 0x99
r2 = 0x99
r3 = 0x99
r4 = 0x99
r5 = 0x99
r6 = 0x99
r7 = 0x99
TASK.2:
Write a program in which add 7 values by using simulator with add function and also
place the result in r2 (register).
PROGRAM:
org 00h
mov a,#00h
add a,#01h
add a,#02h
add a,#03h
add a,#04h
add a,#05h
add a,#06h
add a,#07h
mov r2,a
end
RESULT:
a = 0x1c
r2 = 0x1c