Nguyên văn bởi thanhthuong
Xem bài viết
nếu chơưng trình 1 em sửa lại như thế này thì nó chỉ đếm dc 255 chữ là thôi không đếm tiếp nữa:
dn1 bit p3.0
dn2 bit p3.1
dn3 bit p3.2
dn4 bit p3.3
dn5 bit p3.4
dn6 bit p3.5
dn7 bit p3.6
dn8 bit p3.7
dn9 bit p0.7
dn10 bit p0.6
dn11 bit p0.5
dn12 bit p0.4
dn13 bit p0.3
dn14 bit p0.2
dn15 bit p0.1
dn16 bit p0.0
dn17 bit p1.7
dn18 bit p1.6
dn19 bit p1.5
dn20 bit p1.4
dn21 bit p1.3
dn22 bit p1.2
dn23 bit p1.1
dn24 bit p1.0
d1 data 10h
d2 data 11h
d3 data 12h
d4 data 13h
d5 data 14h
d6 data 15h
d7 data 16h
d8 data 17h
xuat equ p2
lap equ r2
tang equ r1
org 00h
mov a,#00h
mov dptr,#BEGIN
mov p3,#00h
mov lap,#0
mov d1,#00h
mov d2,#00h
mov d3,#00h
mov d4,#00h
mov d5,#00h
mov d6,#00h
mov d7,#00h
mov d8,#00h
org 40h
main:
lcall ctxl
xoay:
lcall ctht
djnz lap,xoay
ljmp main
ctxl:
mov d1,d2
mov d2,d3
mov d3,d4
mov d4,d5
mov d5,d6
mov d6,d7
mov d7,d8
mov a,#00h
movc a,@a+dptr
mov d8,a
CALL TRE
inc tang
cjne a,#0C0h,thoat
mov dptr,#00h
mov tang,#00h
thoat:
mov a,tang
ret
ctht:
clr dn8
mov xuat,d8
lcall tre
setb dn8
clr dn7
mov xuat,d7
lcall tre
setb dn7
clr dn6
mov xuat,d6
lcall tre
setb dn6
clr dn5
mov xuat,d5
lcall tre
setb dn5
clr dn4
mov xuat,d4
lcall tre
setb dn4
clr dn3
mov xuat,d3
lcall tre
setb dn3
clr dn2
mov xuat,d2
lcall tre
setb dn2
clr dn1
mov xuat,d1
lcall tre
setb dn1
ret
tre:
mov r5,#1
de: mov r6,#30
djnz r6,$
djnz r5,de
ret
org 200h
BEGIN: db 01h,01h,0ffh,01h,01h,00h,0ffh,11h,11h,11h,0eeh,00h ,0fch,12h,11h,12h,0fch,00h,0ffh,0ch,08h,30h,0ffh,0 0h,00h,01h,01h,0ffh,01h,01h,00h,0ffh,08h,08h,08h,0 ffh,00h,7fh,80h,80h,80h,0ffh,00h,7eh,81h,81h,81h,7 eh,00h,0ffh,0ch,08h,30h,0ffh,00h
q: db 7eh,81h,81h,91h,0f1h,00h,00h,0ffh,89h,81h,81h,7eh, 00h,01h,01h,0ffh,01h,01h,00h,3fh,40h,80h,40h
h: db 3fh,00h,01h,01h,0ffh,01h,01h,00h,00h,0ffh,89h,81h, 81h,7eh,00h,0fch,12h,11h,12h,0fch,00h,0ffh,00h,00h ,0ffh,08h,08h,08h,0ffh,00h,7eh,81h,81h,81h,7eh,00h ,0c0h
v: db 7eh,81h,81h,81h,81h,00h,00h,7eh,81h,81h,0c1h,0feh, 00h,7fh,80h,80h,80h,0ffh,00h,07h,08h,0f8h,08h,07h, 00h,00h,0ffh,0ch,08h,30h,0ffh,00h,0ffh,08h,08h,08h ,0ffh,00h,7eh,81h,81h,81h,7eh,00h,0ffh,0ch,08h,30h ,0ffh,00h,08h,08h,08h,08h,00h,0ffh,08h,08h,08h
c1: db 0ffh,00h,0fch,12h,11h,12h,0fch,00h,07h,08h,0f8h,08 h,07h,00h,00h,3fh,40h,80h,40h,3fh,00h,7fh,80h,80h, 80h,0ffh,00h,7eh,81h,81h,81h,7eh,00h,01h,01h,0ffh, 01h,01h,00h,00h,7eh,81h,81h,0c1h,0feh,00h,7fh,80h, 80h,80h,0ffh,00h
a1: db 0fch,12h,11h,12h,0fch,00h,00h,0ffh,02h,04h,02h,0ff h,00h,0ffh,00h,0ffh,04h,08h,10h,20h,0ffh,00h
m: db 0ffh,08h,08h,08h,0ffh,00h,00h,00h,00h
x: db 7eh,81h,81h,81h,81h,00h,00h,7eh,81h,81h,0c1h,0feh, 00h,7fh,80h,80h,80h,0ffh,00h,07h,08h,0f8h,08h,07h, 00h,00h,0ffh,0ch,08h,30h,0ffh,00h,0ffh,08h,08h,08h ,0ffh,00h,7eh,81h,81h,81h,7eh,00h,0ffh,0ch,08h,30h ,0ffh,00h,08h,08h,08h,08h,00h,0ffh,08h,08h,08h
CHUC: DB 3EH,41H,41H,41H,22H,00h,7FH,08H,08H,08H,7FH,00h,3F H,40H,40H,40H,3FH,00h,3EH,41H,41H,41H,22H ;chuc
MUNG: DB 00h,00h,00h,7FH,02H,04H,02H,7FH,00h,3FH,40H,40H,40 H,3FH,00h,7FH,06H,08H,30H,7FH,00h,3EH,41H,41H,49H, 7AH ;mung
NAM: DB 00h,00h,00h,7FH,06H,08H,30H,7FH,00h,7EH,09H,09H,09 H,7EH,00h,7FH,02H,04H,02H,7FH ;nam
MOI: DB 00h,00h,00h,7FH,02H,04H,02H,7FH,00h,3EH,41H,41H,41 H,3EH,00h,41H,41H,7FH,41H,41H,00h,00h,5FH ;moi !
HAPPY: DB 00h,00h,00h,7FH,08H,08H,08H,7FH,00h,7EH,09H,09H,09 H,7EH,00h,7FH,09H,09H,09H,06H,00h,7FH,09H,09H,9H,0 6H,00h,03H,04H,78H,04H,03H ;happy
NEW:
machu: db 0ffh,0ffh,81h,7eh,7eh,7eh,0ffh,0ffh
machu1: db 0f1h,0efh,0efh,0efh,0efh,0efh,0efh,0e1h
ma: db 22h,22h,22h,3eh,22h,22h,22h,22h,00h,0C0H
end
VÌ EM MUÓN CHẠY 1 BẢNG QUẢNG CÁO DÀI NHƯNG EM LÀM MÃI MÀ KO DC.CÁC BÁC GIẢI DÙM EM NHÉ.
dn1 bit p3.0
dn2 bit p3.1
dn3 bit p3.2
dn4 bit p3.3
dn5 bit p3.4
dn6 bit p3.5
dn7 bit p3.6
dn8 bit p3.7
dn9 bit p0.7
dn10 bit p0.6
dn11 bit p0.5
dn12 bit p0.4
dn13 bit p0.3
dn14 bit p0.2
dn15 bit p0.1
dn16 bit p0.0
dn17 bit p1.7
dn18 bit p1.6
dn19 bit p1.5
dn20 bit p1.4
dn21 bit p1.3
dn22 bit p1.2
dn23 bit p1.1
dn24 bit p1.0
d1 data 10h
d2 data 11h
d3 data 12h
d4 data 13h
d5 data 14h
d6 data 15h
d7 data 16h
d8 data 17h
xuat equ p2
lap equ r2
tang equ r1
org 00h
mov a,#00h
mov dptr,#BEGIN
mov p3,#00h
mov lap,#0
mov d1,#00h
mov d2,#00h
mov d3,#00h
mov d4,#00h
mov d5,#00h
mov d6,#00h
mov d7,#00h
mov d8,#00h
org 40h
main:
lcall ctxl
xoay:
lcall ctht
djnz lap,xoay
ljmp main
ctxl:
mov d1,d2
mov d2,d3
mov d3,d4
mov d4,d5
mov d5,d6
mov d6,d7
mov d7,d8
mov a,#00h
movc a,@a+dptr
mov d8,a
CALL TRE
inc tang
cjne a,#0C0h,thoat
mov dptr,#00h
mov tang,#00h
thoat:
mov a,tang
ret
ctht:
clr dn8
mov xuat,d8
lcall tre
setb dn8
clr dn7
mov xuat,d7
lcall tre
setb dn7
clr dn6
mov xuat,d6
lcall tre
setb dn6
clr dn5
mov xuat,d5
lcall tre
setb dn5
clr dn4
mov xuat,d4
lcall tre
setb dn4
clr dn3
mov xuat,d3
lcall tre
setb dn3
clr dn2
mov xuat,d2
lcall tre
setb dn2
clr dn1
mov xuat,d1
lcall tre
setb dn1
ret
tre:
mov r5,#1
de: mov r6,#30
djnz r6,$
djnz r5,de
ret
org 200h
BEGIN: db 01h,01h,0ffh,01h,01h,00h,0ffh,11h,11h,11h,0eeh,00h ,0fch,12h,11h,12h,0fch,00h,0ffh,0ch,08h,30h,0ffh,0 0h,00h,01h,01h,0ffh,01h,01h,00h,0ffh,08h,08h,08h,0 ffh,00h,7fh,80h,80h,80h,0ffh,00h,7eh,81h,81h,81h,7 eh,00h,0ffh,0ch,08h,30h,0ffh,00h
q: db 7eh,81h,81h,91h,0f1h,00h,00h,0ffh,89h,81h,81h,7eh, 00h,01h,01h,0ffh,01h,01h,00h,3fh,40h,80h,40h
h: db 3fh,00h,01h,01h,0ffh,01h,01h,00h,00h,0ffh,89h,81h, 81h,7eh,00h,0fch,12h,11h,12h,0fch,00h,0ffh,00h,00h ,0ffh,08h,08h,08h,0ffh,00h,7eh,81h,81h,81h,7eh,00h ,0c0h
v: db 7eh,81h,81h,81h,81h,00h,00h,7eh,81h,81h,0c1h,0feh, 00h,7fh,80h,80h,80h,0ffh,00h,07h,08h,0f8h,08h,07h, 00h,00h,0ffh,0ch,08h,30h,0ffh,00h,0ffh,08h,08h,08h ,0ffh,00h,7eh,81h,81h,81h,7eh,00h,0ffh,0ch,08h,30h ,0ffh,00h,08h,08h,08h,08h,00h,0ffh,08h,08h,08h
c1: db 0ffh,00h,0fch,12h,11h,12h,0fch,00h,07h,08h,0f8h,08 h,07h,00h,00h,3fh,40h,80h,40h,3fh,00h,7fh,80h,80h, 80h,0ffh,00h,7eh,81h,81h,81h,7eh,00h,01h,01h,0ffh, 01h,01h,00h,00h,7eh,81h,81h,0c1h,0feh,00h,7fh,80h, 80h,80h,0ffh,00h
a1: db 0fch,12h,11h,12h,0fch,00h,00h,0ffh,02h,04h,02h,0ff h,00h,0ffh,00h,0ffh,04h,08h,10h,20h,0ffh,00h
m: db 0ffh,08h,08h,08h,0ffh,00h,00h,00h,00h
x: db 7eh,81h,81h,81h,81h,00h,00h,7eh,81h,81h,0c1h,0feh, 00h,7fh,80h,80h,80h,0ffh,00h,07h,08h,0f8h,08h,07h, 00h,00h,0ffh,0ch,08h,30h,0ffh,00h,0ffh,08h,08h,08h ,0ffh,00h,7eh,81h,81h,81h,7eh,00h,0ffh,0ch,08h,30h ,0ffh,00h,08h,08h,08h,08h,00h,0ffh,08h,08h,08h
CHUC: DB 3EH,41H,41H,41H,22H,00h,7FH,08H,08H,08H,7FH,00h,3F H,40H,40H,40H,3FH,00h,3EH,41H,41H,41H,22H ;chuc
MUNG: DB 00h,00h,00h,7FH,02H,04H,02H,7FH,00h,3FH,40H,40H,40 H,3FH,00h,7FH,06H,08H,30H,7FH,00h,3EH,41H,41H,49H, 7AH ;mung
NAM: DB 00h,00h,00h,7FH,06H,08H,30H,7FH,00h,7EH,09H,09H,09 H,7EH,00h,7FH,02H,04H,02H,7FH ;nam
MOI: DB 00h,00h,00h,7FH,02H,04H,02H,7FH,00h,3EH,41H,41H,41 H,3EH,00h,41H,41H,7FH,41H,41H,00h,00h,5FH ;moi !
HAPPY: DB 00h,00h,00h,7FH,08H,08H,08H,7FH,00h,7EH,09H,09H,09 H,7EH,00h,7FH,09H,09H,09H,06H,00h,7FH,09H,09H,9H,0 6H,00h,03H,04H,78H,04H,03H ;happy
NEW:
machu: db 0ffh,0ffh,81h,7eh,7eh,7eh,0ffh,0ffh
machu1: db 0f1h,0efh,0efh,0efh,0efh,0efh,0efh,0e1h
ma: db 22h,22h,22h,3eh,22h,22h,22h,22h,00h,0C0H
end
VÌ EM MUÓN CHẠY 1 BẢNG QUẢNG CÁO DÀI NHƯNG EM LÀM MÃI MÀ KO DC.CÁC BÁC GIẢI DÙM EM NHÉ.
Comment