commit - c698d567f34e466b03f0fefbf21b23da2345b17f
commit + 28ab556add8fdf8d35964fb196fcc7edd18f4eb2
blob - 3e29b1bb8447cc90143c5d3a12cd3b6a0b00725d
blob + 2772e2d78b52fec95d18cc4208586be48b07306c
--- .gitignore
+++ .gitignore
mc5000
+mc5000.1
*.bin
blob - 24f2c81665b0089e6e9d9347586888fc4796f3d3
blob + c5f71b035cc0d5af2b0186e83e61be8d06f0b02a
--- Makefile
+++ Makefile
-.PHONY: all test
+.PHONY: all test clean doc
all: mc5000
+doc: mc5000.1 mc5000.1.txt
test: all
./mc5000 -o test.bin test.s
./mc5000 -o test2.bin test2.s
+clean:
+ rm -f mc5000 mc5000.1 test.bin test2.bin
+
+.SUFFIXES: .mdoc .txt
+.mdoc:
+ mandoc -Ios= -Tlint $<
+ cp -f $< $@
+.mdoc.txt:
+ mandoc -Ios= -Tascii $< | col -b > $@
blob - /dev/null
blob + 5878dd63e6f8deab4305b531b8d900ad013f344c (mode 644)
--- /dev/null
+++ mc5000.1.mdoc
+.Dd January 18, 2023
+.Dt MC5000 1
+.Os
+.Sh NAME
+.Nm mc5000
+.Nd assembler and programmer for rickp's MC5000 Dev Kit
+.Sh SYNOPSIS
+.Nm
+.Op Fl v
+.Op Fl u Ar n
+.Op Fl l Ar dev | Fl o Ar outfile
+.Op Ar infile
+.Sh DESCRIPTION
+The MC5000 is a real-world instantiation of
+the fictional family of microcontrollers
+at the center of
+Zachtronics' programming puzzle game
+.Dq Shenzhen I/O .
+The
+MC5000 Dev Kit
+employs two low-cost Padauk PFS173 chips to interpret MCxxxx code.
+.Pp
+The
+.Nm
+utility reads MCxxxx assembly from
+.Ar infile
+or standard input and
+translates it to MC5000 byte code.
+The result can be
+sent to a target chip
+via the board's serial port
+or written to
+.Ar outfile .
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl l Ar dev
+Program the target chip via the given serial port device.
+This option is mutually exclusive with
+.Fl o .
+.It Fl o Ar outfile
+Write the assembled program byte code to
+.Ar outfile .
+This option is mutually exclusive with
+.Fl l .
+.It Fl u Ar n
+Select MCU
+.Pf # Ar n
+as the target chip.
+The default is MCU #1.
+.It Fl v
+Print extra informational messages during programming.
+If given two times, all serial communication is logged
+to the standard output.
+.El
+.Sh EXIT STATUS
+.Ex -std
+.Sh SEE ALSO
+.Bl -inset
+.It MC5000 Dev Kit
+.Lk https://github.com/rickp/MC5000_DevKit/
+.It Shenzhen I/O
+.Lk https://www.zachtronics.com/shenzhen-io/
+.El
+.Sh AUTHORS
+.An -nosplit
+The MC5000 Dev Kit was created by GitHub user
+.An rickp .
+The
+.Nm
+utility was written by
+.An Sven M.\& Hallberg Aq Mt pesco@khjk.org
+as an alternative to the original programming software.
blob - /dev/null
blob + 8a9a98d10a0afef0c811b58f137facee01b9a0a2 (mode 644)
--- /dev/null
+++ mc5000.1.txt
+MC5000(1) General Commands Manual MC5000(1)
+
+NAME
+ mc5000 - assembler and programmer for rickp's MC5000 Dev Kit
+
+SYNOPSIS
+ mc5000 [-v] [-u n] [-l dev | -o outfile] [infile]
+
+DESCRIPTION
+ The MC5000 is a real-world instantiation of the fictional family of
+ microcontrollers at the center of Zachtronics' programming puzzle game
+ "Shenzhen I/O". The MC5000 Dev Kit employs two low-cost Padauk PFS173
+ chips to interpret MCxxxx code.
+
+ The mc5000 utility reads MCxxxx assembly from infile or standard input
+ and translates it to MC5000 byte code. The result can be sent to a
+ target chip via the board's serial port or written to outfile.
+
+ The options are as follows:
+
+ -l dev Program the target chip via the given serial port device. This
+ option is mutually exclusive with -o.
+
+ -o outfile
+ Write the assembled program byte code to outfile. This option is
+ mutually exclusive with -l.
+
+ -u n Select MCU #n as the target chip. The default is MCU #1.
+
+ -v Print extra informational messages during programming. If given
+ two times, all serial communication is logged to the standard
+ output.
+
+EXIT STATUS
+ The mc5000 utility exits 0 on success, and >0 if an error occurs.
+
+SEE ALSO
+ MC5000 Dev Kit https://github.com/rickp/MC5000_DevKit/
+
+ Shenzhen I/O https://www.zachtronics.com/shenzhen-io/
+
+AUTHORS
+ The MC5000 Dev Kit was created by GitHub user rickp. The mc5000 utility
+ was written by Sven M. Hallberg <pesco@khjk.org> as an alternative to the
+ original programming software.
+
+ January 18, 2023