From 0b76d698990909b8703c377f7105844af6bc2d2c Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Fri, 27 Jul 2018 01:19:02 +0100 Subject: [PATCH] Don't hardcode the machine name in M.F.D. (FILE) listings. --- src/hack/{webser.19 => webser.20} | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) rename src/hack/{webser.19 => webser.20} (98%) diff --git a/src/hack/webser.19 b/src/hack/webser.20 similarity index 98% rename from src/hack/webser.19 rename to src/hack/webser.20 index c1a05135..bb19c862 100644 --- a/src/hack/webser.19 +++ b/src/hack/webser.20 @@ -926,8 +926,10 @@ DIRL:: SLX "" ; Followed by a CRLF ; Never skips ; NYI: nicer layout SNDMFD: PUSH P,IX ; Save - PUSHJ P,NAMPRN ; Format the name - SSX "

SV " ; NYI: look up machine name + SSX "

" ; Open header + PUSHJ P,MACPRN ; Format the machine name + ZSOQ NAMBUF ; Print it + PUSHJ P,NAMPRN ; Format the filename ZSOQ NAMBUF ; So much trouble for this header SSX "

" ; Close header SETZM FILFN1 ; Don't put FN1 in the listing @@ -994,7 +996,23 @@ NAM2:: SETZ ; Always NUL- IDPB T ; terminate POPJ P, ; Done + ; Write machine name followed by a space to NAMBUF + ; Never skips +MACPRN: MOVE T,[ASCBP,,NAMBUF] ; Scratch here + .CALL [ SETZ ; Get the machine name + SIXBIT /SSTATU/ + %CLOUT,, + %CLOUT,, + %CLOUT,, + %CLOUT,, + %CLOUT,, + %CLOUT,,IX ((SETZ))] + JSR DEATH ; or die + MOVEI TT,SPACE ; Add a space + PUTFN T,IX ; Write it + JRST NAM2 ; NUL-terminate and return + REG LEN ; Remaining bytes to be copied REG CNT ; Number of bytes per block REG BP ; Pointer to data to send