Adding version info
VSI BASIC x86-64 X1.8-005 (GEM 50Y3Q) on OpenVMS x86_64 V9.2-2
Alright, when the a program has a single subroutine it works perfectly fine. The moment it has more than one subroutine it breaks and crashes when it encounters it's first return call.
Code: Select all
OPTION TYPE = EXPLICIT
GOSUB PRINT_HIYA
PRINT "2nd GOSUB Upnext"
GOSUB PRINT_HI
EXIT PROGRAM
PRINT_HIYA:
PRINT "Hiya"
RETURN
PRINT_HI:
PRINT "Hi"
RETURN
END
Code: Select all
$ r testreturn
Hiya
%SYSTEM-F-ACCVIO, access violation, reason mask=15, virtual address=FFFFFFFF800000B0, PC=00002098010E0004, PS=0000001B
Improperly handled condition, image exit forced by last chance handler.
Signal arguments: Number = 0000000000000005
Name = 000000000000000C
0000000000000015
FFFFFFFF800000B0
00002098010E0004
000000000000001B
Register dump:
RAX = FFFFFFFF800000B0 RDI = 000000007ACB38D8 RSI = 0000000000000000
RDX = 000000007ACB38A8 RCX = 0000000000000000 R8 = 000000007C05D790
R9 = 0000000000000000 RBX = 000000007ACB3890 RBP = 000000007ACB3950
R10 = FFFFFFFFFFFFFFFE R11 = 0000000000000001 R12 = 000000007ACB39A8
R13 = 0000000000000000 R14 = 000000007ACB3890 R15 = 0000000030F84606
RIP = 00002098010E0004 RSP = 000000007ACB3880 SS = 000000000000001B