The code syntax is not symmetric.
Some lines start with double quotes, some do not.
Some lines terminate with \n" and some do not.
And the whole section starts with (" so it should end with ").
What compiler are you doing this with?
For most of the popular MS-DOS targeted ones there are "int" routines you
can use rather than doing in-line assembler. For example, under Microsoft C
v8.00c this changes the cursor to a block.
Your code, by the way, won't make the cursor disappear. You're calling "set
video mode", by specifying AH = 0x00 and trying to select 320 X 200 16
color EGA by using AL = 0x0D.
The "select cursor type" is AH = 0x01 with CH specifying the start line and
CL specifying the end line. Depending on the hardware, you can often set
the start and end lines to something impossible to make the cursor
disappear.
/* Set the cursor to a block */
#include <dos.h>
main( int argc, char *argv[] )
{
int i;
union REGS r;
r.h.ah = 0x01; /* Select Cursor Type */
r.h.ch = 1; /* Start scan line */
r.h.cl = 8; /* End scan line */
int86( 0x10, &r, &r ); /* Call BIOS */
}
- Bill
What C-compiler do you use ?
Hendrik