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(R) Homepage 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

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

Best regards,

FAVIER Sébastien

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


Complete thread:

Back to the forum
Board view  Mix view
15297 Postings in 1378 Threads, 254 registered users, 13 users online (0 registered, 13 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum