Re: [Freedos-user] cutemouse ctmouse 2.1 beta 4 and jwasm news
Eric Auer wrote: almost a year after cutemouse 2.1 beta 3 I can present ctmouse 2.1 beta 4 :-). This is a version with debugging output in the PS2 config stuff. Is this the debugging output or is it garbage? *** CuteMouse v2.1 beta4 [FreeDOS] 5/3 0/33/3 0/34/3 0/07/@ 0/@7/0 0/04/0 0/0Installed at PS/2 port 7/3 0/30/1 0/12/5 0/5 *** Compared to beta 3, it adds support for touchpads in Dell Inspiron 1501 (where int 15.c204 PS2 ident fails) and changes the meaning of /O from disable wheel to enable wheel - default is now NO wheel because only very few DOS apps use the wheel and the wheel detection does not work on all systems. Option /M (disable mouse systems / old genius) is now ignored. A new option /Y enables old genius. Why is this text not in doc\ctmouse\history.txt? Robert Riebisch -- BTTR Software http://www.bttr-software.de/ - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] cutemouse ctmouse 2.1 beta 4 and jwasm news
2008/06/03 17:48 +0200, Japheth Also bad is the direction in which the fields are defined (from high to low), making it very difficult to convert C headers to ASM include files. Flatly against the Intel conventions, which in all respects number all integers from low to high. - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] cutemouse ctmouse 2.1 beta 4 and jwasm news
Hi Robert! present ctmouse 2.1 beta 4 :-). This is a version with debugging output in the PS2 config stuff. Is this the debugging output or is it garbage? CuteMouse v2.1 beta4 [FreeDOS] 5/3 0/33/3 0/34/3 0/07/@ 0/@7/0 0/04/0 0/0Installed at PS/2 port 7/3 0/30/1 0/12/5 0/5 This is debugging output about the mouse and/or wheel detection. Note that you can also get debugging output later when the mouse (-pointer) is switched on or off by an app. I plan to add some test tool which lets you script PS/2 communication as batch file at a later point, then the debug output can be removed again. The tool will take AL and BH (what else?) for int 15.c2 as command line argument and will display returned register values (only those which are documented to be relevant after int 15.c2). Maybe there will also be a command line option to select one of the registers to be returned as errorlevel (default: carry / error status?) or to enable repeat on error-please-retry. For some reason ctmouse never handles please-retry but I do not know whether it would be worth the overhead...? Are there other suggestions for the tool? Compared to beta 3, it adds support for... Why is this text not in doc\ctmouse\history.txt? Because I had focused on the source code and had forgotten that history.txt is in the zip at all. If you find more problems, please let me know...! Eric :-) - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] cutemouse ctmouse 2.1 beta 4 and jwasm news
Eric Auer wrote: CuteMouse v2.1 beta4 [FreeDOS] 5/3 0/33/3 0/34/3 0/07/@ 0/@7/0 0/04/0 0/0Installed at PS/2 port 7/3 0/30/1 0/12/5 0/5 This is debugging output about the mouse and/or wheel detection. But why is it turned on by default? Because it's a beta driver for testing purposes only? Robert Riebisch -- BTTR Software http://www.bttr-software.de/ - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] cutemouse ctmouse 2.1 beta 4 and jwasm news
Maybe it is context sensitive in TASM, 0 in .data and nop in .code? I believe NASM has a whole range of ways to align things, including pad with user-specified value and pick a multi byte noop machine code instruction where appropriate but you would have to check the docs which is selected when and which syntax overrides. As for the MASM implementation - dunno, too long since I last used MASM ;-). What Nasm does is not that interesting for a Masm-compatible tool. I changed JWasm to the Masm behavior, that is, for 16-bit, NOP, MOV AX,AX and MOV CS:AX,AX are used to pad 1,2 or 3 bytes. About the direction of same-op and xchg instructions: Can you add a syntax for the reverse variant? Afair NASM has this, to make it possible for users to control the byte-exact machine language generated as some exotic apps may need that... Currently it's not the time to implement additional options. But I will check what Masm does and adjust JWasm accordingly. - cmp ax, valuebelow128 uses cmp ax,word in TASM but I cannot make JWASM do that - it uses cmp ax,byte - adc ax,0 has the same problem as cmp ax,4 ... Masm allows cmp ax,word ptr 0 to force it to use the non-sign- extended version, but this doesn't work yet in JWasm. I think this would be pretty useful - the word sized variant of that is popular for self modifying code where constants are updated later... It's fixed in v1.8. - macro options can be of type rest and vararg only in TASM Masm syntax allows VARARG as a parameter qualifier: Okay then it seems JWasm does not allow it yet ;-) It does. However, I don't know whether Masm's VARARG implementation matches Tasm's one. Check the jw-* files in the ctmouse jwasm port: TASM seems to let you write constants as combinations of variable names and lists of elements to fill in for their bitfield. Elements can be skipped and can have default values, as in ,,1,0,,3. You can also write lists of elementname=value to describe the value of a bitfield variable, it seems. With JWasm, you get either an error message or the value 0 in most cases I believe ;-). Good examples are the out_ macro invocations I had to replace... Indeed. I couldn't imagine anyone using bitfields seriously, because there are some stupid design flaws. Nevertheless default values and initializers for RECORD items are implemented in v1.8. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] cutemouse ctmouse 2.1 beta 4 and jwasm news
It's fixed in v1.8. Odd, my report already was about 1.80 ... Ok, then you forgot to tell us that you have access to a time machine. Because the versions stored on my site are v1.7 and v1.8pre. Then an error message would have been better than a 0 value... Sure. Looking back, many things could have been improved ... there are some stupid design flaws Which? most annoying one is that bitfield names are global. Also bad is the direction in which the fields are defined (from high to low), making it very difficult to convert C headers to ASM include files. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
Re: [Freedos-user] cutemouse ctmouse 2.1 beta 4 and jwasm news
Hi! Eric Auer wrote: almost a year after cutemouse 2.1 beta 3 I can present ctmouse 2.1 beta 4 :-). This is a version with debugging output in the PS2 config stuff. Compared to beta 3, it adds support for touchpads in Dell Inspiron 1501 (where int 15.c204 PS2 ident fails) and changes the meaning of /O from disable wheel to enable wheel - default is now NO wheel because only very few DOS apps use the wheel and the wheel detection does not work on all systems. Option /M (disable mouse systems / old genius) is now ignored. A new option /Y enables old genius. Is there a way to disable/enable tapping? Currently (on Asus eeePC) I use Synaptics DOS Driver from http://www.eaglecomputing.com/portables/downloads.htm but there are no sources and the driver consumes more memory than ordinary mouse driver. Andris - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user
[Freedos-user] cutemouse ctmouse 2.1 beta 4 and jwasm news
Hi everybody, almost a year after cutemouse 2.1 beta 3 I can present ctmouse 2.1 beta 4 :-). This is a version with debugging output in the PS2 config stuff. Compared to beta 3, it adds support for touchpads in Dell Inspiron 1501 (where int 15.c204 PS2 ident fails) and changes the meaning of /O from disable wheel to enable wheel - default is now NO wheel because only very few DOS apps use the wheel and the wheel detection does not work on all systems. Option /M (disable mouse systems / old genius) is now ignored. A new option /Y enables old genius. I will need YOUR help to get the message files and documentation in sync again now. Only the English sources and com / exe files are supposed to be okay but even they may still contain wrong messages or version numbers or whatever. Feedback welcome! The main change, however, is under the hood: The original ctmouse was written in TASM 2, using a bit of ideal mode and other extensions. Ctmouse is soaked in trippy macros and the sources are really big. So it was not possible to compile it with the free ArrowASM nor was it possible to convert it to NASM syntax with Michael'S helpful NoMySo tool. However, Japheth's JWASM MASM clone did at least have a rough idea of what to do with the cutemouse sources :-). I had to remove piles of fancy macro invocations and simplify macros to finally be able to compile with JWASM. I think if you simplify the code a little more or make NoMySo a bit more flexible, you could even convert the sources to NASM now :-). The new compiles are almost byte-identical to the old TASM version (old TASM-made binaries included). My mousetst (replaces old C version) already is in NASM anyway. The main ctmouse exe and comtest.com compile as identical versions in JWASM. Only the protocol.com tool differs - I decided not to fix a difference which looks like a bug in the TASM-made version :-p. In several cases, I had to manually tune the sources to force byte identical results: - TASM evendata pads with 0, JWASM even pads with 0fch I do not know how to change this, I just used db 0. - sbb ch,ch xchg dx,si xchg cl,bh xchg si,di sbb al,al xchg dh,bl xchg cx,si xchg cx,bx xchg dl,al xchg dl,ah xchg dx,si xchg ah,al (but not ALL xchg instructions) all swap the arguments when compiled with JWASM as compared to compiled with TASM - I used db ... here. - cmp ax, valuebelow128 uses cmp ax,word in TASM but I cannot make JWASM do that - it uses cmp ax,byte - adc ax,0 has the same problem as cmp ax,4 ... - JWASM does not support testflag / setflag / maskflag which compile into test / or / and in an intelligent way. For example testflag [bx],400h would create a test [bx+1],4 in a TASM made binary... Differences between TASM and MASM: - MASM needs double :: after labels to make them globally visible, TASM has keyword locals to make all labels global ... however I had to use :: at ONLY 28 places and having the global-hints explicit makes the code more readable ... - MASM uses even where TASM uses evendata - MASM uses STRUCNAME ends where TASM uses ends - the size info in MYLABEL label byte can be optional in TASM - JWASM / TASM do not understand warn and various %settings - macro options can be of type rest and vararg only in TASM - TASM allows push and pop with multiple arguments... Dunno about MASM but JWASM does not support this. I think NASM does...? Other JWASM specifics I had to work around: - JWASM seems to have pretty bad support for record bitfields, I had to remove most references to them to avoid broken code - JWASM uses only 8 instead of 16 bytes for foo db 8 dup (?,?) - JWASM does not allow structures to be named OPTION ;-) It also can do less magic with macros compared to TASM... You can find all sorts of related simplifications I had to use in jw-tasm.* - in TASM you can say offset X instead of offset PAIR.X in cases where this is not ambiguous (PAIR is a struct). You cannot say [si].foo either, only [si+offset WHAT.foo]. You can also say ends instead of STRUCTNAME ends in TASM and LABNAME label byte does not need the byte in TASM if it can be inferred. Instead of .model use16 tiny I had to use the JWASM -mt command line option. - to make a COM file with JWASM, several changes were needed: Instead of .startup I had to say: org 100h assume ds:DGROUP and start:: (and at the end: end start). Using tlink /x /t does not work, I have to use tlink /x and call exe2bin after that (Watcom exe2bin) for ctmouse. However, tlink /x /t did work for the utilities! Maybe related to the map info? The ctmouse binary had 14e4 bytes _text, 2 _data, 5b9h const in the version before I run exe2bin and com2exe. While exe to com via exe sounds odd, it has use - gives smaller headers. - you cannot say ERRIF in JWASM and I could not get the hll (if_ loop_ etc) macros by Arkady nor the CODE_ or out_ ones to work in a syntax suitable for JWASM... - instead of PS2WHEELCODE[1] I had to
Re: [Freedos-user] cutemouse ctmouse 2.1 beta 4 and jwasm news
Hi, thanks for posting your results! - TASM evendata pads with 0, JWASM even pads with 0fch I do not know how to change this, I just used db 0. this is indeed hard-coded in the source and will be used only if a 16-bit CODE segment has to be padded by 1 byte. The reason why not just 0x00 bytes are used is because runnable code must be generated, as it can be seen in the following example: mov cx,8000 align 4 nextitem: xor ax,[bx] add bx,2 loop nextitem ... Using 0xFC, however, is a bad idea because it is the CLD instruction, which isn't a noop. - sbb ch,ch xchg dx,si xchg cl,bh xchg si,di sbb al,al xchg dh,bl xchg cx,si xchg cx,bx xchg dl,al xchg dl,ah xchg dx,si xchg ah,al (but not ALL xchg instructions) all swap the arguments when compiled with JWASM as compared to compiled with TASM - I used db ... here. Since someone has made big efforts to implement these optimizations in the Wasm source, I didn't touch them, although I have no idea whether they are useful. - cmp ax, valuebelow128 uses cmp ax,word in TASM but I cannot make JWASM do that - it uses cmp ax,byte - adc ax,0 has the same problem as cmp ax,4 ... Masm allows cmp ax,word ptr 0 to force it to use the non-sign-extended version, but this doesn't work yet in JWasm. - macro options can be of type rest and vararg only in TASM Masm syntax allows VARARG as a parameter qualifier: m1 macro p1, p2:VARARG ... - JWASM seems to have pretty bad support for record bitfields, I had to remove most references to them to avoid broken code Please provide more details. JWasm copies Masm, and Masm's implementation of bitfields isn't very intuitive. - JWASM uses only 8 instead of 16 bytes for foo db 8 dup (?,?) That's a severe bug. It occurs if a question mark is the last of multiple items in a DUP argument. Instead of .model use16 tiny I had to use the JWASM -mt command line option. valid Masm syntax is .model tiny. - you cannot say ERRIF in JWASM there are various .ERRxx directives in Masm. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user