Research V5 development
authorDennis Ritchie <dmr@research.uucp>
Tue, 26 Nov 1974 23:13:21 +0000 (18:13 -0500)
committerDennis Ritchie <dmr@research.uucp>
Tue, 26 Nov 1974 23:13:21 +0000 (18:13 -0500)
Work on file usr/source/s2/tty.s

Co-Authored-By: Ken Thompson <ken@research.uucp>
Synthesized-from: v5

usr/source/s2/tty.s [new file with mode: 0644]

diff --git a/usr/source/s2/tty.s b/usr/source/s2/tty.s
new file mode 100644 (file)
index 0000000..86697c6
--- /dev/null
@@ -0,0 +1,17 @@
+/ tty -- get tty number
+
+.globl ttyn
+
+       clr     r0
+       jsr     pc,ttyn
+       tst     r0
+       movb    r0,nam
+       mov     $1,r0
+       sys     write; name; 5
+       sys     exit
+
+name:
+       <tty>
+nam:
+       <x\n>
+.even