olcott
unread,Nov 24, 2020, 6:06:13 PM11/24/20You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Every C programmer that can pay attention (Some respondents seem to have
attention deficit disorder) will see that the following code very
obviously specifies infinite recursion:
int DebugTrace(u32 P, u32 I)
{
return ((int(*)(int))P)(I);
}
void H_Hat(u32 P)
{
u32 Aborted = DebugTrace(P, P);
if (Aborted)
HALT
else
HERE: goto HERE;
}
int main()
{
u32 P = (u32)H_Hat;
DebugTrace(P, P);
HALT;
}
--
Copyright 2020 Pete Olcott
"Great spirits have always encountered violent opposition from mediocre
minds." Einstein