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

Re: CP/M disk format question



In article <7e2b6e24-e90b-41e5-90b1-1eef9fd0633b@m3g2000hsc.googlegroups.com>,
jonnosan  <jonnosan@gmail.com> wrote:
>On Jul 12, 10:44=A0pm, pau...@saaf.se (Paul Schlyter) wrote:
>> In article <916eae14-3083-4ff3-9eb8-0130f7a1a...@b1g2000hsg.googlegroups.=
>com>,
>>
>>
>>
>>
>>
>> jonnosan =A0<jonno...@gmail.com> wrote:
>> >On Jul 12, 6:42=3DA0pm, pau...@saaf.se (Paul Schlyter) wrote:
>>
>> >> The GW-BASIC-tokens.html web page stated that GW-BASIC never stored
>> >> the line addresses, only the line numbers, when a GW-BASIC program
>> >> was SAVE'd in tokenized format. =3DA0Here MBASIC behaved differently:
>> >> if the program in memory had line addresses instead of line numbers,
>> >> the SAVE'd program would also contain line addresses, if it was saved
>> >> in tokenized format. =3DA0Back when I still wrote some programs in
>> >> MBASIC, I therefore used to execute the program first, thoroughly enou=
>gh
>> >> to make sure all GOTO's/GOSUB's had been executed, before I SAVE'd
>> >> the program in tokenized format - then it would execute slightly faste=
>r
>> >> the next time I LOAD'ed and RUN'ned it. =3DA0If the program was to be =
>saved=3D
>> > in
>> >> ASCII format, this didn't matter of course.
>>
>> >Any chance you could send me some disk images with files that contain
>> >line addresses instead of line numbers? I haven't come across this yet
>> >in any of the (quite limited) images I've tested my code against.
>>
>> You should be able to create such images yourself easily. =A0Write a shor=
>t
>> MBASIC programs which contains GOTO statements. =A0SAVE it in tokenized f=
>ormat
>> before running your program for the first time. =A0Next, run your program=
>,
>> and afterwards SAVE it again to a new file. =A0Exit MBASIC and DUMP the t=
>wo
>> tokenized files and check the differences.
>>
>> If you don't have access to an Apple CP/M computer, then the Apple Oasis
>> emulator should serve fine.
>>
>> --
>> ----------------------------------------------------------------
>> Paul Schlyter, =A0Grev Turegatan 40, =A0SE-114 38 Stockholm, =A0SWEDEN
>> e-mail: =A0pausch at stjarnhimlen dot se
>> WWW: =A0 =A0http://stjarnhimlen.se/- Hide quoted text -
>>
>> - Show quoted text -
>
>Paul,
>
>I've got an image with an MBASIC.COM that identifies itself as
>follows:
>
>BASIC-80 Rev. 5.2
>[Apple CP/M Version]
>Copyright (C) 1980 by Microsoft
>Created: 12-Nov-80
>
>I loaded this under OASIS, and typed in the following program:
>10 GOTO 100
>20 GOTO 200
>30 PRINT "DONE"
>40 END
>100 GOTO 20
>200 GOTO 30
>
>I then saved it as "UNRUN.BAS", and then ran it 3 times in a row, then
>saved it again as "RUN.BAS".
>When I do a hex dump of these 2 files, they are identical, and are:
>
>00	FF 99 62 0A 00 89 20 0E 64 00 00 A3 62 14 00 89  =7F.b... .d..#b...
>10	20 0E C8 00 00 B0 62 1E 00 91 20 22 44 4F 4E 45   .H..0b... "DONE
>20	22 00 B6 62 28 00 81 00 C0 62 64 00 89 20 0E 14  ".6b(...@bd.. ..
>30	00 00 CA 62 C8 00 89 20 0E 1E 00 00 00 00 1A 72  ..JbH.. .......r
>40	21 F5 27 22 01 00 2A DE F3 22 06 26 0E 0C CD 05  !u'"..*^s".&..M.
>50	00 32 EE 08 B7 21 14 15 CA D6 5E 21 21 22 22 EF  .2n.7!..JV^!!""o
>60	08 21 FE FF 22 67 08 AF 32 62 08 32 33 0B 32 C3  .!~=7F"g./2b.23.2C
>70	0C 32 BD 0C 32 58 08 21 00 00 22 5A 08 32 30 F0  .2=3D.2X.!.."Z.20p
>
>This is using line numbers only, not line addresses. Maybe the
>behaviour you described requires a different version of MBASIC?
>
>Regards
>
>Jonno

Nah - a more likely explanation is that my memory is in error.  After all,
it's over 20 years since I did this.... perhaps I only checked the tokenized
program in RAM, and just (erroneously) assumed the contents in the disk
file would be identical?

Thanks for investigating this.  I don't think I used a different version
of MBASIC, since I used the MBASIC which came with the Apple II SoftCard
CP/M distribution.

Regards
Paul

-- 
----------------------------------------------------------------
Paul Schlyter,  Grev Turegatan 40,  SE-114 38 Stockholm,  SWEDEN
e-mail:  pausch at stjarnhimlen dot se
WWW:     http://stjarnhimlen.se/