Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ** por compatibilidad se omiten tildes **
- ================================================================================
- TRABAJO PRACTICO 3 - System Programming - ORGANIZACION DE COMPUTADOR II - FCEN
- ================================================================================
- */
- #include "syscall.h"
- void handler(void);
- void task() {
- char* task_id = "Tarea A1";
- syscall_talk(task_id);
- syscall_setHandler(handler);
- int register res asm("eax");
- uint32_t last_x,last_y;
- uint32_t x = last_x;
- uint32_t y = last_y;
- //char*message = "x: ,y: ";
- char* message[5] = {
- "# # ##### #### # # #### #### ",
- "# # # # # # # # # #",
- "##### ##### # ## #### # #",
- "# # # # # # # # # #",
- "# # # # #### # # #### #### ",
- };
- while(1) {
- while(x == last_x && y == last_y){
- syscall_where(&x,&y);
- }
- if()
- //uint16_t* ptr = (uint32_t*)0xB8000;
- //syscall_where(ptr+1,ptr+1);
- /*for(uint8_t yy = 0;yy < 50;yy++){
- for(uint8_t xx = 0;xx < 80/2;xx++){
- syscall_where(ptr,ptr+1);
- ptr+=2;
- }
- }*/
- for(uint8_t m = 0;m < 5;m++){
- uint8_t x_char = 0;
- while(message[m][x_char] != 0){
- if(message[m][x_char] == '#'){
- uint16_t* video_ptr = (uint16_t*) 0XB8000;
- video_ptr += (m+5) * 80 + x_char+10;
- syscall_where((uint32_t*)video_ptr,(uint32_t*)video_ptr);
- }
- x_char++;
- }
- }
- last_x = x;
- last_y = y;
- }
- }
- void handler() {
- //int register res asm("eax");
- /*
- char* a = "handler ";
- a[8] = res%10+'0';
- syscall_talk(a);
- breakpoint();*/
- uint32_t x,y;
- syscall_where(&x,&y);
- char*message = "x: ,y: ";
- message[2] = x/10 + '0';
- message[3] = x%10 + '0';
- message[7] = y/10 + '0';
- message[8] = y%10 + '0';
- syscall_talk(message);
- syscall_informAction(Center);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement