| 
			| 
					
						| CAHTA 
								Гость
 | 
								|  | «  : 28-08-2005 19:55 »  |  | 
 
 кто знает номера портов светодиодов у компа? ( питание , работа Ж/Д) и светодиодов клавиатуры (Num\Caps\Scroll Lock ) такой вопросс возник после того как я гдето ( уже непомню) нашол номер порта светодиода от FDD! ( 0х3f2 - Floppy LED ( 0x0 - off ; 0x10 - on ) сам проверял .фурычит    самое гдавное что светодиод просто загорается, при этом сам привод молчит! |  
						| 
								|  |  
								|  |  Записан | 
 |  |  | 
	| 
			| 
					
						| Алексей++ 
								глобальный и пушистыйГлобальный модератор    Offline 
								Сообщений: 13
								
								
								
								
								
							 | 
								|  | « Ответ #1 : 29-08-2005 05:45 »  |  | 
 
 а привод и не должен загораться при этом   |  
						| 
								|  |  
								|  |  Записан | 
 
 |  |  | 
	| 
			| 
					
						| RXL | 
								|  | « Ответ #2 : 29-08-2005 08:12 »  |  | 
 
 CAHTA, с питанием проще всего: нажимаешь кнопку - светодиод погас. Один недостаток - комп вырубается    Если серьезно, то зачем тебе это надо? Для какой-либо индикации можно использовать только клавиатурный светодиоды (они управляются программо), остальное - просто индикаторы активности устройств. |  
						| 
								|  |  
								|  |  Записан | 
 
 ... мы преодолеваем эту трудность без синтеза распределенных прототипов. (с) Жуков М.С. |  |  | 
	| 
			| 
					
						| Алексей++ 
								глобальный и пушистыйГлобальный модератор    Offline 
								Сообщений: 13
								
								
								
								
								
							 | 
								|  | « Ответ #3 : 29-08-2005 08:52 »  |  | 
 
 кстати, были какие-то вирусы, которые дисководом играли - похоронный марш etc   ))) мигал ли при этом светодиод - не знаю |  
						| 
								|  |  
								|  |  Записан | 
 
 |  |  | 
	| 
			| 
					
						| CAHTA 
								Гость
 | 
								|  | « Ответ #4 : 29-08-2005 14:22 »  |  | 
 
 а как управлять светодиодами от клавы? |  
						| 
								|  |  
								|  |  Записан | 
 |  |  | 
	| 
			| 
					
						| RXL | 
								|  | « Ответ #5 : 29-08-2005 16:24 »  |  | 
 
 8042 - Keyboard Controller  (AT,PS/2)
 8042 Status Register (port 64h read)
 
 ¦7¦6¦5¦4¦3¦2¦1¦0¦  8042 Status Register
 ¦ ¦ ¦ ¦ ¦ ¦ ¦ +---- output register (60h) has data for system
 ¦ ¦ ¦ ¦ ¦ ¦ +----- input register (60h/64h) has data for 8042
 ¦ ¦ ¦ ¦ ¦ +------ system flag (set to 0 after power on reset)
 ¦ ¦ ¦ ¦ +------- data in input register is command (1) or data (0)
 ¦ ¦ ¦ +-------- 1=keyboard enabled, 0=keyboard disabled (via switch)
 ¦ ¦ +--------- 1=transmit timeout (data transmit not complete)
 ¦ +---------- 1=receive timeout (data transmit not complete)
 +----------- 1=even parity rec'd, 0=odd parity rec'd (should be odd)
 
 Port Mode                 Description
 
 64h  read   8042 status register. Can be read at any time.  See
 table above for more information.
 64h  write  8042 command register.  Writing this port sets Bit 3
 of the status register to 1 and the byte is treated
 as a controller command.  Devices attached to the
 8042 should be disabled before issuing commands that
 return data since data in the output register will
 be overwritten.
 60h  read   8042 output register (should only be read if Bit 0 of
 status port is set to 1)
 60h  write  8042 data register.  Data should only be written if
 Bit 1 of the status register is zero (register is empty).
 When this port is written Bit 3 of the status register
 is set to zero and the byte is treated as a data.  The
 8042 uses this byte if it's expecting data for a previous
 command, otherwise the data is written directly to the
 keyboard.   See KEYBOARD COMMANDS for information on
 programming the actual keyboard hardware.
 
 8042 Commands Related to PC Systems  (Port 64h)
 
 Command                    Description
 
 20   Read 8042 Command Byte: current 8042 command byte is placed
 in port 60h.
 60   Write 8042 Command Byte: next data byte written to port 60h is
 placed in 8042 command register.  Format:
 
 ¦7¦6¦5¦4¦3¦2¦1¦0¦  8042 Command Byte
 ¦ ¦ ¦ ¦ ¦ ¦ ¦ +---- 1=enable output register full interrupt
 ¦ ¦ ¦ ¦ ¦ ¦ +----- should be 0
 ¦ ¦ ¦ ¦ ¦ +------ 1=set status register system, 0=clear
 ¦ ¦ ¦ ¦ +------- 1=override keyboard inhibit, 0=allow inhibit
 ¦ ¦ ¦ +-------- disable keyboard I/O by driving clock line low
 ¦ ¦ +--------- disable auxiliary device, drives clock line low
 ¦ +---------- IBM scancode translation 0=AT, 1=PC/XT
 +----------- reserved, should be 0
 
 A4   Password Installed Test: returned data can be read
 from port 60h;  FA=password installed, F1=no password
 A5   Load Security: bytes written to port 60h will be read
 until a null (0) is found.
 A6   Enable Security: works only if a password is already loaded
 A7   Disable Auxiliary Interface: sets Bit 5 of command register
 stopping auxiliary I/O by driving the clock line low
 A8   Enable Auxiliary Interface: clears Bit 5 of command register
 A9   Auxiliary Interface Test: clock and data lines are tested;
 results placed at port 60h are listed below:
 
 00  no error
 01  keyboard clock line is stuck low
 02  keyboard clock line is stuck high
 03  keyboard data line is stuck low
 04  keyboard data line is stuck high
 
 AA   Self Test: diagnostic result placed at port 60h, 55h=OK
 AB   Keyboard Interface Test:  clock and data lines are tested;
 results placed at port 60h are listed above with command A9
 AC   Diagnostic Dump: sends 16 bytes of 8042's RAM, current input
 port state, current output port state and 8042 program status
 word to port 60h in scan-code format.
 AD   Disable Keyboard Interface: sets Bit 4 of command register
 stopping keyboard I/O by driving the clock line low
 AE   Enable Keyboard Interface: clears Bit 4 of command register
 enabling keyboard interface.
 C0   Read Input Port: data is read from its input port (which is
 inaccessible to the data bus) and written to output register
 at port 60h;  output register should be empty before call.
 
 ¦7¦6¦5¦4¦3-0¦  8042 Input Port
 ¦ ¦ ¦ ¦ +---- undefined
 ¦ ¦ ¦ +----- 1=enable 2nd 256K of motherboard RAM, 0=disable
 ¦ ¦ +------ 1=manufacturing jumper not installed, 0=installed
 ¦ +------- 1=primary display is MDA, 0=primary display is CGA
 +-------- 1=keyboard not inhibited, 0=keyboard inhibited
 
 C1   Poll Input Port Low Bits: Bits 0-3 of port 1 placed in
 status Bits 4-7
 C2   Poll Input Port High Bits: Bits 4-7 of port 1 placed in
 status Bits 4-7
 D0   Read Output Port: data is read from 8042 output port (which is
 inaccessible to the data bus) and placed in output register;
 the output register should be empty.  (see command D1 below)
 D1   Write Output Port: next byte written to port 60h is placed in
 the 8042 output port (which is inaccessible to the data bus)
 
 ¦7¦6¦5¦4¦3¦2¦1¦0¦  8042 Output Port
 ¦ ¦ ¦ ¦ ¦ ¦ ¦ +---- system reset line
 ¦ ¦ ¦ ¦ ¦ ¦ +----- gate A20
 ¦ ¦ ¦ ¦ +-------- undefined
 ¦ ¦ ¦ +--------- output buffer full
 ¦ ¦ +---------- input buffer empty
 ¦ +----------- keyboard clock (output)
 +------------ keyboard data (output)
 
 D2   Write Keyboard Output Register: on PS/2 systems the next data
 byte written to port 60h input register is written to port 60h
 output register as if initiated by a device; invokes interrupt
 if enabled
 D3   Write Auxiliary Output Register: on PS/2 systems the next data
 byte written to port 60h input register is written to port 60h
 output register as if initiated by a device; invokes interrupt
 if enabled
 D4   Write Auxiliary Device: on PS/2 systems the next data byte
 written to input register a port at 60h is sent to the
 auxiliary device
 E0   Read Test Inputs: 8042 reads its T0 and T1 inputs; data is
 placed in output register;  Bit 0 is T0, Bit 1 is T1:
 
 ¦1¦0¦  Test Input Port Bits
 ¦ +---- keyboard clock
 +----- keyboard data
 
 Fx   Pulse Output Port: Bits 0-3 of the 8042 output port can be
 pulsed low for 6 ?s;  Bits 0-3 of command indicate which
 Bits should be pulsed; 0=pulse, 1=don't pulse; pulsing
 Bit 0 results in CPU reset since it is connected to system
 reset line.
 
 - PC systems previous to the AT use the 8255 PPI as a keyboard
 controller and use the keyboard's internal 8048.
 - the keyboard's internal controller buffers up to 16 bytes of
 make/break code information.  This is common among all PC systems
 and shouldn't be confused with the (32 byte) keyboard buffer
 maintained by the BIOS.
 - see  KEYBOARD COMMANDS for information on programming the
 keyboards internal microprocessor
 
 ------------------------------------------------------------------------------
 
 Keyboard Commands & Responses
 
 Commands System Issues to Keyboard (via 8042 port 60h)
 
 ED  Set/Reset Mode Indicators, keyboard responds with ACK then
 waits for a following option byte.  When the option byte is
 received the keyboard again ACK's and then sets the LED's
 accordingly.  Scanning is resumed if scanning was enabled.
 If another command is received instead of the option byte
 (high bit set on) this command is terminated.  Hardware
 defaults to these indicators turned off.
 
 ¦7-3¦2¦1¦0¦ Keyboard Status Indicator Option Byte
 ¦  ¦ ¦ +--- Scroll-Lock indicator  (0=off, 1=on)
 ¦  ¦ +---- Num-Lock indicator  (0=off, 1=on)
 ¦  +----- Caps-Lock indicator  (0=off, 1=on)
 +------- reserved (must be zero)
 
 EE  Diagnostic Echo, keyboard echoes the EE byte back to the system
 without an acknowledgement.
 F0  PS/2 Select/Read Alternate Scan Code Sets, instructs keyboard
 to use one of the three make/break scan code sets.   Keyboard
 responds by clearing the output buffer/typematic key and then
 transmits an ACK.  The system must follow up by sending an
 option byte which will again be ACK'ed by the keyboard:
 
 00  return byte indicating scan code set in use
 01  select scan code set 1  (used on PC & XT)
 02  select scan code set 2
 03  select scan code set 3
 
 F2  PS/2 Read Keyboard ID, keyboard responds with an ACK and a two
 byte keyboard ID of 83AB.
 F3  Set Typematic Rate/Delay, keyboard responds with ACK and waits
 for rate/delay byte.   Upon receipt of the rate/delay byte the
 keyboard responds with an ACK, then sets the new typematic
 values and scanning continues if scanning was enabled.
 
 ¦7¦6¦5¦4¦3¦2¦1¦0¦  Typematic Rate/Delay Option Byte
 ¦ ¦ ¦ +-+-+-+-+---- typematic rate indicator (see INT 16,3)
 ¦ ¦ ¦ ¦ ¦ +------- A in period formula (see below)
 ¦ ¦ ¦ +---------- B is period formula (see below)
 ¦ +------------- typematic delay
 +-------------- always zero
 delay = (rate+1) * 250   (in milliseconds)
 rate = (8+A) * (2**B) * 4.17  (in seconds, ? 20%)
 
 Defaults to 10.9 characters per second and a 500ms delay.  If a
 command byte (byte with high bit set) is received instead of an
 option byte this command is cancelled.
 F4  Enable Keyboard, cause the keyboard to clear its output buffer
 and last typematic key and then respond with an ACK.  The
 keyboard then begins scanning.
 F5  Default w/Disable, resets keyboard to power-on condition by
 clearing the output buffer, resetting typematic rate/delay,
 resetting last typematic key and setting default key types.
 The keyboard responds with an ACK and waits for the next
 instruction.
 F6  Set Default, resets to power-on condition by clearing the output
 buffer, resetting typematic rate/delay and last typematic key
 and sets default key types.  The keyboard responds with an ACK
 and continues scanning.
 F7  PS/2 Set All Keys to Typematic, keyboard responds by sending an
 ACK, clearing its output buffer and setting the key type to
 Typematic.   Scanning continues if scanning was enabled.  This
 command may be sent while using any Scan Code Set but only has
 effect when Scan Code Set 3 is in use.
 F8  PS/2 Set All Keys to Make/Break, keyboard responds by sending an
 ACK, clearing its output buffer and setting the key type to
 Make/Break.  Scanning continues if scanning was enabled.  This
 command may be sent while using any Scan Code Set but only has
 effect when Scan Code Set 3 is in use.
 F9  PS/2 Set All Keys to Make, keyboard responds by sending an ACK,
 clearing its output buffer and setting the key type to Make.
 Scanning continues if scanning was enabled.  This command may
 be sent while using any Scan Code Set but only has effect when
 Scan Code Set 3 is in use.
 FA  PS/2 Set All Keys to Typematic Make/Break, keyboard responds by
 sending an ACK, clearing its output buffer and setting the key
 type to Typematic Make/Break.  Scanning continues if scanning
 was enabled.  This command may be sent while using any Scan Code
 Set but only has effect when Scan Code Set 3 is in use.
 FB  PS/2 Set Key Type to Typematic, keyboard responds by sending an
 ACK, clearing its output buffer and then waiting for the key ID
 (make code from Scan Code Set 3).  The specified key type is then
 set to typematic.   This command may be sent while using any
 Scan Code Set but only has effect when Scan Code Set 3 is in use.
 FC  PS/2 Set Key Type to Make/Break, keyboard responds by sending an
 ACK, clearing its output buffer and then waiting for the key ID
 (make code from Scan Code Set 3).  The specified key type is then
 set to Make/Break.   This command may be sent while using any Sca
 Code Set but only has effect when Scan Code Set 3 is in use.
 FD  PS/2 Set Key Type to Make, keyboard responds by sending an ACK,
 clearing its output buffer and then waiting for the key ID (make
 code from Scan Code Set 3).  The specified key type is then set
 to Make.  This command may be sent while using any Scan Code Set
 but only has effect when Scan Code Set 3 is in use.
 FE  Resend, should be sent when a transmission error is detected
 from the keyboard
 FF  Reset, Keyboard sends ACK and waits for system to receive it
 then begins a program reset and Basic Assurance Test (BAT).
 Keyboard returns a one byte completion code then sets default
 Scan Code Set 2.
 
 
 Keyboard Responses to System (via 8042 port 60h)
 
 00  Key Detection Error or Overrun Error for Scan Code Set 1,
 replaces last key in the keyboard buffer if the buffer is full.
 AA  BAT Completion Code, keyboard sends this to indicate the keyboard
 test was successful.
 EE  Echo Response, response to the Echo command.
 F0  Break Code Prefix in Scan Code Sets 2 and 3.
 FA  Acknowledge, keyboard sends this whenever a valid command or
 data byte is received (except on Echo and Resend commands).
 FC  BAT Failure Code, keyboard sends this to indicate the keyboard
 test failed and stops scanning until a response or reset is sent.
 FE  Resend, keyboard request resend of data when data sent to it is
 invalid or arrives with invalid parity.
 FF  Key Detection Error or Overrun Error for Scan Code Set 2 or 3,
 replaces last key in the keyboard buffer if the buffer is full.
 id  Keyboard ID Response, keyboard sends a two byte ID after ACK'ing
 the Read ID command.  The byte stream contains 83AB in LSB, MSB
 order.  The keyboard then resumes scanning.
 
 - command F7 through FD are NOP's on the AT and are ACK'ed but not
 acted upon
 - see   8042  MAKE CODES  BREAK CODES  INT 16,3
 |  
						| 
								|  |  
								| « Последнее редактирование: 20-12-2007 18:39 от Алексей1153++ » |  Записан | 
 
 ... мы преодолеваем эту трудность без синтеза распределенных прототипов. (с) Жуков М.С. |  |  | 
	| 
			| 
					
						| CAHTA 
								Гость
 | 
								|  | « Ответ #6 : 29-08-2005 18:59 »  |  | 
 
 конечнож все это очень! интересно, но не мог ли ты выложить код на С . а то я чтото не могу понять как это все использовать   |  
						| 
								|  |  
								|  |  Записан | 
 |  |  | 
	| 
			| 
					
						| RXL | 
								|  | « Ответ #7 : 29-08-2005 19:14 »  |  | 
 
 CAHTA,  :nottrue:Напряги мозги! Не все же тебе разжевывать...
 
 |  
						| 
								|  |  
								|  |  Записан | 
 
 ... мы преодолеваем эту трудность без синтеза распределенных прототипов. (с) Жуков М.С. |  |  | 
	| 
			| 
					
						| CAHTA 
								Гость
 | 
								|  | « Ответ #8 : 29-08-2005 19:17 »  |  | 
 
 млин ты хоть обьясни как все это использовать!вот я нашол то что мне нада
 ED  Set/Reset Mode Indicators, keyboard responds with ACK then
 waits for a following option byte.  When the option byte is
 received the keyboard again ACK's and then sets the LED's
 accordingly.  Scanning is resumed if scanning was enabled.
 If another command is received instead of the option byte
 (high bit set on) this command is terminated.  Hardware
 
 defaults to these indicators turned off.
 ¦7-3¦2¦1¦0¦ Keyboard Status Indicator Option Byte
 ¦  ¦ ¦ +--- Scroll-Lock indicator  (0=off, 1=on)
 ¦  ¦ +---- Num-Lock indicator  (0=off, 1=on)
 ¦  +----- Caps-Lock indicator  (0=off, 1=on)
 +------- reserved (must be zero)
 
 ток вот КАК ЭТО ИСПОЛЬЗОВАТЬ. обьясни плиззз
 |  
						| 
								|  |  
								| « Последнее редактирование: 20-12-2007 18:41 от Алексей1153++ » |  Записан | 
 |  |  | 
	| 
			| 
					
						| CAHTA 
								Гость
 | 
								|  | « Ответ #9 : 29-08-2005 19:21 »  |  | 
 
 как я понимаю эт прерывания . но как с ними работать я не знаю! |  
						| 
								|  |  
								|  |  Записан | 
 |  |  | 
	| 
			| 
					
						| Алексей++ 
								глобальный и пушистыйГлобальный модератор    Offline 
								Сообщений: 13
								
								
								
								
								
							 | 
								|  | « Ответ #10 : 30-08-2005 04:32 »  |  | 
 
 САНТА, это не есть прерывания, это есть регистры   пишешь-сбрасываешь бит - и соответственно индикатор |  
						| 
								|  |  
								|  |  Записан | 
 
 |  |  | 
	| 
			| 
					
						| Alf 
								Гость
 | 
								|  | « Ответ #11 : 30-08-2005 07:10 »  |  | 
 
 конечнож все это очень! интересно, но не мог ли ты выложить код на С . а то я чтото не могу понять как это все использовать  Для начала не худо бы поведать, на какой платформе это все нужно сделать. Поскольку, например, под DOS и Windows код будет совершенно различным, да и в других ОС тоже свой. |  
						| 
								|  |  
								|  |  Записан | 
 |  |  | 
	| 
			| 
					
						| Алексей++ 
								глобальный и пушистыйГлобальный модератор    Offline 
								Сообщений: 13
								
								
								
								
								
							 | 
								|  | « Ответ #12 : 30-08-2005 09:09 »  |  | 
 
 Альф, это винда, я уверен   )) |  
						| 
								|  |  
								|  |  Записан | 
 
 |  |  | 
	| 
			| 
					
						| RXL | 
								|  | « Ответ #13 : 30-08-2005 09:15 »  |  | 
 
 Алексей1153, разве можно управлять контроллером FDD из винды на уровне пользователя? - Не думаю. Разве что если win9x. |  
						| 
								|  |  
								|  |  Записан | 
 
 ... мы преодолеваем эту трудность без синтеза распределенных прототипов. (с) Жуков М.С. |  |  | 
	| 
			| 
					
						| Алексей++ 
								глобальный и пушистыйГлобальный модератор    Offline 
								Сообщений: 13
								
								
								
								
								
							 | 
								|  | « Ответ #14 : 30-08-2005 10:02 »  |  | 
 
 RXL, фиг его знает, по крайней мере под ХЫРЫ это: *((BYTE*)(0x3f2))=16; не катит   )) |  
						| 
								|  |  
								|  |  Записан | 
 
 |  |  | 
	| 
			| 
					
						| Alf 
								Гость
 | 
								|  | « Ответ #15 : 30-08-2005 10:15 »  |  | 
 
 Альф, это винда, я уверен   ))В таком случае описания регистров - как мертвому припарки. Познавательно, но практически бесполезно. И вдвойне бесполезно, если клавиатура подключена по USB, а сейчас это не редкость. Не удивлюсь, если в следующем поколении системных плат контроллера 8042 мы уже не обнаружим. Для управления светодиодными индикаторами клавиатуры MSDN рекомендует эмулировать нажатия соответствующих клавиш. Вот как, например, они рекомендуют зажигать индикатор Scroll Lock:    #include <windows.h>
 void SetNumLock( BOOL bState )
 {
 BYTE keyState[256];
 
 GetKeyboardState((LPBYTE)&keyState);
 if( (bState && !(keyState[VK_SCROLL] & 1)) ||
 (!bState && (keyState[VK_SCROLL] & 1)) )
 {
 // Simulate a key press
 keybd_event( VK_SCROLL,
 0x45,
 KEYEVENTF_EXTENDEDKEY | 0,
 0 );
 
 // Simulate a key release
 keybd_event( VK_SCROLL,
 0x45,
 KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,
 0);
 }
 }
 
 void main()
 {
 SetNumLock( TRUE );
 }
 
Если в системе нет каких-либо особых перехватчиков клавиатурных событий с хитрой обработкой, то должно работать. По крайней мере, я испробовал - вроде порядок. |  
						| 
								|  |  
								|  |  Записан | 
 |  |  | 
	| 
			| 
					
						| CAHTA 
								Гость
 | 
								|  | « Ответ #16 : 30-08-2005 12:28 »  |  | 
 
 ыыы , а я про MSDN и забыл. гдето у мя есть 2 диска под SV 6.0и вот еше вопрос . где мона скачать DDK под ХР
 |  
						| 
								|  |  
								|  |  Записан | 
 |  |  | 
	| 
			| 
					
						| CAHTA 
								Гость
 | 
								|  | « Ответ #17 : 30-08-2005 17:39 »  |  | 
 
 а как с регистрами работать? |  
						| 
								|  |  
								|  |  Записан | 
 |  |  | 
	| 
			| 
					
						| Finch 
								СпокойныйАдминистратор    Offline 
								Пол:    
								Пролетал мимо
								
								
								
								
								
							 | 
								|  | « Ответ #18 : 30-08-2005 17:58 »  |  | 
 
 В Винде может и не получится напрямую с регистрами работать. Но работа такая же, как ты работал с портами для HDD. Такая же посылка данных на порты. Только Клавиатуры. DDK есть на сайте. |  
						| 
								|  |  
								|  |  Записан | 
 
 Не будите спашяго дракона.              Джаффар (Коша) |  |  | 
	| 
			| 
					
						| CAHTA 
								Гость
 | 
								|  | « Ответ #19 :  30-08-2005 18:00 »   |  | 
 
 я с портами от HDD не работал не разу! я програмил светодиод от FDD! а по  подробней про регистры и про программирование енных мона? |  
						| 
								|  |  
								|  |  Записан | 
 |  |  | 
	| 
			| 
					
						| Finch 
								СпокойныйАдминистратор    Offline 
								Пол:    
								Пролетал мимо
								
								
								
								
								
							 | 
								|  | « Ответ #20 : 30-08-2005 18:12 »  |  | 
 
 кто знает номера портов светодиодов у компа? ( питание , работа Ж/Д) и светодиодов клавиатуры (Num\Caps\Scroll Lock )такой вопросс возник после того как я гдето ( уже непомню) нашол номер порта светодиода от FDD! ( 0х3f2 - Floppy LED ( 0x0 - off ; 0x10 - on ) сам проверял .фурычит Улыбнись самое гдавное что светодиод просто загорается, при этом сам привод молчит!
 
 Это говорит о том, что ты работал с портом 0x3f2. Тоже самое, только клавиатурные порта 0x60 и 0x64, согласно описания любезно предоставленного RXL .                   8042 - Keyboard Controller  (AT,PS/2)
 8042 Status Register (port 64h read)
 
 ¦7¦6¦5¦4¦3¦2¦1¦0¦  8042 Status Register
 ¦ ¦ ¦ ¦ ¦ ¦ ¦ +---- output register (60h) has data for system
 ¦ ¦ ¦ ¦ ¦ ¦ +----- input register (60h/64h) has data for 8042
 ¦ ¦ ¦ ¦ ¦ +------ system flag (set to 0 after power on reset)
 ¦ ¦ ¦ ¦ +------- data in input register is command (1) or data (0)
 ¦ ¦ ¦ +-------- 1=keyboard enabled, 0=keyboard disabled (via switch)
 ¦ ¦ +--------- 1=transmit timeout (data transmit not complete)
 ¦ +---------- 1=receive timeout (data transmit not complete)
 +----------- 1=even parity rec'd, 0=odd parity rec'd (should be odd)
 
 Port Mode                 Description
 
 64h  read   8042 status register. Can be read at any time.  See
 table above for more information.
 64h  write  8042 command register.  Writing this port sets Bit 3
 of the status register to 1 and the byte is treated
 as a controller command.  Devices attached to the
 8042 should be disabled before issuing commands that
 return data since data in the output register will
 be overwritten.
 60h  read   8042 output register (should only be read if Bit 0 of
 status port is set to 1)
 60h  write  8042 data register.  Data should only be written if
 Bit 1 of the status register is zero (register is empty).
 When this port is written Bit 3 of the status register
 is set to zero and the byte is treated as a data.  The
 8042 uses this byte if it's expecting data for a previous
 command, otherwise the data is written directly to the
 keyboard.   See KEYBOARD COMMANDS for information on
 programming the actual keyboard hardware.
 
 |  
						| 
								|  |  
								| « Последнее редактирование: 20-12-2007 18:45 от Алексей1153++ » |  Записан | 
 
 Не будите спашяго дракона.              Джаффар (Коша) |  |  | 
	| 
			| 
					
						| CAHTA 
								Гость
 | 
								|  | « Ответ #21 : 30-08-2005 18:31 »  |  | 
 
 ну! порт  0х3f2 принадлежит FDD, а не  HDD!!!  кто знает номера портов светодиодов у компа? ( питание , работа Ж/Д) и светодиодов клавиатуры (Num\Caps\Scroll Lock )
 
а вот этим я имел ввиду порты светодиодов питания и загрузки HDD. а не посредстренно порты девайсов! |  
						| 
								|  |  
								|  |  Записан | 
 |  |  | 
	| 
			| 
					
						| CAHTA 
								Гость
 | 
								|  | « Ответ #22 : 30-08-2005 18:43 »  |  | 
 
 хм. чтото я не пойму... ты мне скажи ячто нада послать на порт 60h , чтобы заголелся Num Lock.
 посылать просто outportb(0x3c,<какоето значение>);
 
 60h как я понял это 0x3c правильно?
 |  
						| 
								|  |  
								|  |  Записан | 
 |  |  | 
	|  | 
	| 
			| 
					
						| Finch 
								СпокойныйАдминистратор    Offline 
								Пол:    
								Пролетал мимо
								
								
								
								
								
							 | 
								|  | « Ответ #24 : 30-08-2005 18:50 »  |  | 
 
 60h как я понял это 0x3c правильно?
 Это не одно и тоже. 60h и 0x60 это одно и тоже число. Только другая форма записи. |  
						| 
								|  |  
								|  |  Записан | 
 
 Не будите спашяго дракона.              Джаффар (Коша) |  |  | 
	| 
			| 
					
						| CAHTA 
								Гость
 | 
								|  | « Ответ #25 : 30-08-2005 19:03 »  |  | 
 
 ыыы спс.   как же нудно писать интерпритатор   |  
						| 
								|  |  
								|  |  Записан | 
 |  |  | 
	|  |