[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: IIe to ibm file transfer. Help! :)
In article <sirius-0506961642020001@d-134866.spirit.com.au>
sirius@spirit.com.au (Michael Hickey) writes:
>[...snip...]
>(From Chapter 8 of BASIC Programming with ProDOS)
>
>1 REM CAPTURE
>2 D$ = CHR$(4)
>3 PRINT D$; "OPEN LISTING.EXEC"
>4 PRINT D$; "WRITE LISTING.EXEC"
>5 LIST 10,32767
>6 PRINT D$; "CLOSE LISTING.EXEC"
>7 END
Just one nit to pick here...if your program has any lines numbered above
32767, this routine won't capture them. It's much better to say "LIST 10,"...
omitting the final number in the LIST command lists through the end of the
program no matter what line it ends at.
It's also good to put the entire thing on one line, in order to minimize
the number of pre-existing program lines that you have to be careful to
avoid:
0 D$ = CHR$ (4): PRINT D$"OPEN LISTING.EXEC": PRINT D$"WRITE LISTING.EXEC":
LIST 1,: PRINT D$"CLOSE": END
I've gotten into the habit of leaving line 0 of my programs free in order
to leave room for routines like this.
Some people like to stick a "POKE 33,33" into this routine before the LIST
command, in order to avoid any attempt by Applesoft to break lines in the
middle. (I've never found this to be a problem, but it certainly doesn't
hurt to be paranoid in this case.)
- Neil Parker
--
Neil Parker, nparker@{cie-2,cie}.uoregon.edu, http://cie-2.uoregon.edu/~nparker
"Evolution is vastly overrated." -- Ambassador Delenn, _Babylon_5_