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,912 of 4,255   
   wolfgang kern to Robert Pengelly   
   Re: COM1 interrupt for 16-bit OS   
   12 Nov 23 22:51:28   
   
   From: nowhere@never.at   
      
   On 12/11/2023 21:31, Robert Pengelly wrote:   
   ...   
   >>> Ahh you have 3 variables instead of 2, right I think I understand. What   
   should I do about the buffer though? Like should I get them in say a 1Ch   
   handler to move the cursor in there?   
   >> That should have been "What should I do about the values though?" Like   
   should I parse the buffer in say 1Ch and move the cursor in there?   
      
   yeah, sorry for delayed response, I tend to sleep from time to time :)   
   if your screen is in text-mode then you need to scale all down by 8   
   because mice work on pixels rather than on character row/column.   
      
   > Am I updating the x and y correctly with:   
   >   
   >      xor     ax,     ax   
   >      xor     dx,     dx   
   >      xor     cx,     cx   
   >      mov     bx,     offset buffer   
   >   
   >      mov     al,     [bx]   
   >      mov     dl,     [bx]   
   >   
   >      and     al,     HEX (0C)   
   >      and     dl,     HEX (03)   
   >   
   >      mov     cl,     4   
   >      shl     ax,     cl   
   >   
   >      mov     cl,     6   
   >      shl     dx,     cl   
   >   
   >      mov     cl,     [bx + 2]   
   >      or      ax,     cx   
   >      add     ax,     [mouse_y]   
   >   
   >      mov     cl,     [bx + 1]   
   >      or      dx,     cx   
   >      add     dx,     [mouse_x]   
   >   
   >      mov     [mouse_x],      dx   
   >      mov     [mouse_y],      ax   
   >   
   > If I am how do I stop it wrapping around the screen as doing:   
   >   
   >      cmp     ax,     80   
   >      jge     .no_x_inc   
   >   
   >      cmp     ax,     0   
   >      jl      .no_x_inc   
   >   
   > .inc_x:   
   >   
   >      mov     cs:[mouse_x],       ax   
   >   
   > .no_x_inc:   
   >   
   >      cmp     dx,     25   
   >      jge     .done   
   >   
   >      cmp     dx,     0   
   >      jl      .done   
   >   
   > .inc_y:   
   >   
   >      mov     cs:[mouse_y],       dx   
   >   
   > doesn't seem to work.   
      
   I never supported a mouse in text mode, so my experience is limited to   
   graphic modes.   
   my clipping just used AND or CMOVcc w/o CMP/JUMP lines.   
      
   __   
   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