VOGONS


First post, by Greyhawk

User metadata
Rank Newbie
Rank
Newbie

I found out why it wasn't working. 7CoG uses a direct method of resetting the keyboard at the port level. The method, which is actually shown in my Asm book, 7CoG uses is:

in     al,20h      ; read current value of port 20h
or al, 80h ; set 7th bit to 1
jmp $+2 ; delay
out 20h, al ; send value with 7th bit set to port 20h
and al, 7Fh ; clear 7th bit
jmp $+2 ; delay
out 20h, al ; send value with 7th bit clear to port 20h

(Quoted from my ASM book)

(Took out hack fix because it won't fly)

Last edited by Greyhawk on 2003-11-02, 09:19. Edited 1 time in total.

Reply 1 of 3, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

hmmm it looks like masking and unmaking of an irq.
It hangs in this part ?

maybe our keyboard controller doesn't like being reset this way.

(officially you should turn the keyboard on/off instead of masking unmaking the irq.)

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 3, by Greyhawk

User metadata
Rank Newbie
Rank
Newbie

hmmm it looks like masking and unmaking of an irq.
It hangs in this part ?

Yes, it quits with "PIC:Unhandled command 0x80"

Last edited by Greyhawk on 2003-11-03, 02:50. Edited 1 time in total.

Reply 3 of 3, by Greyhawk

User metadata
Rank Newbie
Rank
Newbie

On further checking, I noticed that is was reading from port 0020h, but it never writes in a OCW3. After searching through several resources, including Ralph Brown's Int list, this appears to be an undefined behavior.