Пример #1
0
void SimpleConsole::ScrollUp()
{
	memcpyw( buffer, buffer+width, width*(height-1) );
	memsetw( buffer + width *( height - 1 ), charStyle , width );
	memcpyw( video, buffer, width * height );
	cursorY --;
}
Пример #2
0
void
get_scrmem(int currcons)
{
 	memcpyw((unsigned short *)vc_scrbuf[currcons], 
 		(unsigned short *)origin, video_screen_size); 
	origin = video_mem_start = (unsigned long)vc_scrbuf[currcons];
	scr_end = video_mem_end = video_mem_start + video_screen_size;
	pos = origin + y*video_size_row + (x<<1);
}
Пример #3
0
void scroll(void) {
    unsigned blank, temp;
    blank = 0x20 | (attrib << 8);

    if (csr_y >= 25) {
        temp = csr_y - 25 + 1;
        memcpyw(txtMemPtr, txtMemPtr + temp * 80, (25 - temp) * 80 * 2);
        memsetw(((unsigned short *) txtMemPtr) + (25 - temp) * 80, blank, 80);
        csr_y = 25 - 1;
    }
}
Пример #4
0
void
set_scrmem(int currcons, long offset)
{
  int i;
  if (video_mem_term - video_mem_base < offset + video_screen_size)
    offset = 0;	/* strange ... */
  memcpyw((unsigned short *)(video_mem_base + offset), 
          (unsigned short *) origin, video_screen_size); 
  video_mem_start = video_mem_base;
  video_mem_end = video_mem_term;
  origin = video_mem_base + offset;
  scr_end = origin + video_screen_size;
  pos = origin + y*video_size_row + (x<<1);
  has_wrapped = 0;
}
Пример #5
0
VHinit ()
{

  /* select VSDD RAM bank 0 so we can access the control tables */

  vbank (0);

  /* set the video register values */

  memcpyw (v_regs, vr_data, 16);

  /* clear the access table to turn off all objects */

  memsetw (v_actab, 0xFFFF, 350);

  /* clear the object table */

  memsetw (v_odtab, 0, 64);

  /* move the character generator table to VSDD RAM */

  memsetw (v_cgtab, 0, 4096);
  memcpyw (v_cgtab, cgtable, 256 * cg_rows);
}
Пример #6
0
char *
LineFwd ()
{
  register short j, k;

  for (j = 0; j < 48; j++)
    TheBuf[j] = ' ';

  TheBuf[0] = '\260';
  TheBuf[48] = '\0';

  if (0 == ptecpos)
    return ((char *) NULL);

  if (0 == (j = findnxt (ptecpos)))
    return ((char *) NULL);

  ptecpos = j;

  memcpyw (&ptebuf.defnum, &patches[ptecpos].defnum, 6);
  pteset = TRUE;
  pte2buf ();

  k = ptecpos;

  for (j = 0; j < 8; j++)
    if (0 == (k = findnxt (k)))
      return (TheBuf);

  dspdfst (&TheBuf[2], patches[k].defnum);
  dspdfst (&TheBuf[15], patches[k].stmnum);
  dspdest (&TheBuf[28], &patches[k]);

  for (j = 0; j < 50; j++)
    if (TheBuf[j] == '\0')
      TheBuf[j] = ' ';

  TheBuf[48] = '\0';
  return (TheBuf);
}
Пример #7
0
void SimpleConsole::MoveCursor()
{
	MoveCursorTo( cursorX, cursorY );
	memcpyw( video + cursorY * width, buffer+ cursorY * width , width);	//刷新光标所在项
}
Пример #8
0
void SimpleConsole::RefreshBuffer()
{
	memcpyw( video, buffer, width * height );
}