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 4,022 of 4,255   
   Robert Pengelly to wolfgang kern   
   Re: COM1 interrupt for 16-bit OS   
   01 Dec 23 06:04:56   
   
   From: robertapengelly@gmail.com   
      
   On Monday, 13 November 2023 at 09:47:06 UTC, wolfgang kern wrote:   
   > On 13/11/2023 10:39, Robert Pengelly wrote:   
   >   
   > > Yeah, I have. Thanks for all the help.   
   > You're Welcome,   
   > this trip into the past confirmed that my brain still works,   
   > almost all other body parts are either artificial or death :)   
   > __   
   > wolfgang   
   > whenever you got more questions just ask away.   
   Can you figure out what I'm doing wrong with the following code:   
      
   serial_handler:   
      
       push    ax   
       push    bx   
       push    cx   
       push    dx   
       push    ds   
      
       mov     ax,     cs   
       mov     ds,     ax   
      
       mov     dx,     HEX (03FD)   
       in      al,     dx   
      
       test    al,     HEX (40)   
       jz      serial_handler.done   
      
       test    al,     HEX (01)   
       jz      serial_handler.done   
      
       mov     dx,     HEX (03F8)   
       in      al,     dx   
      
       mov     bx,     [serial_index]   
       mov     [serial_buffer + bx],       al   
      
       inc     word ptr [serial_index]   
      
       cmp     bx,     2   
       jb      serial_handler.done   
      
   serial_handler.got_all:   
      
       mov     word ptr [serial_index],    0   
      
       xor     ax,     ax   
       xor     dx,     dx   
       xor     cx,     cx   
      
       mov     bx,     offset serial_buffer   
       mov     al,     [bx]   
      
       test    al,     HEX (40)   
       jz      serial_handler.done   
      
       and     al,     HEX (0C)   
      
       mov     cl,     4   
       shl     ax,     cl   
      
       cbw   
      
       mov     cl,     [bx + 2]   
       or      ax,     cx   
       mov     [delta_y],      ax   
      
       mov     al,     [bx]   
       and     al,     HEX (03)   
      
       mov     cl,     6   
       shl     ax,     cl   
      
       cbw   
      
       mov     cl,     [bx + 1]   
       or      ax,     cx   
       mov     [delta_x],      ax   
      
   serial_handler.done:   
      
       mov     al,     HEX (20)   
       out     HEX (20),   al   
      
       pop     ds   
       pop     dx   
       pop     cx   
       pop     bx   
       pop     ax   
       iret   
      
   If the "mov [delta_x], ax and mov [delta_y], ax" parts are changed from "add   
   [mouse_x], ax and add [mouse_y], ax".  The latter was working but for some   
   reason the new code doesn't.   
      
   --- 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