"Walter Bright" wrote in message news:mam6qe$15nu$1...@digitalmars.com...
> We also need a pragma(address) to complement pragma(mangle).

What would that do?

It would allow naming a memory address, similar to using .org in assembly.

eg
pragma(address, 0x0025)
shared ubyte PORTB;
static assert(&PORTB == cast(ubyte*)0x0025);

This is a much nicer version of C's
#define PORTB (*(volatile unsigned char *)0x0025)

Reply via email to