Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Asm IDT "equivalent" for DPMI clients (Developers)

posted by cpcdos E-mail, FRANCE [Lyon], 14.03.2018, 11:32
(edited by cpcdos on 14.03.2018, 13:49)

Hello everyone!

Under FreeDos, i compile programs with GCC, after to have set IDT, remap master & slave ports and blabla... I want load my IDT from lidt asm instruction

For be brief :
idt_pointer.size = 256*sizeof(GateDescriptor) - 1;
idt_pointer.base = (uint32_t)interruptDescriptorTable;
asm volatile("lidt %0" : : "m" (idt_pointer));


From example here by AlgorithMan-de.

My problem.. program crash at the asm inline. I've GDB for be sure (Same problem for lgdt,sgdt,lidt and sidt opcodes) WHY ? I think FreeDos/Dpmi have already loaded GDT and block memory access. I've search DPMI functions for clean previous GDT, and put MY GDT.. I've need of you :-(

I've found docs on http://www.delorie.com/djgpp/doc/libc/
__dpmi_free_ldt_descriptor()
__dpmi_allocate_ldt_descriptors()

but i don't know if it's a good way for me..


Best regards,

---
Sébastien FAVIER

ps: Excuse me for my English level, I'm a French student

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 250 users online (2 registered, 248 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum