flat assembler
Message board for the users of flat assembler.
Index
> Tutorials and Examples > [fasm2] Console Event Discovery |
Author |
|
bitRAKE 04 Apr 2024, 04:31
This console application is an exploration of fasm2/fasmg techniques to simplify common patterns by inventing syntax. This includes an extension to the MS COFF support, GLOBSTR extension for VT100/ANSI output/buildup.
This shows effective use of the modern virtual terminal interface in windows. As with most code it's messy and incomplete, with minor testing.
_________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup Last edited by bitRAKE on 10 Apr 2024, 19:47; edited 1 time in total |
||||||||||||||||||||
04 Apr 2024, 04:31 |
|
bitRAKE 04 Apr 2024, 08:50
In hindsight there are quite a few errors, and comment mistakes. Earlier Windows versions can link against kernel32.lib. Should work on Windows 10 version 1511 (November 2015 update) and Windows Server 2016.
For example, look at how the mouse button events work. Multiple buttons work in a strange way. |
|||
04 Apr 2024, 08:50 |
|
Tomasz Grysztar 04 Apr 2024, 10:48
I updated your attachment to not include the executable file - please package only the sources whenever possible.
|
|||
04 Apr 2024, 10:48 |
|
MatQuasar 04 Apr 2024, 14:15
bitRAKE wrote:
Yes, I tested, it came up "button: 1R" or "button: 12".... but mouse button is not designed to use that way, so I think should be okay. I don't know what happens to PAUSE command to PowerShell, now it is "Press Enter to continue". Even PAUSE command in CMD does not accept key like Ctrl, Alt, Win.... (Sorry, this is more related to my "keypress" example two days ago. ) |
|||
04 Apr 2024, 14:15 |
|
bitRAKE 04 Apr 2024, 18:23
MOUSE_EVENT is just a bad design, imho. The button up event could indicate what button has been released. This isn't just about supporting a more complex usage of devices. More about not needing to cache state to respond to the event - the design assumes too much about the usage.
Some of this event handling will be deprecated in future Windows perhaps. Standard Win32 functions can be used for non-terminal UI elements - focusing the terminal on character only features. |
|||
04 Apr 2024, 18:23 |
|
Tomasz Grysztar 06 Apr 2024, 11:46
Code: eval 'extrn "__imp_',`fun,'" as ',`fun,':QWORD' Code: extrn '__imp_' bappend `fun as fun: QWORD |
|||
06 Apr 2024, 11:46 |
|
bitRAKE 06 Apr 2024, 18:32
That line goes way back - probably the first thing I tried to do in fasmg. bappend works well - I've never used it before.
|
|||
06 Apr 2024, 18:32 |
|
bitRAKE 10 Apr 2024, 19:51
The example has been updated with the changes from the thread, as well as processing for the keyboard event. Some important oddities of working with events:
|
|||
10 Apr 2024, 19:51 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.