flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar 28 Oct 2006, 21:18
First: the handler is a far-call, thus you have to use RETF to return from it.
Second: at the time when your handler is called, you may be not guaranteed that DS is what you'd like it to be (I don't remember as it is with mouse handlers exactly, though). In this case you seem to use the same segment for data as for code, so you need DS to be the same as your CS to make your variables accessible. Thus the correct handler should be like: Code: MouseHandler: push ds ; store DS push cs pop ds ; DS := CS mov [MouseX], cx mov [MouseY], dx mov [MouseButton], bx pop ds ; restore DS retf |
|||
![]() |
|
DustWolf 28 Oct 2006, 22:00
Tomasz Grysztar wrote:
Thanks. ![]() ![]() And always, thanks for the assembler. ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.