📄 int31_04.c
字号:
/* DPMI Driver for FD32: handler for INT 0x31, Service 0x04 * by Luca Abeni * * This is free software; see GPL.txt */#include<ll/i386/hw-data.h>#include<ll/i386/hw-instr.h>#include<ll/i386/hw-arch.h>#include<ll/i386/mem.h>#include<ll/i386/error.h>#include<ll/i386/cons.h>#include "dpmi.h"#include "int31_04.h"#include <logger.h>void int31_0400(union regs *r){ struct ll_cpu_info cpu;#ifdef __DEBUG__ fd32_log_printf("[DPMI] Get DPMI Information\n");#endif CLEAR_CARRY; /* DPMI Version: 0.9 */ r->d.eax = ((r->d.eax & 0xFFFF0000) | 0x00 << 8 | 0x09); /* DPMI Flags: 1 ---> running on 0x386 */ r->d.ebx = ((r->d.ebx & 0xFFFF0000) | 0x01); /* CL = Processor type */ x86_get_cpu(&cpu); r->d.ecx = ((r->d.ecx & 0xFFFFFF00) | (cpu.x86_cpu & 0xFF)); /* Master & Slave base interrupts... */ r->d.edx = ((r->d.edx & 0xFFFF0000) | 0x70 << 8 | 0x40); /* I hope... */}void int31_0401(union regs *r){#ifdef __DEBUG__ fd32_log_printf("[DPMI] Get DPMI Capabilities (Failing... DPMI 1.0 not supported)\n");#endif SET_CARRY;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -