I add a function which name is pgPixel to pg.c and I also add it to pg.h,but when I load the "mk.bat",can't be compiled the pg.c.who'd love to help me?much thanks!
void pgPixel(unsigned long x,unsigned long y,unsigned long color)
{
  unsigned char *vptr0;
  vptr0=pgGetVramAddr(0,0);
  *(unsigned short *)(vptr0+x*2+y*1024)=color;
}
The window of MS-DOS send the error information following:
void pgPutPixel(unsigned long x,unsigned long y,unsigned short color)
{
unsigned char *vptr;
vptr=pgGetVramAddr(x,y);
*(unsigned short *)vptr=color;
}
pg.c:in function pgPixel:
pg.c :121: stray:'\241' in program
.........
This means you have a special character in line 121. Delete this line and enter it again.
But if you use nem's pgGetVramAddr, you should use the x and y parameter, like royonimusha posted, then you don't need to calculate the offset yourself.