CB> Could someone tell me whats wrong with this code?
CB> asm { // Set video mode, via ASM
CB> mov ah,0x13
CB> int 0x10
CB> }
should be ax or al, and 13h and 10h
CB> asm { // Back to text mode, via ASM again
CB> mov ah,0x13
CB> int 0x10
CB> }
should be ax or al, and 3h and 10h
CB> pokeb(0xA000,(x+(y*320)),(char)col);
why pokeb() when you have pointers??
CB> for (x=x1;x<=x2;x++)
CB> {
CB> for (y=y1;y<=y2;y++)
CB> {
CB> pokeb(0xA000,(x+(y*320)),(char)col);
CB> }
CB> }
no checking for in bounds or swapped left-right, high-low
CB> delete &gs; // Back to text mode
You don't have an allocated variable. It is an auto.
Trying to delete it is probably where you got your GPF.
The following message should work for you, though you
really should have your video modeset in functions other
than your constructor and destructor. In a more complete
implementation, you might have your current screen position
as private members, along with present default color and
pointers to your character set. This does, however, work.
> ] Bilbo ergo sum. I am, but only by force of Hobbit..........
---
---------------
* Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)
|