From 90ec6fa0a21eaf67e934565e3fb6fddf0a159395 Mon Sep 17 00:00:00 2001 From: dopefishh Date: Fri, 9 Oct 2015 10:35:45 +0200 Subject: [PATCH] aa --- mart/ex11/ex11.c | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) 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