gosub.bas revision 4479
16145Snate@binkert.org100 LET X = 3 26145Snate@binkert.org110 GOSUB 400 36145Snate@binkert.org120 PRINT U, V, W 46145Snate@binkert.org200 LET X = 5 56145Snate@binkert.org210 GOSUB 400 66145Snate@binkert.org220 LET Z = U + 2*V + 3*W 76145Snate@binkert.org230 PRINT Z 86145Snate@binkert.org240 GOTO 999 96145Snate@binkert.org400 LET U = X*X 106145Snate@binkert.org410 LET V = X*X*X 116145Snate@binkert.org420 LET W = X*X*X*X + X*X*X + X*X + X 126145Snate@binkert.org430 RETURN 136145Snate@binkert.org999 END 146145Snate@binkert.org