10 DEPTH=0
20 GOSUB 1000
30 PRINT "Maximum depth reached:", DEPTH
40 END
1000 DEPTH=DEPTH+1
1001 PRINT "Depth:", DEPTH
1002 GOSUB 1010
1003 RETURN
1010 DEPTH=DEPTH+1
1011 PRINT "Depth:", DEPTH
1012 GOSUB 1020
1013 RETURN
1020 DEPTH=DEPTH+1
1021 PRINT "Depth:", DEPTH
1022 RETURN
