Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,023 of 4,675    |
|    wolfgang kern to All    |
|    Re: programming on PS2 mouse controller    |
|    11 Oct 17 18:09:06    |
      From: nowhere@never.at              Ok Jens,              one more time: you use VideoMem[(y*80)+cnt] = ...              I'd had [(y*160)+cnt] for textmode03 80*25 LL=160 byte              > section .text              [snip...same as before]              you enabled IRQ12 but where is your IRQ-routine ?              > ret              >       > global _mouse_handler       > _mouse_handler:       > xor ecx, ecx       > mov cx, 1000       > xor eax, eax       > .waitkey: in al, 64h       > dec cl       > jnz .1       > ret               1000 =0x03e8, so CL= 0xe8 = 232              > .1:       > and al, 20h       > jz .waitkey              > in al, 60h       > mov cl, al       > in al, 61h       > out 61h, al       > xor ebx, ebx       > mov bl, byte [cnt]       > add ebx, packet       > mov byte [ebx], cl       > inc byte [cnt]       > mov bl, byte [cnt]       > cmp bl, byte [packetsize]       > jb .end       > mov byte [cnt], 0       >       > ;get buttons state       > .2:       > mov al, byte [packet]       > and al, 7       > mov cl, byte [packet+3]       > and cl, 0F0h       > cmp cl, 0F0h       > je .no45btn       > shr cl, 1       > or al, cl       > .no45btn:       > mov byte [buttons], al              !!!              > ;get delta X       > movsx eax, byte [packet+1]       > add word [x], ax       > ;get delta Y       > movsx eax, byte [packet+2]       > add word [y], ax              !!! byte+1 and +2 are UNSIGNED !!!       the two sign bits are within the first byte              > ;get delta Z       > mov cl, byte [packet+3]       > and cl, 0Fh       > cmp cl, 8       > jb .3       > or cl, 0F0h       > .3: movsx eax, cl       > add word [z], ax       ...       __       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