coverting REGS ?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
gtsphere

coverting REGS ?

Post 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, &regs, &regs);
}

thanks so much in advance
Tom

Re:coverting REGS ?

Post 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 )
gtsphere

Re:coverting REGS ?

Post by gtsphere »

that leads to my next question, why and what is an IDT???
Tom

Re:coverting REGS ?

Post 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.
Post Reply