1
0
mirror of https://github.com/PDP-10/its.git synced 2026-03-24 01:27:33 +00:00

Don't give overlong lengths to PRINTSTRING.

Confusion is OK with this; real Muddle isn't.
This commit is contained in:
Adam Sampson
2018-05-01 16:11:09 +01:00
parent 637c52e404
commit 7fd657e7c1

View File

@@ -24,18 +24,16 @@
;"F1 upper 18 bits are length to print (from S1?), if not zero"
<DEFINE TELL(S1 "OPTIONAL" (F1 ,POST-CRLF) S2 S3 "AUX" L)
#DECL ("VALUE" ATOM <PRIMTYPE STRING> "OPTIONAL" FIX
<OR STRING FALSE> <OR STRING FALSE>)
;"not sure that's right - ATS"
<DEFINE TELL (S1 "OPTIONAL" (F1 ,POST-CRLF) S2 S3)
#DECL ((S1) <PRIMTYPE STRING> (F1) FIX (S2 S3) <OR STRING FALSE>)
<AND <NOT <0? <CHTYPE <ANDB .F1 ,PRE-CRLF> FIX>>> <CRLF>>
<SET L <CHTYPE <GETBITS .F1 <BITS 18 18>> FIX>>
<AND <0? .L> <SET L <LENGTH .S1>>>
<PRINTSTRING .S1 .OUTCHAN .L>
<AND <ASSIGNED? S2> <PRINTSTRING .S2>>
<AND <ASSIGNED? S3> <PRINTSTRING .S3>>
<PRINTSTRING .S1 .OUTCHAN>
; "warn if <CHTYPE <GETBITS .F1 <BITS 18 18>> FIX> != 0?"
<AND <ASSIGNED? S2> <PRINTSTRING .S2 .OUTCHAN>>
<AND <ASSIGNED? S3> <PRINTSTRING .S3 .OUTCHAN>>
<AND <NOT <0? <CHTYPE <ANDB .F1 ,POST-CRLF> FIX>>> <CRLF>>
<SETG TELL-FLAG T>
>
<SETG TELL-FLAG T>>
; Read a line after printing the prompt
; ALT means accept only alternate terminator character