diff --git a/works/SysProg/lab-01/Compiler Explorer C Editor #1 Code (7).c b/works/SysProg/lab-01/lab-01.c similarity index 100% rename from works/SysProg/lab-01/Compiler Explorer C Editor #1 Code (7).c rename to works/SysProg/lab-01/lab-01.c diff --git a/works/SysProg/lab-02/Readme.md b/works/SysProg/lab-02/Readme.md new file mode 100644 index 0000000..c3b072c --- /dev/null +++ b/works/SysProg/lab-02/Readme.md @@ -0,0 +1,23 @@ +## task 1 +```C +#include +#include + +void main() { + uint32_t magic = 0xAABBCCDD; + uint8_t*byte_ptr = (uint8_t*) & magic; + + printf("Byte 0: 0x%02X\n", byte_ptr[0]); + printf("Byte 1: 0x%02X\n", byte_ptr[1]); + printf("Byte 2: 0x%02X\n", byte_ptr[2]); + printf("Byte 3: 0x%02X\n", byte_ptr[3]); +} +``` +## all conclusions +![alt text](file:///z%3A/prog-radzh/works/SysProg/lab-02/all%20conclusions.png) + +## printf output +![alt text](image.png) + +## memory cell address +![alt text](image-1.png) diff --git a/works/SysProg/lab-02/all conclusions.png b/works/SysProg/lab-02/all conclusions.png new file mode 100644 index 0000000..27d19be Binary files /dev/null and b/works/SysProg/lab-02/all conclusions.png differ diff --git a/works/SysProg/lab-02/lab-02.c b/works/SysProg/lab-02/lab-02.c new file mode 100644 index 0000000..160196e --- /dev/null +++ b/works/SysProg/lab-02/lab-02.c @@ -0,0 +1,12 @@ +#include +#include + +void main() { + uint32_t magic = 0xAABBCCDD; + uint8_t*byte_ptr = (uint8_t*) & magic; + + printf("Byte 0: 0x%02X\n", byte_ptr[0]); + printf("Byte 1: 0x%02X\n", byte_ptr[1]); + printf("Byte 2: 0x%02X\n", byte_ptr[2]); + printf("Byte 3: 0x%02X\n", byte_ptr[3]); +} \ No newline at end of file diff --git a/works/SysProg/lab-02/memory cell address.png b/works/SysProg/lab-02/memory cell address.png new file mode 100644 index 0000000..071861f Binary files /dev/null and b/works/SysProg/lab-02/memory cell address.png differ diff --git a/works/SysProg/lab-02/printf output.png b/works/SysProg/lab-02/printf output.png new file mode 100644 index 0000000..985fb9b Binary files /dev/null and b/works/SysProg/lab-02/printf output.png differ