
!++
! FACILITY:
!   KERMIT-32/36
!
! ABSTRACT:
!	This file contains the common definitions for KERMIT-32 and KERMIT-36.
!
! ENVIRONMENT:
!   User mode
!
! AUTHOR: Robert C. McQueen, CREATION DATE: 24-January-1983
!
! MODIFIED BY:
!
!--

%SBTTL 'Table of Contents'
%SBTTL 'Symbol definitions -- Routine calls'

!
! EQUATED SYMBOLS:
!
!
! Function types passed to FILE_OPEN routine.
!

LITERAL
    FNC_READ = 0,				! Open for reading
    FNC_WRITE = 1;				! Open for writing

!
! File types used
!

LITERAL
    FILE_ASC = 1,				! ASCII files (SEVEN-BIT)
    FILE_BIN = 2;				! Binary (.COM) files. (EIGHT-BIT)

!
! Parity types
!

LITERAL
    PAR_MIN = 0,				! Min offset
    PAR_NONE = 0,				! No parity
    PAR_MARK = 1,				! Mark parity
    PAR_EVEN = 2,				! Even parity
    PAR_ODD = 3,				! Odd parity
    PAR_MAX = 3;				! Max offset
	%SBTTL	'Character definitions'

!
! Character definitions
!

LITERAL
    CHR_NUL = %O'000',			! Null (tape feed character, fill character)
    CHR_SOH = %O'001',			! Start of header
    CHR_STX = %O'002',			! Start of text
    CHR_ETX = %O'003',			! End of text
    CHR_EOT = %O'004',			! End of transmission
    CHR_ENQ = %O'005',			! Enquiry (WRU "Who are you?")
    CHR_ACK = %O'006',			! Acknowledge
    CHR_BEL = %O'007',			! Bell
    CHR_BS = %O'010',			! Backspace
    CHR_TAB = %O'011',			! Horizontal tab
    CHR_LFD = %O'012',			! Line feed
    CHR_VTB = %O'013',			! Vertical tab
    CHR_FFD = %O'014',			! Form feed
    CHR_CRT = %O'015',			! Carriage return
    CHR_SO = %O'016',			! Shift out
    CHR_SI = %O'017',			! Shift in
    CHR_DLE = %O'020',			! Data link escape
    CHR_DC1 = %O'021',			! Device control 1 (also XON)
    CHR_DC2 = %O'022',			! Device control 2 (also TAPE or AUX ON)
    CHR_DC3 = %O'023',			! Device control 3 (also XOFF)
    CHR_DC4 = %O'024',			! Device control 4 (also AUX OFF)
    CHR_NAK = %O'025',			! Negative acknowledge
    CHR_SYN = %O'026',			! Synchronous idle (SYNC)
    CHR_ETB = %O'027',			! End of transmission block
    CHR_CAN = %O'030',			! Cancel
    CHR_EM = %O'031',			! End of medium
    CHR_SUB = %O'032',			! Substitute
    CHR_ESC = %O'033',			! Escape
    CHR_FS = %O'034',			! File separator
    CHR_GS = %O'035',			! Group separator
    CHR_RS = %O'036',			! Record separator
    CHR_US = %O'037',			! Unit separator

    CHR_CTL_A = %O'001',			! Control-A
    CHR_CTL_B = %O'002',			! Control-B
    CHR_CTL_C = %O'003',			! Control-C
    CHR_CTL_D = %O'004',			! Control-D
    CHR_CTL_E = %O'005',			! Control-E
    CHR_CTL_F = %O'006',			! Control-F
    CHR_CTL_G = %O'007',			! Control-G
    CHR_CTL_H = %O'010',			! Control-H
    CHR_CTL_I = %O'011',			! Control-I
    CHR_CTL_J = %O'012',			! Control-J
    CHR_CTL_K = %O'013',			! Control-K
    CHR_CTL_L = %O'014',			! Control-L
    CHR_CTL_M = %O'015',			! Control-M
    CHR_CTL_N = %O'016',			! Control-N
    CHR_CTL_O = %O'017',			! Control-O
    CHR_CTL_P = %O'020',			! Control-P
    CHR_CTL_Q = %O'021',			! Control-Q
    CHR_CTL_R = %O'022',			! Control-R
    CHR_CTL_S = %O'023',			! Control-S
    CHR_CTL_T = %O'024',			! Control-T
    CHR_CTL_U = %O'025',			! Control-U
    CHR_CTL_V = %O'026',			! Control-V
    CHR_CTL_W = %O'027',			! Control-W
    CHR_CTL_X = %O'030',			! Control-X
    CHR_CTL_Y = %O'031',			! Control-Y
    CHR_CTL_Z = %O'032',			! Control-Z
    CHR_SP = %C' ',				! Space
    CHR_DEL = %O'177',				! Delete
    CHR_ESCAPE = %O'035',			! Connect escape character
    CHR_SIZE = 8;				! Size of the characters we process
!
! Constants
!

LITERAL
    TRUE = 0 EQL 0,				! Value of true
    FALSE = 0 NEQ 0,				! Value of FALSE.
    MAX_FILE_NAME = 132,			! Maximum length of a file specification
    MAX_REC_LENGTH = 256,			! Maximum record length we handle
    INIT_DELAY = 5,				! Initial delay time
    MAX_RETRIES = 30,				! Maximum number of retries
    MAX_MSG = 96;				! Maximum message length
	%SBTTL	'Macro definitions'

! The following definition is for BLISS-36 only.

%IF %BLISS(BLISS36) %THEN

!
! MACRO TO GENERATE EQULST CONSTRUCTS.
!
MACRO
	$EQULST(P,G,I,S)[A]=
	    %NAME(P,GET1ST_ A) =
		%IF NUL2ND_ A
		%THEN (I) + %COUNT*(S)	! ASSUMES I, S ALWAYS GENERATED BY CONVERSION PROGRAM
		%ELSE GET2ND_ A
		%FI %,

	GET1ST_(A,B)=
	     A %,
	GET2ND_(A,B)=
	     B %,	! KNOWN NON-NULL
	NUL2ND_(A,B)=
	     %NULL(B) %;
%FI ! End of %IF %BLISS(BLISS36)
