コード例 #1
0
ファイル: dskbios32.c プロジェクト: Moteesh/reactos
VOID DiskBios32Post(VOID)
{
    /*
     * Initialize BIOS Disk RAM dynamic data
     */

    /* Some vectors are in fact addresses to tables */
    // Diskette Parameters
    ((PULONG)BaseAddress)[0x1E] = MAKELONG(0xEFC7, BIOS_SEGMENT);
    // Hard Disk 0 Parameter Table Address
    ((PULONG)BaseAddress)[0x41] = NULL32;
    // Hard Disk 1 Drive Parameter Table Address
    ((PULONG)BaseAddress)[0x46] = NULL32;

    /* Relocated services by the BIOS (when needed) */
    ((PULONG)BaseAddress)[0x40] = NULL32; // ROM BIOS Diskette Handler relocated by Hard Disk BIOS
    // RegisterBiosInt32(0x40, NULL); // ROM BIOS Diskette Handler relocated by Hard Disk BIOS

    /* Register the BIOS 32-bit Interrupts */
    RegisterBiosInt32(BIOS_DISK_INTERRUPT, BiosDiskService);

    /* Initialize the BDA */
    // Bda->LastDisketteOperation = 0;
    // Bda->LastDiskOperation = 0;
    AllDisksReset();
}
コード例 #2
0
ファイル: kbdbios32.c プロジェクト: Nevermore2015/reactos
BOOLEAN KbdBios32Initialize(VOID)
{
    /* Initialize the common Keyboard BIOS Support Library */
    if (!KbdBiosInitialize()) return FALSE;

    /* Initialize the BDA */
    Bda->KeybdBufferStart = FIELD_OFFSET(BIOS_DATA_AREA, KeybdBuffer);
    Bda->KeybdBufferEnd   = Bda->KeybdBufferStart + BIOS_KBD_BUFFER_SIZE * sizeof(WORD);
    Bda->KeybdBufferHead  = Bda->KeybdBufferTail = Bda->KeybdBufferStart;

    // FIXME: Fill the keyboard buffer with invalid values, for diagnostic purposes...
    RtlFillMemory(((LPVOID)((ULONG_PTR)Bda + Bda->KeybdBufferStart)), BIOS_KBD_BUFFER_SIZE * sizeof(WORD), 'A');

    /* Register the BIOS 32-bit Interrupts */

    /* Initialize software vector handlers */
    RegisterBiosInt32(BIOS_KBD_INTERRUPT, BiosKeyboardService);

    /* Set up the HW vector interrupts */
    EnableHwIRQ(1, BiosKeyboardIrq);

    return TRUE;
}