diff --git a/README.md b/README.md index 34f5b1f..01b3582 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ EMU-WRITER -- You didn't think you needed it, but now you know. * When creating the disk image, write-protect the program files. * When splitting a paragraph, the "new" paragraph should always be the smaller of the two. This makes memory management easier. * Consider adding a defrag operation that runs every 64/60s seconds. +* The save routine appears to ignore write-protection status. Use the PAB's STATUS op-code in order to fix that, or alternatively, simply refuse to overwrite any file that is not DSP/FIX 64. ### Manual test cases diff --git a/assm.py b/assm.py index 7d6badc..22a4756 100644 --- a/assm.py +++ b/assm.py @@ -108,9 +108,14 @@ def link_main_files(linked_file, include_membuf, object_files): program_files = glob.glob(WORK_FOLDER + "EMUWRITE*") for program_file in program_files: if not program_file.endswith(".dsk"): + # Add the program files to disk add_command_1 = "xdm99.py {disk_image} -a {program_file} -f PROGRAM" add_command_2 = add_command_1.format(disk_image = disk_image, program_file = program_file) os.system(add_command_2) + # Write-Protect the program files + protect_command_1 = "xdm99.py {disk_image} -w {program_file}" + protect_command_2 = protect_command_1.format(disk_image = disk_image, program_file = program_file.replace("./Fiad\\", "")) + os.system(protect_command_2) # Add example documents to disk imageE text_files = ["HANSEL", "THREELANG"]