Reducing source code: weak+alias values in array

Jens Bauer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Apr 29 08:15:21 PDT 2015


On Wednesday, 29 April 2015 at 13:58:14 UTC, Artur Skawina wrote:
> On 04/27/15 19:49, Jens Bauer via Digitalmars-d-learn wrote:
>> I was wondering if there's a way to reduce my bulky startup 
>> files a bit.
>> 
>> If using the GNU Assembler (GAS), then one can reduce the code 
>> using a macro like this:
>> 
{snip}
>> 
>> An example on one of my bulky startup files:
>> https://github.com/jens-gpio/MCU/blob/master/startup/stm/stm32f439_startup.d
>
> Just create a helper module, which the startup files can all
> use to generate the data from a dsl. Eg

That is very cool and quite short. Thank you!
I'll try it out ... I'm already starting to understand some of 
what's going on, but it'll probably be clearer when I've typed 
the code (I do not just do copy-and-paste, as I've found out that 
I learn better by forcing each letter through my brain).


More information about the Digitalmars-d-learn mailing list