[comp.sys.cbm] Scan cbm programs from the magazine listings?

ewm@cbnews.ATT.COM (edward.w.mcfarland) (02/10/90)

     Having access as I do to an Apple Mac IIcx with scanner and OCR
software, I was wondering what might be entailed in scanning in the 
program listings that appear in the C= magazines for conversion to
run on my C64.
     Not being up on CBM file systems, would I convert the scanned program
to C= ASCII?  Would it then run in that state? (I can down load the ASCII
file to my C64 and convert it to C= ASCII)
     I assume that the C= specific Basic things like the cursor control 
instructions that Run magazine uses in their listings would have to be
keyed in after you get the prog. into C= ASCII.

Thanks for sharing your knowlege,

     Ed McFarland          ewm@mvusa.ATT.COM

kmunn@ic.sunysb.edu (Kristofer A Munn) (02/11/90)

Yes, you can scan the listings but you can't just run them from that.
BASIC keywords are stored as single bytes and they are printed from a
list of the commands within the computer during a list.  You would have
to write a small program that prints the line on the screen, puts GOTOxx
on the next logical line and then move the cursor up, put a couple of
RETURNs (CHR$(13)s) in the buffer (631-640,198) and then stop the program.
The computer would then hit RETURN twice, once entering the new line and
the second time rerunning the program to do the next line.  Anyone who has
seen D-Blitz run knows what I am talking about.
--
        /\      /\      /\ ----------------------------------------------*
  /\  _/  \  /\/  \    /  \ Kristofer Munn (KMUNN@libserv1.ic.sunysb.edu) \
 /  \/  /\ \/  \   \/\/    \ State University of New York at Stonybrook    \
/  /\/\/ /\/    \/\/ /      \ ----------------------------------------------*

randy@athena.mit.edu (Randall W Winchester) (02/12/90)

In article <13835@cbnews.ATT.COM> ewm@cbnews.ATT.COM (edward.w.mcfarland,54264,mv,30002w3,508 960 6202) writes:
>
>
>     Having access as I do to an Apple Mac IIcx with scanner and OCR
>software, I was wondering what might be entailed in scanning in the 
>program listings that appear in the C= magazines for conversion to
>run on my C64.
>     Not being up on CBM file systems, would I convert the scanned program
>to C= ASCII?  Would it then run in that state? (I can down load the ASCII
>file to my C64 and convert it to C= ASCII)
>     I assume that the C= specific Basic things like the cursor control 
>instructions that Run magazine uses in their listings would have to be
>keyed in after you get the prog. into C= ASCII.
>
>Thanks for sharing your knowlege,
>
>     Ed McFarland          ewm@mvusa.ATT.COM

Once the BASIC text has been converted to CBM ASCII, it has to be
tokenized, or converted to PRG format.  There are several public
domain utilities to tokenize SEQ listings of BASIC programs, but the
simplest way to do it is to enter the following commands in direct
mode:

	OPEN 1,8,8, "filename"
	POKE 781,1
	SYS 65478

On the C128, simply enter OPEN 1,8,8, "filename" : SYS 65478,0,1.

When the disk drive stops running, a <RUN-STOP>/<RESTORE> will return
control to the keyboard.  If you do a LIST, you'll see the program in
memory.  It can then be saved to disk.

*******************************************************************************
* Randy Winchester * randy@athena.mit.edu * PO Box 1074, Cambridge, MA  02142 *
*******************************************************************************