Im following James Molloy`s guide to create small OS and now i stuck on interrupt. I dont really understand how to call my interrupt handlers instead of this command:
asm volatile("int $0x21");
Main file
#include "monitor.h"
#include "multiboot.h"
#include "descriptor_tables.h"
#include "timer.h"
#include "paging.h"
#include "simple.h"
int main(struct multiboot *mboot_ptr){
// Initialise all the ISRs and segmentation
init_descriptor_tables();
// Initialise the screen (by clearing it)
monitor_clear();
monitor_write("Hello, paging world!\n");
init_simple();
asm volatile("int $0x21");
return 0;
}
Where 0x21 is an interrupt`s number in vector.Is there a method to make a interrupt using a c command?
For example i want use this commands:
char c; // for interrupt created and handler allocate memory for char/int etc.
char c = 'a'; // allocate + assing
c; // get value
c = 'b'; // assing new value
Is there any possible way to do it?