// What is used by a function call? #include "mem_syms.h" #define ADDR DEC unsigned int gcd(unsigned int a, unsigned int b) { unsigned int result; Serial.print("Stack size: "); Serial.println( (int) STACK_SIZE, ADDR); if ( a == 0 ) { result = b; } else if ( a == 1 ) { result = 1; } else { result = gcd(b, a % b); } // comment out the next two lines and observe the change in stack size Serial.print(a, DEC); Serial.print(" "); Serial.print(b, DEC); Serial.println(" "); return result; } void setup() { unsigned int g; Serial.begin(9600); Serial.println("MEM07"); Serial.print("Avail mem:"); Serial.println(AVAIL_MEM, DEC); g = gcd(8820, 462); Serial.print("gcd is "); Serial.println(g, DEC); } void loop() { }