aboutsummaryrefslogtreecommitdiffstats
path: root/tools/abcprint.txt
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-01-04 16:42:42 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-01-04 16:42:42 -0800
commitbc0fb6e12bd1999f38d39199164edb47ea56c6b2 (patch)
tree9d3363da80af4cdeb9f9769b21b811c5cfd769ff /tools/abcprint.txt
parent81eed1d4265ae193cf334edfe5aeb0b68418ffcf (diff)
downloadabc80-bc0fb6e12bd1999f38d39199164edb47ea56c6b2.tar.gz
abc80-bc0fb6e12bd1999f38d39199164edb47ea56c6b2.tar.xz
abc80-bc0fb6e12bd1999f38d39199164edb47ea56c6b2.zip
abcprintd: initial implementation of a remote access protocol
Completely untested, but "at least it compiles" implementation of a remote file access protocol in abcprintd.
Diffstat (limited to 'tools/abcprint.txt')
-rw-r--r--tools/abcprint.txt54
1 files changed, 54 insertions, 0 deletions
diff --git a/tools/abcprint.txt b/tools/abcprint.txt
new file mode 100644
index 0000000..6c16971
--- /dev/null
+++ b/tools/abcprint.txt
@@ -0,0 +1,54 @@
+abcprintd protocol
+
+FF 00 -> end of print job
+
+FF FF -> FF as part of print job
+
+All other bytes are part of a print job
+
+
+File sharing commands:
+----------------------
+
+All commands start with FF <opcode> <seq>, and all responses begin
+with FF <opcode> <seq> <err>, where <err> is 0 for OK and otherwise
+0x80+ABC80 error code.
+
+FF A0 ss ixix NNNNNNNNEEE OPEN TEXT
+
+ ixix = Address of IX-map (used as a handle)
+
+ Open an existing file for reading in text mode
+
+FF A1 ss ixix NNNNNNNNEEE OPEN BINARY
+
+ Open an existing file for reading in binary (block) mode
+
+FF A2 ss ixix NNNNNNNNEEE PREPARE TEXT
+
+ Create a new file for writing in text mode
+
+FF A3 ss ixix NNNNNNNNEEE PREPARE BINARY
+
+ Create a new file for writing in binary (block) mode
+
+FF A4 ss ixix INPUT
+
+ Read a text line; response followed by len (2 bytes) + data
+
+FF A5 ss ixix len READ BLOCK
+
+ Read a data block of specified len; response: len + data
+
+FF A6 ss ixix len data... PRINT
+
+ Write a text line or data block
+
+FF A7 ss ixix CLOSE
+
+ Close a file handle
+
+FF A8 ss xxxx CLOSEALL
+
+ All files are closed and forgotten. xxxx ignored.
+