-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtareaAE.c
More file actions
51 lines (39 loc) · 1.16 KB
/
tareaAE.c
File metadata and controls
51 lines (39 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* ** por compatibilidad se omiten tildes **
================================================================================
TRABAJO PRACTICO 3 - System Programming - ORGANIZACION DE COMPUTADOR II - FCEN
================================================================================
*/
#include "colors.h"
#include "defines.h"
#include "game.h"
#include "syscall.h"
#include "i386.h"
void task(int x, int y) {
/* Tarea */
int restantex = MAPA_ANCHO-3;
int restantey = MAPA_ALTO-3;
while(1)
{
//breakpoint();
int i;
for (i = 0; i < restantex; i++){
//breakpoint();
syscall_mover(DER);
}
restantex = restantex - 3;
for (i = 0; i < restantey; i++) {
// int hola = 0;
// int caca = 1;
// hola = caca/hola;
syscall_mover(ABA);
}
restantey = restantey - 3;
for (i = 0; i < restantex; i++)
syscall_mover(IZQ);
restantex = restantex - 3;
for (i = 0; i < restantey; i++)
syscall_mover(ARR);
restantey = restantey - 3;
}
while(1) { __asm __volatile("mov $2, %%eax":::"eax"); }
}