scroll, keyboard, and reboot
Re:scroll, keyboard, and reboot
hey tom, as for the reboot at least, i have this
extern void reboot;
hope this helps you out
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
extern void reboot;
hope this helps you out
Re:scroll, keyboard, and reboot
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
Re:scroll, keyboard, and reboot
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)
...just pulse the CPU reset line:
out_byte(0x64, 0xFE);
Re:scroll, keyboard, and reboot
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! What the hell is wrong???
Ok, the last time I say it: When you check if the key is released, you have to AND it with 0x7F. Secondly, why the hell do you do
This makes absolutely no sense. First of all, it doesn't work because you didn't AND with 0x7F - but if you had done this, it would mean that each time you release a key, you have unshifted keys...
So take s.th. like this:
reboot code:
Ok, the last time I say it: When you check if the key is released, you have to AND it with 0x7F. Secondly, why the hell do you do
Code: Select all
if (scancode & KEYPRESS) /* key up */
{
if (scancode != KRLEFT_SHIFT || .....)
shift = FALSE;
...
}
So take s.th. like this:
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();
}
Re:scroll, keyboard, and reboot
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! ....
Any way, I tried that before and it didn't work..i'll try the & 0x... thing again...
Re:scroll, keyboard, and reboot
Don't start new threads if you think the current one is too big. If a thread is too big, either df or I will sort it out.
Re:scroll, keyboard, and reboot
Well, I got my keyboard handler working! ;D
Now, all I had to do was change if (scancode!=... to If(scancode==) !
Now, all I need is a scroll funtion.
Oh, I also got a bug. 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...
Now, all I had to do was change if (scancode!=... to If(scancode==) !
Now, all I need is a scroll funtion.
Oh, I also got a bug. 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...
Re:scroll, keyboard, and reboot
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...
Re:scroll, keyboard, and reboot
fixed the bug, had to load more sectors.
still no scroll function. If no one has it, that's ok.
still no scroll function. If no one has it, that's ok.