for lecture 29 it's far more easy to have a function to load idt: void load_i...

Denis Kirjanov Answered 1 answer
Question by Denis Kirjanov 1 year ago

Question

for lecture 29 it's far more easy to have a function to load idt:

void load_idt(struct idtr_desc *idtr)
{
__asm__ volatile("lidt %0" :: "m"(*idtr));
}

Answers

Answered by Daniel McCarthy

Instructor

Hey Dennis,
It may seem easier at first glance but I think its important to seperate assembly code from C, this is a design pattern that I like to follow. I recommend waiting until you finish the course before making your own changes because it can be hard for me to assist if things go wrong if the code base is different.

Kind regards,
Daniel M