[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting



Andreas Wennborg (andreasw@algonet.se) wrote:

: Notice - your applesoft program cannot have program lines higher than 60699.
: -----Clip here ------- 
: 60700  HOME:PRINT "            HANG ON...
: 60705  PRINT
: 60710 D$=CHR$(4)
: 60760  PRINT D$"OPEN /RAM5/BASIC.TXT"
: 60761  PRINT D$"APPEND /RAM5/BASIC.TXT"
: 60762  PRINT D$"WRITE /RAM5/BASIC.TXT"
: 60763  POKE 33,30: PRINT : PRINT : LIST 0,60699
: 60765  PRINT D$"CLOSE /RAM5/BASIC.TXT": TEXT : POKE 33,40
: 60766  VTAB 23: HTAB 10:INVERSE:PRINT "DONE.":NORMAL
: 60768 DEL 60700,60768
: RUN 60700
: ------ Clip ------

: This routine is written for ProDOS, I notice that you probably are 
: running DOS 3.3, it shouldn't be so hard to convert this routine to work 
: under DOS 3.3.

I'm an old-school, hack it quick sort of programmer.  I already responded
directly to the original poster, but here's my solution to the problem:

(NOTE:  This is all one line...remove excess line-turns before using!)

DOS 3.3 VERSION--

0 PRINT CHR$(21):TEXT:HOME:POKE 33,33:PRINT CHR$(4);"MONCO":PRINT CHR$(4);
  "OPEN APPLESOFT PROGRAM.TXT":PRINT CHR$(4);"WRITE APPLESOFT PROGRAM.TXT"
  :LIST 1,63999:PRINT CHR$(4);"CLOSE":PRINT CHR$(4);"NOMONCO":TEXT:END

ProDOS VERSION--

0 PRINT CHR$(21):TEXT:HOME:POKE 33,33:PRINT CHR$(4);"OPEN APPLESOFT.PROGR"
  :PRINT CHR$(4);"WRITE APPLESOFT.PROGR":LIST 1,63999:PRINT CHR$(4);"CLOSE"
  :TEXT:END

Notes on the DOS 3.3 version...
a.  Turns off the 80-column text card if it is on, on ANY A][
b.  Sets the text window to 40x24
c.  Clears the screen
d.  Set text window to 33 characters, which causes Applesoft to suppress extra
    spaces in program listings
e.  Set file output monitoring (verbose debugging mode)
f.  Open the file APPLESOFT PROGRAM.TXT, creating it if it doesn't exist
g.  Send output to the file APPLESOFT PROGRAM.TXT
h.  List the entire program except for the capture routine
    (63999 is the highest allowable Applesoft line number)
i.  Close all files (which also flushes the file output buffer)
j.  Turn off verbose file debugging
k.  Reset the text window to 40x24
l.  END so that the program being captured doesn't have a chance to run

Notes on the ProDOS version--
Same as above, except:
e.  MON command is not available in ProDOS
f.  Use ProDOS-friendly filename "APPLESOFT.PROGR"
g.  Ditto.
j.  Since MON command is not available, neither is NOMON 8-)

Okay, so it isn't pretty; it's automated and not very friendly; and you
have to manually rename the file when you're done.  What do you expect?  This
is an "old fashioned" utility!  8-)

--Dave Althoff, Jr.
-- 
    /-\        _       _         |\                       
   /XXX\      /X\     /X\_      _| \   XX    
  /XXXXX\    /XXX\  _/XXXX\_   /X|  <#XXXXX  (hard hat area...       )
_/XXXXXXX\__/XXXXX\/XXXXXXXX\_/XXX  oXXXXXXX (.sig under construction)