home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
LANGUAGS
/
PASCAL-P
/
PP319DOC.LBR
/
APPENDC.MZN
/
APPENDC.MAN
Wrap
Text File
|
2000-06-30
|
10KB
|
296 lines
.macro chttl = Compilation#with#codelisting
.ahd .chttl
.sav .rm 100 .asis
This is the sole operator input for this example
--------------------------------------------------------------
B>job pascpcd typetext.pas nul typetext.pcd typetext.pcd con 128
JOB V1.2
B>; PcdCompile source listing pcd tic codelist options
B>; For unsegmented programs with no intrinsic/external calls.
B>; Use "NUL" for any unwanted files
B>; Tic may later be used to create assembly source with ASSMAP.
B>; Tic and pcd may be identical to save disk space
B>; since assmpcd does not use pcd until tic has been read.
B>; Set options 128 for listing on assmpcd listing
B>; (8 bit compiles for 16 bit machine(HP3000) with increasing stack)
B>; (16 bit forces RBM format output on pcd)
B>RUNPCD pascalp (TYPETEXT.PAS,NUL,TYPETEXT.PCD);[128]
PascalP system Ver. 2.3.0 Copyright (C) 1982
CP/M installation rev. 2.3
PASCALP (pasctext, pasclist, prr, ef, output); V 3.1.0
NO. ERRORS=0 WARNINGS=0 Program size(pcode bytes)=288
Exit Pascal system, Max heap use @9F0C
B>RUNPCD assmpcd (TYPETEXT.PCD,TYPETEXT.PCD,CON);[128]
PascalP system Ver. 2.3.0 Copyright (C) 1982
CP/M installation rev. 2.3
ASSMPCD (assmtext, rbmfile, listfile, output) Ver. 1.1.8
; 1000 0:d PROGRAM typetext(kbd, input, output);
; 2000 0:d (* Modification of "EXPAND" to paginate to crts *)
; 3000 0:d (* and wrap over-long lines into multiple lines. *)
; 4000 0:d (* Converts textfiles, replacing indention codes *)
; 5000 0:d (* by spaces. dle, ' '+i represents i spaces *)
; 6000 0:d (* Revised 14 July 83 to handle the sequences *)
; 7000 0:d (* dle eoln and dle code eoln *)
; 8000 0:d (* both are mapped into simply eoln. This avoids *)
; 9000 0:d (* anomolies generated by a UCSD format editor. *)
; 10000 0:d (* Assumes no non-printing characters in input *)
; 11000 0:d
; 12000 0:d LABEL 1;
0006 PGM TYPETEXT
; 13000 0:d
; 14000 0:d CONST
; 15000 0:d dle = 16;
; 16000 0:d pagesize = 24; (* lines *)
; 17000 0:d linesize = 80; (* columns *)
; 18000 0:d
; 19000 0:d VAR
; 20000 0:d c : char;
; 21000 1:d linenum,
; 22000 1:d column : integer;
; 23000 5:d kbd : text; (* for continue/terminate control only *)
; 24000 191:d
; 25000 191:d (*$n-,d- No runtime checks or linenos for speed *)
; 26000 191:d
; 27000 191:d (* 1--------------1 *)
; 28000 191:d
; 29000 191:d PROCEDURE pause;
; 30000 0:d
; 31000 0:d BEGIN (* pause *)
0006 FWD PAUSE
; 32000 0: 2 IF eof(kbd) THEN terminate
0006 PRO PAUSE
0006 NTR PAUSE
PAUSE:
0006 F70000 ENT 1,@5
0009 66FF41 LAO 191
000C F00C EOF
000E F8FFF0 FJP @6
; 33000 11: 4 ELSE readln(kbd);
0011 F025 CSP TRM
0013 PAR 0
0013 FAFFEB UJP @7
@6:
0016 66FF41 LAO 191
0019 F01B CSP RLN
001B PAR 1
@7:
; 34000 21: 2 linenum := 1;
001B 01 LDCI 1
001C 73FFFB STOI 5
; 35000 25: 2 END; (* pause *)
001F 00F6 RET 0
@5=0
; 36000 27: 2
; 37000 27: 2 (* 1--------------1 *)
; 38000 27: 2
; 39000 27: 2 PROCEDURE linewrap;
; 40000 27: 2
; 41000 27: 2 BEGIN (* linewrap *)
0021 FWD LINEWRAP
; 42000 0: 2 IF column > linesize THEN BEGIN (* linewrap *)
0021 PRO LINEWRAP
0021 NTR LINEWRAP
LINEWRAP:
0021 F70000 ENT 1,@9
0024 7BFFFD LDOI 3
0027 50 LDCI 80
0028 CB GRTI
0029 F8FFD5 FJP @10
; 43000 11: 4 column := 1; linenum := succ(linenum);
002C 01 LDCI 1
002D 73FFFD STOI 3
0030 7BFFFB LDOI 5
0033 E0 INCI 1
0034 73FFFB STOI 5
; 44000 22: 4 IF linenum > pagesize THEN pause;
0037 7BFFFB LDOI 5
003A 18 LDCI 24
003B CB GRTI
003C F8FFC2 FJP @11
003F F301 CGP 1,PAUSE
@11:
; 45000 32: 4 writeln; END;
0041 7A000C LDOA -12
0044 F01D CSP WLN
0046 PAR 1
@10:
; 46000 37: 2 END; (* linewrap *)
0046 00F6 RET 0
@9=0
; 47000 39: 2
; 48000 39: 2 (* 1--------------1 *)
; 49000 39: 2
; 50000 39: 2 BEGIN (* typetext *)
; 51000 0: 1 reset(kbd); linenum := 1; column := 1;
0048 F027 MAI TYPETEXT
TYPETEXT:
004A F70000 ENT 1,@13
004D 01 LDCI 1
004E 01 LDCI 1
004F 5D86 LDCI 134
0051 0C LDCI 12
0052 5C084B424420
0058 20202020 LCA 'KBD '
005C 08AA MVS 8
005E 66FF41 LAO 191
0061 F026 CSP FIN
0063 PAR 9
0063 66FF41 LAO 191
0066 00 LDCA NIL
0067 F019 CSP RES
0069 PAR 2
0069 01 LDCI 1
006A 73FFFB STOI 5
006D 01 LDCI 1
006E 73FFFD STOI 3
; 52000 41: 1 WHILE NOT eof DO BEGIN
@14:
0071 7A000A LDOA -10
0074 F00C EOF
0076 EC NOT
0077 F8FF87 FJP @15
; 53000 50: 3 WHILE NOT eoln DO BEGIN
@16:
007A 7A000A LDOA -10
007D F00B CSP ELN
007F PAR 0
007F EC NOT
0080 F8FF7E FJP @17
; 54000 59: 5 read(c);
0083 66FFFF LAO 1
0086 7A000A LDOA -10
0089 F016 CSP RDC
008B PAR 2
; 55000 67: 5 WHILE c = chr(dle) DO BEGIN
@18:
008B 79FFFF LDOC 1
008E 10 LDCI 16
008F B1 EQUC
0090 F8FF6E FJP @19
; 56000 75: 7 IF NOT eoln THEN read(c);
0093 7A000A LDOA -10
0096 F00B CSP ELN
0098 PAR 0
0098 EC NOT
0099 F8FF65 FJP @20
009C 66FFFF LAO 1
009F 7A000A LDOA -10
00A2 F016 CSP RDC
00A4 PAR 2
@20:
; 57000 92: 7 IF eoln THEN GOTO 1 (* dle eoln & dle code eoln -> eoln *)
00A4 7A000A LDOA -10
00A7 F00B CSP ELN
00A9 PAR 0
00A9 F8FF55 FJP @21
00AC FAFF52 UGO @3
; 58000 103: 9 ELSE BEGIN
00AF FAFF4F UJP @22
@21:
; 59000 106: 9 IF c > ' ' THEN BEGIN
00B2 79FFFF LDOC 1
00B5 20 LDCC ' '
00B6 C9 GRTC
00B7 F8FF47 FJP @23
; 60000 114:11 write(' ' : ord(c)-ord(' '));
00BA 20 LDCC ' '
00BB 79FFFF LDOC 1
00BE 20 LDCC ' '
00BF A0 SBI
00C0 7A000C LDOA -12
00C3 F01F CSP WRC
00C5 PAR 3
; 61000 125:11 column := column + ord(c) - ord(' '); END;
00C5 7BFFFD LDOI 3
00C8 79FFFF LDOC 1
00CB 9E ADI
00CC 20 LDCC ' '
00CD A0 SBI
00CE 73FFFD STOI 3
@23:
; 62000 137: 9 read(c); END;
00D1 66FFFF LAO 1
00D4 7A000A LDOA -10
00D7 F016 CSP RDC
00D9 PAR 2
@22:
; 63000 145: 7 END;
00D9 FEB1 UJS @18
@19:
; 64000 147: 5 write(c); column := succ(column);
00DB 79FFFF LDOC 1
00DE 01 LDCI 1
00DF 7A000C LDOA -12
00E2 F01F CSP WRC
00E4 PAR 3
00E4 7BFFFD LDOI 3
00E7 E0 INCI 1
00E8 73FFFD STOI 3
; 65000 163: 5 IF (column > linesize) AND NOT eoln THEN linewrap; END;
00EB 7BFFFD LDOI 3
00EE 50 LDCI 80
00EF CB GRTI
00F0 7A000A LDOA -10
00F3 F00B CSP ELN
00F5 PAR 0
00F5 EC NOT
00F6 EF AND
00F7 F8FF07 FJP @24
00FA F302 CGP 0,LINEWRAP
@24:
00FC FE7D UJS @16
@17:
; 66000 182: 3 1: readln; column := 1; linenum := succ(linenum);
@3:
00FE 7A000A LDOA -10
0101 F01B CSP RLN
0103 PAR 1
0103 01 LDCI 1
0104 73FFFD STOI 3
0107 7BFFFB LDOI 5
010A E0 INCI 1
010B 73FFFB STOI 5
; 67000 198: 3 IF linenum > pagesize THEN pause;
010E 7BFFFB LDOI 5
0111 18 LDCI 24
0112 CB GRTI
0113 F8FEEB FJP @25
0116 F301 CGP 0,PAUSE
@25:
; 68000 208: 3 writeln; END;
0118 7A000C LDOA -12
011B F01D CSP WLN
011D PAR 1
011D FE53 UJS @14
@15:
; 69000 215: 1 END. (* typetext *)
011F 66FF41 LAO 191
0122 F00A CSP CLO
0124 PAR 1
0124 F024 STP
@13=192
0126 END
0126 FEFAFEDDFF1D
012C 02
0 TYPETEXT 0048 global
1 PAUSE 0006 global
2 LINEWRAP 0021 global
EXECUTABLE Code size (bytes) is 301 = 012D (hex)
Exit Pascal system, Max heap use @6E7E
B>era temp0001.$$$
B>
!
.res
`