Mã chương trình Assembler

Một phần của tài liệu Thiết kế mạch hiển thị chữ trường đại học sư phạm dùng vi điều khiển (Trang 39 - 52)

MAIN:

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#11111111B JNB P3.0,CT1

JNB P3.1,CT2 JNB P3.2,CT3 JNB P3.3,CT4 LJMP MAIN

;**********************************

CT2:

LCALL LOPCT2 LJMP CT2

CT3:

LCALL LOPCT3 LJMP CT3

CT4:

LCALL LOPCT4 LJMP CT4

;**********************************

CT1:

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00000001B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00000011B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00000111B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00001111B MOV P0,#00000000B MOV P1,#00000000B

LCALL TRE1

MOV P2,#00011111B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00111111B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#01111111B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#10000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11100000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11110000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111100B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111110B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B

MOV P0,#11111111B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000001B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000010B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000001B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000011B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000111B MOV P1,#00000011B

LCALL TRE1

MOV P2,#00000000B MOV P0,#00001111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00011111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#01111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#10000000B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#11000000B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#11100000B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#11110000B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#11111000B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#11111100B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#11111110B

MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

LJMP CT1 LOPCT2:

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00100001B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00110011B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00111111B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00111111B

MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00111111B MOV P0,#00011000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00111111B MOV P0,#00111100B MOV P1,#00000000B LCALL TRE1

MOV P2,#00111111B MOV P0,#01111110B MOV P1,#00000000B LCALL TRE1

MOV P2,#00111111B MOV P0,#11111111B MOV P1,#00000000B LCALL TRE1

MOV P2,#10111111B MOV P0,#11111111B MOV P1,#00000001B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B

LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B

MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B CALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B CALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B

LCALL TRE1 RET

LOPCT3:

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00100000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00110000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00111000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00111100B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00111110B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00111111B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#00111111B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#01111111B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#00000000B MOV P1,#00000000B

LCALL TRE1

MOV P2,#11111111B MOV P0,#10000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11100000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11110000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111100B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111110B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000001B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B

MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B

LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

RET LOPCT4:

MOV P2,#00000000B MOV P0,#00000000B MOV P1,#00000000B LCALL TRE1

MOV P2,#10101010B MOV P0,#01010101B MOV P1,#00000010B LCALL TRE1

MOV P2,#01010101B MOV P0,#10101010B MOV P1,#00000001B LCALL TRE1

MOV P2,#10101010B MOV P0,#01010101B MOV P1,#00000010B LCALL TRE1

MOV P2,#01010101B MOV P0,#10101010B MOV P1,#00000001B LCALL TRE1

MOV P2,#10101010B MOV P0,#01010101B MOV P1,#00000010B LCALL TRE1

MOV P2,#01010101B MOV P0,#10101010B MOV P1,#00000001B LCALL TRE1

MOV P2,#10101010B MOV P0,#01010101B MOV P1,#00000010B

LCALL TRE1

MOV P2,#01010101B MOV P0,#10101010B MOV P1,#00000001B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

MOV P2,#11111111B MOV P0,#11111111B MOV P1,#00000011B LCALL TRE1

RET

; *******************

TRE1:

JNB P3.7,$

JB P3.7,$

JNB P3.7,$

JB P3.7,$

MOV R7,#0

D11: JNB P3.7,D11 INC R7

CJNE R7,#255,D11 RET

END

Một phần của tài liệu Thiết kế mạch hiển thị chữ trường đại học sư phạm dùng vi điều khiển (Trang 39 - 52)

Tải bản đầy đủ (PDF)

(54 trang)