A1exSun
Advanced Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Это не совсем относится к Си, но... Устанавливаю будильник RTC. Срабатывает прерывание и все, второй раз до перезагрузки ОС больше будильник не работает. Прочел такое: Код: It is important to know that upon a IRQ 8, register C will contain a bitmask telling which interrupt happened. The RTC is capable of producing a periodic interrupt(what we use), an update ended interrupt, and an alarm interrupt. If you are only using the RTC as a simple timer, this is not important. What is important is that if register C is not read after an IRQ 8, then the interrupt will not happen again. So, even if you don't care about what type of interrupt it is, just attach this code to the bottom of your IRQ handler to be sure you get another interrupt. outportb(0x70, 0x0C); //select register C inportb(0x71); //just throw away contents. | Мол нужно заканчивать обработку прерывания чтением регистра С, для сброса будильника. Сделал - не помогло. Использовал функцию AH = 07h прерывания INT 4Ah для сброса будильника - помогло, но мне нужно его сбросить через регистр. Почему чтение С не сбрасывает? | Всего записей: 1871 | Зарегистр. 25-11-2009 | Отправлено: 23:04 23-12-2011 | Исправлено: A1exSun, 23:05 23-12-2011 |
|