[comp.sys.cbm] BBS input

shavlul@ucscb.ucsc.edu (60231000) (01/08/91)

One thing you may want to consider, if you use ML to send chars into A$
directly, is that it will probably not work when you compile the BASIC.
When I wrote my BBS for the C-64 this technique did not work at all with
BLITZ!, though it is otherwise a great compiler.  Why did I use ML?  I was
trying to get rid of all string arrays from the program, thereby reducing
garbage collection from 5-10 seconds down to nothing.  (Try DIM A$(50), 
fill it up, and PRINT FRE(0)).  The problem was solved by calling the ML
routine with SYS, reading the ASCII code of the current char (via PEEK) and
storing it into an integer array.  When the carriage return was encountered,
a one-time loop that did A$=A$+CHR$(A%[I]) did the trick. (This clutters up
free memory, true, but garbage collection isn't a problem any more anyways
 :-)).  What's best is this compiles properly.  While this was not at the most
lightning speeds with normal BASIC (though faster than using GET#), with
compiled BASIC it really flies.

When I was C= b-boarding (around 1986), the big speed problem was with the
disk drives.  It seems that the serial I/O was timing sensitive and can 
not be interfered with by an RS232 Non-Maskable-Interrupt.  One idea I had
was to figure out a way to send files using handshaking for every bit
(instead of only for every char) so that the modem does not have to wait for
the drive and vice versa.  Does anyone know if this has been tried?

The next time someone puts down your C-64, ask them if their machine is
immune to viruses :-).

treesh@vangogh.helios.nd.edu (01/08/91)

Well, because Im runing Cnet 128 software, the use of complied basic is out 
of the question, all code must be in true 6502 ML, or in non-complied basic.
Speed is not a problem at all running in straight basice because all the
i/o stuff is handles in ML, and anything that would be slow in basic
have been written in ML.  Basic is used as a logical platform to controll
what SYS to do next.  

If you have never called a Cnet BBS, I recomend that you try one out, you
will be suprized at how fast they move, even on the 64.
 
ctfm