scroll, keyboard, and reboot
Posted: Sun Oct 20, 2002 3:11 pm
[attachment deleted by admin]
The Place to Start for Operating System Developers
http://f.osdev.org/
this will reboot your computer, i just call it from a C fileGLOBAL _reboot ;global allowing access to reboot function
;function: reboot
;purpose: reboots our comp
_reboot:
mov ah, 0
int 0x16 ;Bios keyboard service
jmp 0xFFFF:0x0000 ;reboot machine
ret ;Return to caller, heh pretty much this wastes a byte
Is BIOS INT 16 be callable? (pmode???) I think, there is an easier way of rebooting computer by setting output port of 8042 keyboard controller. (just some ins and outs)...
mov ah, 0
int 0x16 ;Bios keyboard service
jmp 0xFFFF:0x0000 ;reboot machine
ret ;Return to caller, heh pretty much this wastes a byte
Is BIOS INT 16 be callable? (pmode???) I think, there is an easier way of rebooting computer by setting output port of 8042 keyboard controller. (just some ins and outs)
Code: Select all
if (scancode & KEYPRESS) /* key up */
{
if (scancode != KRLEFT_SHIFT || .....)
shift = FALSE;
...
}
Code: Select all
UINT GetRawKey(...)
{
...
...
if (scancode & KEYPRESS)
{
scancode &= 0x7F; /* THIS HERE IS IMPORTANT! */
if (scancode == KRLEFT_SHIFT || scancode == KRRIGHT_SHIFT)
scan = FALSE;
continue;
}
...
}
Code: Select all
void reboot(void)
{
u_char temp;
cli();
/* flush the keyboard controller */
do
{
temp = inb(0x64);
if (temp & 1)
inb(0x60);
}while(temp & 2);
/* send the CPU reset line */
outb(0x64, 0xFE);
hlt();
}
Well, This is only the 2nd thread, and I made a new one because the other one was too big and I needed help with other things too, like the reboot and stuff...abless wrote: Tom, I'm getting quite angry now...I showed you the code for the shifting about three times now, and you always start a new thread! ....
Are you running out of memory space with your kernel loaded at 5000h? How big is it? You should only run out of space there if your kernel is bigger than about 630KB.Tom wrote:I need more room for my kernel. It's loaded at 5000h, I know that's ok, but I need more room another way...How? I think Tim Rob. knows...or someone else...