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,913 of 4,255    |
|    Robert Pengelly to wolfgang kern    |
|    Re: COM1 interrupt for 16-bit OS    |
|    12 Nov 23 14:03:16    |
      From: robertapengelly@gmail.com              On Sunday, 12 November 2023 at 21:51:33 UTC, wolfgang kern wrote:       > 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        What values am I scaling down the values passed to the interrupt or the       values I calculate after I got all three bytes?              > I never supported a mouse in text mode, so my experience is limited to        > graphic modes.              I'm only using text mode at the moment as a test case. The plan is to only       have the mouse in graphics mode eventually. I didn't think of using AND,       would I do something like "and [mouse_x], 319" and would that also work if the       value is negative so it        will stay at zero?              --- 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