Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions doc/sysdoc/%pi.105 → doc/sysdoc/%pi.106
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 0 additions & 2 deletions doc/sysdoc/intrup.108 → doc/sysdoc/intrup.109
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
124 changes: 124 additions & 0 deletions src/lars/ccurve.123
Original file line number Diff line number Diff line change
@@ -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
Loading