VTech Alphabert s Magic Readport User Manual Page 5

  • Download
  • Add to my manuals
  • Print
  • Page
    / 80
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 4
BM Dept., Govt. Engg. College, Gandhinagar Page 5
EXPERIMENT NO. 1
AIM: Write a program to ….
Add two 8 bit numbers stored in register R6 and R7.
Multiply two 8 bit numbers stored in register R6 and R7.
To find 1’s complement of number stored in register R0.
To perform AND operation between content of register R0 and R1.
Assembly language programs:
Program 1: To add two 8 bit numbers stored in register R6 and R7.
ORG 00h
MOV R6,#55h ; Transfer data 55h to register R6
MOV R7,#44h ; Transfer data 44h to register R7
MOV A,R6 ; Transfer content of register R6 to accumulator
ADD R7 ; Add content of R7 with accumulator and store result in A
END ; End of program
Program 2: To multiply two 8 bit numbers stored in register R6 and R7.
ORG 00h
MOV R6,#55h ; Transfer data 55h to register R6
MOV R7,#44h ; Transfer data 44h to register R7
MOV A,R6 ; Transfer content of register R6 to accumulator
MOV B, R7 ; Transfer content of R7 in register B
MUL AB ; Multiply accumulator and register B, Store result in both
END ; End of program
Program 3: To find 1’s complement of number stored in register R0. Store result in
register R1.
ORG 00h
MOV A,R0 ; Transfer number stored in R0 to Accumulator
CPL A ; Complement the content of accumulator
MOV R1,A ; Store result in register R1
END ; End of program
Program 4: To perform AND operation between content of register R0 and R1. Store
result in register R3.
ORG 00h
MOV A,R0 ; Transfer number stored in R0 to Accumulator
ANL A,R1 ; AND operation between A and register R1
MOV R3,A ; Store result in register R3
END ; End of program
Note: Check execution of program 3 and 4 by loading different values in registers.
Page view 4
1 2 3 4 5 6 7 8 9 10 ... 79 80

Comments to this Manuals

No comments