home bbs files messages ]

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,886 of 4,255   
   wolfgang kern to Robert Pengelly   
   Re: COM1 interrupt for 16-bit OS   
   12 Nov 23 00:56:46   
   
   From: nowhere@never.at   
      
   On 11/11/2023 18:44, Robert Pengelly wrote:   
   ,,,   
   > 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:   
      
   CLI   
   mov  [0x33 * 4], offset handler   
   mov [0x33  * 4 + 2], segment   
   also during write to any PIT-I/O 0x20/A0 0x21/A1   
   STI   
      
   > then I should disable the IRQ first then re-enable it after I setup the   
   interrupt.   
      
   yes, this prevents IRQs in the middle of a change which would make it   
   crash for sure.   
      
   > As for the timer I'm using a handler for int 1Ch, is that bad practice or   
   something?   
      
   INT 1C is a software INT called by PIC-handler, so it's fine for tests.   
   But if you use it permanent your mouse is polled rather then interrupt   
   driven.   
      
   almost all my 16 bit IRQ-routines start with:   
      
   push ax   
   push ds   
   in al,port   ;03F8 in case of COM_1 this read releases the IRQ-pin   
   mov buffer,al   
   inc buffer   
   cmp buffer,limit   
   ja ... ;to reset count and tell received packet is complete   
   cmp al,..   
   jz ...   
   __   
   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