I haven't used 68K gcc in a while, but I think this should work (I used a similar trick in x86 a while back):
extern inline unsigned long get_d1()
{
unsigned long retval asm("d1");
return retval;
}
int main()
{
printf("the value of D1 is %ld\n",get_d1());
return 0;
}