flat assembler
Message board for the users of flat assembler.
  
|  Index
      > Macroinstructions > Postpone to specific section | 
| Author | 
 | 
| revolution 23 May 2023, 09:02 Postpone doesn't know about sections.
 An option is to make a named macro. Code: ;... section 'code' ... macro after_code { ;... } mov eax,0x1234 ;... after_code ;... | |||
|  23 May 2023, 09:02 | 
 | 
| 3D_FASM 23 May 2023, 09:15 Yes, but there is a problem... how to find or put label to the end of the .code section automatically... | |||
|  23 May 2023, 09:15 | 
 | 
| macomics 23 May 2023, 10:21 Code: ; header macro end_of_section {} ; start end_of_section postpone { end_of_section } ; last end_of_section macro section args& { end_of_section ; previous end_of_section section args macro end_of_section \{ \}} ; new end_of_section ; main code section '.text' readable executable macro end_of_section { end_of_section ; recursive call invoke ExitProcess, 0 } entry $ section '.rsrc' data readable resource from 'rsrc.res' | |||
|  23 May 2023, 10:21 | 
 | 
| 3D_FASM 23 May 2023, 21:34 Not bad | |||
|  23 May 2023, 21:34 | 
 | 
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.