Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <reg515.sfr>
- #include <lcd.h>
- void main()
- {
- unsigned char x;
- unsigned int i, l=0;
- lcd_init();
- out_instr(0x01);
- while(1)
- {
- x=get_kb();
- for(i=0;i<15000;i++);
- if(x!='\0'&&x!='e')
- out_char(x);
- if(x>='0'&&x<='9')
- l=l*10+((int)x-48);
- if(x=='e')
- {
- out_instr(0x01);
- out_char(l);
- l=0;
- }
- if(x=='b')
- {
- out_instr(0x01);
- l=0;
- }
- // for(i=0;i<15000;i++);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement