flat assembler
Message board for the users of flat assembler.
Index
> Main > Community package macros feedback request |
Author |
|
vid 19 May 2008, 23:50
My idea would be to focus more on easy-to-use package, eg. quasi-automatic imports for basic DLLs, idata / udata macros (maybe more, like c[onstant]data, etc...), invoke, parameter number counting ... all this by default.
I could provide macros that would allow this, and allow to make compatible headers for other libraries. Like this: Code: include 'win32.inc' ;our default package include 'winsock.inc' ;extra DLL not included in default package (not used here) include 'fasmlib.inc' ;extra library (not used here) idata { string db "oh yeah",0 } start: invoke MessageBoxA, 0, string, "uh oh", 0 invoke ExitProcess, 0 .end start Note that there *is* one tough problem: using idata/udata would be required, if you want them to be placed in data section. no ".data" possible (yep, I made mistake in post quoted by Loco). If we allow ".data", then we have to disallow idata/udata, or force user to place .data behind every idata/udata These are macros i can provide... actually, they are mostly done for my old FASMPAK thingy, just few minor changes needed, i hope. |
|||
19 May 2008, 23:50 |
|
revolution 20 May 2008, 14:10
I would be pleased to see 'includeonce' (or similar name) in the macros package. I think it is important for multi-person development. I have previously posted a version, but just for completeness here it is again
Code: match =files@included,files@included{ macro nest_includeonce\{ macro includeonce path,[instr]\\{\\common file@include equ path match head path tail,files@included\\\{file@include equ\\\} match head path,files@included\\\{file@include equ\\\} match file,file@include\\\{ files@included equ files@included path nest_includeonce include file purge includeonce irp i,instr\\\\{i\\\\} \\\} \\} \}nest_includeonce macro show_included\{match x i,files@included\\{irps j,i\\\{display \\\`j,13,10\\\}\\}\} files@included equ x } Code: macro libraryonce [dll_tag,dll_name,import_file] { forward libraryonce@tag equ dll_tag match head dll_tag tail,.library_tag_list\{libraryonce@tag equ\} match head dll_tag,.library_tag_list\{libraryonce@tag equ\} match any,libraryonce@tag\{ .library_tag_list equ .library_tag_list,dll_tag dll_tag#.module_name equ dll_name match any,import_file\\{includeonce import_file\\} \} } |
|||
20 May 2008, 14:10 |
|
vid 20 May 2008, 14:46
What exactly should be "includeonce" used for? Can you give example where it is useful?
|
|||
20 May 2008, 14:46 |
|
revolution 20 May 2008, 14:55
vid wrote: What exactly should be "includeonce" used for? Can you give example where it is useful? This also enhances the ability to write self-contained modules of common utilities and functions used in many different projects. I find this useful in many ways. |
|||
20 May 2008, 14:55 |
|
vid 20 May 2008, 15:27
Okay, you're right. But I think most important is to make basic package that delivers default macros and win32 includes. I'd postpone things like this for bit later. It's always good idea to start small.
|
|||
20 May 2008, 15:27 |
|
revolution 20 May 2008, 16:33
LocoDelAssembly wrote: He also told me about chatting in an IRC channel about this. I think we still have a channel on freenode so we could set a date where most of us can participate and chat a little more freely than what will be allowed on this thread |
|||
20 May 2008, 16:33 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.