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,904 of 4,255   
   Robert Pengelly to wolfgang kern   
   Re: Does a PS/2 mouse get detected if pl   
   12 Nov 23 06:53:48   
   
   From: robertapengelly@gmail.com   
      
   On Sunday, 12 November 2023 at 14:46:58 UTC, wolfgang kern wrote:   
   > On 12/11/2023 15:41, Robert Pengelly wrote:   
   > > On Sunday, 12 November 2023 at 14:07:11 UTC, wolfgang kern wrote:   
   > >> On 12/11/2023 14:08, Robert Pengelly wrote:   
   > >> ...   
   > >>> ps2_wait_input:   
   > >>>   
   > >>> push ax   
   > >>> mov cx, HEX (FFFF)   
   > >>>   
   > >>> ps2_wait_input.loop:   
   > >>   
   > >>   
   > >>   
   > >>> xor ax, ax   
   > >> this isn't needed at all   
   > >>> in al, HEX (64)   
   > >>>   
   > >>> and al, 0b00000010   
   > >>> jz ps2_wait_input.done   
   > >>>   
   > >>> loop ps2_wait_input.loop   
   > >>>   
   > >>> ps2_wait_input.done:   
   > >>>   
   > >>> pop ax   
   > >>> ret   
   > >> it may return too early if your PC is faster than 12MHZ :)   
   > >> I'd use the DOS timer variable (can't remember it's at 40:xxxx ?)   
   > >>   
   > >> push ax   
   > >> push cx   
   > >> push es   
   > >> push 0x40 ;or use the longer MOV AX,0x0040 |MOV ES,AX   
   > >> pop es   
   > >> mov cx,[es:dostick]   
   > >> add cx,2   
   > >> L1:   
   > >> IN AL,0x64   
   > >> TEST AL,2   
   > >> jz DONE   
   > >> cmp cx,[es:dostick]   
   > >> jb L1   
   > >> done:   
   > >> pop,,,, ret   
   > > Most of the "xor ax, ax" are left over from me zeroing it out ready for   
   printing to make things a little easier to read. And that's a good idea.   
   > how about MOV AH.00 upfront once ?   
   > > I may need the longer version as I'm targeting 8086.   
   > oh you work in a museum ? :)   
   > __   
   > wolfgang   
   No, I'm just interested in the while 8086 stuff.  Once I get a 8086 compatible   
   OS working then maybe I'll move on to 386.  I hate that most OS's are 64-bit   
   only nowadays cause that leaves a lot of historical machines on outdated and   
   unsecure OS's.   
      
   --- 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