My understanding as I read EXPECT is, it is supposed to copy "n" characters of the text entered from the keyboard, to any specified memory address in the form ( addr n --- ).
Where "n" is the maximum number of characters to be expected and "addr" is the address where the text is moved to.
My question is that when the text is moved to the specified address, is the actual length of the text entered also stored at the address by EXPECT or is there a word used to calculate the length of the copied text and store that length at the beginning of the text?
To recap the destination memory should have a length byte followed by the entered text so that COUNT can put the "addr" and the "length byte" on the data stack ready for TYPE to use.
I should be able to do this, right?
PAD 80 EXPECT PAD COUNT TYPE
|