0% found this document useful (0 votes)
8 views6 pages

Assembly Language Practical Exercises

The document contains a series of assembly language code snippets for practical exercises involving data manipulation and delays using registers and ports. Each practical demonstrates different operations such as moving data between registers, creating delays, and outputting binary values to ports. The code is structured with labels and loops to facilitate repeated execution of tasks.

Uploaded by

ajayshinde9945
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views6 pages

Assembly Language Practical Exercises

The document contains a series of assembly language code snippets for practical exercises involving data manipulation and delays using registers and ports. Each practical demonstrates different operations such as moving data between registers, creating delays, and outputting binary values to ports. The code is structured with labels and loops to facilitate repeated execution of tasks.

Uploaded by

ajayshinde9945
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PRACTICAL NO.

Code :

ORG 0000H
MOV R0,#30H MOV
R1,#40H
MOV R2,#0AH
BACK:MOV A,@R0
MOV @R1,A
INC R0 INC
R1
DJNZ R2,BACK
END
CODE :

ORG 0000H
MOV R0,#30H MOV
R1,#40H
MOV R2,#0AH
BACK:MOV A,@R0
MOVx @R1,A
INC R0 INC
R1
DJNZ R2,BACK
END
PRACTICAL NO. 2

CODE:

ORG 0000H
START:MOV P0, #0FFH
CALL DELAY
MOV P0, #00H
CALL DELAY
SJMP START
DELAY:MOV R0, #0FH
L3:MOV R1,#0FFH
L1:MOV R1,#0FFH
L2:DJNZ R1, L2
DJNZ R2, L1
DJNZ RO, L3
RET

END
CODE:
ORG 0000H
MOV P0,#00H
START:MOV P0, #0AAH
CALL DELAY
MOV P0.#55H
CALL DELAY
SJMP START
DELAY: MOV R0, #0FH
L3:MOV R1,#0FFH
L1:MOV R1,#0FFH
L2:DJNZ R1, L2
DJNZ R2, L1
DJNZ RO, L3
RET END
PRACTICAL NO.3
Code:
ORG 0000H

MOV P1, #00001111B ;

CALL DELAY

MOV P0, #11111111B ; all bits high

START:

MOV P0, #11000000B ; 0

CALL DELAY

MOV P0, #11111001B ; 1

CALL DELAY

MOV P0, #10100100B ; 2

CALL DELAY

MOV P0, #10110000B ; 3

CALL DELAY

MOV P0, #10011001B ; 4 (typo fixed: last digit B not 8)

CALL DELAY

MOV P0, #10010010B ; 5

CALL DELAY

MOV P0, #10000010B ; 6

CALL DELAY

MOV P0, #11111000B ; 7

CALL DELAY

MOV P0, #10000000B ; 8

CALL DELAY

MOV P0, #10010000B ; 9

CALL DELAY SJMP START


DELAY:

MOV R0, #0FH

L3: MOV R2, #0FFH

L1: MOV R1, #0FFH

L2: DJNZ R1, L2

DJNZ R2, L1

DJNZ R0, L3

RET

END
Practical No. 4

CODE :

ORG 0000H START:


MOV P1, #0CH CALL
DELAY
MOV P1, #06H
CALL DELAY
MOV P1, #03H
CALL DELAY
MOV P1, #09H
CALL DELAY SJMP
START DELAY:
MOV R0, #0FH
L3: MOV R2, #0FFH
L1: MOV R1, #0FFH
L2: DJNZ R1, L2
DJNZ R2, L1
DJNZ R0, L3
RET
END

You might also like