From 44e12ceff0625ebc68cd071c17d7edc9ae3d73c7 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Fri, 10 Jul 2026 14:24:35 +0200 Subject: [PATCH 1/2] Display the recursive C-Curve on the 340 display. --- src/lars/ccurve.123 | 124 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 src/lars/ccurve.123 diff --git a/src/lars/ccurve.123 b/src/lars/ccurve.123 new file mode 100644 index 000000000..10e2a3498 --- /dev/null +++ b/src/lars/ccurve.123 @@ -0,0 +1,124 @@ + TITLE Recursive C-Curve + +A=1 +B=2 +C=3 +PTR=16 +P=17 + +APR==0 +PI==4 +DIS=130 +DISCHN==5 +M%PNT==020000 ;Point mode. +M%INC==140000 ;Incremental mode. +I%INT==200000 ;In incremental mode: intensify. +I%ESC==400000 ;In incremental mode: escape. +P%INT==002000 ;In point mode: intensify. +P%HOR==000000 ;In point mode: set horizontal position. +P%VER==200000 ;In point mode: set vertical position. + + +LOC 41 + JRST NTS +LOC DISCHN*2+40 + BLKO DIS,BLKOP' + JSR DISBRK + +LOC 100 +.VECTOR PDL(PDLLEN==100) +GO: MOVE P,[-PDLLEN,,PDL-1] + MOVE PTR,[442200,,LIST] ;Start of display list. + MOVEI A,M%PNT+137 + IDPB A,PTR ;Set scale and intensity; go to point mode. + MOVEI A,M%PNT+P%HOR+400 + IDPB A,PTR ;Set horizontal position. + MOVEI A,M%INC+P%VER+500 + IDPB A,PTR ;Set vertical position. + TLZ PTR,7700 + TLO PTR,0400 + + MOVE C,[-4,,TAB] + MOVEI A,<1_4>+10 + MOVEI B,20 + PUSHJ P,CURVE + + TLZ PTR,7700 + TLO PTR,4300 + MOVEI A,0 + IDPB A,PTR ;Pad out last incremental mode instruction. + + MOVEI A,LIST ;Compute length of display list. + SUB A,PTR + HRLS A + HRRI A,LIST-1 ;Make BLKO pointer. + MOVEM A,DSTART' + + .DSTART DSTART + .VALUE [ASCIZ /:The 340 display is not available. + +:KILLî/] + JFCL + .HANG + +NTS: CONO APR,675550 ;Reset processor. + CONO PI,10400 ;Reset and deactivate PI. + CONO PI,2200+<200_-DISCHN> ;Activate PI and turn on channel. + JSR DISBRK ;Start display. +HANG: JRST . + +DISBRK: 0 + MOVE A,DSTART + MOVEM A,BLKOP + CONO DIS,100+DISCHN + JRST 12,@DISBRK + +CURVE: + JUMPE B,CURVE0 + PUSH P,B + SOS B + PUSHJ P,CURVE + MOVE A,RIGHT(A) + PUSHJ P,CURVE + MOVE A,LEFT(A) + POP P,B + POPJ P, +CURVE0: XCT (C) + AOBJP C,[MOVE C,[-4,,TAB] ? JRST .+1] + IDPB A,PTR + POPJ P, + +TAB: TLC PTR,000200 ;Every fourth byte, switch to 6 bits. + TLC PTR,000200 ;And back again. + JFCL + JFCL + +;Type 340 incremental mode instructions look like this: +;| 0 | 1 | 2 | 3 | 4 | 5 | 6-9 | 10-13 | 14-17 | +;|ESC|INT| H | L | V | D | HLVD | HLVD | HLVD | +;If ESC is one, escape to parameter mode. +;If INT is one, intensify the following dots. +;Four dot moves follow: bits 2-5, 6-9, 10-13, and 14-17. +;If H is one, move one step horizontally: if L is one, move left; else +;move right. If V is one, move one step vertically: if D is one, move +;down; else move up. + +;This program never uses diagonal movement, so the only moves used +;are 0010 for up, 0011 for down, 1000 for right, and 1100 for left. +;These tables map from a direction value, to one that has turned 90 +;degrees right or left, respectively. The additional top two 01 bits +;are for the ESC and INT bits which are filled in at the start of +;every 18-bit instruction. + +RADIX 2 +RIGHT: 0 ? 0 ? 011000 ? 011100 ? 0 ? 0 ? 0 ? 0 ? 010011 ? 0 ? 0 ? 0 ? 010010 + 0 ? 0 ? 0 + 0 ? 0 ? 011000 ? 011100 ? 0 ? 0 ? 0 ? 0 ? 010011 ? 0 ? 0 ? 0 ? 010010 +LEFT: 0 ? 0 ? 011100 ? 011000 ? 0 ? 0 ? 0 ? 0 ? 010010 ? 0 ? 0 ? 0 ? 010011 + 0 ? 0 ? 0 + 0 ? 0 ? 011100 ? 011000 ? 0 ? 0 ? 0 ? 0 ? 010010 ? 0 ? 0 ? 0 ? 010011 +RADIX 8. + +LIST: BLOCK 100000 + +END GO From 5fc2717d6df6be2b2402986ad64abcf5f455d5bb Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Fri, 17 Jul 2026 15:05:00 +0200 Subject: [PATCH 2/2] Remove comment that the 340 no longer works. --- doc/sysdoc/{%pi.105 => %pi.106} | 2 -- doc/sysdoc/{intrup.108 => intrup.109} | 2 -- 2 files changed, 4 deletions(-) rename doc/sysdoc/{%pi.105 => %pi.106} (99%) rename doc/sysdoc/{intrup.108 => intrup.109} (99%) diff --git a/doc/sysdoc/%pi.105 b/doc/sysdoc/%pi.106 similarity index 99% rename from doc/sysdoc/%pi.105 rename to doc/sysdoc/%pi.106 index 89690766a..d9097f9db 100644 --- a/doc/sysdoc/%pi.105 +++ b/doc/sysdoc/%pi.106 @@ -158,8 +158,6 @@ STACK The format of the new-style interrupt stack %PIDIS Display memory protect [2] (A) The 340 or E&S display got an MPV. - This is now obsolete since the 340 and E&S - no longer work.  %PIDWN System-going-down status change [3] (A) diff --git a/doc/sysdoc/intrup.108 b/doc/sysdoc/intrup.109 similarity index 99% rename from doc/sysdoc/intrup.108 rename to doc/sysdoc/intrup.109 index facabe167..dc350897f 100755 --- a/doc/sysdoc/intrup.108 +++ b/doc/sysdoc/intrup.109 @@ -444,8 +444,6 @@ to the instruction that is being executed when it is signaled. ;left set according to %OPOPC. %PIDIS==20 ;Display memory protect [2] (A) ;The 340 or E&S display got an MPV. - ;This is now obsolete since the 340 and E&S - ;no longer work. %PIARO==10 ;Arithmetic overflow [3] (S) ;The PDP-10's built-in arithmetic overflow ;condition was detected by the hardware.