Hello everyone, Am currently trying to write a set of bindings for #FujiNet to manipulate buffers in memory to MBASIC strings (e.g. to get the received data from the network, into a string), Has anyone written any routines to do this?
-Thom
Am 01/12/2022 03:56 PM, Thom Cherryhomes schrieb:
Hello everyone, Am currently trying to write a set of bindings for
#FujiNet to manipulate buffers in memory to MBASIC strings (e.g. to
get the received data from the network, into a string), Has anyone
written any routines to do this?
-Thom
I have not found any working code, but this really good
description should provide everything you need.
On the "CP/M CD-ROM": /CPM/MSOFT/M-SOFT.CAT
You could precreate a string with the required maximum length,
then use it as a fixed length IN/OUT buffer.
You are not allowed to modify the string length, so you could
an additional integer paramter and pass the used length there.
Use "MID$" to R/W your data, like so...
Initialize a buffer with the required length.
110 X$="1234567890"
120 L=0
A$ holds the string you want to pass in.
210 L=LEN(A$)
220 MID$(X$,1,L)=A$
[...] Your CALL here need to pass X$ and L
B$ gets the returned string.
300 B$=MID$(A$,1,L)
HTH Martin
Am 01/14/2022 07:12 AM, Martin schrieb:
Am 01/12/2022 03:56 PM, Thom Cherryhomes schrieb:
Hello everyone, Am currently trying to write a set of bindings for
#FujiNet to manipulate buffers in memory to MBASIC strings (e.g. to
get the received data from the network, into a string), Has anyone
written any routines to do this?
-Thom
I have not found any working code, but this really good
description should provide everything you need.
On the "CP/M CD-ROM": /CPM/MSOFT/M-SOFT.CAT
You could precreate a string with the required maximum length,
then use it as a fixed length IN/OUT buffer.
You are not allowed to modify the string length, so you could
an additional integer paramter and pass the used length there.
Use "MID$" to R/W your data, like so...
Initialize a buffer with the required length.
110 X$="1234567890"
120 L=0
A$ holds the string you want to pass in.
210 L=LEN(A$)
220 MID$(X$,1,L)=A$
[...] Your CALL here need to pass X$ and L
B$ gets the returned string.
300 B$=MID$(A$,1,L)
HTH Martin
After actually trying out my suggestions,
I have to make a few corrections,
Initializing the string vith a constant assignment
does not allocate a buffer in the string area.
The passed string descriptor points directly to
the string constant in line 110 and writing over
it will change the program.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 07:46:30 |
Calls: | 10,388 |
Calls today: | 3 |
Files: | 14,061 |
Messages: | 6,416,828 |
Posted today: | 1 |