Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <REG52.H>
- #include <stdio.h>
- void init_RS(void);
- int a = -30;
- int b = -12345;
- long int c = 0x4A6F6E00;
- char d = 'A';
- long int e = 54321;
- long int f = 0xAFFFFFFF;
- void main(void) {
- init_RS();
- printf("a = %d;\nb = %d;\nc = %lx;\nd = %c;\ne = %ld;\nf = %lx;", a, b, c, d, e, f);
- while(1);
- }
- void init_RS(void) {
- SCON = 0x52;
- TMOD |= 0x20;
- TH1 = 0xFD;
- TR1 = 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement