I can't test it because I am missing "DATA\DEFAULT.STP", but the problem seemed to be the arrays you were using. I don't really know why maybe someone else could explain it. But I did fix it for you:

`COLOR 7, 0`

LOCATE 1, 1

A$(0) = "x"

A$(1) = CHR$(251)

B$(1) = "*"

B$(2) = " "

M = 1

OPEN "DATA\DEFAULT.STP" FOR INPUT AS #1

LoadSetupData:

INPUT #1, Z$

IF EOF(1) = 0 THEN INPUT #1, Cmd$

CLOSE #1

FOR t = 1 TO 4

p(t) = VAL(MID$(Z$, t, 1))

NEXT t

FOR t = 1 TO 4

h(t) = VAL(MID$(Z$, t + 4, 1))

NEXT t

FOR t = 1 TO 3

i(t) = VAL(MID$(Z$, t + 8, 1))

NEXT t

FOR t = 1 TO 7

j(t) = VAL(MID$(Z$, t + 11, 1))

NEXT t

FOR t = 1 TO 2

k(t) = VAL(MID$(Z$, t + 18, 1))

NEXT t

FOR t = 1 TO 2

l(t) = VAL(MID$(Z$, t + 20, 1))

NEXT t

FOR t = 1 TO 2

m(t) = VAL(MID$(Z$, t + 22, 1))

NEXT t