This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | uint32_t a = 123; | |
| uint32_t dr7 = 0; | |
| //write addr of 'a' to dr0 | |
| __asm__ volatile ("mov %0, %%dr0" :: "r" (&a)); | |
| //read dr7 | |
| __asm__ volatile ("mov %%dr7, %0" : "=r" (dr7)); | |
| //set 16-17 01b - write to dr7 | |
| set_n_bit(dr7, 16, 0); | |
| set_n_bit(dr7, 17, 1); | |
| //set 18-19 lenght 4 bytes - 11b | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | void task_colored_square() { | |
| for(uint32_t l = 0; l < 100; ++l) { | |
| uint32_t r, g, b; | |
| uint32_t hex; | |
| r = 255; g = 0; b = 0; | |
| /* | |
| 255 0 0 | |
| | | |
| V | |
| 255 0 255 |