void SelectFont(int Size) { union REGS regs; struct SREGS segregs; PalState.sh_font = Size; /* save current state */ CallInt(0x5f, 0x1000, 0, Size, 0, ®s); segregs.es = regs.x.dx; regs.x.di = regs.x.ax; regs.h.ah = 0x11; int86x(0x5f, ®s, ®s, &segregs); }
inline void CheckPIC(){ //This function is called by process() and will call IRQ's unsigned int i; if(pic_short==0){return;} //if there are no interrupts to be called.. if(flags->_if==0){return;} if((port20h&0x20)!=0){return;} //if the pic is in the middle of an interrupt for(i=0;i<=15;i++){ //printf("pie"); if((pic_short&(1<<i))!=0){ CallInt(8+i); //printf("pie"); current_interrupt=i; pic_short=pic_short&(1<<i); break; } } }
void into(){ if(flags->of==1){ CallInt(4); } }
void int3(){ //int 3 is a one byte opcode! CallInt(3); }
void int_normal(){ //This is the actual int opcode unsigned char tmp; ip++; MemRead8(CS,ip,&tmp); CallInt(tmp); }
inline void CheckPIC(){ if(pic_short==0){return;} //if there are no interrupts to be called.. if((port21h&0x20)!=0){return;} //if the pic is in the middle of an interrupt if((pic_short&1)!=0){ //first interrupt(zero) needs to be called.. CallInt(8+0); return; } if((pic_short&2)!=0){ CallInt(8+1); return; } if((pic_short&4)!=0){ CallInt(8+2); return; } if((pic_short&8)!=0){ CallInt(8+3); return; } if((pic_short&16)!=0){ CallInt(8+4); return; } if((pic_short&32)!=0){ CallInt(8+5); return; } if((pic_short&64)!=0){ CallInt(8+6); return; } if((pic_short&128)!=0){ CallInt(8+7); return; } if((pic_short&255)!=0){ CallInt(8+8); return; } if((pic_short&512)!=0){ CallInt(8+9); return; } if((pic_short&1024)!=0){ CallInt(8+10); return; } if((pic_short&2048)!=0){ CallInt(8+11); return; } if((pic_short&4096)!=0){ CallInt(8+12); return; } if((pic_short&8192)!=0){ CallInt(8+13); return; } if((pic_short&16384)!=0){ CallInt(8+14); return; } if((pic_short&32768)!=0){ CallInt(8+15); return; } }
void int3(){ CallInt(3); }
void int_normal(){ unsigned char tmp; ip++; MemRead8(CS,ip,&tmp); CallInt(tmp); }
void SetLineType(unsigned int LineType) { PalState.sh_Ltype = LineType; /* save current state */ CallInt(0x5f, 0x0b00, 0, LineType, 0, NULL); }
void Rectangle(int x1, int y1, int x2, int y2, int FillStyle) { SetPos(x1, y1); CallInt(0x5f, 0x0500 | FillStyle, 0, x2, y2, NULL); }