CD-ROM and Keyboard led help needed 
Author Message
 CD-ROM and Keyboard led help needed

I have a 2 questions that I hope can be answered.

1)  Can anybody tell me where the flags are that tell the keyboard to
turn the Caps Lock, Num Lock, and Scroll Lock leds on or off are
located?  I'm not looking for the location that tells BIOS wether they
are or not, I'm looking to turn them off or on directly from inside a
program.

2)  Is there a way to electronically eject and close the cd-rom disk
tray?  I know Media Player in Windows does it when you press the eject
button icon while in audio mode.

For both questions the answer, I'm sure, is there is an interrupt you can
call or some port you can output to, I'm just not sure which interrupt
or which port to use.

E-mail responses please, as I check my mail more often than my news.  And
thanks to anyone and everyone that responds.
--
/-------Belinda Carlisle-------Mariah Carey-------Gloria Estefan--------\
|                                                                       |
|                       "I code, therefore I am"                        |
|                                                                       |



Tue, 24 Jun 1997 02:40:53 GMT  
 CD-ROM and Keyboard led help needed

Quote:
> I have a 2 questions that I hope can be answered.

> 1)  Can anybody tell me where the flags are that tell the keyboard to
> turn the Caps Lock, Num Lock, and Scroll Lock leds on or off are
> located?  I'm not looking for the location that tells BIOS wether they
> are or not, I'm looking to turn them off or on directly from inside a
> program.
> E-mail responses please, as I check my mail more often than my news.  And
> thanks to anyone and everyone that responds.

Here's something fished out of the 80XXX Snippets. 'Tis a strange
thing, the LED question...  Seems on some machines a simple write
to the BDA will result in the LED being lit. Others will require
a call to 16/1 to update the keyboard (the LED) after the write
to the BDA at 40:17.

You'll notice, lighting the LED directly (like the code below)
does not mean the system will be synchronized to it.

;----------------------------
; by MARC KOOY
;"LedsGo -- A program to cycle LED's of keyboard"

R       EQU     00000001b
L       EQU     00000010b
M       EQU     00000100b       ; It's strange, but okay!

cseg segment
assume cs:cseg, ds:cseg
org 100h
.286

LedsGo_Main:
        Mov     cx,0Ah
 lgm1:  Mov     LedsOn, L
        Call    UpdateLeds
        Mov     LedsOn, M
        Call    UpdateLeds
        Mov     LedsOn, R
        Call    UpdateLeds
        Loop    lgm1
        Int     20h

LedsOn  db      1

UpdateLeds Proc near            ; Use this Proc to update the LED's when
        PushA                   ; LedsOn is filled with a new value
        Mov     AL, 0EDh
        Out     60h, AL         ; Give "Change LED status" command
BufferDelay1:
        In      AL, 64h         ; Read Status register
        Test    AL, 02h
        JNZ     BufferDelay1    ; Wait till the Command register is empty
        Mov     AL, LedsOn
        Out     60h, AL         ; Give data for LED's that must go on
BufferDelay2:
        In      AL, 64h         ; Read Status register
        Test    AL, 02h
        JNZ     BufferDelay2    ; Wait til the Data register is empty
        Mov     BX,02h
  ul1:  Mov     CX,0FFFFh
        Loop    $
        Dec     BX
        Jne     ul1
        PopA
        Ret                     ; End of UpdateLeds
UpdateLeds EndP

cseg ends
End  LedsGo_Main

--

FIDO     : James Vahn 1:346/15.1
--



Tue, 24 Jun 1997 02:40:43 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. CD-ROM and Keyboard led help needed

2. Programming CD-ROM/CD-R/CD-RW

3. Programming CD-ROM/CD-R/CD-RW

4. want code/info for playing audio cd's in CD-ROM

5. Need info on CD-ROM(audio) Drives and how to control them

6. Distinguishing CD-ROM from CD/RW drives?

7. CD-Rom: Direct Read from Music-CD ???

8. HELP!!! I need help with keyboard INT

9. HELP!!! I need help with the keyboard INT

10. Leading zero question, need help.

11. Keyboard LED Controller

12. asm86 - keyboard LED-s programing

 

 
Powered by phpBB® Forum Software