overwriting a file in TMP

Building your first 6502-based project? We'll help you get started here.
Post Reply
shampoocell
Posts: 2
Joined: 24 May 2018

overwriting a file in TMP

Post by shampoocell »

I'm sure I'm missing something silly here, but surely I should be able to write to disk to the same file name once I've worked on more code in Turbo Macro Pro on the C64, yes? For example, I work for a night, then write my file to disk either as a sequence (via -> w) or as a binary PRG file (via -> s) and call it "FOO." The next day, I can come back and load "FOO" and write some more code, but if I try to use either command above and write "FOO" to disk again, I get a "file exists" error.

I'm sure I'm missing some newbie step involving writing to disk; what is it??
John West
Posts: 383
Joined: 03 Sep 2002

Re: overwriting a file in TMP

Post by John West »

It's been a long time since I've used a C64, and I have never used that assembler. But... you could try saving your file as @:FOO (or possibly @0:FOO). I think that was the syntax for "save and replace".
shampoocell
Posts: 2
Joined: 24 May 2018

Re: overwriting a file in TMP

Post by shampoocell »

John West wrote:
It's been a long time since I've used a C64, and I have never used that assembler. But... you could try saving your file as @:FOO (or possibly @0:FOO). I think that was the syntax for "save and replace".
You are awesome!! @: did the trick! Thank you so much!
User avatar
BigDumbDinosaur
Posts: 9426
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: overwriting a file in TMP

Post by BigDumbDinosaur »

shampoocell wrote:
John West wrote:
It's been a long time since I've used a C64, and I have never used that assembler. But... you could try saving your file as @:FOO (or possibly @0:FOO). I think that was the syntax for "save and replace".
You are awesome!! @: did the trick! Thank you so much!
Watch out for @SAVE (save-with-replace). Some Commodore floppy drives have problems with the save-with-replace function and end up trashing the BAM (block allocation map), cross-linking files and otherwise making a mess of the disk. The only Commodore drives I know of that correctly implement save-with-replace are the 1571 with the second revision ROMs and the 1581.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
Post Reply