Format of SAVE'd programs on disk
I’ve been doing a lot with the Microsoft 6502 source code and one of the capabilities I’ve added is being able to SAVE/LOAD from an SD card. All of the variants of that BASIC save and load tokenized programs. That is, the SAVE function saves the current BASIC program exactly as it appears in memory, with tokens and some ASCII data. All of the early versions of MS BASIC did not support disk operations directly and any disk code was added later by the computer manufacturer who incorporated the MS interpreter into their systems. Jump forward a couple years when Microsoft directly supported CP/M so that the underlying disk code could be standardized. When a SAVE “ABC.BAS” command was executed, was the program saved tokenized still, or was it saved as all ASCII like the LIST command would produce? Someone could then edit BASIC programs using a text editor and be able to read them back in, as opposed to having binary files that could only be edited from within BASIC itself. I’m just wondering if it’s worth my effort to add the capability to save/load ASCII or just be happy with my tokenized version. I’m interested to know what Microsoft did in later versions of their interpreter. Bob
MS GW-BASIC had a “,a” switch to save in ASCII, but I don’t remember if other MS variants had this. I’m thinking Atari basic may have but I’d have to research. On Mon, Jan 20, 2020 at 8:47 PM Bob Applegate via vcf-midatlantic < vcf-midatlantic@lists.vcfed.org> wrote:
I’ve been doing a lot with the Microsoft 6502 source code and one of the capabilities I’ve added is being able to SAVE/LOAD from an SD card. All of the variants of that BASIC save and load tokenized programs. That is, the SAVE function saves the current BASIC program exactly as it appears in memory, with tokens and some ASCII data. All of the early versions of MS BASIC did not support disk operations directly and any disk code was added later by the computer manufacturer who incorporated the MS interpreter into their systems.
Jump forward a couple years when Microsoft directly supported CP/M so that the underlying disk code could be standardized. When a SAVE “ABC.BAS” command was executed, was the program saved tokenized still, or was it saved as all ASCII like the LIST command would produce? Someone could then edit BASIC programs using a text editor and be able to read them back in, as opposed to having binary files that could only be edited from within BASIC itself.
I’m just wondering if it’s worth my effort to add the capability to save/load ASCII or just be happy with my tokenized version. I’m interested to know what Microsoft did in later versions of their interpreter.
Bob
A quick scan reveals that MSX BASIC had this ability. I recall that LISTing to a disk file had the effect of saving as text on the Atari. On Mon, Jan 20, 2020 at 9:45 PM Dean Notarnicola <dnotarnicola@gmail.com> wrote:
MS GW-BASIC had a “,a” switch to save in ASCII, but I don’t remember if other MS variants had this. I’m thinking Atari basic may have but I’d have to research.
On Mon, Jan 20, 2020 at 8:47 PM Bob Applegate via vcf-midatlantic < vcf-midatlantic@lists.vcfed.org> wrote:
I’ve been doing a lot with the Microsoft 6502 source code and one of the capabilities I’ve added is being able to SAVE/LOAD from an SD card. All of the variants of that BASIC save and load tokenized programs. That is, the SAVE function saves the current BASIC program exactly as it appears in memory, with tokens and some ASCII data. All of the early versions of MS BASIC did not support disk operations directly and any disk code was added later by the computer manufacturer who incorporated the MS interpreter into their systems.
Jump forward a couple years when Microsoft directly supported CP/M so that the underlying disk code could be standardized. When a SAVE “ABC.BAS” command was executed, was the program saved tokenized still, or was it saved as all ASCII like the LIST command would produce? Someone could then edit BASIC programs using a text editor and be able to read them back in, as opposed to having binary files that could only be edited from within BASIC itself.
I’m just wondering if it’s worth my effort to add the capability to save/load ASCII or just be happy with my tokenized version. I’m interested to know what Microsoft did in later versions of their interpreter.
Bob
Just verified that my copy of BASIC-80 (Rev. 4.82, (C) 1980) saves files in tokenized format. It has the option to SAVE "filename",A which saves in ASCII but the default is tokenized. This makes it much faster to save and to load. My belief (educated guess) is that was the default for most or all versions of MS BASIC, including (as Dean says) the IBM PC version later named (for some unknown [to me] reason) "Gee Whiz" Basic.
-----Original Message----- From: vcf-midatlantic <vcf-midatlantic-bounces@lists.vcfed.org> On Behalf Of Dean Notarnicola via vcf-midatlantic Sent: Monday, January 20, 2020 9:45 PM To: vcf-midatlantic <vcf-midatlantic@lists.vcfed.org> Cc: Dean Notarnicola <dnotarnicola@gmail.com> Subject: Re: [vcf-midatlantic] Format of SAVE'd programs on disk
MS GW-BASIC had a “,a” switch to save in ASCII, but I don’t remember if other MS variants had this. I’m thinking Atari basic may have but I’d have to research.
On Mon, Jan 20, 2020 at 8:47 PM Bob Applegate via vcf-midatlantic < vcf- midatlantic@lists.vcfed.org> wrote:
I’ve been doing a lot with the Microsoft 6502 source code and one of the capabilities I’ve added is being able to SAVE/LOAD from an SD card. All of the variants of that BASIC save and load tokenized programs. That is, the SAVE function saves the current BASIC program exactly as it appears in memory, with tokens and some ASCII data. All of the early versions of MS BASIC did not support disk operations directly and any disk code was added later by the computer manufacturer who incorporated the MS interpreter into their systems.
Jump forward a couple years when Microsoft directly supported CP/M so that the underlying disk code could be standardized. When a SAVE “ABC.BAS” command was executed, was the program saved tokenized still, or was it saved as all ASCII like the LIST command would produce? Someone could then edit BASIC programs using a text editor and be able to read them back in, as opposed to having binary files that could only be edited from within BASIC itself.
I’m just wondering if it’s worth my effort to add the capability to save/load ASCII or just be happy with my tokenized version. I’m interested to know what Microsoft did in later versions of their interpreter.
Bob
Hjmmm.. it appears there's debate even in 2020 about where the GW comes from: https://en.wikipedia.org/wiki/GW-BASIC "There are several theories on what the initials "GW" stand for. Greg Whitten, an early Microsoft employee who developed the standards in the company's BASIC compiler line, says Bill Gates picked the name GW-BASIC. Whitten refers to it as Gee-Whiz BASIC and is unsure if Gates named the program after him.[6] The Microsoft User Manual from Microsoft Press also refers to it by this name.[citation needed] It may have also been nicknamed Gee-Whiz because of its numerous graphics commands.[6] Other common theories as to the initials' origins include "Graphics and Windows", "Gates, William" (Microsoft's president at the time), or "Gates-Whitten" (the two main designers of the program)." On 1/21/2020 8:48 AM, Glenn Roberts via vcf-midatlantic wrote:
Just verified that my copy of BASIC-80 (Rev. 4.82, (C) 1980) saves files in tokenized format. It has the option to SAVE "filename",A which saves in ASCII but the default is tokenized. This makes it much faster to save and to load. My belief (educated guess) is that was the default for most or all versions of MS BASIC, including (as Dean says) the IBM PC version later named (for some unknown [to me] reason) "Gee Whiz" Basic.
-----Original Message----- From: vcf-midatlantic <vcf-midatlantic-bounces@lists.vcfed.org> On Behalf Of Dean Notarnicola via vcf-midatlantic Sent: Monday, January 20, 2020 9:45 PM To: vcf-midatlantic <vcf-midatlantic@lists.vcfed.org> Cc: Dean Notarnicola <dnotarnicola@gmail.com> Subject: Re: [vcf-midatlantic] Format of SAVE'd programs on disk
MS GW-BASIC had a “,a” switch to save in ASCII, but I don’t remember if other MS variants had this. I’m thinking Atari basic may have but I’d have to research.
On Mon, Jan 20, 2020 at 8:47 PM Bob Applegate via vcf-midatlantic < vcf- midatlantic@lists.vcfed.org> wrote:
I’ve been doing a lot with the Microsoft 6502 source code and one of the capabilities I’ve added is being able to SAVE/LOAD from an SD card. All of the variants of that BASIC save and load tokenized programs. That is, the SAVE function saves the current BASIC program exactly as it appears in memory, with tokens and some ASCII data. All of the early versions of MS BASIC did not support disk operations directly and any disk code was added later by the computer manufacturer who incorporated the MS interpreter into their systems.
Jump forward a couple years when Microsoft directly supported CP/M so that the underlying disk code could be standardized. When a SAVE “ABC.BAS” command was executed, was the program saved tokenized still, or was it saved as all ASCII like the LIST command would produce? Someone could then edit BASIC programs using a text editor and be able to read them back in, as opposed to having binary files that could only be edited from within BASIC itself.
I’m just wondering if it’s worth my effort to add the capability to save/load ASCII or just be happy with my tokenized version. I’m interested to know what Microsoft did in later versions of their interpreter.
Bob
participants (4)
-
Adam Michlin -
Bob Applegate -
Dean Notarnicola -
Glenn Roberts