SHARE
TWEET

Untitled

a guest Dec 11th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <REG52.H>
  2. #include <stdio.h>
  3.  
  4. int a = 5;
  5. char b = 'a';
  6. char text[] = "jestem tekstem";
  7. signed int c = -15;
  8. unsigned char d[] = "dom";
  9. void init_RS(void);
  10.  
  11. void main(void) {
  12.     init_RS();
  13.     printf("zmienna typu int ma wartosc: %d\nzmienna typu char ma wartosc: %c\nzmienna typu tekstowego ma wartosc: %s\n", a, b, text);
  14.     printf("zmienna typu signed int ma wartosc: %sd\nzmienna typu unsigned char ma wartosc: %us", c, d);
  15.     while(1);
  16. }
  17.  
  18. void init_RS(void) {
  19.     SCON = 0x52;
  20.     TMOD |= 0x20;
  21.     TH1 = 0xFD;
  22.     TR1 = 1;
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top