Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.development    |    Operating system development chatter    |    4,255 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,881 of 4,255    |
|    wolfgang kern to Robert Pengelly    |
|    Re: COM1 interrupt for 16-bit OS    |
|    11 Nov 23 12:41:03    |
      From: nowhere@never.at              On 11/11/2023 11:18, Robert Pengelly wrote:       ...              > "have you enabled IRQ4 in the PIC port 0x20"       > I looked at your table stuff but I'm still a little confused how I enable it.              only modify one:       in al,0x21       and al,0xEF ;reset bit 4       out 0x21,al              or all if your brave :)       mov al,00       out 0x21.al ;enables all 8 channels              and before you touch any part of the interrupt chain you should disable       IRQs with this single byte reserved for that, re-enable after done.              > As for the code all I'm doing is changing my timer interrupt to the IRQ4 one       (0x0C * 4 (+ 2) as that's what I think that's what the interrupt get fired).              [PIT(timer)] fires IRQ_0 (INT08) at default setting 18.2 Hz then:       * PIT handler (either BIOS or DOS or your own) may satisfy the PIT by        reading port_0x40 (not required if set to auto repeat mode, default).       * PIT handler also increments the TIMER-variable       altering this may cause the system to hang.              [COM1 at IRQ4 aka INT!2] fires on your chosen serial-event.       * I'd chose INT on Buffer full for a mouse       * the mouse may send several bytes and each cause an interrupt, so       * the IRQ4 handler must read the com-port and must be aware of how many       bytes may come in addition so it fills a buffer (where is yours?) and       then respond to the result (can be button/wheel/x/y-motions or error).              I never abused the PIT-handler for a test, this is not good practice.       __       wolfgang              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca