From 25fc9eb131395e73448e1c7168cc8cff3a487cb2 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Fri, 1 Nov 2019 02:23:51 +0100 Subject: [PATCH] Add page comments to cat.s --- scans/cat.s | 3 +++ src/cmd/cat.s | 3 +++ 2 files changed, 6 insertions(+) diff --git a/scans/cat.s b/scans/cat.s index 24e6c65..8043bb0 100644 --- a/scans/cat.s +++ b/scans/cat.s @@ -1,3 +1,4 @@ +"** 06-5-12.pdf page 21 " cat lac 017777 i @@ -60,6 +61,7 @@ done: and d1 sna cla jmp 1f +"** 06-5-12.pdf page 22 jms putc jmp done 1: @@ -121,6 +123,7 @@ putc: 0 sad d128 skp jmp putc i +"** 06-5-12.pdf page 23 lac fo sys write; iopt+1; 64 lac iopt diff --git a/src/cmd/cat.s b/src/cmd/cat.s index 12a08e3..4b002b6 100644 --- a/src/cmd/cat.s +++ b/src/cmd/cat.s @@ -1,3 +1,4 @@ +"** 06-5-12.pdf page 21 " cat: cat arg1 [arg2 ...] " Load the pointer pointer in 017777 to see if we have any arguments @@ -63,6 +64,7 @@ done: and d1 sna cla jmp 1f +"** 06-5-12.pdf page 22 jms putc " Store the character in the buffer jmp done " and loop back 1: @@ -126,6 +128,7 @@ putc: 0 sad d128 skp jmp putc i " No, so return (more room still in the buffer) +"** 06-5-12.pdf page 23 lac fo " Load fd1 (i.e stdout) sys write; iopt+1; 64 " and write out the 64 words in the buffer lac iopt