From: dopefishh Date: Fri, 9 Oct 2015 08:35:45 +0000 (+0200) Subject: aa X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=90ec6fa0a21eaf67e934565e3fb6fddf0a159395;p=des2015.git aa --- diff --git a/mart/ex11/ex11.c b/mart/ex11/ex11.c index 6e107db..520777a 100644 --- a/mart/ex11/ex11.c +++ b/mart/ex11/ex11.c @@ -12,13 +12,17 @@ #define LPT1IRQ 7 #define TICKS 5 -#define MAXX 10 -#define MAXY 7 +#define MAXX 16 RT_TASK intrtask, drawtask; RTIME ticks[TICKS+1]; RTIME tocks[TICKS+1]; +unsigned char data[MAXX] = { + 1, 2, 4, 8, 16, 32, 64, 128, 256, + 1, 2, 4, 8, 16, 32, 64, 128, 256 +}; + void add_tick(RTIME *t, RTIME tnew) { unsigned int i = 0; @@ -34,9 +38,22 @@ void add_tick(RTIME *t, RTIME tnew) void taskd(void *arg) { RTIME time = *(RTIME *)arg; - rt_printf("Time to draw=%.2fms\n", time/1000/1000.0); - RTIME step = time/MAXX; - rt_printf("Every x has %.2fms\n", step/1000/1000.0); + RTIME step = time/(2*MAXX+2); + unsigned int i; + + //To the right + outb(0x00, 0x378); + rt_task_sleep(step*2); + for(i=0; i