[comp.sys.amiga.tech] Flaming 'C' compilers

peter@sugar.uu.net (Peter da Silva) (10/02/88)

Speaking of flaming 'C' compilers, when are we going to get the Amiga
equivalent of:

	interrupt foo()
	{
		...
	}

This keyword would make the prologue code save all the registers on the stack
in a known order (whatever move multiple registers does), and restores them
on return. Manx would do a geta4() if needed. The registers should be available
for hacking (say, for a handler). You would need some way of declaring that
you need an iret at the end:

	hard interrupt serial_interrupt()
	{
		...
	}

	soft interrupt mhandler(a0, a1, a2, a3, a4, a5, a6, a7, d0)
	void *a0, *a1, *a2, *a3, *a4, *a5, *a6, *a7;
	unsigned long d0;
	{
		...
	}

Maybe make the keywords "interrupt" for a hard interrupt, and "handler" for
a soft interrupt?

It's really sick that the PC has this (even if the PC version is hosed: it
doesn't switch to your task stack on entry... you might be on the system
stack, which isn't likely to have enough room for 'C'), where the more
sophistoicated and powerful Amiga doesn't.
-- 
		Peter da Silva  `-_-'  peter@sugar.uu.net
		 Have you hugged  U  your wolf today?