flat assembler
Message board for the users of flat assembler.
  
|  Index
      > Windows > struct(macro argument) | 
| Author | 
 | 
| revolution 27 Jul 2010, 14:25 Use the hash:     Code: mov ax,[tst#.wDay] | |||
|  27 Jul 2010, 14:25 | 
 | 
| jumpex 27 Jul 2010, 14:34 Yes. That worked. #
 Now why didn't I find that anywhere? If you don't have a source where I can read about it (which I am sure you will, but) - how does it work? | |||
|  27 Jul 2010, 14:34 | 
 | 
| revolution 27 Jul 2010, 14:51 Inside macroinstruction also special operator # can be used. This operator causes two names to be concatenated into one name. It can be useful, because it's done after the arguments and local names are replaced with their values. | |||
|  27 Jul 2010, 14:51 | 
 | 
| jumpex 27 Jul 2010, 14:53 Now I remember.
 Thank you. | |||
|  27 Jul 2010, 14:53 | 
 | 
| jumpex 27 Jul 2010, 21:29 It's offtopic, but it's too small of a question to start a new thread about.
 Code: [...] lamb rb 128 [...] ;do something with lamb mov dword[lamb],0 [...] I want to "clear" [lamb], as I append strings to it. Is this a correct way to do so? If not - what is the correct way? Again - sorry for the offtopic. | |||
|  27 Jul 2010, 21:29 | 
 | 
| revolution 27 Jul 2010, 21:35 Do you want to clear (set to zero) the entire 128 bytes? Are you using null terminated strings? | |||
|  27 Jul 2010, 21:35 | 
 | 
| jumpex 27 Jul 2010, 22:13 Yes. Yes. | |||
|  27 Jul 2010, 22:13 | 
 | 
| revolution 27 Jul 2010, 22:23 Since you are using null terminated strings then this will suffice:     Code: mov [lamb],0 | |||
|  27 Jul 2010, 22:23 | 
 | 
| jumpex 27 Jul 2010, 22:26 Thanks.
 You've been very helpful. | |||
|  27 Jul 2010, 22:26 | 
 | 
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.