[comp.sys.apple] Writing ^D, final chapter?

AWCTTYPA@UIAMVS.BITNET ("David A. Lyons") (01/10/88)

>Date:         Sat, 9 Jan 88 03:27:34 GMT
>From:         portal!cup.portal.com!dick_a_wotiz@uunet.uu.NET
>Subject:      Re: writing ^D in basic
>
>You should be able to write it out to a file as long as the chr$(4)
>does NOT come right after a carriage return.  If it is the first character
>of a line, ProDOS will swallow up the rest of the line, but if it isn't
>the first character, it should be written to the file just like any other
>ascii character.
>
>Dick Wotiz                 dick@portal.com
>                           dick@cup.portal.com
>                           {sun,atari,uunet,hoptoad}!portal!dick

Very close!  Actually, the restriction is that the Ctrl-D can't be the first
character printed by a PRINT statement!  The Ctrl-D *can* follow a RETURN
in the file.  DOS 3.3 just looked at the output stream for returns followed
by Ctrl-Ds, but BASIC.SYSTEM (not ProDOS!) intercepts the output of the
Applesoft's TRACE feature (& doesn't let it get to the screen) & always knows
what the current statement is.

I tested this with BASIC.SYSTEM 1.1 & it works great.  I BLOADed my test file
with ,TTXT and checked to make sure the Ctrl-D was in there, and it was.


--David A. Lyons  a.k.a.  DAL Systems
  PO Box 287 | North Liberty, IA 52317
  BITNET: AWCTTYPA@UIAMVS
  CI$: 72177,3233