File IOSUBS

Directory of image this file is from
This file as a plain text file

[IOSUBS
[
[SUPER-GRAND SUBROUTINE PACKAGE
[
[CONTAINS IOCHAR, IOLINE, LOOKIE, CUTESUBS
[
[SEE DESCRIBE FOR WRITE-UP
[
[
[
[
[IOCHAR
[
[SUBROUTINES FOR LETTERS, NUMBERS
[
[#8A, ALPHANUMERIC DISPLAY, GIVES WORDS
[#8B, BINARY-OCTAL DISPLAY, GIVES OCTAL NUMBERS
[#8D, DECIMAL DISPLAY, GIVES DECIMAL NUMBERS
[
[
[
[BINARY-OCTAL DISPLAY
[ENTER AT 8B
[CALL: JMP 8B
[      ADDRESS OF #
[      X COORD.
[      Y COORD.
[
#8B LDA
0
SET i 11
8D+107 [8**N
JMP p+5
[
[
[DECIMAL DISPLAY
[ENTER AT 8D
[CALL: JMP 8D
[      ADDRESS OF #
[      X COORD.
[      Y COORD.
[
#8D LDA
0
SET i 11
8D+113 [10**N
JMP 8D+145 [INIT
JMP 8D+36 [DECODE
[OUTPUT
JMP 8D+11 [DIS CON
STC 8D+20 [SWITCH
JMP <RETURN>
[
[
[DISPLAY CONTROLLER
[IGNORES LEADING ZEROES
[PUTS PATTERN WORD IN 10
[
ADD 0
STC p+23
SRO i
4210
JMP p+11
ADD 12
ADM i
<SWITCH>
AZE
JMP p+4
SET i 12 [LEADING 0
8D+143 [BLANK
JMP p+7
LDA [GET #
12
ROL 1
ADA i
8D+117 [FWA # PATTERNS
STC 12
JMP 8D+177 [F DIS
JMP <RETURN>
[
[
[DECODE OCTAL, DECIMAL
[USED IN DIS, TTY
[11: FWA DECODE LIST
[INTERNAL: ADDRESS OF #
[CALL: JMP FWA
[      JMP DISPATCH
[      <NEXT INSTR>
[
ADD 0
BCL i
JMP-ADD
STC p+1
<ADD DISPATCH>
STC p+37
XSK i 0
ADD 0
STC p+40
LDA
<NUMBER ADDRESS>
STC p+7
SET i 12
1777 [DIGIT CTR
XSK i 12
LDA 11
COM
LAM i
<TEMP>
LZE i
JMP p+6
STC p+4
LAM
p-5
JMP p-12
<GARBAGE>
APO i
JMP p-15
AZE i
XSK i 12
AZE
ADA 11
AZE i
CLR
STC p-20 [TEMP
XSK i 11
<DISPATCH>
SRO i
3567
JMP p-33
JMP <RETURN>
[
[NUMBERS FOR DECODE
1000 [OCTAL
100
10
1
1750 [DECIMAL
144
12
1
[
[NUMERICAL PATTERNS
4136 [0
3641
2100 [1
0177
4523 [2
2151
4122 [3
2651
2414 [4
0477
5172 [5
0651
1506 [6
4225
4443 [7
6050
5126 [8
2651
5131 [9
3452
0000 [BLANK
0000
[
[
[INITIALIZE 8A, 8B, 8D
[GETS ADDRESS OF # OR LIST
[GETS X, Y COORD.
[SETS DISPLAY SIZE
[FORMS FINAL RETURN
[ENTER WITH CALL+1 IN ACC
[
BCL i
JMP
STC 12
LDA 12
STA [#, LIST
8D+50
STA
p+6
COM
APO
ADD 8K+2
ADD 8K+2
ADA i
<NUM>
STC 8D+206 [INCR
LDA i 12
STC 10 [X COORD
LDA i 12
STC 8D+202 [Y COORD
ADD 12
ADD p-23 [JMP
ADD 8K+1 [1
STA  [RETURNS
8D+10
STC 8A+11
JMP 0
[
[
[FINAL DISPLAY
[DISPLAYS ONE CHAR FROM LIST
[10: FWA PATTERN WORD
[12: X COORDINATE
[INTERNAL: Y COORD.
[          INCREMENT
[FULL OR HALF-SIZE
[
ADD 0
STC p+31 [RETURN
LDA i
<Y>
SRO 12
DIS 10
ADA i
<INCR> [2 OR 4
SRO i
3737
JMP p-6
LDA
p-5
ADM
10
SRO i
2525
JMP p-17
XSK i 12
SRO i
2525
JMP p-23
LDA
10
ADD p-21
STC 10
JMP <RETURN>
[
[
[ALPHANUMERIC DISPLAY
[ENTER AT 8A
[CALL: JMP 8A
[      FWA LIST OF PATTERN WORDS
[      X COORD.
[      Y COORD.
[# OF CHARACTERS IN ACC
[
#8A COM
STC 11
ADD 0
JMP 8D+145 [INIT
ADD 8D+162 [FWA LIST
STC 12
JMP 8D+177 [F DIS
XSK i 11
JMP p-2
JMP <RETURN>
[
[
[IOLINE
[
[SUBROUTINES FOR GRAPHS, STRAIGHT LINES
[
[#8H, HORIZONTAL, GIVES HORIZONTAL LINES
[#8E, ELEVATION, GIVES VERTICAL LINES
[#8G, GRID, GIVES X AND Y AXES
[#8M, MEMPLOT, GIVES GRAPH OR HISTOGRAM
[#8C, CURSOR, GIVES POINTER FOR MEMPLOT
[
[THE ORIGIN <0,0> CAN BE AT LOWER OR MIDDLE LEFT
[8H-1 = 0 GIVES CONVENTIONAL LINC ORIGIN
[8H-1 = 1400 GIVES ORIGIN IN LOWER LEFT
[
[
[
[HORIZONTAL
[
[HORIZONTAL LINE ON SCOPE
[
[ENTRY PARAMETERS:
[  10: FIRST POINT X
[  11: LENGTH OF LINE
[ ACC: FIRST POINT Y
[
[EXIT PARAMETERS:
[  10: NEXT POINT X
[ ACC: NEXT POINT Y
[
[ENTRY AT 8H: FULL HORIZONTAL LINE
[ENTRY AT 8H+2: SHORT HORIZONTAL LINE FROM X=0
[ENTRY AT 8H+4: SHORT HORIZONTAL LINE FROM X=<10>
[
[ORIGIN FOR LINEAR DISPLAYS
0
[
#8H SET i 11
1000
SET i 10
0
ADD 8H-1
STC p+11 [Y
ADD 11
AZE i
JMP 0 [LENGTH 0
COM
STC 11
ADD 0
STC p+7 [RETURN
LDA i
<Y>
DIS 10
XSK i 10
XSK i 11
JMP p-3
<JMP RETURN>
[
[
[ELEVATION
[ELEVATED <VERTICAL> LINE ON SCOPE
[ENTRY PARAMETERS SAME AS HORIZ
[EXIT PARAMETERS SAME AS HORIZ
[ENTRY AT 8E: FULL VERTICAL LINE
[ENTRY AT 8E+2: SHORT VERTICAL LINE FROM Y=0
[ENTRY AT 8E+3: SHORT VERTICAL LINE FROM Y=ACC
[
#8E SET i 11
1000
CLR
ADD 8H-1
STC p+11 [Y
ADD 11
AZE i
JMP 0 [LENGTH 0
COM
STC 11
ADD 0
STC p+7 [RETURN
LDA i
<Y>
DIS 10
ADD 8K+1
XSK i 11
JMP p-3
<JMP RETURN>
[
[
[MEMPLOT
[BAR PLOT OR HISTOGRAM FROM MEMORY
[12: FWA POINT LIST
[ENTRY AT 8M: UNSCALES BAR PLOT, 1000 POINTS
[CALL: JMP 8M
[
[ENTRY AT 8M+1: SCALED PLOT
[ACC: SCALER AND HISTOGRAM SWITCH
[ACC 0: 0 FOR BARPLOT, 1 FOR HISTOGRAM
[ACC 3-5: EXPANSION OF X SCALE
[ACC 9-11: EXPANSION OF Y SCALE
[CALL: JMP 8M+1
[
[USES FULL SCOPE
[
#8M CLR
STC 8M+47 [SCALES
STC 10 [X
ADD 0
STC p+24 [RETURN
ADD 8M+47 [SCALES
APO [VERTPLOT
JMP 8J-3 [SET FF
JMP 8J-7 [RESET FF
JMP 8M+46 [INIT
ADD 8K+1
JMP 8M+60 [ROL X
STC p+4 [X WIDTH
JMP p+2
[
[BARPLOT
[PLOTS MEMORY
[
XSK i 12
SET i 11
<X WIDTH>
LDA 12
JMP 8M+62 [ROL Y
JMP 8H+4 [HORIZ
[DONE
LDA i
-777
ADD 10
APO i
JMP <RETURN>
JMP 8J
JMP p-14 [BARPLOT
[
[PLOTS VERTICAL BARS FOR HISTOGRAM
[
LDA 12
COM
ADA i 12
COM
APO
CLR
ADA 12 [GET BIGGER Y
JMP 8M+62 [ROL Y
STC 11 [Y
JMP 8E+3 [ELEV
JMP p-26 [DONE
[
[INITIALIZE MEMPLOT, CURSOR
[
LDH i [LEFT HALF
<SCALES>
BSE i
ROL
STC p+6 [ROL X
LDH [RIGHT HALF
4|p-5
ADD p-4
STC p+4 [ROL Y
JMP 0
<ROL X>
JMP 0
<ROL Y>
JMP 0
[
[
[CURSOR
[DISPLAYS CURSOR ON GRAPH
[WORKS WITH MEMPLOT
[12: FWA POINT LIST
[SCALING SET BY MEMPLOT
[ENTRY AT 8C
[CALL: JMP 8C
[      <SAM DISPATCH>
[
[DISPATCH USUALLY SAM N
[
#8C LDA
0
ADA i
ADD-JMP
STC p+1
<ADD DISPATCH>
STC p+11
XSK i 0
ADD 0
STC p+25 [RETURN
JMP 8M+46 [INIT
ADD 8M+60 [ROL X
BSE i
SCR
STC p+10
<SAM DISPATCH>
BCL i [PATCH FOR
7000  [SAM TO GIVE
BCO i [NUMBERS FROM
400   [0-777
STA
10  [X
<SCR>
ADD 12 [FWA MEMORY
STC 12 [Y POINTER
LDA 12 [Y
JMP 8M+62 [ROL Y
SET i 11
20 [CURSOR HEIGHT
JMP 8E+3 [CURSOR
JMP <RETURN>
[
[
[GRID
[DISPLAYS AXES WITH TIC MARKS
[TICS ARE 100<10>, OR 144<8> POINTS APART
[ENTER AT 8G
[CALL: JMP 8G
[
#8G LDA
0
STC p+5 [RETURN
JMP 8H
JMP 8E
[TICS
SRO i
1010
JMP <RETURN>
LDA i
144
ADD 10
SET i 11
14 [TIC LENGTH
JMP 8H+2
ADD 8H-1 [FIX ORIGIN
STC 10
SET 11
p-5
JMP 8E+3
JMP p-16
[
[
[LOOKIE
[
[SCANS ENTIRE PDP MEMORY
[INCLUDES EDIT FEATURE
[REQUIRES PROGOFOP PATCH
[STOPS PROGOFOP WHILE RUNNING
[ENTER AT 8L
[CALL: JMP 8L
[POT 0: LOCATION OF SCAN
[POT 1: EDIT POINTER
[SNS 1 AND 2 FORM 2-BIT BANK SELECTOR
[SNS 4: DECIMAL, OCTAL IF OFF
[SNS 5: REPLACE AT POINTER WITH LSW
[SNS 0: JMP RETURN
[
#8L LDA
0
STC p+131 [RETURN
LDA i
120 [PROGOFOP PATCH
PDP
CLR
SNS i 1
ADD 8K+2
SNS i 2
ADD 8K+1
STC p+56 [BANK
ADD 8K+4
JMP 8A [DISPLAY BANK
p+130 [FWA PATTERN
400
340
JMP 8B
p+47 [BANK
440
340
SAM 0
ADA i
400
SCR 3
ROL 4
STA i
<FWA>
SNS 4
JMP p+4
LDA i
JMP 8D
JMP p+3
LDA i
JMP 8B
STC p+43 [DISPLAY
SAM 1 [POINTER
ADD p-16 [400
SCR 5
STA i
<POINT>
ADD p-16 [FWA
STC p+50 [EDIT LCN
ADD p-3
COM
ADA i
27
ROL 5
STC p+4 [EDIT-Y
JMP 8B
p+40 [EDIT LCN
0
<EDIT-Y>
LDA i
1400
STC p+22 [Y
LDA i
<BANK>
ROR 2
ADD p-40 [FWA
STA i
<PDP ADDRESS>
[LOOP
NOP
HLT [TO PDP FOR MEMORY
STA i
<MEMORY>
LDA i
-40
ADM
p+4 [Y
<DISPLAY>
p-6 [MEMORY
200
<Y>
SNS 5
JMP p+11 [NO EDIT
LDA
p-20 [PDP ADDR
BCL i
6000
COM
ADA i
<EDIT>
AZE
CLR
HLT
CLR
SNS i 0
COM
HLT [QUIT IF 0
SNS i 0
<JMP RETURN>
LDA i
-400
ADD p-25 [Y
APO
JMP 8L+6 [START OVER
LDA i
1
ADM
p-47 [PDP ADDR
JMP p-47 [LOOP
[
[PATTERN WORDS FOR BANK
5177 [B
2651
4477 [A
7744
3077 [N
7706
1077 [K
4324
[
[PDP PATCH TO PROGOFOP
[STARTS AT 120, BN 2
[120, 0
[     CLA
[     TAD <12
[     ICON
[     CLA
[     IAAC
[     DCA ADDRESS
[     TAD I ADDRESS
[     IACA
[     CLA
[     TAD <12
[     ICON
[     CLA
[     IAAC
[     SMA, CLA
[     JMP .+3
[     ILES
[     DCA I ADDRESS
[     TAD <12
[     ICON
[     CLA
[     IAAC
[     SZA
[     JMP I 120
[     JMP 121
[ADDRESS, 0
[     12
[
[
[CUTESUBS
[
[CONTAINS KONSTANT, FALLTHRU, JUMP-FF
[
[#8K, KONSTANT, HAS LIST OF CONSTANTS
[#8F, FALLTHRU, IS LOOP CONTROLLER
[#8J, JUMP-FF, IS JUMP FLIP-FLOP CONTROLLER
[
[
[
[KONSTANT
[
[-10, -4 TO +4, +10
[IN 8K-5, 8K-4 TO 8K+4, 8K+5
[8K CONTAINS -0
[
-10
-4
-3
-2
-1
#8K -0
1
2
3
4
10
[
[
[FALLTHRU
[
[ALLOWS CONTROLLED LOOPING
[ENTER AT 8F
[CALL: JMP 8F
[      <DISPATCH>
[      NEXT INSTRUCTION
[
[8W: WAIT SWITCH
[COMMONLY SNS N OR SXL N
[DISPATCH IS COMMONLY A JMP <SUBROUTINE>
[WILL EXECUTE DISPATCH UNTIL 8W CHANGED
[NEEDS 8W=SOMETHING IN MANUSCRIPT
[
#8F LDA
0
BCL i
JMP-ADD
STC p+1
<ADD DISPATCH>
STA [DISPATCH
p+16
STC p+21
XSK i 0
ADD 0
STC p+15 [RETURN
LDA i
8W
BCO i
i
STC p+7 [NOT 8W
8W
JMP p+5
8W
JMP p+4 [RETURN
<DISPATCH>
JMP p-3
<NOT 8W>
<RETURN>
<DISPATCH>
JMP p-3
[
[
[JUMP-FF
[
[JUMP FLIP-FLOP
[IF SET, WILL RETURN AT p+2
[IF RESET, WILL RETURN AT p+1
[
[TO SET, JMP 8J-3
[TO RESET, JMP 8J-7
[TO UTILIZE, JMP 8J
[ENTRY AT 8J
[CALL: JMP 8J
[      <RESET DISPATCH>
[      <SET DISPATCH>
[
[RESET
LDA i
NOP
STC p+5
JMP 0
[SET
LDA i
XSK i 0
STC p+1
[FLIP-FLOP
#8J <FF INSTR>
JMP 0
[
[



Feel free to contact me, David Gesswein djg@pdp8online.com with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with.  I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation. 

PDP-8 Home Page   PDP-8 Site Map   PDP-8 Site Search