I tried the following code with the MPE ARM VFX Forth Stamp Compiler v6.30:
interpreter
\ Parse ccc delimited by " (double-quote) and store the characters as
\ unicode in memory. Return the number of characters stored.
: unicode" ( "ccc<quote>" -- u )
[char] " parse
dup if
tuck ( addr u -- u addr u )
over + swap ( addr u -- addr+u addr )
do
i @ c, 0 c,
loop
else
swap drop
then
;
: usb-string-descriptor" ( "ccc<quote>" -- )
here 0 c, 3 c,
unicode"
2 * 2 + swap c!
;
target
usb-string-descriptor" LPCUSB"
But it says
Error 337 USB-STRING-DESCRIPTOR" 337/$151 Memory address not in defined section
File .\USB2.FTH Line 306 Page 1 Page line 306
usb-string-descriptor" LPCUSB"
I've tried to add "cdata", but no luck. Any idea what I'm doing wrong?