#include "reg52.H" #define P1_0 =P1^0; #define Fosc=11059200; Unsigned char idata a(10) at 0x30; Unsigned char i,j,k; Unsigned long bb; Unsigned int xx; Void Timer0_int(void) interrupt 1 { P1_0=~P1_0; TI=0; SBUF=a(i); If (i>9) i=0; } Void main(void) { For (i=0;i<10;i++) a(i)='0'+i; TMOD=0x21; xx=65536-10000; TH0=(unsigned char) (xx>>8); TL0=(unsigned char) (xx); Bb=Fosc/12; Bb=bb/32; Bb=bb/4800; i=(unsigned char) (bb); TH1=256-i; TL1=256-i; ET0=1; EA=1; While(1); }
被word自动顶格大写了,大家将就着看吧。似乎是一段以某波特率传输的程序吧,是多少波特率呢?
还有一段
MOV R0,#40H MOV R1,#50H MOV R2,#5 MOV C,0 LOOP: MOV A,@R0 MOV C,0 ADDC A,@R1 MOV 0,C MOV @R0,A INC R0 INC R1 DJNZ R2,LOOP MOV C,0 JNC OK MOV A,#1 MOV @R0,A Ok: RET
汇编看着超级费解啊,求解释。谢谢!
[ 本帖最后由 hjy3721 于 2012-6-12 11:31 编辑 ]
|