There seems to be a fundamental misunderstanding about the different, and relevant, file systems at play. I'm not at all intending to insult, I'm just pointing out that a lot of the confusion seems to be rooted here. So:
1) The Raspberry Pi has its own Linux-based file system. You seem to already be reasonably familiar with that. Great.
2) OS/8 has its own file system as well. There is essentially no relationship between the OS/8 file system in the PiDP-8/I and the Raspberry Pi's file system other than that simulated storage media (e.g., hard disks, floppy disks, DecTapes, etc.) in OS/8 appear as themselves separate, unique files in the Raspberry Pi file system. As one specific example, the default OS/8 system disk (RKA0: and RKB0:) appears as /opt/pidp8i/share/media/os8/v3d.rk05 in the Raspberry Pi file system. As another specific example, an OS/8 DecTape (e.g., DTA0:) could appear as /opt/pidp8i/share/media/os8/cc8.tu56 in the Raspberry Pi file system.
3) If you look at any of the boot script files in, I believe, /opt/pidp8i/share/boot you will see how the SIMH attach command (often abbreviated "att") connects a simulated media file in the Raspberry Pi file system to a "storage device" in OS/8. For example:
att rk0 /opt/pidp8i/share/media/os8/v3d.rk05
tells SIMH to treat the data in the Raspberry Pi file named /opt/pidp8i/share/media/os8/v3d.rk05 as devices RKA0: and RKB0: in OS/8, while the command:
att dt0 /opt/pidp8i/share/media/os8/cc8.tu56
tells SIMH to treat the data in the Raspberry Pi file system named /opt/pidp8i/share/media/os8/cc8.tu56 as device DTA0: in OS/8
4) There are a number of ways to move files files back and forth between the Raspberry Pi file system and the OS/8 file system:
4b) My personal favorite way is to use the simulated paper tape reader (PTR) in OS/8. First, make a .txt file in the Raspberry Pi file system that contains the text (e.g., the source code for some program) that you want to import into the PiDP-8/I, Call that file /opt/mycode/myfile.txt for sake of illustration. Then, from inside of SIMH while running OS/8:
. (note: this is the OS/8 prompt)
.
^e (note: you type control/e on the SIMH console keyboard, this drops you from OS/8 into SIMH itself
simh> attach ptr /opt/mycode/myfile.txt (note: this connects your Rasping text file to the OS/8 PTR: device)
simh> go (note: this returns you from SIMH back to running OS/8)
.R PIP (note: this runs the OS/8 system program PIP, aka Peripheral Interchange Program)
*MYFILE.PA<PTR:/A (note: * is the PIP prompt,
MYFILE.PA is the file name you want to use in OS/8, PTR: is where you are going from, the /A tells PIP it is ASCII data)
^ (note: OS/8 is prompting you to load the tape into the reader, but you did that with the SIMH attach, command earlier, so now just hit any normal key on the keyboard)
*^C (note: when the simulated paper tape read is done, PIP prompts you for another file to interchange, you type control/c to tell PIP there are no more)
. (note, you are now back at the OS/8 prompt with the file DSK:
MYFILE.PA that you can deal with as an OS/8 file)
The difficulty here is that the end-of-line delimiter in Raspberry Pi (a LINEFEED character, ASCII 212) is different than in OS/8 (a RETURN character, ASCII 215) so you will need to further massage the file using either the OS/8 editor program TECO or a separate, custom utility program like
LF2CR.SV that I can supply to you if you want. I won't provide the details here unless you really want to go this route.
After fixing the end-of-line delimiter, the content of your original Raspberry Pi file
/opt/mycode/myfile.txt is also in an OS/8 file named
DSK:MYFILE.PA. You have complete freedom to specify other OS/8 disks and DecTapes like RKA1:, RKB1:, DTA0:, DTA1:, etc. You can also use other file extensions, like .BA for BASIC source code, .FT for FORTRAN code, and so on. You have the full capabilities of your OS/8 system, as described in the earlier-referenced OS/8 Handbook to use the programming languages described in the earlier-referenced OS/8 Language Reference Manual.
Either option 4a or 4b would be the most realistic recreation of how code development and execution was done in a real PDP-8 once the data is in the OS/8 file.
5) If you have the assembly listing of a program like in your first message, you can manually toggle it into the PiDP-8/I using the front panel. You will need to learn Octal notation if you don't already know it, but it's quite easy in reality. Just understand that the left-most column is the Memory Address and the column immediately to the right of that is the memory contents to load at that address. See the 1970 edition of the Small Computer Handbook (
https://bitsavers.org/pdf/dec/pdp8/handbooks/SmallComputerHandbook_1970.pdf), Chapter 2 for descriptions of all of the front panel switches and lights. The down sides here are that this only works for assembler code (no other languages), it is inconvenient for larger programs, and it's non-trivial to save what you did to be able to re-run it again later without re-entering the whole program through the switches again.
6) you can also enter assembled octal code using the SIMH "deposit" (often abbreviated as just d) command. Simply, when SIMH is running the PiDP-8/i, use control/e to drop into SIMH mode and, for example, for your first program above:
^E
simh> d 00200 7201
simh> d 00201 7421
simh> d 00202 7313
... (note: here you would be entering all. of the other memory contents between addresses 00202 and 00227)
simh> d 00227 0000
simh> d 00230 0000
simh> d 00231 0000
simh> go 00200
Again, the issues here are that it only works on assembler code and that it's a bit inconvenient to have to re-type all of this to load the program when you want to re-run it later. On the other hand, the SIMH dump command appears to be able to save what you entered for later use using the SIMH load command. The key here is to understand that the save-ed and load-ed files are in the Raspberry Pi's file system, and not at all in the OS/8 file system.
7) You can take all of the SIMH commands from option 6 and enter them into a text file in the Raspberry Pi file system, for example, /opt/mycode/myscript.script, as in:
d 00200 7201
d 00201 7421
d 00202 7313
... (note: here you would be entering all. of the other memory contents between addresses 00202 and 00227)
d 00227 0000
d 00230 0000
d 00231 0000
go 00200
Then, with the PiDP-8/I in SIMH command mode (e.g., after typing control/e), you can use the SIMH "do" command to execute your script:
^e
simh> do /opt/mycode/myscript.script
If you have the final go 00200 command in the script the do command will immediately load your program and execute it. If you don't put the go 00200 command into the script then you can manually type the go 00200 to the SIMH prompt, as in:
^e
simh> do /opt/mycode/myscript.script
simh> go 00200
Finally, if you first put the front panel Sing Inst switch (farthest right) on, then you can:
^e
simh> do /opt/mycode/myscript.script
simh> go
then put the Sing Inst switch back off, then put 000200 into the front panel switch register, then hit Load Add, then Start. An advantage of doing things this way is that these scripts are easily re-loadable using the SIMH do command.
8) Finally, of course, is the use of the SIMH Load command as Vincent Slyngstand mentioned above but that does mean you have to first prepare the binary image file inside of OS/8 and then export it (e.g., via PIP and the simulated PTR: device or use PALBART) and seems to me to be pretty unnatural if you are wanting the "real PDP-8" experience..
I hope all of this helps,
-- steve