.mcall	.module
.module	PASCAL,release=X01,version=6,comment=<Pascal System Driver>,audit=YES
;+
;			Copyright (c) 1985
;			   C. E. Chew
;
; This software is furnished under a license and may be used and  copied
; only  in  accordance  with  the  terms  of  such  license and with the
; inclusion of the above copyright notice.  This software or  any  other
; copies  thereof may not be provided or otherwise made available to any
; other person.  No title to and ownership of  the  software  is  hereby
; transferred.
;
; The information in this software is subject to change  without  notice
; and should not be construed as a commitment by the author.
;
; The author assumes no responsibility for the use or reliability of his
; software.
;-
	.sbttl	Definitions
	.dsabl	gbl
	.globl	$minit $menu $mfile $moct $mswt $mcmd $mjob $mme $mwait
	.globl	$tclr $tmov
	.mcall	.print .ttyou .scca .exit .twait
;
	.psect	pascal, ro
	.psect	text, d
	.psect	data, d
area:	.blkw	2			;room for scca stuff
;+
; Character definitions
;-
esc	=: 33				;escape
bel	=: 7				;bell
space	=: 40				;space
cr	=: 15				;carriage return
lf	=: 12				;line feed
;
drow	=: 23.				;location of program prompt
dcol	=: 26.
srow	=: 23.				;location of stack prompt
scol	=: 66.
lrow	=: 23.				;location of listing switch
lcol	=: 46.
;+
; Main menu definitions
;-
n.edit	=: 1
n.comp	=: 2
n.link	=: 3
n.run	=: 4
n.file	=: 5
n.stk	=: 6
n.list	=: 7
n.copy	=: 10
n.save	=: 11
n.dir	=: 12
n.exit	=: 13
fopt	=: n.copy			;first selection
;
.macro	section name
	.sbttl	name
	.psect	wp
.endm	section
;
.macro	job name
$name$	= .
	.ascii	/name/
	.rept	6 - <. - $name$>
	.byte	0
	.endr
.endm	job
;
.macro	newline
	.byte	cr, lf
.endm
;
.macro	dbltop
	.ascii	<esc>'#3'
.endm
;
.macro	dblbot
	.ascii	<esc>'#4'
.endm
;
.macro	locate row col
	.ascii	<esc>'['
	.byte	row/10.+'0
	.byte	row-<row/10.*10.>+'0
	.ascii	';'
	.byte	col/10.+'0
	.byte	col-<col/10.*10.>+'0
	.ascii	'H'
.endm
	section	<Main Driver>
;+
; Main driver.
;
; INPUTS:
;	None.
;
; OUTPUTS:
;	None.
;
; EFFECTS:
;	Drives the main menu for the system.
;-
	.enabl	lsb
pascal::
	clr	-(sp)
	mov	#bkgnd,-(sp)
	call	$mjob			;wait for it
	tst	(sp)+
	beq	11$
;
	clr	-(sp)
	mov	limit+2,-(sp)		;can load here
	call	$minit			;initialise
	tst	(sp)+
	bne	10$
11$:	.print	#dying
	clr	r0
	.exit
;
10$:	call	init			;and us too
;
	mov	#fopt,r5		;assume first option is ok
;
20$:	clr	-(sp)			;room for result
	mov	r5,-(sp)
	bgt	30$
	neg	r5			;display is ok
30$:	mov	#o.main,-(sp)
	mov	#m.main,-(sp)
	call	$menu
	mov	(sp)+,r5		;this is it
;
	mov	r5,r0
	dec	r0
	asl	r0
	clr	-(sp)
	call	@40$(r0)		;and dispatch
	mov	r5,prevkey		;record what we just did
	mov	(sp)+,r5
	br	20$
;
	.psect	data
40$:	.word	edit, comp, link, run, file, stk, list, copy, save, dir, exit
prevkey:.word	0
limit:	.limit
pause:	.word	0, 2.
onesec:	.word	0, 60.
twosec:	.word	0, 120.
;
	.psect	text
dying:	.nlcsi	type=I part=PREFIX
	.asciz	'F-Cannot initialise menu routines'
	section	Initialisation
;+
; Initialise the system.
;
; INPUTS:
;	None.
;
; OUTPUTS:
;	None.
;
; EFFECTS:
;	Gets the preliminary work file.
;-
	.enabl	lsb
init::
	.scca	#area #ctrlc
	call	$tclr			;new page
	clr	-(sp)
	call	$tmov			;top of page
	.print	#30$
	mov	#<wfp*400+1>,-(sp)	;where to prompt
	mov	#wfile,-(sp)
	call	$mfile
	tstb	wfile
	bne	10$			;good, there's something
	.ttyou	#bel
	br	init
;
10$:	mov	#wfile,r0		;give something to show
	mov	#dwfile,r1
20$:	movb	(r0)+,(r1)+
	bne	20$
	movb	#space,-(r1)
	sub	#wfile,r0
	neg	r0
	add	#8.,r0			;fill with spaces
	beq	26$
25$:	movb	#space,(r1)+
	sob	r0,25$
26$:	return
;
	.psect	text
30$:	.ascii	'Program name : '<200>
wfp	=: . - 30$
wfile:	.blkb	7
;
	.psect	data
ctrlc:	.blkw	1
	section	Edit
;+
; Switch to editor.
;
; INPUTS:
;	sp ->	return
;		.word next
;
; next indicates the most probable next option.
;
; OUTPUTS:
;	sp ->	.word next
;
; EFFECTS:
;	Allows the editor to run on the given file.
;-
	.enabl	lsb
edit:
	clr	-(sp)
	mov	#kex,-(sp)
	mov	pc,-(sp)
	call	$mswt			;switch console to kex
	tst	(sp)+
	beq	20$
;
	clr	-(sp)
	mov	#wfile,r0
	mov	#50$,r1
	mov	r1,-(sp)
10$:	movb	(r0)+,(r1)+
	bne	10$
	call	$mcmd			;pass command to kex
	tst	(sp)+
	beq	20$
;
	clr	-(sp)
	mov	#kex,-(sp)
	call	$mjob			;wait for completion
	call	$mme
	call	$mwait
	tst	(sp)+
	bne	30$
;
20$:	call	$mme
	.ttyou	#bel			;error
	mov	#n.edit,2(sp)
	br	40$
;
30$:	mov	#n.comp,2(sp)
40$:	return
;
	.psect	data
kex:	job	KEX
50$:	.blkb	7
	.even
	section	<Compile the program>
;+
; Compiles the program.
;
; INPUTS:
;	sp ->	return
;		.word next
;
; next indicates the most probable next option.
;
; OUTPUTS:
;	sp ->	.word next
;
; EFFECTS:
;	Compiles the program.
;-
	.enabl	lsb
comp:
	mov	r2,-(sp)
	mov	#110$,r2		;set up listing switches
	mov	#140$,r0		;assume it's off
	tstb	lswt
	beq	1$			;it's off
	add	#<130$-140$>,r0
1$:	movb	(r0)+,(r2)+
	bne	1$
	dec	r2
;
	mov	#wfile,r0
	mov	#100$,r1
10$:	movb	(r0),(r1)+
	movb	(r0)+,(r2)+
	bne	10$
	dec	r2
	mov	#120$,r0
20$:	movb	(r0)+,(r2)+
	bne	20$
	dec	r1
	mov	#150$,r0
30$:	movb	(r0)+,(r1)+
	bne	30$
	mov	(sp)+,r2
;
	clr	-(sp)
	mov	#p2fp,-(sp)
	mov	pc,-(sp)
	call	$mswt			;switch to second pass
	tst	(sp)+
	beq	1000$
;
	clr	-(sp)
	mov	#101$,-(sp)
	call	$mcmd			;second pass command
	tst	(sp)+
	beq	1000$
;
	clr	-(sp)
	mov	#p1fp,-(sp)
	clr	-(sp)
	call	$mswt			;switch to first pass
	tst	(sp)+
	beq	1000$
;
	clr	-(sp)
	mov	#111$,-(sp)
	call	$mcmd			;first pass command
	tst	(sp)+
	beq	1000$
;
	clr	-(sp)
	mov	#p1fp,-(sp)
	call	$mjob			;wait for first pass
	tst	(sp)+
	beq	1000$
;
	clr	-(sp)
	mov	#p2fp,-(sp)
	call	$mjob			;wait for second pass
	call	$mme
	call	$mwait
	tst	(sp)+
	bne	55$
;
1000$:	call	$mme
	.ttyou	#bel
	mov	#n.comp,2(sp)
	br	56$
;
55$:	mov	#n.edit,2(sp)
56$:	return
;
	.psect	data
p2fp:	job	PASS2
p1fp:	job	PASS1
101$:	.ascii	'- PL: D '
100$:	.asciz	'pascal TT:'
150$:	.asciz	' TT:'
	.even
111$:	.ascii	'-'
110$:	.asciz	'CL pascal PL: D TT:'
120$:	.asciz	' PL: D TT:'
130$:	.asciz	'CL '
140$:	.asciz	' '
	.even
	section	<Link the program>
;+
; Invoke the linker.
;
; INPUTS:
;	sp ->	return
;		.word next
;
; next indicates the most probable next option.
;
; OUTPUTS:
;	sp ->	.word next
;
; EFFECTS:
;	Links the current program as a virtual job.
;-
	.enabl	lsb
link:
	mov	#stack,r0
	mov	#200$,r1		;move stack stuff across
10$:	movb	(r0)+,(r1)+
	bne	10$
	movb	#200,-(r1)
;
	mov	r2,-(sp)
	mov	#wfile,r0		;move program name across
	mov	#201$,r1
	mov	#210$,r2
30$:	movb	(r0),(r1)+
	movb	(r0)+,(r2)+
	bne	30$
	dec	r1
;
	mov	#120$,r0		;virtual root setup
40$:	movb	(r0)+,(r1)+
	bne	40$
;
	dec	r2			;pascal library and virtual overlay
	mov	#130$,r0
60$:	movb	(r0)+,(r2)+
	bne	60$
;
	clr	-(sp)
	mov	#bkgnd,-(sp)
	mov	pc,-(sp)
	call	$mswt			;switch to background
	tst	(sp)+
	beq	1000$
;
	mov	#88$,r2
62$:	clr	-(sp)
	mov	(r2)+,-(sp)
	beq	61$			;end of list
	call	$mcmd			;pass link command
	tst	(sp)+
	.twait	#area #pause
	br	62$
;
61$:	cmp	(sp)+,(sp)+
	mov	(sp)+,r2
	.twait	#area #twosec
	clr	-(sp)
	mov	#bkgnd,-(sp)
	call	$mjob			;wait for it
	call	$mme
	call	$mwait
	tst	(sp)+
	bne	55$
;
1000$:	call	$mme
	.ttyou	#bel
	mov	#n.link,2(sp)
	br	56$
;
55$:	mov	#n.run,2(sp)
56$:	return
;
	.psect	data
88$:	.word	90$, 95$, 91$, 92$, 93$, 94$, 0
;
90$:	.ascii	'LIN/XM/PRO/TRA/EXT:'
200$:	.ascii	'001000'<200>
	.even
;
95$:	.ascii	'/EXE:'
201$:	.asciz	'PASCAL PASVIR'
	.even
;
91$:	.ascii	'PASSTK,'
210$:	.asciz	'PASCAL,PASLIB/V:1'
	.even
;
92$:	.asciz	'//'
	.even
;
93$:	.asciz	'$ROOT$'
	.even
;
94$:	.asciz	'.STK.'
;
120$:	.asciz	' PASVIR'
130$:	.asciz	',PASLIB/V:1'
	.even
	section	<Run the program>
;+
; Run the program.
;
; INPUTS:
;	sp ->	return
;		.word next
;
; next indicates the most probable next option.
;
; OUTPUTS:
;	sp ->	.word next
;
; EFFECTS:
;	Runs the program as a virtual job.
;-
	.enabl	lsb
run:
	mov	#wfile,r0
	mov	#100$,r1
10$:	movb	(r0)+,(r1)+		;copy filename across
	bne	10$
	dec	r1
	mov	#110$,r0		;and extension
20$:	movb	(r0)+,(r1)+
	bne	20$
;
	clr	-(sp)
	mov	#bkgnd,-(sp)
	mov	pc,-(sp)
	call	$mswt			;switch to background
	tst	(sp)+
	beq	1000$
;
	clr	-(sp)
	mov	#90$,-(sp)
	call	$mcmd			;and run it
	tst	(sp)+
	beq	1000$
;
	clr	-(sp)
	mov	#bkgnd,-(sp)
	call	$mjob			;wait for background to complete
	tst	(sp)+
	call	$mme			;clear screen to show we're ready
	clr	-(sp)
	mov	#wfile,-(sp)
	mov	pc,-(sp)
	call	$mswt			;give terminal to program
	tst	(sp)+
	beq	1000$
;
	clr	-(sp)
	mov	#<wfile!1>,-(sp)
	call	$mjob			;and wait for it to terminate
	call	$mme
	call	$mwait
	tst	(sp)+
	bne	55$
;
1000$:	call	$mme
	.ttyou	#bel
	mov	#n.run,2(sp)
	br	56$
;
55$:	mov	#n.edit,2(sp)
56$:	return
;
	.psect	data
90$:	.ascii	'SRU DK:'
100$:	.asciz	'pascal.sav'
110$:	.asciz	'.SAV'
	.even
	section	<Directory Listing>
;+
; Obtain a directory listing.
;
; INPUTS:
;	sp ->	return
;		.word next
;
; next indicates the most probable next option.
;
; OUTPUTS:
;	sp ->	.word next
;
; EFFECTS:
;	Obtains a directory listing for the user.
;-
	.enabl	lsb
dir:
	mov	#n.dir,2(sp)		;can't be sure what she'll do next
	clr	-(sp)
	mov	#bkgnd,-(sp)
	mov	pc,-(sp)
	call	$mswt			;switch console to background
	tst	(sp)+
	beq	10$
;
	clr	-(sp)
	mov	#30$,-(sp)
	call	$mcmd			;pass command
	tst	(sp)+
	beq	10$
;
	clr	-(sp)
	mov	#bkgnd,-(sp)
	call	$mjob			;wait for background to complete
	call	$mme
	call	$mwait
	tst	(sp)+
	bne	20$
;
10$:	call	$mme
	.ttyou	#bel			;error
;
20$:	return
;
	.psect	data
bkgnd:	job	B
30$:	.asciz	'DIR/ALP DSK:'
	.even
	section	<Copy to work area>
;+
; Copy program files to work area.
;
; INPUTS:
;	sp ->	return
;		.word next
;
; next indicates the most probable next option.
;
; OUTPUTS:
;	sp ->	.word next
;
; EFFECTS:
;	Copies program files to work area.
;-
	.enabl	lsb
copy:
	mov	#wfile,r0
	mov	#35$,r1			;move filename across
1$:	movb	(r0)+,(r1)+
	bne	1$
	dec	r1
	mov	#40$,r0
2$:	movb	(r0)+,(r1)+
	bne	2$
;
	mov	#n.edit,2(sp)		;can't be sure what she'll do next
	clr	-(sp)
	mov	#bkgnd,-(sp)
	mov	pc,-(sp)
	call	$mswt			;switch console to background
	tst	(sp)+
	beq	10$
;
	clr	-(sp)
	mov	#30$,-(sp)
	call	$mcmd			;pass command
	tst	(sp)+
	beq	10$
;
	clr	-(sp)
	mov	#bkgnd,-(sp)
	call	$mjob			;wait for background to complete
	call	$mme
	call	$mwait
	tst	(sp)+
	bne	20$
;
10$:	call	$mme
	.ttyou	#bel			;error
;
20$:	return
;
	.psect	data
30$:	.ascii	'COP DSK:'
35$:	.asciz	'program DK:'
40$:	.asciz	' DK:'
	.even
	section	<Save to work disk>
;+
; Save program files to work disk.
;
; INPUTS:
;	sp ->	return
;		.word next
;
; next indicates the most probable next option.
;
; OUTPUTS:
;	sp ->	.word next
;
; EFFECTS:
;	Saves program files to the work disk.
;-
	.enabl	lsb
save:
	mov	#wfile,r0
	mov	#35$,r1			;move filename across
1$:	movb	(r0)+,(r1)+
	bne	1$
	dec	r1
	mov	#40$,r0
2$:	movb	(r0)+,(r1)+
	bne	2$
;
	mov	#n.edit,2(sp)		;can't be sure what she'll do next
	clr	-(sp)
	mov	#bkgnd,-(sp)
	mov	pc,-(sp)
	call	$mswt			;switch console to background
	tst	(sp)+
	beq	10$
;
	clr	-(sp)
	mov	#30$,-(sp)
	call	$mcmd			;pass command
	tst	(sp)+
	beq	10$
;
	clr	-(sp)
	mov	#bkgnd,-(sp)
	call	$mjob			;wait for background to complete
	call	$mme
	call	$mwait
	tst	(sp)+
	bne	20$
;
10$:	call	$mme
	.ttyou	#bel			;error
;
20$:	return
;
	.psect	data
30$:	.ascii	'COP DK:'
35$:	.asciz	'program DSK:'
40$:	.asciz	' DSK:'
	.even
	section	<Filename Specification>
;+
; Switch filenames.
;
; INPUTS:
;	sp ->	return
;		.word next
;
; next indicates the most probable next option.
;
; OUTPUTS:
;	sp ->	.word next
;
; EFFECTS:
;	Allows the user to alter the filename.
;-
	.enabl	lsb
file:
	mov	#<dcol*400+drow>,-(sp)
	mov	#10$,-(sp)
	call	$mfile			;see what they say
	tstb	10$
	bne	20$
	.ttyou	#bel			;nothing happened
	mov	#-n.file,2(sp)		;display is ok
	br	30$
;
20$:	mov	r2,-(sp)
	mov	#wfile,r1
	mov	#10$,r0			;transfer
	mov	#dwfile,r2
25$:	movb	(r0),(r1)+
	movb	(r0)+,(r2)+
	bne	25$
	movb	#space,-(r2)
	clrb	-(r1)
	sub	#10$,r0
	neg	r0
	add	#8.,r0
	beq	27$
26$:	movb	#space,(r2)+
	clrb	(r1)+
	sob	r0,26$
27$:	mov	(sp)+,r2
	mov	#-n.copy,2(sp)
;
30$:	mov	#<dcol*400+drow>,-(sp)
	call	$tmov			;tidy up display
	.print	#21$
	mov	#<dcol*400+drow>,-(sp)
	call	$tmov
	.print	#wfile
	return
;
	.psect	text
10$:	.blkb	7
21$:	.ascii	'      '<200>
	section	<Stack specification>
;+
; Specify a new stack size.
;
; INPUTS:
;	sp ->	return
;		.word next
;
; next indicates the most probable next option.
;
; OUTPUTS:
;	sp ->	.word next
;
; EFFECTS:
;	Allows the user to specify a new stack size.
;-
	.enabl	lsb
stk:
	mov	#<scol*400+srow>,-(sp)
	mov	#10$,-(sp)
	call	$moct			;see what they say
	tstb	10$
	bne	20$
	.ttyou	#bel			;nothing happened
	mov	#-n.stk,2(sp)		;display is ok
	br	30$
;
20$:	mov	r2,-(sp)
	mov	#stack,r1
	mov	#10$,r0			;transfer
	mov	#dstack,r2
25$:	movb	(r0),(r1)+
	movb	(r0)+,(r2)+
	bne	25$
	mov	(sp)+,r2
	mov	#-n.edit,2(sp)
;
30$:	mov	#<scol*400+srow>,-(sp)
	call	$tmov			;tidy up display
	.print	#21$
	mov	#<scol*400+srow>,-(sp)
	call	$tmov
	.print	#stack
	return
;
	.psect	text
10$:	.blkb	7
21$:	.ascii	'      '<200>
stack:	.asciz	'1000'
	.byte	0, 0, 0
	section	<Toggle Listing Switch>
;+
; Toggle the listing switch.
;
; INPUTS:
;	sp ->	return
;		.word next
;
; next indicates the most probable next option.
;
; OUTPUTS:
;	sp ->	.word next
;
; EFFECTS:
;	Toggles the listing switch.
;-
	.enabl	lsb
list:	comb	lswt			;toggle it
	bne	10$
	mov	#100$,r0		;it's off
	br	20$
;
10$:	mov	#200$,r0		;it's on
20$:	mov	#dlswt,r1
	mov	r0,-(sp)
	movb	(r0)+,(r1)+
	movb	(r0)+,(r1)+
	movb	(r0)+,(r1)+
	mov	#<lcol*400+lrow>,-(sp)
	call	$tmov			;show him
	.print	(sp)+
	mov	#-n.edit,2(sp)
	return
;
	.psect	text
lswt:	.byte	0			;it's off
100$:	.asciz	'OFF'
200$:	.asciz	'ON '
	section	<Exit Processor>
;+
; Exit from system.
;
; INPUTS:
;	sp ->	return
;		.word next
;
; next indicates the most probable next option.
;
; OUTPUTS:
;	sp ->	.word next
;
; EFFECTS:
;	Allows the user to exit from the system.
;-
	.enabl	lsb
exit:
	cmp	prevkey,#n.exit
	bne	10$			;give them another chance
	call	$tclr
	clr	-(sp)
	call	$tmov			;tidy up the house
	.scca	#area #0		;re-enagage control/c
	clr	r0			;hard exit
	.exit
;
10$:	mov	#-n.exit,2(sp)		;last chance
	return
	section	<Menu Text>
;+
; This section contains the text for the menus.
;-
	.enabl	lsb
	.psect	text
m.main:
	dbltop
.ascii	'             PASCAL SYSTEM'
	newline
	dblbot
.ascii	'             PASCAL SYSTEM'
	newline
	newline
	newline
.ascii'	    Please select an action by using the arrow keys.'
	newline
	newline
.ascii'	    Press HELP to obtain a description of the emphasised action.'
	newline
.ascii'	    Press DO to cause the action to be executed.'
	locate 23. 8.
.ascii	'Current Program : '
dwfile:	.blkb	7
	locate 23. 36.
.ascii	'Listing : '
dlswt:	.ascii	'OFF'
	locate 23. 53.
.ascii	'Stack Size : '
dstack:	.ascii	'1000'
	.byte	0, 0, 0
;
	.psect	data
o.main:
	.byte	10., 20.
	.word	d.edit
	.word	h.edit
	.byte	11., 20.
	.word	d.comp
	.word	h.comp
	.byte	12., 20.
	.word	d.link
	.word	h.link
	.byte	13., 20.
	.word	d.run
	.word	h.run
	.byte	14., 20.
	.word	d.file
	.word	h.file
	.byte	15., 20.
	.word	d.stk
	.word	h.stk
	.byte	16., 20.
	.word	d.list
	.word	h.list
	.byte	17., 20.
	.word	d.copy
	.word	h.copy
	.byte	18., 20.
	.word	d.save
	.word	h.save
	.byte	19., 20.
	.word	d.dir
	.word	h.dir
	.byte	21., 20.
	.word	d.exit
	.word	h.exit
	.word	0
;
	.psect	text
d.edit:
.asciz	'. Edit the program'
d.comp:
.asciz	'. Compile the program'
d.link:
.asciz	'. Link the program'
d.run:
.asciz	'. Run the program'
d.file:
.asciz	'. Select another program'
d.stk:
.asciz	'. Select another stack size'
d.list:
.asciz	'. Toggle listing switch'
d.copy:
.asciz	'. Copy the program files to the work area'
d.save:
.asciz	'. Save the program files to the work disk'
d.dir:
.asciz	'. Obtain a directory of the work disk'
d.exit:
.asciz	'. Exit'
;
h.edit:
.ascii'	Editing a Program:'
	newline
	newline
.ascii'	    This causes the currently selected program to  be  retrieved'
	newline
.ascii'	and the editor invoked. You may then  freely  edit  the  program'
	newline
.ascii'	with the editor.'
	newline
	newline
.ascii'	    Once the editing session is terminated, either by exiting or'
	newline
.ascii'	quitting from the editor, you will return to this menu.'
	newline
	newline
.asciz	'                       Press ENTER or RETURN to continue.'
;
h.comp:
.ascii'	Compiling a Program:'
	newline
	newline
.ascii'	    The currently selected program  will  be  submitted  to  the'
	newline
.ascii'	Pascal compiler to be compiled.'
	newline
	newline
.asciz	'                       Press ENTER or RETURN to continue.'
;
h.link:
.ascii'	Linking a Program:'
	newline
	newline
.ascii'	    The currently selected program will be linked  to  become  a'
	newline
.ascii'	job with the currently selected stack size.'
	newline
	newline
.asciz	'                       Press ENTER or RETURN to continue.'
;
h.run:
.ascii'	Running a Program:'
	newline
	newline
.ascii'	    The currently selected program will be run as a system job.'
	newline
	newline
.asciz	'                       Press ENTER or RETURN to continue.'
;
h.file:
.ascii'	Selecting a Program:'
	newline
	newline
.ascii'	    This allows you to select a different program  to  work  on.'
	newline
.ascii'	The program selected will remain  the  work  program  until  you'
	newline
.ascii'	select another program.'
	newline
	newline
.ascii'	    If you do not type in a new program name when prompted,  the'
	newline
.ascii'	program name will remain unchanged.'
	newline
	newline
.asciz	'                       Press ENTER or RETURN to continue.'
;
h.stk:
.ascii'	Selecting a Stack Size:'
	newline
	newline
.ascii'	    This allows you to select the stack size a program  will  be'
	newline
.ascii'	linked with.'
	newline
	newline
.ascii'	    If you do not enter a new stack  size  when  prompted,  the'
	newline
.ascii'	stack size will remain unchanged.'
	newline
	newline
.asciz	'                       Press ENTER or RETURN to continue.'
;
h.list:
.ascii'	Toggling the Listing Switch:'
	newline
	newline
.ascii'	    This causes the  listing  switch  to  be  toggled  from  its'
	newline
.ascii'	current setting to its alternate setting. This means that if the'
	newline
.ascii'	switch is currently ON it will be changed to OFF and vice versa.'
	newline
	newline
.ascii'	    In the ON position, the switch will cause  the  compiler  to'
	newline
.ascii'	display the program on the terminal  while  the  compilation  is'
	newline
.ascii'	taking place. In the OFF position, only the number of  the  line'
	newline
.ascii'	currently being compiled will be displayed.'
	newline
	newline
.asciz	'                       Press ENTER or RETURN to continue.'
;
h.copy:
.ascii'	Copying Program Files to the Work Area:'
	newline
	newline
.ascii'	    All the program files on the work disk will be copied to the'
	newline
.ascii'	work area.'
	newline
	newline
.asciz	'                       Press ENTER or RETURN to continue.'
;
h.save:
.ascii'	Saving Program Files to the Work Disk:'
	newline
	newline
.ascii'	    All the program files in the work area will be saved to  the'
	newline
.ascii'	work disk.'
	newline
	newline
.asciz	'                       Press ENTER or RETURN to continue.'
;
h.dir:
.ascii'	Obtaining a Directory of the Work Area:'
	newline
	newline
.ascii'	    A listing of the files in the work area  will  be  obtained.'
	newline
	newline
.ascii'	    Files with a .PAS extension are Pascal source  files.  Files'
	newline
.ascii'	 with a .BAK extension are the backup files  of  those  sources.'
	newline
.ascii'	Files with a .OBJ extension are the object files and those  with'
	newline
.ascii'	a .SAV extension are the executable images.'
	newline
	newline
.asciz	'                       Press ENTER or RETURN to continue.'
;
h.exit:
.ascii'	Exiting:'
	newline
	newline
.ascii'	    This will cause the Pascal system to terminate  and  control'
	newline
.ascii'	will return to RT-11.'
	newline
	newline
.ascii'	    Because of the severity of such an action, the  system  will'
	newline
.ascii'	only perform the action  if  you  press  the  DO  key  twice  in'
	newline
.ascii'	succession.'
	newline
	newline
.asciz	'                       Press ENTER or RETURN to continue.'
	.end	pascal
