flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > C style fastcall macro toolkit - version 1

Author
Thread Post new topic Reply to topic
Jessé



Joined: 03 May 2025
Posts: 54
Jessé 08 Jun 2025, 12:56
This is the final stable (at least to my tests Wink) version of my fastcall toolkit macro set.
Changes from BETA2:

- irpv demon is now gone!
- overall performance has become quite good now!
- removed internal TRUE, FALSE and NULL definitions. Internal types for this still exist.
- default size statement for unsizable parameters is now permanent (see this post);
- upgrade 'testtype' internal macro following Tomasz recomendations about register identification;
- 32 bit computed address with 32 registers now is recognized as 32-bit size;
- added support to pass MMX registers for integer type parameters (dword, qword);
- enhance tword parameter decision taking on FPU parameters (including FPU registers);
- added PI number (TT or π represented) as a tword parameter;
- added support for ("CHARDATA") format to pass up to qword characters parameter (not string);
- added 'alias' macro inside proto macro, which defines only the alias not the function name as macro;
- internal aliased functions now call function 'name' instead of '_name';
- added _bss macro for uninitialized data section (alpha stage, due to limitations on how 'virtual' directive handles uninitialized data);
- added '_code rwx' for declaring a self modifying code section (read, write and execute);
- made _data, _rdata and _code reusable, outputting sections contents to the topmost _data, _rdata or _code macro;
- label x number thing is removed, completely unreliable. But it is not a problem, because it still has *label or the classical [label] to do its stuff.

I included the updated user guide version, please read it. There's some points to consider when using the new stuff. Also helper texts are alongside macro code to complement what's in the user guide.
The 'irpv' problem is due to me keeping using my first premature version of 'testtype', which has wrong define/equ/= usage for some global variables. 100% fixed now!
The one here is much more refined, stable, and has a much much better performance than the BETA2 approach. And extra features, too.
This also makes it extremely bounded to fasm2 environment, which is never an issue, because it is made for fasm2 assembler/x86-64/Linux O.S./System V ABI Fastcall calling convention. So, backup that copy of BETA2 if you have it. One might need to reuse my text-based register detect melhod if doing anything customized.

Have fun! ✌️


Description: Clean and nifty now, without any "possession" =D
Packed with examples, adapted to the new stuff, also.

Download
Filename: fastcall_v1 demo.zip
Filesize: 52.49 KB
Downloaded: 54 Time(s)


_________________
jesse6
Post 08 Jun 2025, 12:56
View user's profile Send private message Reply with quote
Jessé



Joined: 03 May 2025
Posts: 54
Jessé 13 Jun 2025, 05:44
From now on, one can get any updates on this macro toolkit under my GitHub repo for it (finally).
I know I'm changing the wheel while the car is moving, but, I can't wait... Rolling Eyes
Post 13 Jun 2025, 05:44
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.