fab:	$fab	fac=<get,put,upd,del>,shr=<put,get,del,upd>
rab:	$rab	usz=10000,rsz=10000,ubf=buffer,rbf=buffer,rac=key,-
		ksz=4,kbf=uid,fab=fab


buffer:	.blkb	10000





	.library	/sys$login:peb/
	.library	/sys$library:lib/
	$prvdef
	$Maildef
	$hlpdef
        $notesdef
	$NOTESMSGDEF
	NOTEITEMS
	$ttdef
 	$tt2def
	$brkdef
	$Fscndef

fpmt:	
.ascid	/Command (Copy) > /


cpmt:	.ascid	/Cli     Pmt > /




; ---------------------------------------------------------------







open_o:         .word   8
                .word   notes$k_notefile_create_time
                .long   create_time
                .long   0
;
		.word	100
		.word	notes$k_notefile_user_area
		.long	notefile_user_area
		.long	notefile_user_area_len
;
                .long   0
op_msg_mast:	.ascid	/%PAN-I-OPEN_SC, Opening the Master conference/
op_msg_shad:	.ascid	/%PAN-I-OPEN_TC, Opening the Shadow conference/
o_msg:	.ascid	/%PAN-I-OPEN_R, Opening file for RMS access/
result_spec:            .blkb   150
result_spec_len:        .blkl   1
Shadow:	.ascid	/SHADOW/
shad_entry_len:		.blkl	1
shad_entry:		.blkb	300
shad_file_cont:	.blkl	1
title:          .blkb   100
title_len:      .blkl   1
uid:			.blkl	1
OUT:	.long	500
	.long	out+8
	.blkb	500



out_len = . - out

tmp_OUT:	.long	500
		.long	tmp_out+8
		.blkb	500




open_m:         .word   4
                .word   notes$k_notefile_moderate
                .long   moderate
                .long   0
;
                .word   4
                .word   notes$k_nosignal
                .long   hint
                .long   0
;
                .long   0


Null:		.word	0
		.word	0
		.long	0
		.long	0
;
		.long	0


notice:         .blkb   100
notice_len:     .blkl   1



notes_open_o:   .word   100
                .word   notes$k_notefile_title
                .long   title
                .long   title_len
;
                .word   150
                .word   notes$k_notefile_result_spec
                .long   result_spec
                .long   result_spec_len
;
                .word   100
                .word   notes$k_notefile_notice
                .long   notice
                .long   notice_len
;
		.word	4
		.word	notes$k_notefile_restricted
		.long	is_restricted
		.long	0
;
		.word	300
		.word	notes$k_notefile_moderator
		.long	moderator_st
		.long	moderator_st_len
;
		.word	4
		.word	notes$k_notefile_high_uid
		.long	max_uid_in_high_uid
		.long	0
;
		.word	100
		.word	notes$k_notefile_user_area
		.long	notefile_user_area
		.long	notefile_user_area_len
;
		.word   8
                .word   notes$k_notefile_create_time
                .long   create_time
                .long   0
;
                .long   0



master_create_time:	.blkl	2




Notefile_file_name:	.blkb	100
Notefile_file_name_len:	.blkl	1


notebook_spec:		.long	100
			.long	notebook_spec+8
			.blkb	100


notebook_in:	.word   0
                .word   notes$k_notefile_file_name
                .long   notebook_spec+8
                .long   0
;
		.word	notebook_def_len
		.word	notes$k_notefile_default_name
		.long	notebook_def_spec
		.long	0
;
		.long	0


notebook_def_spec:	.ascii	/SYS$LOGIN:notes$notebook.NOTE/
notebook_def_len = . - notebook_def_spec


notebook_file_cont:	.blkl	1



notebook:	.ascid	/NOTEBOOK/





book_in:	.word	4
		.word	notes$k_notefile_context
		.long	notebook_file_cont
		.long	0
;
		.long	0

notebook_cont:	.blkl	1


mod_en:	.ascid	/%PAN-I-MODP, Enable moderator privileges on the Target conference/

mast_file_cont:	.blkl	1


master_entry_len:	.blkl	1
master_entry:		.blkb	300

Master:	.ascid	/MASTER/


input:	.long	300
	.long	input+8
	.blkb	300


full_default_name:   .ascii  /Notes$Library:.Note/
full_default_name_len =. - full_default_name

ent_out:	.word	100
		.word	notes$k_notefile_file_name
		.long	Notefile_file_name
		.long	Notefile_file_name_len
;
		.word	4
		.word	notes$k_entry_last_status
		.long	last_status
		.long	0
;
		.word	4
		.word	notes$k_entry_unseen_est
		.long	unseen_est
		.long	0
;
		.word	100
		.word	notes$k_entry_name
		.long	entry_name
		.long	entry_name_len
;
		.word	3000
		.word	notes$k_seen_map
		.long	seen_map
		.long	seen_map_len
;
		.word	100
		.word	NOTES$K_ENTRY_USER_AREA
		.long	note_user_area
		.long	note_user_area_len
;
		.word	4
		.word	notes$k_notefile_entrytotal
		.long	entrytotal
		.long	0
;
		.word	4
		.word	notes$k_notefile_high_uid
		.long	high_uid
		.long	0
;
		.word	8
		.word	notes$k_notefile_lastrev
		.long	notefile_lastrev
		.long	0
;
		.word	300
		.word	notes$k_notefile_moderator
		.long	moderator_st
		.long	moderator_st_len
;
                .word   100
                .word   notes$k_notefile_notice
                .long   notice
                .long   notice_len
;
		.word   4
                .word   notes$k_notefile_numnotes
                .long   number_of_notes
                .long   0
;
		.word   100
                .word   notes$k_notefile_title
                .long   title
                .long   title_len
;
		.word	3000
		.word	notes$k_seen_map
		.long	seen_map
		.long	seen_map_len
;
		.long	0

                                                                  


entry_name:	.blkb	100
entry_name_len:	.blkl	1

dlm:	
.ascid	/-------------------------------------------------------------------------------/

descr:		.blkl	2

ctr_title:	.ascid	/%PAN-I-TI,  Title = "!AS"/
ctr_notice:	.ascid	/%PAN-I-NO, Notice = "!AS"/

ctr_filn:	.ascid	/%PAN-I-CONF, Conference file is "!AS"/

ctr_ent:	.ascid	/%PAN-I-ENTO, Opening notebook entry !AS ............../
ctr_ent1:	.ascid	/%PAN-I-CONO, Opening conference     !AS ............../




 


unseen_est:	.blkl	1

seen_map:	.blkb	3000
seen_map_len:	.blkl	1
NUMBER_OF_NOTES:	.blkl	1

note_user_area_len:	.blkl	1
note_user_area:		.blkb	100

notes_open_i:   .word   0
                .word   notes$k_notefile_file_name
                .long   input+8
                .long   0
;
def_l:          .word   default_name_len
                .word   notes$k_notefile_default_name
def_n:          .long   default_name
                .long   default_name_len
;
se_mp:		.word	0
		.word	notes$k_seen_map
		.long	seen_map
		.long	0
;
                .long   0

notefile_user_area:	.blkb	100
notefile_user_area_len:	.blkl	1

notefile_lastrev:	.blkl	2
moderator_st:		.blkb	500
moderator_st_len:	.blkl	1

moderate:       .long   1       ; we want to be a Goderator  !!

max_uid_in_high_uid:	.blkl	1

last_status:	.blkl	1

is_restricted:	.blkl	1

hint:		.long	1

high_uid:	.blkl	1

ent_in:		.word	0
		.word	notes$k_entry_name
		.long	0
		.long	0
;
		.word   default_name_len
cl_xy:          .word   notes$k_noop		;notes$k_notefile_default_name
		.long   default_name
                .long   default_name_len
;
		.long	0

entrytotal:		.blkl	1


default_name:   .ascii  /Notes$library:.Note/
default_name_len =. - default_name

create_time:	.blkl	2

ctr_max_u:	.ascid	/Copy the input maximum UID (!XL) to the output conf (!XL)/
maximum_uid:	.blkl	1

not_a_high:	.ascid	/*** This is __NOT__ a higher UID than exists ***/

san_fail:	.ascid	/>>> failed to understand the file structure <<</

copy:		.ascid	/COPY/





	.entry	start,0



	movab	list, descr
	movab	list, descr+4
	addl2	#list_len, descr+4
	$lkwset_s       inadr=descr



; get the master conf name


	movl    #100,input         
	Pushaw  input
	pushaq  master
	pushaq  input
	calls   #3,g^lib$get_foreign
	check	r0,error



	pushaq	op_msg_mast
	calls	#1,g^lib$put_output





; save it

	movl	input, master_name
	movc3	input, input+8, master_name+8




	movw	input,notes_open_i








	movw	#full_default_name_len, def_l
	movab	full_default_name, def_n



        pushaw  notes_open_o
        pushaw  notes_open_i
        pushal  mast_file_cont
        calls   #3,G^Notes$notefile_begin
        check   r0,error

	movq	create_time, master_create_time



	movl	max_uid_in_high_uid, maximum_uid

	movl	maximum_uid  ,note_uid

	movab	mast_file_cont, notes_beg_i+4

        pushaw  notes_beg_o
        pushaw  notes_beg_i
        pushal  mast_note_cont
        calls   #3,G^Notes$note_begin
	check	r0,error





        movl    result_spec_len,Descr
        movab   result_spec,descr+4
;       pushaq  descr
;       calls   #1,g^lib$put_output


	movl	#100,out
	$fao_s	ctrstr=ctr_filn,outbuf=out,outlen=out,-
		p1=#Descr
	pushaq	out
	calls	#1,g^lib$put_output



	movl	title_len,Descr
	movab	title,Descr+4
;	pushaq	Descr
;	calls	#1,g^lib$put_output

	movl	#100,out
	$fao_s	ctrstr=ctr_title,outbuf=out,outlen=out,-
		p1=#Descr
	pushaq	out
	calls	#1,g^lib$put_output


        movl    notice_len,Descr
        movab   notice,descr+4
;       pushaq  descr
;       calls   #1,g^lib$put_output


	movl	#100,out
	$fao_s	ctrstr=ctr_notice,outbuf=out,outlen=out,-
		p1=#Descr
	pushaq	out
	calls	#1,g^lib$put_output





loop:	nop




	cmpl	#^x40000000, note_uid
	bneq	8150$
	movl	#1,r0
	brw	error
8150$:	nop





	incl	uid_scan

	clrl	mast_note_id_len
	clrl	shad_note_id_len

	movc5	#0,(sp),#^a/ /,#50, mast_note_id
	movc5	#0,(sp),#^a/ /,#50, shad_note_id

	movc5	#0,(sp),#^a/ /,#200, shad_note_title
	movc5	#0,(sp),#^a/ /,#200, mast_note_title

	movc5	#0,(sp),#^a/ /,#100,shad_author
	movc5	#0,(sp),#^a/ /,#100,mast_author

; get a note from the master




	clrl	mast_note_flag

	pushaw	mast_note_out
	pushaw	note_in
	pushal	mast_note_cont
	calls	#3,g^notes$note_get
	blbs	r0,10$
	cmpl    r0,#NOTES$_NO_SUCH_NOTE
	bneq	67$
	brw	nxt
67$:	$exit_s	code=R0
10$:	nop

; note is there

	incl	mast_note_flag




;	movl	#100,out
;	$fao_s	ctrstr=ctr_t1,outbuf=out,outlen=out,-
;		p1=#11,-
;		p2=#mast_note_id,-
;		p3=#mast_note_time
;	pushaq	out
;	calls	#1,g^lib$put_output





; is this note_id in the database ????

	movab	list, R6


; ----------------------------------------
500$:	nop

	cmpl	#-1, (R6)	; end of list ?
	bneq	501$
	pushaq	full
	calls	#1,g^lib$put_output
	$exit_s	code=#1
501$:	nop


	tstl	(R6)
	bneq	502$		; add entry

	movq	mast_note_time, (R6)
	movc3	#11, mast_note_id, 8(R6)
	brw	nxt

502$:	nop



; is the same as an existing note ?

	cmpc3	#11, mast_note_id, 8(R6)
	bneq	559$	

	movq	(R6), tquad

	movl	#100,out
	$fao_s	ctrstr=ctr_t,outbuf=out,outlen=out,-
		p1=#11,-
		p2=#mast_note_id,-
		p3=#mast_note_time,-
		p4=#tquad
	pushaq	out
	calls	#1,g^lib$put_output

	brw	nxt



; duplicate note here


559$:	nop

	addl2	#8, R6
	addl2	#11, R6

	brw	500$




nxt:	decl	note_uid
	brw	loop


; ----------------------------------------------
error:	nop


	ret

do_c_o:	.ascid	/%PAN-I-DO_CO, PAN will now copy the new notes/

report_only:	.ascid	+(As this pass was done /REPORT_ONLY)+
report_only1:	.ascid	+(*_NO_* changes have been made))+


note_in:	.word	4
		.word	notes$k_note_uid
		.long	note_uid
		.long	0
;
                .word   4
hd:             .word   notes$k_nosignal
                .long   no_sig
                .long   0
;
		.long	0






note_uid:	.long	0







notes_beg_i:    .word   4
                .word   notes$k_notefile_context
                .long   0
                .long   0
;
                .word   4
                .word   notes$k_nosignal
                .long   no_sig
                .long   0

;
                .long   0




notes_beg_o:    .word   4
                .word   notes$k_notefile_numnotes
                .long   number_of_notes
                .long   0
;
                .long   0
                                                                                


shad_note_cont:	.blkl	1
mast_note_cont:	.blkl	1

no_sig:         .long   1






mast_note_out:	
		.word   20
                .word   notes$k_note_id
                .long   mast_note_id
                .long   mast_note_id_len
;
		.word	4
		.word	notes$k_note_uid
		.long	mast_uid
		.long	0
;
		.word	100
		.word	notes$k_note_title
		.long	mast_note_title
		.long	mast_note_title_len
;
		.word	8
		.word	notes$k_note_create_time
		.long	mast_note_time
		.long	0
;
		.word	4
		.word	notes$k_note_hidden
		.long	mast_hidden
		.long	0
;
		.word	100
		.word	notes$k_note_author
		.long	mast_author
		.long	mast_author_len
;
		.word	4
		.word	notes$k_note_numrecords
		.long	mast_number_of_lines
		.long	0
;
		.long	0



mast_number_of_lines:	.blkl	1
shad_number_of_lines:	.blkl	1


mast_note_id:		.blkb	50
mast_note_id_len:	.blkl	1
mast_uid:		.blkl	1
mast_note_title:	.blkb	200
mast_note_title_len:	.blkl	1
mast_note_time:		.blkl	2
mast_hidden:		.blkl	1

ctr_tell_u:		.ascid	/Working on UID !XL/


shad_note_out:	
		.word   20
                .word   notes$k_note_id
                .long   shad_note_id
                .long   shad_note_id_len
;
		.word	4
		.word	notes$k_note_uid
		.long	shad_uid
		.long	0
;
		.word	100
		.word	notes$k_note_title
		.long	shad_note_title
		.long	shad_note_title_len
;
		.word	8
		.word	notes$k_note_create_time
		.long	shad_note_time
		.long	0
;
		.word	4
		.word	notes$k_note_hidden
		.long	shad_hidden
		.long	0
;
		.word	100
		.word	notes$k_note_author
		.long	shad_author
		.long	shad_author_len
;
		.word	4
		.word	notes$k_note_numrecords
		.long	shad_number_of_lines
		.long	0
;
		.long	0


shad_author:	.blkb	100
mast_author:	.blkb	100

shad_author_len:	.blkl	1
mast_author_len:	.blkl	1



shad_note_id:		.blkb	50
shad_note_id_len:	.blkl	1
shad_uid:		.blkl	1
shad_note_title:	.blkb	200
shad_note_title_len:	.blkl	1
shad_note_time:		.blkl	2
shad_hidden:		.blkl	1

mast_note_flag:		.blkl	1
shad_note_flag:		.blkl	1

no_same:	.Ascid	/%PAN-F-DATE_MISMATCH, Same UID notes have not same time stamp/

wrg_mst:	.ascid	/%PAN-F-WRG_MAST, This is not the right master file for this shadow /







ctr_ns2:	.ascid	/Shadow, UID !XL, note !12AD, time !%D/
ctr_ns1:	.ascid	/Master, UID !XL, note !12AD, time !%D/

ctr_tell_u1:	.ascid	/!ASUID !XL:Master !12<!AS!12AD!>,Shadow !12<!AS!12AD!> @!%D/
ctr_tell_u2:	.ascid	/!ASUID !XL:Master !12<!AS!12AD!>,Shadow !12<!AS!12AD!> @/


neither:	.blkl	1
nei_exit:	.ascid	/%PAN-I-LIMEX, Scan exit after 30 "no notes"/

last_uid:	.blkl	1

indent:	.ascid	/####################################################/


un_hid_nol:	.ascid	/>>> WARNING! Unhiding note we did not get the text for <<</

ctr_cb1:	.ascid	/>>> the master has the missing base note !AD, as UID !XL<<</
no_base:	.ascid	/>>> this topic does not exist <<</
huh:		.ascid	/>>> loop detected , move stack dumped <<</
ctr_iw:		.ascid	/>>> Shadow note !AD is UID !XL<<</
ctr_li:		.ascid	/>>> Master note !UL lines, Shadow note !UL lines<<</
no_same_lines:	.Ascid	/>>> Same notes have not the same number of lines <<</
del_bas:	.ascid	/>>> base note deleted in the master, but not in the shadow <<</
ctrm:		.ascid	/>>> Master note is missing from the shadow <<</
auth_ch:	.ascid	/>>> Note authors are different <<</
del_shad:	.ascid	/>>> Delete shadow note (not in the master) <<</
note_id_ch:	.ascid	/>>> Note ID has changed <<</
note_tit_ch:	.ascid	/>>> Note Title has changed <<</
note_hid_ch:	.ascid	/>>> Note hidden status has changed <<</

shad_del:	.blkl	1
shad_Cnote_id:	.blkl	1
shad_Cnote_tit:	.blkl	1
shad_Cnote_hid:	.blkl	1
del_both:	.blkl	1


ctr_rep1:	.ascid	/!5UL Notes were deleted from the shadow /
ctr_rep2:	.ascid	/!5UL Notes were moved/
ctr_rep3:	.ascid	/!5UL Notes had titles changed/
ctr_rep4:	.ascid	/!5UL Notes had their hidden status changed/
ctr_rep5:	.ascid	/!5UL Notes were not in either conf /
ctr_rep6:	.ascid	/!5UL UID's scanned /
ctr_rep7:	.ascid	/!5UL Notes found & compared/
ctr_rep8:	.ascid	/!5UL Notes missing from the shadow !AS/
ctr_rep9:	.ascid	/!5UL Notes should be copied over (symbol PAN$TO_BE_COPIED/
ctr_rep10:	.ascid	/!UL/

ny_count:	.blkl	1


miss_g:		.ascid	+, and copied over+

notes_tested:	.blkl	1

uid_scan:	.blkl	1

since:	.ascid	/SINCE/


end_quad:	.blkl	2

Tquad:	.blkl	2


tmp:	.blkl	2
word7:	.blkw	20

ctr_last2:	.ascid	/Last shadow update completed at !%D/

ctr_peb:	.ascid	/!UW, !UW, !UW, !UW/




from_last:	.ascid	/Will SYNC from completion of last update/
ctr_last3:	.ascid	+Verifying notes written since !%D+
day:	.ascid	/1 00:00:00/

build:		.blkl	100
build_len = . - build

build_point:	.blkl	1

changes:	.blkl	1

start_uid:	.ascid	/START_UID/

other_shad_note_cont:	.blkl	1







	.entry	do_pan_cre_symbols,^m<r3,r4,r5,r6,r7,r8,r9>
	nop
	nop
	movl	(ap),  R2
	movl	@4(ap), R3	; number of notes written
	movl	8(ap), R4	; address of return info structure

; create a DCL symbol for notes written PAN$EXTRACT_NOTES_WRITTEN

	movl	#100,out
	$fao_s	ctrstr=ctr_rep10,outbuf=out,outlen=out,-
		p1=R3

        PUSHAL  DCLFLAG                
        PUSHAQ  out		   ; value of symbol
        PUSHAQ  p_wrt		   ; symbol to set
        CALLS   #3,G^LIB$SET_SYMBOL    
	check	r0,error



; default the other symbols

	clrl	out

        PUSHAL  DCLFLAG                
        PUSHAQ  out		   ; value of symbol
        PUSHAQ  e_noI		   ; symbol to set
        CALLS   #3,G^LIB$SET_SYMBOL    
	check	r0,error

        PUSHAL  DCLFLAG                
        PUSHAQ  out		   ; value of symbol
        PUSHAQ  e_noA		   ; symbol to set
        CALLS   #3,G^LIB$SET_SYMBOL    
	check	r0,error

        PUSHAL  DCLFLAG                
        PUSHAQ  out		   ; value of symbol
        PUSHAQ  e_noT		   ; symbol to set
        CALLS   #3,G^LIB$SET_SYMBOL    
	check	r0,error



	pushaq	sym_cre
	calls	#1,g^lib$put_output



	movl	@4(ap), R3	; number of notes written

	cmpl	#1, R3
	beql	10$
	ret
10$:	nop





;0	(itmcod = notes$k_note_id,
;12	(itmcod = notes$k_note_author,
;24	(itmcod = notes$k_note_pen_name,
;36	(itmcod = notes$k_note_title,
;	(itmcod = notes$k_note_create_time,
;	(itmcod = notes$k_note_numresponses,
;	(itmcod = notes$k_note_numrecords,
;	(itmcod = notes$k_note_hidden,
;	(itmcod = notes$k_note_blink_id,
;	(itmcod = notes$k_note_blink_title,
;	(itmcod = notes$k_notefile_file_name,


; -------------------------------------------------------------

	movl	8(ap), R9	; address of return info structure

	cmpw	#notes$k_note_id, 2(R9)
	beql	20$
	pushaq	struc_q
	calls	#1,g^lib$put_output
	$exit_s	code=#1
20$:	nop


	movl	4(R9), R4
	movl	@8(R9), R5

	movl	#100,out
	$fao_s	ctrstr=ctr_s1,outbuf=out,outlen=out,-
		p1=R5,-
		p2=R4


        PUSHAL  DCLFLAG                
        PUSHAQ  out		   ; value of symbol
        PUSHAQ  e_noI		   ; symbol to set
        CALLS   #3,G^LIB$SET_SYMBOL    
	check	r0,error

; -------------------------------------------------------------



	movl	8(ap), R9	; address of return info structure
	addl2	#12, R9

	cmpw	#notes$k_note_author, 2(R9)
	beql	21$
	pushaq	struc_q
	calls	#1,g^lib$put_output
	$exit_s	code=#1
21$:	nop


	movl	4(R9), R4
	movl	@8(R9), R5

	movl	#100,out
	$fao_s	ctrstr=ctr_s1,outbuf=out,outlen=out,-
		p1=R5,-
		p2=R4


        PUSHAL  DCLFLAG                
        PUSHAQ  out		   ; value of symbol
        PUSHAQ  e_noA		   ; symbol to set
        CALLS   #3,G^LIB$SET_SYMBOL    
	check	r0,error
; -------------------------------------------------------------



	movl	8(ap), R9	; address of return info structure
	addl2	#36, R9

	cmpw	#notes$k_note_title, 2(R9)
	beql	22$
	pushaq	struc_q
	calls	#1,g^lib$put_output
	$exit_s	code=#1
22$:	nop


	movl	4(R9), R4
	movl	@8(R9), R5


	locc	#0, #100 , (R4)

	subl3	R0, #100, R5

	movl	#100,out
	$fao_s	ctrstr=ctr_s1,outbuf=out,outlen=out,-
		p1=R5,-
		p2=R4


        PUSHAL  DCLFLAG                
        PUSHAQ  out		   ; value of symbol
        PUSHAQ  e_noT		   ; symbol to set
        CALLS   #3,G^LIB$SET_SYMBOL    
	check	r0,error



	ret

ctr_s1:		.ascid	/!AD/

struc_q:	.ascid	/%PAN-F-INERR, Internal structure error/

	.entry	do_pan_enable_mod,^m<r3,r4,r5,r6,r7,r8,r9>


	pushaq	mod
	calls	#1,g^Cli$Present
	blbc	r0,10$

	pushaq	mod_en
	calls	#1,g^lib$put_output

	movl	@4(ap), shad_file_cont

        pushaw  null
        pushaw  open_m
        pushal  shad_file_cont
        calls   #3,G^Notes$notefile_modify
	blbs	r0,10$

	MOVL    R0,VEC+4
        $PUTMSG_S       MSGVEC=VEC


10$:	nop
	movl	#1, r0
	ret

mod:		.ascid	/MODERATOR/
ent_this:	.ascid	/*******  do_pan_enable_mod *******/






VEC:    .LONG   2
        .BLKL   1
        .LONG   0
        .LONG   0

last_shadow_update:	.blkl	2

ctr_word:	.ascid	/word 7 !UW /
blank:	.ascid	/                             /
missing:	.blkl	1


ny:	.ascii	/not yet copied/
ny_len = . - ny


none:	.ascii	/**None**/
none_len = . - none

report:	.ascid	/REPORT_ONLY/

base_fnd:	.ascid	/this is a base note/


ask_out:	.word	4
		.word	notes$k_note_uid
		.long	note_uid
		.long	0
;
		.word   20
                .word   notes$k_note_id
                .long   mast_note_id
                .long   mast_note_id_len
;
		.long	0

ask_in:		.word	0
		.word	notes$k_note_id
		.long	0
		.long	0
;
		.long	0

save:		.blkl	500
save_point:	.long	save
saved:		.blkl	1





ask_out_iw:	.word	4
		.word	notes$k_note_uid
		.long	iw_note_uid
		.long	0
;
		.word   20
                .word   notes$k_note_id
                .long   iw_note_id
                .long   iw_note_id_len
;
		.long	0


iw_note_uid:	.blkl	1

iw_note_id:	.blkb	50

iw_note_id_len:	.blkl	1

ctr_iw1:	.ascid	/The target note_id !AD exists in the shadow,as UID !XL/

ctr_cb:	.ascid	/!AS.0/

other_mast_note_cont:	.blkl	1

fred:	.blkl	1


master_name_flag:	.ascid	+/NOnotebook   +
master_name:		.long	100
			.long	master_name+8
			.blkb	100


shadow_name_flag:	.ascid	+/NOnotebook   +
shadow_name:		.long	100
			.long	shadow_name+8
			.blkb	100


ctr_am:		.ascid	+$ Pan Copy Note !AS!AS !AS!AS /Range=!AD /NOlog+

ctr_am1:	.ascid	+$ Pan Copy Note !AS!AS !AS!AS /NOlog /Limit=100+


am:	.ascid	+Do the following (or use SYNC/COPY) to get this note+
am1:	.ascid	/Spawning PAN to copy this note/
S_FLAG:	.LONG	0



m_pad:	.ascid	/                   /
s_pad:	.ascid	/                   /


	.entry	cond_hand, ^m<r2,r3,r4,r5,r6,r7,r8,r9>




; get pointer to signal array           
                                        
        movl    chf$l_sigarglst(ap),r5  

	movl	chf$l_sig_name(r5),R5


	cmpl    R5,#NOTES$_NO_SUCH_NOTE
	beql	10$


	movl	#ss$_resignal, r0
	
	ret



10$:	movl	#ss$_continue, r0


	ret

symbol:	.ascid	/PAN$TO_BE_COPIED/
DCLFLAG:        .LONG   LIB$K_CLI_GLOBAL_SYM  

def_tbc:	.ascid	/-1/

keyword_cnx:	.blkl	1



keyword:	.ascii	/PAN$DATA_STORE/
keyword_len = . - keyword



key_out:	.word	100
		.word	NOTES$K_KEYWORD_USER_AREA
		.long	KEYWORD_USER_AREA
		.long	KEYWORD_USER_AREA_len
;
		.long	0

KEYWORD_USER_AREA:	.blkb	100
KEYWORD_USER_AREA_len:	.blkl	1




key_in:	.word	0
	.word	NOTES$K_KEYWORD_NAME
	.long	0
	.long	0
;
        .word   4
        .word   notes$k_nosignal
        .long   no_sig
        .long   0
;
	.long	0	

keyword_add:	.ascid	/Adding keyword PAN$DATA_STORE/

ctr_wm1:	.ascid	/Master conf creation date is !%D/
ctr_wm2:	.ascid	/Master conf creation date is !%D  (Stored in the shadow conf)/

key_add:	.word	0
		.word	NOTES$K_KEYWORD_USER_AREA
		.long	KEYWORD_USER_AREA
		.long	0
;
		.word	keyword_len
		.word	NOTES$K_KEYWORD_NAME
		.long	keyword
		.long	0	
;
		.long	0




p_wrt:	.ascid	/PAN$EXTRACT_NOTES_WRITTEN/

e_noI:	.ascid	/PAN$EXTRACT_NOTE_ID/

e_noA:	.ascid	/PAN$EXTRACT_NOTE_AUTHOR/

e_noT:	.ascid	/PAN$EXTRACT_NOTE_TITLE/

sym_cre:	.ascid	/%PAN-I-SYMC, DCL symbols PAN$EXTRACT_* created/

time:	.ascid	/0 00:00:30/
quad:	.blkl	2

full:	.ascid	/list is full/
list:	.blkb	19 * 50000
	.long	-1

list_len = . - list



	

limit_done:	.ascid	/ **** LIMIT time has expired ****/

ctr_t:	.ascid	/Note !AD, !%D, !%D/
ctr_t1:	.ascid	/!AD   !%D/
limit:		.ascid	/LIMIT_TIME/

	.entry	limit_ast,^m<r2,r3,r4,r5,r6,r7,r8,r9>

	pushaq	limit_done
	calls	#1,g^lib$put_output

	clrl	limit_done

	ret


	.end	start