; PUPDEF.MAC;34 & <NEWMANUAL>PUPDEF.MAC;12 24-JAN-83 1050	PAGE 1



LINE 1, PAGE 1
1)	;<PUP>PUPDEF.MAC;34    13-JAN-83 14:34:08    EDIT BY TAFT
1)	; Change ASSIGN to .ASSIGN
1)	;<PUP>PUPDEF.MAC;33    26-SEP-82 15:14:24    EDIT BY TAFT
1)	; Add Desired-Property property and X.prop indices.
1)	; Add New-enumerate command
1)	; Define MOVX and TX-- macros
1)	;<PUP>PUPDEF.MAC;32    12-SEP-80 11:28:29    EDIT BY TAFT
1)	; Add SNDSTL
1)	;<PUP>PUPDEF.MAC;31    28-NOV-79 11:14:18    EDIT BY TAFT
1)	; Add FTP/Mail flags to mark type table
1)	;<PUP>PUPDEF.MAC;30     2-SEP-79 15:58:49    EDIT BY TAFT
LINE 1, PAGE 1
2)	;<PUP>PUPDEF.MAC.10, 31-Mar-82 15:48:46, Edit by SCHOEN
2)	; Add global storage dummy parameters to USEVAR definition
2)	;<PUP>PUPDEF.MAC;8	3/1/81			Edit by RINDFLEISCH
2)	; Added SAVE/RSTR macros for PUSH/POP and CALL/RET for PUSHJ/POPJ
2)	;<PUP>PUPDEF.MAC;7	20-Aug-80 13:12:12  Edit by SCHOEN
2)	; Added RUNM UUO for lower-fork runnable PUPFTP
2)	;<PUP>PUPDEF.MAC;6	11-Jul-80 13:06:53  Edit by SCHOEN
2)	; Added SHXINT, SHXFLG defns for user "!" typeout when not debugging
2)	;<PUP>PUPDEF.MAC;5	4/23/80		Edit by SCHOEN
2)	; SEARCH SYSDEF so calls to VACCT and GDACC simulations don't fail
2)	; on Tops20
2)	;<SCHOEN>PUPDEF.MAC;4    4/3/80			EDIT BY RINDFLEISCH
2)	; Added macros to simulate VACCT and GDACC JSYSs
2)	;<PUP>PUPDEF.MAC;3    25-Mar-80 12:45:08    EDIT BY SCHOEN
2)	; Changed (no)tenex/tops20 opdefs to macro so they work
2)	;<PUP>PUPDEF.MAC;2    21-Mar-80 12:45:08    EDIT BY SCHOEN
2)	; Define (no)tenex/tops20 macros for conditional assembly
2)	;<PUP>PUPDEF.MAC;30     2-SEP-79 15:58:49    EDIT BY TAFT


LINE 6, PAGE 2
1)	
LINE 6, PAGE 2
2)	IFNDEF FT10X,<SEARCH SYSDEF>
2)	


LINE 29, PAGE 2
1)	
1)	RAISEF==1B18		; Raise lower-case input
1)	
1)	
1)	; Macro to declare storage PC's to be used in a module
1)	
1)	DEFINE USEVAR(LSVAR,LSPVAR) <
1)		DEFINE LS(LOC,SIZE<1>) <.ASSIGN LOC,LSVAR,SIZE>


; PUPDEF.MAC;34 & <NEWMANUAL>PUPDEF.MAC;12 24-JAN-83 1050	PAGE 2

LINE 30, PAGE 2
2)	RUNF==1B3		; PUPFTP running as lower fork option
2)	
2)	RAISEF==1B18		; Raise lower-case input
2)	SHXFLG==1B19		; Typed a "!" on a line
2)	
2)	
2)	; Macros to define conditional assembly for Tops-20/Tenex
2)	; assumes calling program has "SEARCHed SYSDEF"
2)	; ejs, 3/20/80
2)	define tops20,<ifn ft20>
2)	define notops20,<ife ft20>
2)	define tenex,<ifn ft10x>
2)	define notenex,<ife ft10x>
2)	
2)	; Macro to declare storage PC's to be used in a module
2)	
2)	DEFINE USEVAR(LSVAR,LSPVAR,GSVAR<GSVAR>,GSPVAR<GSPVAR>) <
2)		DEFINE LS(LOC,SIZE<1>) <.ASSIGN LOC,LSVAR,SIZE>


LINE 42, PAGE 3
1)	
1)	
LINE 42, PAGE 3
2)		UUO URUNM	; Error message to shared page
2)	


LINE 58, PAGE 3
1)		ZZ==0
1)		IFNB <EOCF>,<ZZ==1>
1)		UFTPM [<MK'TYPE>B7+<CODE>B15+<ZZ>B16+<NPOP>+1
1)			ASCIZ \STRING\]
1)	>
1)	↑L
LINE 58, PAGE 3
2)		ZZ==<IFNB <EOCF>,<1>>
2)		UFTPM [<MK'TYPE>B7+<CODE>B15+<ZZ>B16+<NPOP>+1
2)			ASCIZ \STRING\]
2)	>
2)	DEFINE RUNM(TYPE,STRING) <
2)		URUNM [TYPE
2)		       ASCIZ \STRING\]
2)	>
2)	
2)	; MACRO definitions to save and restore lists of locations
2)	DEFINE SAVE(LST)<
2)	   IRP LST,<PUSH P,LST>		; Save stuff on stack
2)	>
2)	


; PUPDEF.MAC;34 & <NEWMANUAL>PUPDEF.MAC;12 24-JAN-83 1050	PAGE 3

2)	DEFINE RSTR(LST)<
2)	   IRP LST,<POP P,LST>		; Recover stuff from stack
2)	>
2)	
2)	; OPDEF's for subroutine call/return
2)	OPDEF	CALL [PUSHJ P,]
2)	OPDEF	RET  [POPJ P,]
2)	
2)	↑L


LINE 7, PAGE 4
1)	SNDSTL==↑D100		; Sender property string length
1)	
1)	PQUOTE=="'"		; Quote character in property lists
1)	EOL==37			; Tenex EOL character (internal use only)
1)	
1)	
LINE 7, PAGE 4
2)	
2)	PQUOTE=="'"		; Quote character in property lists
2)	CR==15			; Char defs
2)	LF==12
2)	FF==14
2)	DEL==177
2)	EOL==37			; Tenex EOL character (internal use only)
2)	
2)	; Global network numbers (assigned by Jon Postel/ARPA)
2)	NW%CHS==7		; CHAOSNET
2)	NW%ARP==12		; ARPANET
2)	NW%DLN==26		; DIALNET
2)	NW%SUN==44		; SUNET
2)	NW%LCL==:NW%SUN		; Local connected network for PUPSRV
2)	
2)	SHXINT==↑d10		; Type a "!" every 10 pages if not debugging
2)	


LINE 29, PAGE 4
1)		X DPRP,<DESIRED-PROPERTY>
1)		X DEVI,<DEVICE>,USRSTL/5+1
LINE 40, PAGE 4
2)		X DEVI,<DEVICE>,USRSTL/5+1


; PUPDEF.MAC;34 & <NEWMANUAL>PUPDEF.MAC;12 24-JAN-83 1050	PAGE 4



LINE 36, PAGE 4
1)		X SNDR,<SENDER>,SNDSTL/5+1
1)		X SFIL,<SERVER-FILENAME>,SFNSTL/5+1
LINE 46, PAGE 4
2)		X SNDR,<SENDER>,USRSTL/5+1
2)		X SFIL,<SERVER-FILENAME>,SFNSTL/5+1


LINE 48, PAGE 4
1)	; Assign offsets and indices for individual properties in a property list
1)	
LINE 58, PAGE 4
2)	; Assign offsets for individual properties in a property list
2)	


LINE 53, PAGE 4
1)		X.'SYM==PLINDX
1)		PLINDX==PLINDX+1
1)	>
1)		PLSIZE==0
1)		PLINDX==0
1)	
1)		PNAMES
1)	
1)	; Must be able to hold all Desired-Property flags in one word
1)	IFG PLINDX-↑D36,<PRINTX More than 36 property names defined>
1)	↑L
LINE 63, PAGE 4
2)	>
2)		PLSIZE==0
2)	
2)		PNAMES
2)	↑L


LINE 17, PAGE 5
1)		NOTFTS==1B4		; Not allowed in FTP server
1)		NOTMLS==1B5		; Not allowed in Mail server
1)	
1)	DEFINE MARKS <
1)		XN RETR, 1,<Retrieve>
1)		XN STOR, 2,<Store>,NOTMLS
1)		XS YES,  3,<Yes>,OKRETR+OKSTOR
LINE 17, PAGE 5
2)	
2)	DEFINE MARKS <
2)		XN RETR, 1,<Retrieve>
2)		XN STOR, 2,<Store>


; PUPDEF.MAC;34 & <NEWMANUAL>PUPDEF.MAC;12 24-JAN-83 1050	PAGE 5

2)		XS YES,  3,<Yes>,OKRETR+OKSTOR


LINE 29, PAGE 5
1)		XN NSTO,11,<New-store>,NOTMLS
1)		XN ENUM,12,<Enumerate>,NOTMLS
1)		XN PLST,13,<Here-is-property-list>
1)		XN NENU,14,<New-enumerate>,NOTMLS
1)		XN ABOR,15,<Abort>,OKRETR+OKSTOR
1)		XN DELE,16,<Delete>,NOTMLS
1)		XN RENA,17,<Rename>,NOTMLS
1)		XN SMAI,20,<Store-mail>,NOTFTS
1)		XN RMAI,21,<Retrieve-mail>,NOTFTS
1)		XN FMAI,22,<Flush-mail>,NOTFTS
1)		XS MBEX,23,<Mailbox-exception>,NOTFTS
1)	>
LINE 27, PAGE 5
2)		XN NSTO,11,<New-store>
2)		XN DIR, 12,<Directory>
2)		XN PLST,13,<Here-is-property-list>
2)		XN YUSR,14,<You-are-user>
2)		XN ABOR,15,<Abort>,OKRETR+OKSTOR
2)		XN DELE,16,<Delete>
2)		XN RENA,17,<Rename>
2)		XN SMAI,20,<Store-mail>
2)		XN RMAI,21,<Retrieve-mail>
2)		XN FMAI,22,<Flush-mail>
2)		XS MBEX,23,<Mailbox-exception>
2)	>


LINE 56, PAGE 5
1)	↑L
1)	; MOVX and TX-- instructions, ripped off from MACSYM.MAC
1)	
1)	DEFINE MOVX (AC,MSK)<
1)	   ..MX1==MSK			;;EVAL EXPRESSION IF ANY
1)		..MX2==0		;;FLAG SAYS HAVEN'T DONE IT YET
1)		IFE <..MX1>B53,<
1)		  ..MX2==1
1)		  MOVEI AC,..MX1>	;;LH 0, DO AS RH
1)		IFE ..MX2,<		;;IF HAVEN'T DONE IT YET,
1)		IFE <..MX1>B17,<
1)		  ..MX2==1
1)		  MOVSI AC,(..MX1)>>	;;RH 0, DO AS LH
1)		IFE ..MX2,<		;;IF HAVEN'T DONE IT YET,
1)		IFE <<..MX1>B53-↑O777777>,<
1)		  ..MX2==1
1)		  HRROI AC,<..MX1>>>	;;LH -1
1)		IFE ..MX2,<		;;IF HAVEN'T DONE IT YET,
1)		IFE <<..MX1>B17-↑O777777B17>,<


; PUPDEF.MAC;34 & <NEWMANUAL>PUPDEF.MAC;12 24-JAN-83 1050	PAGE 6

1)		  ..MX2==1
1)		  HRLOI AC,(..MX1-↑O777777)>> ;;RH -1
1)		IFE ..MX2,<		;;IF STILL HAVEN'T DONE IT,
1)		  MOVE AC,[..MX1]>	;;GIVE UP AND USE LITERAL
1)		PURGE ..MX1,..MX2>
1)	
1)	;THIS DOUBLE IRP CAUSES ALL COMBINATIONS OF MODIFICATION AND TESTING
1)	;TO BE DEFINED
1)	
1)	DEFINE ..DOTX (M,T)<
1)		IRP M,<
1)		IRP T,<
1)		  DEFINE TX'M'T (AC,MSK)<
1)			..TX(M'T,AC,<MSK>)>>>>
1)	
1)		..DOTX (<N,O,Z,C>,<,E,N,A>) ;DO ALL DEFINITIONS
1)		PURGE ..DOTX
1)	
1)	;..TX
1)	;ALL TX MACROS JUST CALL ..TX WHICH DOES ALL THE WORK
1)	
1)	DEFINE ..TX(MT,AC,MSK)<
1)	   ..TX1==MSK			;;EVAL EXPRESSION IF ANY
1)		..TX2==0		;;FLAG SAYS HAVEN'T DONE IT YET
1)		IFE <..TX1&↑O777777B17>,<
1)		  ..TX2==1		;;LH 0, DO AS RH
1)		  TR'MT AC,..TX1>
1)		IFE ..TX2,<		;;IF HAVEN'T DONE IT YET,
1)		IFE <..TX1&↑O777777>,<
1)		  ..TX2==1		;;RH 0, DO AS LH
1)		  TL'MT AC,(..TX1)>>
1)		IFE ..TX2,<		;;IF HAVEN'T DONE IT YET,
1)		  IFE <<..TX1>B53-↑O777777>,< ;;IF LH ALL ONES, 
1)		    ..TX3 (MT,AC)>>	;;TRY Z,O,C SPECIAL CASES
1)		IFE ..TX2,<		;;IF STILL HAVEN'T DONE IT,
1)		  TD'MT AC,[..TX1]>	;;MUST GIVE UP AND USE LITERAL
1)		PURGE ..TX1,..TX2>
1)	
1)	;SPECIAL CASE FOR LH ALL ONES
1)	
1)	DEFINE ..TX3 (MT,AC)<
1)		IFIDN <MT><Z>,<		;;IF ZEROING WANTED
1)		  ..TX2==1
1)		  ANDI AC,↑-..TX1>	;;CAN DO IT WITH ANDI
1)		IFIDN <MT><O>,<		;;IF SET TO ONES WANTED
1)		  ..TX2==1
1)		  ORCMI AC,↑-..TX1>	;;CAN DO IT WITH IORCM
1)		IFIDN <MT><C>,<		;;IF COMPLEMENT WANTED
1)		  ..TX2==1
1)		  EQVI AC,↑-..TX1>>	;;CAN DO IT WITH EQV
1)	


; PUPDEF.MAC;34 & <NEWMANUAL>PUPDEF.MAC;12 24-JAN-83 1050	PAGE 7

LINE 54, PAGE 5
2)	
2)	
2)