Hi Sergei Antonov, thanks for your mail, sounds like JWASM changed in interesting ways... Would be interesting to also know why it did that ;-)
> Hi! > There are problems compiling CuteMouse 2.1 beta 4 with JWasm 2.02. > And I'd like to suggest a patch to fix them. > > The problem in the makefile results in this error: > Error A2125: Cannot open file: "ctmouse" [1] > > Compiling ctmouse.asm results in these errors: > ctmouse.asm(3779) : Error A2252: Invalid operand for 'offset' operator: > S_mousetype > say(2)[ctmouse.asm]: Macro called from > ctmouse.asm(3779): Main line code > ctmouse.asm(4752) : Error A2205: Instruction operand must have size > ctmouse.asm: 5066 lines, 1 passes, 126 ms, 0 warnings, 2 errors > > The patch to fix that is attached. Here is your patch again: > diff -Naur cutemouse21b4-orig/source/ctmouse/ctmouse.asm > cutemouse21b4/source/ctmouse/ctmouse.asm > --- cutemouse21b4-orig/source/ctmouse/ctmouse.asm 2008-07-11 > 23:18:06.000000000 +0400 > +++ cutemouse21b4/source/ctmouse/ctmouse.asm 2010-06-24 12:53:20.000000000 > +0400 > @@ -3776,7 +3776,8 @@ > ; end_ > @@mfb: > push cx ; exit function and errorlevel > - say S_mousetype[si] > + mov di,S_mousetype[si] > + call sayASCIIZ The macro say is defined as follows: say macro stroff ; :vararg ; MOVOFF_ di,<stroff> mov di,offset stroff call sayASCIIZ endm The macro MOVOFF_ is defined as: MOVOFF_ macro reg,offs ; :vararg ifnb <reg> ifnb <offs> ifdifi <offs>,<reg> mov reg,offset offs endif endif endif endm Can anybody explain why argument S_mousetype[si] apparently worked with old versions of JWASM but no longer is working? It seems that "mov di, <offset S_mousetype[si]>" goes wrong? > ; say bx > mov di,bx > call sayASCIIZ > @@ -4749,7 +4750,7 @@ > jnz @@clonz > mov ax,[bx + offset cmOPTION.optmask] > or [options],ax > - call [bx + offset cmoption.optp...@] > + call word ptr [bx + offset cmoption.optp...@] > j commandline > ; end_ > @@clonz: If the call above now needs explicit "word ptr", then why does for example "call [XMSentry]" not trigger a similar problem? Because the call above uses "[bx+someoffset]"? I hope JWasm does not try to scale the offset by word ;-) > diff -Naur cutemouse21b4-orig/source/ctmouse/makefile > cutemouse21b4/source/ctmouse/makefile > --- cutemouse21b4-orig/source/ctmouse/makefile 2008-07-03 > 00:04:20.000000000 +0400 > +++ cutemouse21b4/source/ctmouse/makefile 2010-06-24 13:07:49.000000000 > +0400 > @@ -15,7 +15,7 @@ > # Rules to build files ################################################# > > .asm.obj: > - $(AS) $* > + $(AS) $*.asm > .obj.exe: > $(LINKEXE) $* > The value of AS at that point is "jwasmd -mt ", but I do not know which version of MAKE you use. Might make a difference in whether it passes ctmouse or ctmouse.asm in the $* part?? I just tested with JWASMD 1.80 for comparison, that one opens file.asm if I give either file or file.asm as argument, but if I give "file." as argument, it tries to open "file." without a file name extension. Sounds useful, so why and when did JWASM stop doing that? Eric ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel