-d TEXT="1234abcd" is the same that -d TEXT=1234abcd, so use 3 double quotes before and after the string : TEXT="""1234abcd"""
With the compiler option -pp you can see the resulting source code.
"The -pp compiler option enables the preprocessor-only mode. The code is parsed & checked as usual, but is not compiled. A pre-processed version of every input source.bas is generated, named source.pp.bas."