_____________________________________________________________________________

  AppEngine_CodecOp						 SWI &4D946
_____________________________________________________________________________

							   AppEngine_SocketOp
								 (SWI &4D946)

	Provides operations to encode and decode data

On entry
	R0 = reason code
	other registers are reason code dependent

On exit
	R0 preserved
	other registers are reason code dependent

Interrupts
	Interrupt status is undefined
	Fast interrupts are enabled

Processor mode
	Processor is in SVC mode

Re-entrancy
	Not defined

Use
	This call provides operations to encode and decode data into various
	encoded formats.

	The action of the SWI depends on the reason code passed in R0:

		R0	Action
		0	encodes data into a Base64 string
		1	decodes Base64 data into a string

Related SWIs
	None

Related vectors
	None
_____________________________________________________________________________

							  AppEngine_CodecOp 0
								 (SWI &4D946)

	Encodes data into a Base64 string

On entry
	R0 = 0
	R1 = pointer to input data
	R2 = length of input data (no more than 189 bytes)

On exit
	R0, R1, R2 preserved
	R3 = pointer to Base64-encoded string

Use
	This call is used to encode small amounts of data into the 7-bit MIME
	Base64 encoded format, for use in Internet applications.
	
	Since the output is a string, limited to a maximum of 255 characters
	you must ensure that you supply no more than 189 bytes of input. 
	This is because for every three bytes of input, the encoder generates
	four bytes of output and also strings of certain lengths are suffixed
	with '=' characters which reduces the maximum input length more.
	
	The exact method for detemining the output string length is :
	
		( ( in_length * 4 / 3 ) + 3 ) AND NOT 3
_____________________________________________________________________________

							  AppEngine_CodecOp 1
								 (SWI &4D946)

	Decodes Base64 data into a string

On entry
	R0 = 1
	R1 = pointer to Base64-coded input data
	R2 = length of input data (no more than 340 bytes)

On exit
	R0, R1, R2 preserved
	R3 = pointer to decoded string

Use
	This call is used to decode small amounts of MIME Base64 encoded data
	into a string, for use in Internet applications.

	Since the output is a string, limited to a maximum of 255 characters
	you must ensure that you supply no more than 340 bytes of input. 
	This is because for every four bytes of input, the encoder generates
	three bytes of output.
	
	The method for detemining the output string length is not detailed
	here as it cannot be easily calculated without access to the input
	data.
	
	This SWI is not suitable for decoding non-ASCII data.
