[In case you want to read this mail in English, tell me and I'll resend.]
Hallo Erik,
Grub Invaders hat zwei Bugs und eine Inkompatibilität, die mit aktuellen Binutils auftritt.
Die Bugs sind falsche Datentypen (u8 * statt char *) und eine unvollständige clean.sh (invaders wird nicht entfernt). Die Inkompatibilität mit neueren Binutils sorgt dafür, dass invaders zufallsgesteuert durchaus mal 128 MB oder größer werden kann.
Patch für alle drei Probleme folgt (auch als Anhang):
diff -ur invaders/clean.sh invaders-fixed/clean.sh --- invaders/clean.sh 2001-05-21 22:43:13.000000000 +0200 +++ invaders-fixed/clean.sh 2009-04-13 17:03:14.000000000 +0200 @@ -2,4 +2,4 @@
set -e set -v -rm -f *.o *~ invaders.exec +rm -f *.o *~ invaders.exec invaders diff -ur invaders/compile.sh invaders-fixed/compile.sh --- invaders/compile.sh 2001-05-21 22:26:46.000000000 +0200 +++ invaders-fixed/compile.sh 2009-04-13 16:59:44.000000000 +0200 @@ -4,7 +4,7 @@ set -v
CFLAGS="-fno-builtin -nostdinc -O2 -I. -Wall -Werror" -LDFLAGS="-nostdlib -Wl,-N -Wl,-Ttext -Wl,100000" +LDFLAGS="-nostdlib -Wl,-N -Wl,-Ttext -Wl,100000 -Wl,--build-id=none" gcc $CFLAGS -c keyboard.c gcc $CFLAGS -c delay.c gcc $CFLAGS -c common.c diff -ur invaders/video.c invaders-fixed/video.c --- invaders/video.c 2001-05-13 15:56:33.000000000 +0200 +++ invaders-fixed/video.c 2009-04-13 17:01:22.000000000 +0200 @@ -36,7 +36,7 @@ video_putchar(x+1,y,hextab[hex&15]); };
-void video_putstring(int32 x, int32 y, uint8 *str) +void video_putstring(int32 x, int32 y, char *str) { while (*str) video_putchar(x++,y,*(str++)); }; diff -ur invaders/video.h invaders-fixed/video.h --- invaders/video.h 2001-05-13 15:56:33.000000000 +0200 +++ invaders-fixed/video.h 2009-04-13 17:01:05.000000000 +0200 @@ -8,7 +8,7 @@ void video_putchar(int32 x, int32 y, uint8 code); void video_fill(int32 x, int32 y, int32 width, int32 height, uint8 code); void video_puthex8(int32 x, int32 y, uint8 hex); -void video_putstring(int32 x, int32 y, uint8 *str); +void video_putstring(int32 x, int32 y, char *str);
// immediate effect void video_update();
Viele Grüße Carl-Daniel