Create the basic boilerplate for the project

2025-09-21 23:26:39 +02:00
commit 27f665a230
2 changed files with 111 additions and 0 deletions
+100
@@ -0,0 +1,100 @@
# Sudoku Solver Wiki
## About
The Sudoku solver is a simple application, that reads the map of a sudoku from a
file and solves it. It then Outputs the result to the terminal output of the
PDP-10. The program is written in assembly language, and serves as a first
exploration into writing code for the PDP-10 in assembly language. This wiki
will document programming techniques and ideas specific for this program, in
order to give an understanding of how the code works. It's not for using the
program alone, which would be simple, and is already documented in the projects
[ReadMe](https://gitea.orca-central.de/jali/PDP10Sudoku/src/branch/develop/README.md)
file. It will also be covered here, in more detail. Basic programming
techniques, as well as the MIDAS Assembler and the PDP-10 instruction set are
also covered in the
[PDP-10 Coding examples wiki](https://gitea.orca-central.de/Examples/PDP10Coding/wiki).
## Prerequisites
In order to run this program, you need a working PDP-10 simulator (or, if you
are a very lucky person,the real thing). You can either use the
[PiDP-10 kit](https://obsolescence.wixsite.com/obsolescence/pidp10), or a
Raspberry Pi 5 to run it on. The PiDP-10 can be run on any Raspberry 5 computer,
even without the front panel, but having the front panel is fancier. You can
also run [simh](https://opensimh.org/) on a PC, but that would only be half the
fun.
The PiDP-10 shold be booted into ITS, as this is the OS, this project is running
against. Now the only thing you need to do, is copy the source code files into
the file system of your PiDP-10. You can do this by using the `mlftp` tool,
installed on the machine your simulator runs on. You clone the repository and
run the following commands from the command line:
```bash
/opt/pidp10/bin/mlftp -w ITS "SUDOKU 1 JALI;" ./src/SUDOKU.MID
/opt/pidp10/bin/mlftp -w ITS "PUZZL1 SUDOKU JALI;" ./src/PUZZL1.SUDOKU
```
This will copy the source code file, and the example puzzle file onto the
PiDP-10. Remmber to change the directory name in the ITS path form `JALI` to the
directory you want to copy to.
You can now edit both files in EMACS on the PiDP-10. However, if you prefer to
edit your code in a somewhat more modern environment (your favourite IDE, for
example), consider installing the
[git-monitor](https://gitea.orca-central.de/jali/PiDP10Services) on your
PiDP-10's host system. The monitor is a service written in
[bash](https://www.gnu.org/software/bash/), that will clone your project
repositories and then monitor a given branch for new commits. On new commits it
pulls them, and runs the script `.git-monitor_after.sh`, which in turn, contains
the upload commands for ITS. This way, you can automatically update your source
code in ITS, even when you are working on a modern machine.
## Building and running
Log into ITS with your developers user name by typing `USERNAME$U` (where `$` is
the ESC-Key), If you are a *luser*: Type `:LOGIN USERNAME` and swap `USERNAME`
for your *actual* username. Confirm with `Enter`.
Now you can build the sudoku solver by invoking MIDAS in DDT:
```
:MIDAS TS SUDOKU_SUDOKU
```
This will instruct MIDAS to create a relocatable binary (TS) from the latest
version of the `SUDOKU` file, and store it in a file named `TS SUDOKU` in the
current directory. If this succeded, listing the files with `:LISTF` (or
`CTRL+F`, if you're not a turist), should look something like this:
```
KA JALI
FREE BLOCKS #2=154 #3=169 #0=156 #1=171
1 PUZZL1 SUDOKU 1 ! 9/21/2025 22:02:04
3 SUDOKU 1 1 ! 9/21/2025 22:02:02
1 TS SUDOKU 1 ! 9/21/2025 23:25:09
```
To invoke the solver run it with:
```
:SUDOKU PUZZL1 SUDOKU
```
This will pass the file `PUZZL1 SUDOKU` to the program, and start to solve it.
The result will be printed on the screen (once the project is finished).
## Source code
The following chapters will describe parts of the source code, and the
techniques it uses to achieve it's goal. Not everything will be explained here,
basic techniques, such as working with accumulators or using a stack are
explained in the
[PDP-10 Coding examples wiki](https://gitea.orca-central.de/Examples/PDP10Coding/wiki).
The different techniques will be explained by area, such as `mathematics` or
`Input/Output`.
- [InputOutput](./InputOutput.md)
+11
@@ -0,0 +1,11 @@
# Input/Output operations
## About
This chapter describes the basic input/output techniques, especially, how the
puzzle templates are read from files and converted into a field of numbers
between 0 and 9.
## Opening files on disk
TODO: continue here