Пример #1
0
 void set_cursor(int offset){
 	offset /= 2;
 	//select the internal register 14 and 15 of display
 	//to write the high byte and low byte of the new 
 	//cursor offset.
 	write_port_byte(DISPLAY_CTRL_PORT, CURSOR_LOW_BYTE);
 	write_port_byte(DISPLAY_DATA_PORT, (unsigned char)offset);
 	write_port_byte(DISPLAY_CTRL_PORT, CURSOR_HIGH_BYTE);
 	write_port_byte(DISPLAY_DATA_PORT, (unsigned char)(offset >> 8));
 }
Пример #2
0
 int get_cursor(){
 	//select the internal register 14 and 15 of display
 	//to read the high byte and low byte of the cursor 
 	//offset.
 	int offset;
 	write_port_byte(DISPLAY_CTRL_PORT, CURSOR_HIGH_BYTE);
 	offset = read_port_byte(DISPLAY_DATA_PORT) << 8;
 	write_port_byte(DISPLAY_CTRL_PORT, CURSOR_LOW_BYTE);
 	offset += read_port_byte(DISPLAY_DATA_PORT); 	

 	return offset * 2;
 }
Пример #3
0
static void PREFIX186(_outsb)(i8086_state *cpustate)    /* Opcode 0x6e */
{
#ifdef I80286
	if (PM && (CPL>IOPL)) throw TRAP(GENERAL_PROTECTION_FAULT, 0);
#endif
	ICOUNT -= timing.outs8;
	write_port_byte(cpustate->regs.w[DX],GetMemB(DS,cpustate->regs.w[SI]));
	cpustate->regs.w[SI] += cpustate->DirVal; /* GOL 11/27/01 */
}
Пример #4
0
static void PREFIX186(_outsb)(void)    /* Opcode 0x6e */
{
	ICOUNT -= cycles.outs8;
	write_port_byte(I.regs.w[DX],GetMemB(DS,I.regs.w[SI]));
	I.regs.w[SI] += I.DirVal; /* GOL 11/27/01 */
}
Пример #5
0
static void PREFIX186(_outsb)(i8086_state *cpustate)    /* Opcode 0x6e */
{
	ICOUNT -= timing.outs8;
	write_port_byte(cpustate->regs.w[DX],GetMemB(DS,cpustate->regs.w[SI]));
	cpustate->regs.w[SI] += cpustate->DirVal; /* GOL 11/27/01 */
}