Skip to content

Commit

Permalink
Write-proect prograzm files in the disk image
Browse files Browse the repository at this point in the history
  • Loading branch information
bkrug committed May 18, 2024
1 parent 627a70f commit 81186bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions assm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 81186bd

Please sign in to comment.