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,930 of 4,255    |
|    Robert Pengelly to Robert Pengelly    |
|    Re: Does a PS/2 mouse get detected if pl    |
|    15 Nov 23 00:27:07    |
      From: robertapengelly@gmail.com              On Sunday, 12 November 2023 at 15:01:05 UTC, Robert Pengelly wrote:       > On Sunday, 12 November 2023 at 14:53:50 UTC, Robert Pengelly wrote:       > > 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.       > Made the changes to ps2_read_port and ps2_write_port along with using "out       0xEB, al" but it still doesn't work.       Right, I rewrite all the IRQ12 related stuff and it seems to work as I get an       A printed in the handler when I capture the mouse with qemu, how do I tell the       controller that I've got the data? I've tried:              in al, 0x20       out 0x20, al              in al, 0x60       out 0x60, al              and              in al 0x64       out 0x64, al              and nothing happens as I only get the A printed once              --- 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