INT 61 - Banyan VINES - 3270 INTERFACE                                          
	AX = 0002h
	BH = function number (see #03346)
	DS:CX -> argument block (except BH=00h,1Ah) (see #03348)
Return: AX = status (see #03347)
Notes:	Either 3270/SNA or 3270/BSC interface may use AX=0002h, depending on
	  which is loaded first.  The other interface will use AX=000Ah
	Status codes greater than 63h indicate an inconsistency in the 3270/SNA
	  or 3270/BSC resident driver, which must be reloaded by the user


(Table 03346)
Values for VINES 3270 interface function number:
 00h "pi2reset"	 reset 3270/SNA or 3270/BSC driver
 02h "pi2bsc"	 (3270/BSC only)
 03h "pi2get"	 get information stored in 3270 resident driver
 04h "pi2put"	 store information in 3270 resident driver
 05h "pi2gcur"	 get current screen position
 07h "pi2sdat"	 send data keystroke
 08h "pi2scom"	 send command keystroke
 0Ah "pi2field"	 get field info for arbitrary screen positions
 0Fh "pi2stat"	 get logical unit/device status
 12h "pi2nlus"	 determine logical unit/device assignment
 13h "pi2gate"	 specifies comm port address to gateway service
 14h "pi2attach" attach a logical unit/device
 15h "pi2sdev"	 save logical unit/device info in resident driver
		(not supported in >3.0)
 16h "pi2gdev"	 get device information (not supported in >3.0)
 17h "pi2luinfo" get info about specific logical unit/device
 18h "pi2gerr"	 get finer error detail
 19h "pi2dhold"	 (3270/SNA only)  holds a 3270 device
 1Ah "pi2shut"	 release memory-resident module
 1Ch "pi2sprof"	 save profile info in res driver (not supp in >3.0)
 1Dh "pi2gprof"	 get prevsly stored profile info (not supp in >3.0)


(Table 03347)
Values for VINES 3270 status:
 0000h	successful
 000Bh	invalid parameter or data does not fit data area
 000Ch	another code path currently active in resident driver
 000Dh	operation currently not allowed
 0032h	encountered connection disconnect error
 0033h	encountered "sosend" completion error
 0034h	encountered "sosend" communication error
 0035h	attach request refused.	extended error info via "pi2gerr":
	01h resource unavailable
	02h invalid type
	03h version mismatch
	04h invalid logical unit number
	05h error during ARL processing
	06h no access for user
 0071h	encountered "sosock" error
 0072h	encountered unrecognizable error
 0073h	encountered "sowait" error (extended info via "pi2gerr")
 0074h	encountered invalid type-of-request on "sowait"
 0075h	encountered "sorec" error (extended info via "pi2gerr")
 0076h	encountered "sorec" completion error (ext info via "pi2gerr")
 0077h	encountered connection request
 0078h	encountered unrecognizable data
 0079h	encountered unknown connection ID (ext info via "pi2gerr")
SeeAlso: #03325


Format of argument block for BH=03h,04h:
Offset	Size	Description	(Table 03348)
 00h	WORD	size of data area (max 256)
 02h  N BYTEs	data area
SeeAlso: #03349,#03350,#03351


Format of argument block for BH=05h:
Offset	Size	Description	(Table 03349)
 00h	WORD	logical unit/device number
 02h	WORD	pointer to WORD buffer for cursor index
 04h	WORD	pointer to BYTE buffer for current field attribute
SeeAlso: #03348,#03350,#03351


Format of argument block for BH=07h:
Offset	Size	Description	(Table 03350)
 00h	WORD	logical unit/device number
 02h	WORD	ASCII data byte
 04h	WORD	pointer to WORD count of characters which will need updating
SeeAlso: #03348,#03349,#03351


Format of argument block for BH=08h:
Offset	Size	Description	(Table 03351)
 00h	WORD	logical unit/device number
 02h	WORD	3270 keystroke (see #03352)
SeeAlso: #03348,#03349,#03350,#03353


(Table 03352)
Values for 3270 keystroke:
 0000h	Enter
 0001h	Clear
 0002h	PA1
 0003h	PA2
 0004h	PA3
 0005h	PF1
 ...
 001Ch	PF24
 001Dh	CSELECT (cursor select)
 001Eh	Insert
 001Fh	Delete
 0020h	EOField
 0021h	EINPUT (erase input)
 0022h	Reset
 0023h	Attention
 0024h	SysReq
 0025h	Duplicate
 0026h	Fieldmark
 0027h	Home
 0028h	NextLine
 0029h	Tab
 002Ah	BackTab
 002Bh	cursor up
 002Ch	cursor down
 002Dh	cursor right
 002Eh	cursor left
 002Fh	double cursor right
 0030h	double cursor left
 0031h	PRINT
 0032h	CANCEL
 0033h	Backspace


Format of argument block for BH=0Ah:
Offset	Size	Description	(Table 03353)
 00h	WORD	logical unit/device number
 02h	WORD	screen index
 04h	WORD	pointer to WORD buffer for field length
 06h	WORD	pointer to WORD buffer for offset in screen of field start
SeeAlso: #03351,#03354


Format of argument block for BH=0Fh:
Offset	Size	Description	(Table 03354)
 00h	WORD	logical unit/device number
 02h	WORD	clear mask (clear these bits of status after returning status)
 04h	WORD	pointer to WORD buffer for device status (see #03355)
SeeAlso: #03353,#03356


Bitfields for Banyan 3270 device status:
Bit(s)	Description	(Table 03355)
 10	status modified
 9	buffer modified
 8	set cursor
 5	sound alarm
 1-0	size of print line for printer logical units
	00  unformatted line
	01  40-character line
	10  64-character line
	11  80-character line


Format of argument block for BH=12h:
Offset	Size	Description	(Table 03356)
 00h	WORD	pointer to WORD buffer for number of logical units or devices
 02h	WORD	pointer to WORD buffer for version number
 04h	WORD	pointer to 64-byte buffer for logical unit/device list
SeeAlso: #03354,#03357


Format of argument block for BH=13h:
Offset	Size	Description	(Table 03357)
 00h 16 BYTEs	communications port address (see #03328)
SeeAlso: #03356,#03358


Format of argument block for BH=14h:
Offset	Size	Description	(Table 03358)
 00h	WORD	logical unit/device number
		0000h attach any free device of the specified type
 02h	WORD	logical unit/device type
		(3270/SNA) 01h, 02h, or 03h
		(3270/BSC) 02h display
		(3270/BSC) 03h printer
 04h	WORD	pointer to WORD buffer for attached logical unit/device number
SeeAlso: #03357,#03359


Format of argument block for BH=16h:
Offset	Size	Description	(Table 03359)
 00h	WORD	pointer to 18-byte buffer for device block (see #03364)
		first WORD must be set to desired logical unit/device number
SeeAlso: #03358,#03360


Format of argument block for BH=17h:
Offset	Size	Description	(Table 03360)
 00h	WORD	logical unit/device number
 02h	WORD	pointer to information block in caller's DS (see #03365)
SeeAlso: #03359,#03361


Format of argument block for BH=18h:
Offset	Size	Description	(Table 03361)
 00h	WORD	pointer to WORD buffer for major error code
 02h	WORD	pointer to WORD buffer for minor error code
SeeAlso: #03360,#03362


Format of argument block for BH=19h:
Offset	Size	Description	(Table 03362)
 00h	WORD	logical unit/device number
SeeAlso: #03361,#03363


Format of argument block for BH=1Ch,1Dh:
Offset	Size	Description	(Table 03363)
 00h	WORD	pointer to profile block in caller's DS (see #03368)
SeeAlso: #03348,#03362


Format of device block, argument block for BH=15h:
Offset	Size	Description	(Table 03364)
 00h	WORD	logical unit/device number
 02h	WORD	logical unit/device type
 04h	WORD	display model number
 06h	WORD	numeric checking
 08h	WORD	status line
 0Ah	BYTE	unprotected normal field attribute
 0Bh	BYTE	unprotected intensified field attribute
 0Ch	BYTE	protected normal field attribute
 0Dh	BYTE	protected intensified field attribute
 0Eh	WORD	reserved
 10h	WORD	printer port number


Format of information block:
Offset	Size	Description	(Table 03365)
 00h	WORD	device model number
 02h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	screen buffer pointer
 06h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	status line pointer (see #03366)
 0Ah	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	reserved


Format of Banyan VINES 3270 status line:
Offset	Size	Description	(Table 03366)
 00h	BYTE	comm line status
		00h inactive
		01h active
 01h	BYTE	activation level
		01h physical unit activated
		02h logical unit also activated
		03h session is bound
 02h	BYTE	data traffic state
		00h inactive
		01h active
 03h	BYTE	screen ownership
		00h SLU->PLU session owns screen
		01h SLU->SSCP session owns screen
 04h	BYTE	keyboard status (see #03367)
 05h	BYTE	insert mode
		01h if in insert mode
 06h	BYTE	numeric
		01h if current screen buffer is numeric only
 07h	BYTE	printer status
		00h printer not assigned
		01h printer is inactive
		02h printer error
		03h currently printing
		04h printer is busy
		05h printer is very busy
 08h	BYTE	printer assignment
 09h	BYTE	maximum size of network name
 0Ah  N BYTEs	ASCIZA NUL-terminated ASCII string.	The ASCIZ string "ABC" consists of the four bytes 41h, 42h, 43h, and 00h.  Unless otherwise specified, maximum lengths given in the interrupt list do not include the terminating NUL. network name
	BYTE	maximum size of message window
      M BYTEs	null-terminated message window
	BYTE	code set
		00h EBCDIC
		01h ASCII
      M BYTEs	extended attributes
		01h extended attributes are in effect (stored at screen+1920)
		    each extended attribute specifies
		    bits 0,1: 00=normal, 01=blink, 10=reverse, 11=underscor
		    bits 2-4: 000=default,001=blue,010=red,011=pink,
			      100=green,101=turquoise,110=yellow,111=white
	BYTE	extended color
		01h other than base color is in effect


(Table 03367)
Values for Banyan VINES 3270 keyboard status:
 00h	UNLOCK - ready to accept data
 01h	TIME - aid was struck
 02h	SYSTEM - received response no restore
 03h	FUNCTION - unavailable keyboard function
 04h	INPUT - not currently used
 05h	ENDFIELD - field filled in insert mode
 06h	PROTECTED - attempt to enter in protected field
 07h	NUMERIC - attempt to enter in numeric field
 08h	PROGRAM - error in outbound data stream


Format of Banyan VINES 3270 profile block:
Offset	Size	Description	(Table 03368)
 00h 64 BYTEs	gateway service name
 40h 16 BYTEs	gateway comm port address
 50h	WORD	primary logical unit number
 52h	WORD	secondary logical unit type
 54h	WORD	secondary logical unit number
 56h	WORD	printer assignment
 58h 50 BYTEs	keyboard definitions filename