Page 1 of 1
coverting REGS ?
Posted: Wed Nov 13, 2002 5:43 pm
by gtsphere
okay, i got a question, this union REGS, i know thats some what DOS based, (dos.h) so, how would I convert this to inline asm?
*original funciton*
void set_mode(byte mode)
{
union REGS regs;
regs.h.ah = SET_MODE;
regs.h.al = mode;
int86(VIDEO_INT, ®s, ®s);
}
thanks so much in advance
Re:coverting REGS ?
Posted: Wed Nov 13, 2002 6:17 pm
by Tom
Warmaster's CTOS has stuff that would help ( i.e. geteax() // get eax's value )
and to do that you just make functions based of of inportb and outportb examples ( i.e. look at outportb's move value to ax command )
And to use the regs int86 you need v86 mode or a IDT ( FritzOS has a almost working IDT, soon to be released )
Re:coverting REGS ?
Posted: Wed Nov 13, 2002 6:43 pm
by gtsphere
that leads to my next question, why and what is an IDT???
Re:coverting REGS ?
Posted: Wed Nov 13, 2002 6:47 pm
by Tom
a scary thing that lets the computer do stuff while doing other stuff ( i.e. while the processor is too busy...the key's pressed will be held untill the processor has time to put the keys on the screen...good idea for muli-tasking OSes ( FritzOS will be a full OS )
IDT = Interrupt Descriptor Table....lets you use hardware interrupts and IRQ's.