* This file implements the API used in the PC version.
name_resolve(regs
, sregs
)
movetous((char *) &parms
, sregs
->es
, regs
->x
.di
, sizeof parms
);
if (strcmp((char *)&parms
, NAME_SESSMGR
) == 0) {
regs
->x
.dx
= GATE_SESSMGR
;
} else if (strcmp((char *)&parms
, NAME_KEYBOARD
) == 0) {
regs
->x
.dx
= GATE_KEYBOARD
;
} else if (strcmp((char *)&parms
, NAME_COPY
) == 0) {
} else if (strcmp((char *)&parms
, NAME_OIAM
) == 0) {
regs
->h
.cl
= 0x2e; /* Name not found */
* Session Information Services.
query_session_id(regs
, sregs
)
QuerySessionIdParms parms
;
movetous((char *)&parms
, sregs
->es
, regs
->x
.di
, sizeof parms
);
if (parms
.option_code
!= 0x01) {
regs
->h
.cl
= 0x0d; /* Invalid option code */
} else if (parms
.data_code
!= 0x45) {
NameArrayElement element
;
movetous((char *)&list
, FP_SEG(parms
.name_array
),
FP_OFFSET(parms
.name_array
), sizeof list
);
if (list
.length
< 14) || (list
.length
> 170)) {
list
.number_matching_session
= 1;
list
.name_array_element
.short_name
= parms
.data_code
;
list
.name_array_element
.type
= TYPE_DFT
;
list
.name_array_element
.session_id
= 23;
memcpy(list
.name_array_element
.long_name
, "ONLYSESS",
sizeof list
.name_array_element
.long_name
);
movetothem(FP_SEG(parms
.name_array
),
FP_OFFSET(parms
.name_array
), (char *)&list
, sizeof list
);
parms
.function_code
= 0x6d;
movetothem(sregs
->es
, regs
->x
.di
, (char *)&parms
, sizeof parms
);
query_session_parameters(regs
, sregs
)
QuerySessionParametersParms parms
;
movetous((char *)&parms
, sregs
->es
, regs
->x
.di
, sizeof parms
);
if (parms
.rc
[0] !=0) || (parms
.function_id
!= 0)) {
if (parms
.session_id
!= 23) {
regs
.h
.cl
= parms
.rc
= 0x02;
regs
.h
.cl
= parms
.rc
= 0;
parms
.function_id
= 0x6b;
parms
.session_type
= TYPE_DFT
;
parms
.session_characteristics
= 0; /* Neither EAB nor PSS */
parms
.rows
= MaxNumberLines
;
parms
.columns
= MaxNumberColumns
;
parms
.presentation_space
= 0;
movetothem(sregs
->es
, regs
.x
.di
, (char *)&parms
, sizeof parms
);
query_session_cursor(regs
, sregs
)
QuerySessionCursorParms parms
;
movetous((char *)&parms
, sregs
->es
, regs
->x
.di
, sizeof parms
);
if ((parms
.rc
!= 0) || (parms
.function_id
!= 0)) {
} else if (parms
.session_id
!= 23) {
parms
.function_id
= 0x6b;
parms
.cursor_type
= CURSOR_BLINKING
; /* XXX what is inhibited? */
parms
.row_address
= ScreenLine(CursorAddress
);
parms
.column_address
= ScreenLineOffset(CursorAddress
);
movetothem(sregs
->es
, regs
->x
.di
, sizeof parms
);
connect_to_keyboard(regs
, sregs
)
ConnectToKeyboardParms parms
;
movetous((char *)parms
, sregs
->es
, regs
->x
.di
, sizeof parms
);
if ((parms
.rc
!= 0) || (parms
.function_id
!= 0)) {
} else if (parms
.session_id
!= 23) {
} else if (parms
.intercept_options
!= 0) {
parms
.first_connection_identifier
= 0;
parms
.function_id
= 0x62;
movetothem(sregs
->es
, regs
->x
.di
, (char *)&parms
, sizeof parms
);
disconnect_from_keyboard(regs
, sregs
)
DisconnectFromKeyboardParms parms
;
movetous((char *)&parms
, sregs
->es
, regs
->x
.di
, sizeof parms
);
if ((parms
.rc
!= 0) || (parms
.function_id
!= 0)) {
} else if (parms
.session_id
!= 23) {
} else if (parms
.connectors_task_id
!= 0) {
parms
.function_id
= 0x62;
movetothem(sregs
->es
, regs
->x
.di
, (char *)&parms
, sizeof parms
);
write_keystroke(regs
, sregs
)
disable_input(regs
, sregs
)
movetous((char *)&parms
, sregs
->es
, regs
->x
.di
, sizeof parms
);
if ((parms
.rc
!= 0) || (parms
.function_id
!= 0)) {
} else if (parms
.session_id
!= 23) {
} else if (parms
.connectors_task_id
!= 0) {
parms
.function_id
= 0x62;
movetothem(sregs
->es
, regs
->x
.di
, (char *)&parms
, sizeof parms
);
enable_input(regs
, sregs
)
movetous((char *)&parms
, sregs
->es
, regs
->x
.di
, sizeof parms
);
if ((parms
.rc
!= 0) || (parms
.function_id
!= 0)) {
} else if (parms
.session_id
!= 23) {
} else if (parms
.connectors_task_id
!= 0) {
parms
.function_id
= 0x62;
movetothem(sregs
->es
, regs
->x
.di
, (char *)&parms
, sizeof parms
);
BufferDescriptor
*target
, *source
;
movetous((char *)&parms
, sregs
->es
, regs
->x
.di
, sizeof parms
);
if ((parms
.rc
!= 0) || (parms
.function_id
!=0)) {
movetothem(sregs
->es
, regs
->x
.di
, (char *)parms
, sizeof parms
);
* Operator Information Area Services.
read_oia_group(regs
, sregs
)
movetous((char *)&parms
, sregs
->es
, regs
->x
.di
, sizeof parms
);
if ((parms
.rc
!= 0) || (parms
.function_id
!= 0)) {
} else if (parms
.session_id
!= 23) {
int group
= parms
.oia_group_number
;
char far
*where
= parms
.oia_buffer
;
case OIA_ONLINE_OWNERSHIP
:
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
case OIA_CHARACTER_SELECTION
:
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
case OIA_HIGHLIGHT_GROUP_1
:
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
case OIA_INPUT_INHIBITED
:
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
case OIA_HIGHLIGHT_GROUP_2
:
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
case OIA_COMMUNICATION_ERROR_REMINDER
:
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
case OIA_AUTOKEY_PLAY_RECORD_STATUS
:
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
case OIA_AUTOKEY_ABORT_PAUSE_STATUS
:
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
if (group
!= OIA_ALL_GROUPS
) {
} /* else, fall through */
parms
->function_id
= 0x6d;
movetothem(sregs
->es
, regs
->x
.di
, (char *)&parms
, sizeof parms
);
if (regs
->h
.ah
== NAME_RESOLUTION
) {
name_resolution(regs
, sregs
);
query_session_id(regs
, sregs
);
case QUERY_SESSION_PARMS
:
query_session_parms(regs
, sregs
);
case QUERY_SESSION_CURSOR
:
query_session_cursor(regs
, sregs
);
case CONNECT_TO_KEYBOARD
:
connect_to_keyboard(regs
, sregs
);
disable_input(regs
, sregs
);
write_keystroke(regs
, sregs
);
enable_input(regs
, sregs
);
case DISCONNECT_FROM_KEYBOARD
:
disconnect_from_keyboard(regs
, sregs
);
copy_string(regs
, sregs
);
read_oia_group(regs
, sregs
);
* Called from telnet.c to fork a lower command.com. We
* use the spint... routines so that we can pick up
* interrupts generated by application programs.
static char command
[256];
spinted
.int_no
= API_INTERRUPT_NUMBER
;
cmdptr
= command
+strlen(command
);
if ((cmdptr
+strlen(*argv
)) >= (command
+sizeof command
)) {
fprintf(stderr
, "Argument list too long at argument *%s*.\n",
*cmdptr
++ = ' '; /* Blank separators */
cmdptr
+= strlen(cmdptr
);
length
= strlen(command
)-1;
* spint_start() returns when either the command has finished, or when
* the required interrupt comes in. In the latter case, the appropriate
* thing to do is to process the interrupt, and then return to
* the interrupt issuer by calling spint_continue().
spint_start(command
, &spinted
);
while (spinted
.done
== 0) {
handle_api(&spinted
.regs
, &spinted
.sregs
);
spint_continue(&spinted
);
fprintf(stderr
, "Process generated a return code of 0x%x.\n",