From: sparky4 Date: Sun, 24 May 2015 06:24:40 +0000 (-0500) Subject: huge memory model test... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=86121293a63d2017f58df55edbfef5c6197acc4a;p=16.git huge memory model test... modified: makefile modified: pcxtest.exe modified: src/lib/bitmap.c modified: src/pcxtest.c --- diff --git a/makefile b/makefile index c108e708..d471bb71 100644 --- a/makefile +++ b/makefile @@ -1,5 +1,5 @@ OFLAGS=-ot -ox -ob -ol -oh -or -FLAGS=-0 -d2 -wo $(OFLAGS)# -mh +FLAGS=-0 -d2 -wo $(OFLAGS) -mh DIRSEP=\ SRC=src$(DIRSEP) SRCLIB=$(SRC)lib$(DIRSEP) diff --git a/pcxtest.exe b/pcxtest.exe index 2c9959a3..fe533129 100644 Binary files a/pcxtest.exe and b/pcxtest.exe differ diff --git a/src/lib/bitmap.c b/src/lib/bitmap.c index 3777c3d1..598aa610 100644 --- a/src/lib/bitmap.c +++ b/src/lib/bitmap.c @@ -75,7 +75,7 @@ bitmapLoadPcx(char *filename) { FILE *file; bitmap_t result; dword bufSize; - int index; + dword index; byte count, val; /* open the PCX file for reading */ @@ -89,13 +89,13 @@ bitmapLoadPcx(char *filename) { loadPcxStage1(file, &result); /* allocate the buffer */ - bufSize = ((dword)result.width * result.height); + bufSize = (result.width * result.height); result.data = malloc((bufSize)); - /*0000printf("Size of block is %u bytes\n", _msize(result.data)); + printf("Size of block is %u bytes\n", _msize(result.data)); printf("Size of bufSize is %lu bytes\n", bufSize); printf("Size of result.width is %lu \n", result.width); printf("Size of result.height is %lu \n", result.height); - printf("Dimensions of result is %lu\n", result.width*result.height);*/ + printf("Dimensions of result is %lu\n", result.width*result.height); //exit(0); if(!result.data) { fprintf(stderr, "Could not allocate memory for bitmap data."); diff --git a/src/pcxtest.c b/src/pcxtest.c index 3901c238..26aea719 100644 --- a/src/pcxtest.c +++ b/src/pcxtest.c @@ -55,8 +55,7 @@ DrawPBuf(page_t *page, int x, int y, planar_buf_t *p, byte sprite) void main() { bitmap_t bmp; planar_buf_t *p; - //int i; - dword i; + int i; page_t page; word start; int plane;