quakeforge/ruamoko/qwaq/gcd.r
Bill Currie d23c9582f1 [qwaq] Implement execute-to-cursor
Support for finding the first address associated with a source line was
added to the engine, returning 0 if not found.

A temporary breakpoint is set and the progs allowed to run free.
However, better handling of temporary breakpoitns is needed as currently
a "permanent" breakpoint will be cleared without clearing the temporary
breakpoing if the permanent breakpoing is hit while execut-to-cursor is
running.
2021-06-08 16:54:04 +09:00

20 lines
253 B
R

void printf (string fmt, ...) = #0;
void traceon (void) = #0;
int x, y;
int
gcd (int a, int b)
{
if (b == 0) return a;
else return gcd (b, a % b);
}
int
main (int argc, string *argv)
{
x = 130;
y = 120;
printf ("%d\n", gcd (x, y));
return 0;
}