home bbs files messages ]

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,692 of 4,675   
   R.Wieser to All   
   Re: Borlands Tasm32 v5.x and using "assu   
   15 Dec 18 13:06:33   
   
   From: address@nospicedham.not.available   
      
   Rod,   
      
   >> Foo PROCDESC lArg1:DWORD,lArg2.DWORD   
   >   
   > The . should be a : I think.  Is this a syntax error issue or typo?   
      
   :-(  A typo.  One key lower and a bit to the left of the ":".   
      
   > Borland's TASM 4.0 manual indicates that the PROCTYPE directive is   
   > used to force type-checking, e.g.,   
      
   I had to google PROCTYPE and do some quick testing, but it looks that it and   
   PROCDESC are rather similar, with the difference ethat PROCDESC is used for   
   a single procedure, and PROCTYPE as a template to be applied to one-or-more   
   procedures.   
      
   In other words, although it could simplify the maintainance of the   
   indirectly-called procedures (change the template conform the call and all   
   procedures linked to it will throw mismatch errors) it doesn't do anything   
   for the indirect call itself.   
      
   > Does the PROCTYPE do what you want? i.e., generate an error?   
      
   Yes for a direct call, no for an indirect one  - how could it, as it has no   
   idea which procedure gets called.   
      
   > Is the language specified somewhere in your code?   
      
   Yes.   At the top.  STDCALL in my case.   
      
   > call Foo ???? 12345678h, 0h   
      
   I've never done it that way.  I've always put it, if such an override was   
   needed, direct behind the PROCDESC keyword (before the argument definition)   
   (and only there).   
      
   > So, does that format, i.e., calling Foo directly instead of indirectly   
   > via a register, generate an error?   
      
   Yep, it certainly does (caveat: it doesn't if *no* arguments follow the   
   call, even when the procedure and PROCDESC declares them.   And now you   
   mention it I might create another thread for it)   
      
   > I.e., does any assembler track values in registers such as the address   
   > of a procedure to be called? ...   
      
   That was-and-is not my question.  I assume you know how "assume" works for   
   segment registers ?    I'm just looking for something similar for normal   
   registers.   
      
   (And if I'm lucky such an "assume" will also work for when I point a   
   register to a structure - throwing errors when a postfixed member is not   
   part of the structure the register points at).   
      
   > I.e., I don't see an example of using call indirectly via a register.   
      
   I hope you mean that as in the documentation you have found (googled?), as   
   my example certainly contains an indirect call ...   
      
   > Sorry, I'm not qualified to answer any of your questions, as I'm   
   > not familiar with TASM's regular syntax, but I didn't mind looking   
   > for a few minutes.   
      
   :-)  I think that not many people a) still program in assembly b) for   
   Windows c) are using a 20 year old assembler.     I just hoped that someone   
   knew if that "assume" (or something similar) *could* work on normal   
   registers, and if so what the standard way of doing that would look like.   
      
   Currently I've got nothing.  Any lead is therefore more than nothing.   
      
   > FYI, TASM's ideal syntax is similar to NASM's syntax, IIRC.   
      
   As far as I know, yes.    Tasms "non-ideal" mode just seems to be a bit more   
   flexible in how certain commands are written (like sometimes "{offset to   
   memory} + {register}" is the most descriptive, but at thoer times "{register   
   pointing to a record}+{offset to field}" is better suited).   
      
   Regards,   
   Rudy Wieser   
      
   --- 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