Я следую руководству Джеймса Моллоя по созданию небольшой ОС, и теперь я застрял на прерывании. Я действительно не понимаю, как вызывать обработчики прерываний вместо этой команды:
asm volatile("int $0x21");
Основной файл
#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;
}
Где 0x21 — это номер прерывания в векторе. Есть ли способ сделать прерывание с помощью команды c?
Например, я хочу использовать эти команды:
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
Есть ли способ сделать это?