Someone in gamedev.com chat told me that in 13h, you can clear the screen using newline. What is the command for newline? I tried doing \n but that didn't do anything. Someone also told me to use memset to turn all pixels to 0. How do I do that?
Someone in gamedev.com chat told me that in 13h, you can clear the screen using newline. What is the command for newline? I tried doing \n but that didn't do anything. Someone also told me to use memset to turn all pixels to 0. How do I do that?
memset( ptr_to_start_of_screen_memory, 0, number_of_bytes_in_screen_memory);
> you can clear the screen using newline
printf("\n"); probably won't work, but something like
gprintf("\n"); (ie. graphical printf) might
You would need to find out the exact name of this routine, assuming it existed.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
for mode 13h, the video segment address is 0A000h. If you're dealing with 320x200x8, you'll need to set 8000 BYTES after this address (64000 bits).
you can also clear the screen by using inline ASM:
mov ax,13h
int 10h
Peter Kimberley
[email protected]
Okay. Everytime I try to use memset, it says implicit declaration of memset();
I use brackeen.com's method to using bitmaps here is what I typed:
memset(VGA_256_COLOR_MODE,0,64000);
For some reason DJGPP comes up with a parse error everytime I use in-line assembly, I tried _asm __asm asm asm_ asm__ and all of them do the same thing.
memset is declared in string.h
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.