Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #629
| From | Charlie <charlieDOTd@verEYEzon.net> |
|---|---|
| Newsgroups | comp.sys.apple2.programmer |
| Subject | Re: Need help with a line in a BASIC program |
| Date | 2013-01-29 15:34 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <ke9bnf$jcf$1@dont-email.me> (permalink) |
| References | <3e30ecec-5a39-4dc4-95aa-675d00deef3f@f6g2000yqm.googlegroups.com> <ke99ge$293$1@dont-email.me> <1877742389381182277.970401mjmahon-aol.com@news.giganews.com> |
On 1/29/2013 3:03 PM, Michael J. Mahon wrote: > Charlie<charlieDOTd@verEYEzon.net> wrote: >> On 1/29/2013 10:11 AM, A2CPM wrote: >>> Hi! >>> >>> One of the ProDOS format disk images for the Mill 6809 card have >>> two BASIC >>> programs for extracting all the files on a disk formatted by the FLEX >>> operating system for the Apple ][. The names are "FLEX.TO.PRODOS" and >>> "FLEX.TO.DECIMAL". The two programs are identical except for line >>> 2030. >>> >>> Expanded line 2030 from "FLEX.TO.DECIMAL": >>> 2030 FOR I = 4 TO 255: >>> PRINT(PEEK(SA + I)): >>> NEXT I >>> >>> Expanded line 2030 from "FLEX.TO.PRODOS": >>> 2030 FOR I = 4 TO 255: >>> PRINT CHR$(PEEK(SA + I));: >>> NEXT I >>> >>> "FLEX.TO.DECIMAL" runs in AppleWin but stops because the files >>> written >>> to the output disk are so much bigger than the files on the input disk >>> so >>> the output disk becomes full. "FLEX.TO.PRODOS" breaks out of BASIC, >>> showing >>> "SYNTAX ERROR". >>> >>> So, why does "FLEX.TO.DECIMAL" run and "FLEX.TO.PRODOS" not run? >>> I was >>> able to get all the files extracted from the FLEX disk with >>> "FLEX.TO.DECIMAL" >>> but would like to know how to change line 2030 to make >>> "FLEX.TO.PRODOS" run. >>> >>> Willi >> >> Is one of the numbers PEEKED a 4? A PRINT CHR$(4); will cause a SYNTAX >> ERROR in the FOR/NEXT loop (at least in AppleWin). Try running it >> without the semi-colon to see if that's it. >> >> Charlie > > That was my point. Ctl-D signals ProDOS that the following PRINTed > characters are a ProDOS command. Since the purpose of this loop is to copy > arbitrary binary data to a text file (!), the semicolon is necessary to > prevent the insertion of a CR after each byte. > > This loop will only work on files that do not contain ctl-Ds--not very > useful for arbitrary data, an a bog-slow byte at a time copy. > > -michael - NadaNet 3.1 and AppleCrate II: http://home.comcast.net/~mjmahon Michael, your post hadn't showed up yet on my newsreader when I posted (you beat me by 5 minutes :-) I only suggested removing the semi-colon to see if the SYNTAX ERROR went away, not to use it for copying data. I should have been more clear on that. Charlie
Back to comp.sys.apple2.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Need help with a line in a BASIC program A2CPM <a2@wilserv.com> - 2013-01-29 07:11 -0800
Re: Need help with a line in a BASIC program David Schmidt <schmidtd@my-deja.com> - 2013-01-29 10:48 -0500
Re: Need help with a line in a BASIC program retrogear <larrygr510@gmail.com> - 2013-01-29 08:21 -0800
Re: Need help with a line in a BASIC program BLuRry <brendan.robert@gmail.com> - 2013-01-29 08:34 -0800
Re: Need help with a line in a BASIC program A2CPM <a2@wilserv.com> - 2013-01-29 09:31 -0800
Re: Need help with a line in a BASIC program David Schmidt <schmidtd@my-deja.com> - 2013-01-29 13:15 -0500
Re: Need help with a line in a BASIC program A2CPM <a2@wilserv.com> - 2013-01-29 10:35 -0800
Re: Need help with a line in a BASIC program Michael J. Mahon <mjmahon@aol.com> - 2013-01-29 13:51 -0600
Re: Need help with a line in a BASIC program Charlie <charlieDOTd@verEYEzon.net> - 2013-01-29 14:56 -0500
Re: Need help with a line in a BASIC program Michael J. Mahon <mjmahon@aol.com> - 2013-01-29 14:03 -0600
Re: Need help with a line in a BASIC program Charlie <charlieDOTd@verEYEzon.net> - 2013-01-29 15:34 -0500
Re: Need help with a line in a BASIC program A2CPM <a2@wilserv.com> - 2013-01-29 12:21 -0800
Re: Need help with a line in a BASIC program David Schmidt <schmidtd@my-deja.com> - 2013-01-29 15:40 -0500
Re: Need help with a line in a BASIC program "Bill Buckels" <bbuckels@mts.net> - 2013-01-31 08:36 -0600
Re: Need help with a line in a BASIC program gids.rs@sasktel.net - 2013-01-31 08:01 -0800
csiph-web