Search found 9 matches

by XV8
Sun May 09, 2010 7:25 pm
Forum: General Programming
Topic: Keyboard I/O programming question
Replies: 8
Views: 19575

Re: Keyboard I/O programming question

Thank you for all. Problem was solved.
i don't change my ISRs(high level and low level). But i add function which reading output value from the Keyboard controller.

pathos wrote: but I think the keyboard status register thinks it's busy, and you have to clear it.

The problem in it. Thank you.
by XV8
Fri May 07, 2010 5:17 pm
Forum: General Programming
Topic: Keyboard I/O programming question
Replies: 8
Views: 19575

Re: Keyboard I/O programming question

i have the ISR on asm and compiling it by nasm this low level ISR call High level c++ function IRQ_33: cli pushad ; call ir2 function (in C++ _Z3ir2v) call _Z3ir2v popad sti iretd static int q=49; void ir2() { unsigned char * u= (unsigned char*) 0xb8000; unsigned short cur=0; u[cur*2]=q; u[(cur++*2)...
by XV8
Wed May 05, 2010 10:01 pm
Forum: General Programming
Topic: Keyboard I/O programming question
Replies: 8
Views: 19575

Re: Keyboard I/O programming question

Hi. need help. when i read keyboard controller status register(from 0x64) i have value= 17 (00010001). but when i install ISR for keyboard interrupt (which write any char to screen), the ISR code execute automatically and write char to screen 1 times . If i press to keyboard key nothing don't occur....
by XV8
Mon Apr 26, 2010 7:55 pm
Forum: Beginning OS Development
Topic: Demo 15 Problem
Replies: 25
Views: 42969

Re: Demo 15 Problem

Problem is resolved. GCC align structure by size of the biggest field. this is example struct test_t { int a; char b; int c; } ; struct test_t test = { 10, 20, 30}; GCC compilier it to test: .long 10 .byte 20 .zero 3 .long 30 GCC use .zero 3 for alignment. If use directive __attribute__ ((packed)) G...
by XV8
Sun Apr 25, 2010 7:48 pm
Forum: Beginning OS Development
Topic: Demo 15 Problem
Replies: 25
Views: 42969

Re: Demo 15 Problem

i check the GDT register by sgdt instructions. But i got a wrong result. Value which i got from GDT register is not valid. it different from value which i Load into them. Limit of GDT is correct, But address of GDT in GDT register is wrong. I check it and i have found that it is 16 low bit of origin...
by XV8
Sat Apr 24, 2010 7:54 pm
Forum: Beginning OS Development
Topic: Demo 15 Problem
Replies: 25
Views: 42969

Re: Demo 15 Problem

I use bochs. When keyboard interrupt occured bochs crash. I set for all interrupts one default IR. It do nothing. When i use in asm : asm("int $0") bochs crash too. Where mistake? May be that IDT Register have wrong value? How i check it? #define MAX_INTERRUPTS 256 #define IDT_DESC_TYPE_IN...
by XV8
Sat Apr 17, 2010 7:15 pm
Forum: Beginning OS Development
Topic: Multitasking
Replies: 5
Views: 9657

Re: Multitasking

you want to say that i create common IR for Keyboard interrupt, which just tell to Keyboard driver in user mode, that interrupt has occured? But there two problem. For each Keyboard interrupt i must switch current task to Keyboard Task. ( Keyboard driver run as a user programm). Сan be that some int...
by XV8
Wed Apr 14, 2010 2:50 pm
Forum: Beginning OS Development
Topic: Multitasking
Replies: 5
Views: 9657

Re: Multitasking

I use Multitasking, Virtual Memory Manager and my os is microkernel oriented. So Keyboard driver is programm. How i can set interrupt vector for keyboard interrupt? i know just this decision -> Create small procedure -> Set interrupt vector to this procedure -> In procedure tell Process Manager to s...
by XV8
Tue Apr 06, 2010 11:02 am
Forum: Beginning OS Development
Topic: Multitasking
Replies: 5
Views: 9657

Multitasking

I develop small os.I have a problem with multitasking. I search information of TSS but i not find anything.can you help me in this. possible you have documentation or tutorials.