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,884 of 4,255    |
|    Robert Pengelly to wolfgang kern    |
|    Re: COM1 interrupt for 16-bit OS    |
|    11 Nov 23 09:44:30    |
      From: robertapengelly@gmail.com              On Saturday, 11 November 2023 at 11:41:08 UTC, wolfgang kern wrote:       > 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       Awesome it works thanks. As for:              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.              Do you mean some like if I want to do something like:              mov [0x33 * 4], offset handler       mov [0x33 * 4 + 2], segment              then I should disable the IRQ first then re-enable it after I setup the       interrupt.              As for the timer I'm using a handler for int 1Ch, is that bad practice or       something?              --- 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