This commit is contained in:
2020-11-04 23:59:28 +01:00
commit 34b50d2a29
232 changed files with 86161 additions and 0 deletions

2653
COMMAND/BATCH.C Normal file

File diff suppressed because it is too large Load Diff

BIN
COMMAND/BIN/BATCH.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/CMDLIST.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/COM.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/COMCPY.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/COMINT.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/COMMAND.COM Normal file

Binary file not shown.

BIN
COMMAND/BIN/COMMAND.EXE Normal file

Binary file not shown.

BIN
COMMAND/BIN/CONFIG.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/CRIT.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/CSTART.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/CSUP.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/DOSIF.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/GLOBAL.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/HELPSTUB.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/MESSAGE.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/PRINTF.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/RESIDENT.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/SUPPORT.OBJ Normal file

Binary file not shown.

BIN
COMMAND/BIN/TXHELP.BIN Normal file

Binary file not shown.

BIN
COMMAND/BIN/TXHELP.EXE Normal file

Binary file not shown.

BIN
COMMAND/BIN/TXHELP.OBJ Normal file

Binary file not shown.

74
COMMAND/CHAR.DEF Normal file
View File

@@ -0,0 +1,74 @@
; File : $CHAR.DEF$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
;************************************************;
;* *;
;* Character Definitions *;
;* *;
;************************************************;
CTLA equ 'A' - '@'
CTLB equ 'B' - '@'
CTLC equ 'C' - '@'
CTLD equ 'D' - '@'
CTLE equ 'E' - '@'
CTLF equ 'F' - '@'
CTLG equ 'G' - '@'
BELL equ 'G' - '@'
CTLH equ 'H' - '@'
CTLI equ 'I' - '@'
TAB equ 'I' - '@'
CTLJ equ 'J' - '@'
LF equ 'J' - '@'
CTLK equ 'K' - '@'
CTLM equ 'M' - '@'
CR equ 'M' - '@'
CTLP equ 'P' - '@'
CTLQ equ 'Q' - '@'
CTLR equ 'R' - '@'
CTLS equ 'S' - '@'
CTLT equ 'T' - '@'
CTLU equ 'U' - '@'
CTLV equ 'V' - '@'
CTLW equ 'W' - '@'
CTLX equ 'X' - '@'
CTLY equ 'Y' - '@'
CTLZ equ 'Z' - '@'
ESC equ '[' - '@'
CTLBS equ '\' - '@'
CTLUB equ '_' - '@'
CTLUP equ '^' - '@'
DEL equ 07Fh
RUBOUT equ DEL
CTL equ '^'

212
COMMAND/CMDLIST.C Normal file
View File

@@ -0,0 +1,212 @@
/*
; File : $Workfile: CMDLIST.C$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
; CMDLIST.C 1.18 94/08/09 15:47:05
; Fixed TRUENAME help.
; CMDLIST.C 1.16 94/06/28 15:42:23
; Add TRUENAME support
; CMDLIST.C 1.15 93/12/01 00:17:11
; Tidy up, commands alphabetical for benefit of help screen
; CMDLIST.C 1.14 93/10/28 17:08:05
; ifdef'd out 'more' , since it now external
; see cmd_list[].
; CMDLIST.C 1.12 93/04/22 14:50:45
; GOSUB, RETURN and SWITCH now have help.
; CMDLIST.C 1.11 93/01/21 16:15:03
; CMDLIST.C 1.7 92/08/06 09:52:44
; Added novell_ext_list which is used to expand novell system information
; statements. See BATCH.C for more info.
; ENDLOG
*/
/*
* 3 Oct 90 remove 8087 command
* 5 Oct 90 remove logout and lock command
* 23 Oct 90 support AND, OR, INPUT, INPUTC, +BATCH
* 23 Nov 90 add ECHOERR command
*/
#include "defines.h"
#include <portab.h>
#include "command.h" /* Command Definitions */
#include "txhelp.h"
/*.pa
* CMD_LIST maps command names to routines as well as specifying
* the top level of syntax checking. If a command requires parameters
* then the message field must point to the error message to be
* displayed if no parmeters are given.
*/
EXTERN VOID CDECL cmd_break(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_call(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_cd(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_copy(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_ctty(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_chcp(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_idle(BYTE *, BYTE *); /*#NOIDLE#*/
EXTERN VOID CDECL cmd_hiload(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_date(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_del(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_dir(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_delq(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_md(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_more(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_path(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_prompt(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_ren(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_rd(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_time(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_truename(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_type(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_ver(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_verify(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_vol(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_cls(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_echo(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_echoerr(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_exit(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_for(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_goto(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_gosub(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_return(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_switch(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_if(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_pause(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_pauseerr(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_rem(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_set(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_shift(BYTE *, BYTE *);
EXTERN VOID CDECL cmd_or(BYTE *, BYTE *);
GLOBAL S_CMD cmd_list[] =
{
/*
TO DO: MAKE DUAL LANG AWARE
*/
#if !defined(NOXBATCH)
{ "and", cmd_if, PARAM_IFCONTEXT,DLS_help_and },
#endif /*NOXBATCH*/
{ "break", cmd_break, PARAM_NONE, DLS_help_break },
{ "call", cmd_call, PARAM_NEEDFILE, DLS_help_call },
{ "cd", cmd_cd, PARAM_NONE, DLS_help_chdir },
{ "chcp", cmd_chcp, PARAM_NONE, DLS_help_chcp },
{ "chdir", cmd_cd, PARAM_NONE, DLS_help_chdir },
{ "cls", cmd_cls, PARAM_NONE, DLS_help_cls },
{ "copy", cmd_copy, PARAM_NEEDFILE, DLS_help_copy },
{ "ctty", cmd_ctty, PARAM_NEEDDEV, DLS_help_ctty },
{ "date", cmd_date, PARAM_NONE, DLS_help_date },
{ "del", cmd_del, PARAM_NEEDFILE, DLS_help_del },
{ "delq", cmd_delq, PARAM_NEEDFILE, DLS_help_delq },
{ "dir", cmd_dir, PARAM_NONE, DLS_help_dir },
{ "echo", cmd_echo, PARAM_NONE, DLS_help_echo },
{ "era", cmd_del, PARAM_NEEDFILE, DLS_help_erase },
{ "eraq", cmd_delq, PARAM_NEEDFILE, DLS_help_eraq },
{ "erase", cmd_del, PARAM_NEEDFILE, DLS_help_erase },
{ "exit", cmd_exit, PARAM_NONE, DLS_help_exit },
{ "for", cmd_for, PARAM_SYNTAX, DLS_help_for },
{ "gosub", cmd_gosub, PARAM_SYNTAX, DLS_help_gosubreturn},
{ "goto", cmd_goto, PARAM_SYNTAX, DLS_help_goto },
{ "hiload", cmd_hiload, PARAM_NONE, DLS_help_hiload },
{ "idle", cmd_idle, PARAM_NONE, DLS_help_idle },
{ "if", cmd_if, PARAM_SYNTAX, DLS_help_if },
{ "lh", cmd_hiload, PARAM_NONE, DLS_help_hiload },
{ "loadhigh", cmd_hiload, PARAM_NONE, DLS_help_hiload },
{ "md", cmd_md, PARAM_NEEDPATH, DLS_help_mkdir },
{ "mkdir", cmd_md, PARAM_NEEDPATH, DLS_help_mkdir },
#if !defined(NOXBATCH)
{ "or", cmd_or, PARAM_IFCONTEXT,DLS_help_or },
#endif /*NOXBATCH*/
{ "path", cmd_path, PARAM_NONE, DLS_help_path },
{ "pause", cmd_pause, PARAM_NONE, DLS_help_pause },
{ "prompt", cmd_prompt, PARAM_NONE, DLS_help_prompt },
{ "rd", cmd_rd, PARAM_NEEDPATH, DLS_help_rmdir },
{ "rem", cmd_rem, PARAM_NONE, DLS_help_rem },
{ "ren", cmd_ren, PARAM_NEEDFILE, DLS_help_rename },
{ "rename", cmd_ren, PARAM_NEEDFILE, DLS_help_rename },
{ "return", cmd_return, PARAM_NONE, DLS_help_gosubreturn},
{ "rmdir", cmd_rd, PARAM_NEEDPATH, DLS_help_rmdir },
{ "set", cmd_set, PARAM_NONE, DLS_help_set },
{ "shift", cmd_shift, PARAM_NONE, DLS_help_shift },
#if SWITCH_ENABLED
{ "switch", cmd_switch, PARAM_SYNTAX, DLS_help_switch },
#endif
{ "time", cmd_time, PARAM_NONE, DLS_help_time },
{ "truename", cmd_truename, PARAM_NONE, DLS_help_truename},
{ "type", cmd_type, PARAM_NEEDFILE, DLS_help_type },
{ "ver", cmd_ver, PARAM_NONE, DLS_help_ver },
{ "verify", cmd_verify, PARAM_NONE, DLS_help_verify },
{ "vol", cmd_vol, PARAM_NONE, DLS_help_vol },
{ NULL, NULL, PARAM_NONE }
};
EXTERN VOID CDECL get_login_name(BYTE *);
EXTERN VOID CDECL get_pstation(BYTE *);
EXTERN VOID CDECL get_full_name(BYTE *);
EXTERN VOID CDECL get_hour(BYTE *);
EXTERN VOID CDECL get_hour24(BYTE *);
EXTERN VOID CDECL get_minute(BYTE *);
EXTERN VOID CDECL get_second(BYTE *);
EXTERN VOID CDECL get_am_pm(BYTE *);
EXTERN VOID CDECL get_greeting(BYTE *);
EXTERN VOID CDECL get_year(BYTE *);
EXTERN VOID CDECL get_short_year(BYTE *);
EXTERN VOID CDECL get_month(BYTE *);
EXTERN VOID CDECL get_month_name(BYTE *);
EXTERN VOID CDECL get_day(BYTE *);
EXTERN VOID CDECL get_day_of_week(BYTE *);
EXTERN VOID CDECL get_nday_of_week(BYTE *);
EXTERN VOID CDECL get_os_version(BYTE *);
EXTERN VOID CDECL get_connection(BYTE *);
GLOBAL N_CMD novell_ext_list[] = {
{ "LOGIN_NAME", get_login_name },
{ "P_STATION", get_pstation },
{ "FULL_NAME", get_full_name },
{ "HOUR", get_hour },
{ "HOUR24", get_hour24 },
{ "MINUTE", get_minute },
{ "SECOND", get_second },
{ "AM_PM", get_am_pm },
{ "GREETING_TIME", get_greeting },
{ "YEAR", get_year },
{ "SHORT_YEAR", get_short_year },
{ "MONTH", get_month },
{ "MONTH_NAME", get_month_name },
{ "DAY", get_day },
{ "DAY_OF_WEEK",get_day_of_week },
{ "NDAY_OF_WEEK",get_nday_of_week},
{ "OS_VERSION", get_os_version },
{ "STATION", get_connection },
{ NULL, NULL }
};

1833
COMMAND/COM.C Normal file

File diff suppressed because it is too large Load Diff

1490
COMMAND/COMCPY.C Normal file

File diff suppressed because it is too large Load Diff

2173
COMMAND/COMINT.C Normal file

File diff suppressed because it is too large Load Diff

238
COMMAND/COMMAND.H Normal file
View File

@@ -0,0 +1,238 @@
/*
; File : $Workfile$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
*/
#define SWITCH_ENABLED 1
#define DOSPLUS 1
#define BETA 1
#define PASSWORD 1
/*
* DOS Plus Command Line Processor definitions
*/
#define PIPE_CHAR '|' /* Invoke PIPE handling */
#define MULTI_CHAR '!' /* Character allows multiple commands on */
/* one command line or in batch file line */
#define BACK_CHAR '&' /* This character forces the preceeding */
/* command to be placed into the background. */
#define ESC_CHAR '~' /* Do not process the following character */
#define MAX_PATHLEN 131 /* Maximum length of a Path "x:\...." */
#define MAX_FILELEN 140 /* Maximum length of full file specification */
/* ie "x:\....\nnnnnnnn.eee;password" */
#define MAX_ENVLEN 255 /* Maximum length of environment entry */
#define DEFAULT_PROMPT "$n$g" /* Default Prompt string */
#define MAX_MEMSIZE 1000 /* Maximum Memory Size */
#define MAX_LIMSIZE 8192 /* Max LIM Memory */
/*
* The following definitions are used to control console redirection,
* pipes, echo status etc.
*/
#define REDIR_ACTIVE 0x0001 /* Redirection Enabled */
#define REDIR_BATCH 0x0002 /* Redirect Complete Batch File */
#define REDIR_PIPE 0x0004 /* Redirection from PIPE command*/
#define REDIR_FOR 0x0008 /* Redirection from FOR command */
#define ECHO_ON 0x0001 /* Turn Echo ON unconditionally */
#define ECHO_OFF 0x0000 /* Permanently Turn Echo OFF */
#define XBATCH_ON 0x0001 /* Turn Echo ON unconditionally */
#define XBATCH_OFF 0x0000 /* Permanently Turn Echo OFF */
/*
* The following definitions are "LONGJMP" error codes used
* to specify the cause of the Internal Abort.
*/
#define IA_BREAK 1 /* Control-C "BREAK" termination */
#define IA_STACK 2 /* Stack Overflow */
#define IA_HEAP 3 /* Heap Overflow */
#define IA_FILENAME 4 /* FileName specification Error */
/*.pa*/
#define SYSDATE struct sysdate
SYSDATE {
WORD year; /* Current Year 1980 - 2099 */
BYTE month; /* Month (1 - 12) */
BYTE day; /* Day (1 - 31) */
BYTE dow; /* Day of the Week (0 - 6) (Sun - Sat) */
};
#define SYSTIME struct systime
SYSTIME {
BYTE hour; /* Hour (0 - 23) */
BYTE min; /* Minute (0 - 59) */
BYTE sec; /* Second (0 - 59) */
BYTE hsec; /* Hundredth of a second (0 - 99) */
};
#define DTA struct dta
DTA { /* 128 Data Transfer Buffer in Search */
BYTE resvd[21]; /* First - Search Next format */
BYTE fattr;
WORD ftime;
WORD fdate;
LONG fsize;
BYTE fname[13];
};
/************************************************************************/
/* */
/* The following structure is initialized by the COMMAND.COM */
/* kernel via a call to MS_S_COUNTRY. It is needed for */
/* date/time conversions and directory displays... */
/* */
/************************************************************************/
#define INTERNAT struct internat
INTERNAT {
WORD dt_fmt; /* 0=MM/DD/YY 1=DD/MM/YY 2=YY/MM/DD */
BYTE currcy[5]; /* currency symbol + nulls */
BYTE d1000[2]; /* thousands delimiter + null */
BYTE ddecm[2]; /* decimal delimiter + null */
BYTE ddate[2]; /* date delimiter + null */
BYTE dtime[2]; /* time delimiter + null */
BYTE cflg; /* currcy sym bits: 01 trailing, 02 = spaced */
BYTE cdec; /* number of decimal places in currency */
BYTE ampm; /* 0=am/pm 1=24h clock */
BYTE internl[14];
UWORD code;
};
/* Possible values of needparam in S_CMD. */
#define PARAM_NONE 0
#define PARAM_NEEDFILE 1
#define PARAM_NEEDPATH 2
#define PARAM_NEEDDEV 3
#define PARAM_SYNTAX 4
#define PARAM_IFCONTEXT 6
#define S_CMD struct s_cmd
S_CMD {
#if defined(MWC)
BYTE *cmnd; /* ASCII command string */
CDECL VOID (* CDECL func)(BYTE *, BYTE *);
UWORD needparm; /* Pointer to Null command line msg */
WORD help_index; /* help msg index */
#else
#if defined(__WATCOMC__)
BYTE *cmnd; /* ASCII command string */
VOID CDECL (*func)(BYTE *, BYTE *);
UWORD needparm; /* Pointer to Null command line msg */
WORD help_index; /* help msg index */
#else
BYTE *cmnd; /* ASCII command string */
VOID (* CDECL func)(); /* corresponding 'C' function */
UWORD needparm; /* Pointer to Null command line msg */
WORD help_index; /* help msg index */
#endif
#endif
};
#define N_CMD struct n_cmd
N_CMD {
#if defined(MWC)
BYTE *string; /* ASCII command string */
CDECL VOID (* CDECL func)(BYTE *);
#else
#if defined(__WATCOMC__)
BYTE *string; /* ASCII command string */
VOID CDECL (*func)(BYTE *);
#else
BYTE *string; /* ASCII command string */
VOID (* CDECL func)(); /* corresponding 'C' function */
#endif
#endif
};
#if defined(CDOSTMP)
#define INVALID_DRV(drv) (drv < 0 || drv > 25 || (drv == *SYSDATB(SRCHDISK)))
#else
#define INVALID_DRV(drv) (drv < 0 || drv > 31)
#endif
/* DOS file attribute bit masks */
#define ATTR_RO 0x0001 /* file is read/only */
#define ATTR_HID 0x0002 /* file is hidden */
#define ATTR_SYS 0x0004 /* file system is system */
#define ATTR_STD (ATTR_SYS | ATTR_RO)
#define ATTR_ALL 0x0014 /* find all but labels & hidden */
#define ATTR_LBL 0x0008 /* find labels */
#define ATTR_DIR 0x0010 /* find directories, too */
#define ATTR_DEV 0x0040 /* Attribute returned for Device*/
#define STDIN 0 /* Standard Console Input Handle */
#define STDOUT 1 /* Standard Console Output Handle */
#define STDERR 2 /* Standard Error Output */
#define STDAUX 3 /* Auxilary Device Handle */
#define STDPRN 4 /* Printer Device Handle */
#define STDCON 5 /* Internal Console Handle */
#define OPEN_RO 0x0000 /* Open in Read Only */
#define OPEN_WO 0x0001 /* Open in Write Only */
#define OPEN_RW 0x0002 /* Open in Read/Write mode */
#define OPEN_DRW 0x0010 /* Deny Read/Write Access */
#define OPEN_DW 0x0020 /* Deny Write Access */
#define OPEN_DR 0x0030 /* Deny Read Access */
#define OPEN_DN 0x0040 /* Deny None */
#define OPEN_NI 0x0080 /* Prevent Child Inheriting */
#define OPEN_READ (OPEN_RO | OPEN_DW) /* Open Read Only */
#define OPEN_WRITE (OPEN_WO | OPEN_DRW) /* Open Write Only */
#define OPEN_RDWR (OPEN_RW | OPEN_DRW) /* Open Read and Write */
/*
* Set STACK to 1 to use dynamic string storage fuunction STACK
* which will reserve a any number of bytes on the stack for
* the life of the calling function. However this routine relies
* on a certain type of function exit code and cannot be used
* with all compilers
*/
#define STACK defined(MSC)
/* macros to break 'far' pointers into segment and offset components */
#define FP_OFF(__p) ((unsigned)(__p))
#define FP_SEG(__p) ((unsigned)((unsigned long)(void far*)(__p) >> 16))
/* make a far pointer from segment and offset */
#define MK_FP(__s,__o) ((void far*)(((unsigned long)(__s)<<16)|(unsigned)(__o)))

1258
COMMAND/COMMAND.MAP Normal file

File diff suppressed because it is too large Load Diff

574
COMMAND/CONFIG.C Normal file
View File

@@ -0,0 +1,574 @@
/*
; File : $Workfile: CONFIG.C$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
; ENDLOG
*/
/*
* 28 Oct 87 Always decrement the MEMSIZE field by 0x0A paragraphs to
* allow for the SAT's.
* 9 Nov 87 Recheck the login vector after detemining the specified
* drive in NETDRIVE.
* 9 Dec 87 Always display Physically Remote drives as Remote.
* 28 Jan 88 Support the CTTY command for DOS Plus command interpreter
* 27 May 88 Added string undefs.
* 15 Jun 88 DBG is now permanent.
* 23 Jun 88 Use new ONOFF function for XXX [=] ON|OFF parsing
* 29 Jun 88 Check OWNER field in ?CB for valid AUX and LIST devices
* 5 Aug 88 Let L_SET and A_SET determine the validity of a Device No.
* 12 Aug 88 Enforce default AUX and PRINTER on COM1 and LPT1 mapping
* 7 Feb 89 Support the CHCP command for DR DOS
* 14 Apr 89 cmd_chcp: Print relevant msg if ED_FILE returned
* 30 Aug 89 DR Dos idle command
* 30 Oct 89 "DEBUG is" moved to message.c (ie. non-resident)
* 6-Mar-90 Watcom C v 7.0
* 20-Sep-90 is_filechar() now takes pointer instead of byte.
* 2-Oct-90 Prevent exec of XSTOP.EXE from within STOP command
* 3-Oct-90 remove 8087 command
* 4-Oct-90 Netdrive goes CCB based
* 12-Oct-90 cmd_printer/cmd_aux removed (now part of printmap)
* 12-Oct-90 NETDRIVE now says "netdrive d: /Local" to aid Richard
* (You can save and restore state in batch files)
*/
#include "defines.h"
#include <string.h>
#if defined(MWC) && defined(strlen)
#undef strcmp /* These are defined as macros in string.h */
#undef strcpy /* which are expaneded in line under */
#undef strlen /* Metaware C. These undefs avoid this. */
#endif
#include <portab.h>
#include <mserror.h>
#if !defined(DOSPLUS)
#include <pd.h>
#include <ccpm.h>
#include <sysdat.h>
#else
#include <idle.h> /*#NOIDLE#*/
#endif
#include "command.h" /* COMMAND Definitions */
#include "support.h"
#include "dosif.h" /* DOS interface definitions */
#include "toupper.h"
#include "global.h"
/*
* USER BEWARE
*
* A process descriptor exists in both DOS Plus and Concurrent
* DOS. But is an internal Structure in DOS Plus and should only
* be used with the upmost care.
*/
#if !defined(DOSPLUS)
EXTERN PD FAR * CDECL pd; /* Far pointer to Current PD */
#endif
MLOCAL VOID setflag(cmd, msg, field, flag)
BYTE *cmd; /* Pointer to the Users Command Line */
BYTE *msg; /* Status Message String */
UWORD FAR *field; /* FAR pointer to the Flags field */
UWORD flag; /* The Flag to be updated */
{
switch(onoff(cmd)) { /* Check for "=on/off" */
case YES: /* Turn Flag ON */
*field |= flag;
break;
case NO: /* Turn Flag OFF */
*field &= ~flag;
break;
default:
if(*deblank(cmd)) /* Display an error message */
printf(MSG_ONOFF); /* for a non blank commnad */
else
printf(msg, *field & flag ? MSG_ON : MSG_OFF);
break;
}
}
/*.pa*/
#if defined(CDOSTMP)
/*
* BREAK [ON|OFF]
*/
GLOBAL VOID CDECL cmd_break(cmd)
REG BYTE *cmd;
{
setflag(cmd, MSG_BREAK, (UWORD FAR *) &pd->P_SFLAG, PSF_BREAK);
}
/*
* VERIFY [ON|OFF]
*/
GLOBAL VOID CDECL cmd_verify(cmd)
REG BYTE *cmd;
{
setflag(cmd, MSG_VERIFY, (UWORD FAR *) &pd->P_SFLAG, PSF_VERIFY);
}
#else
/*
* BREAK [ON|OFF]
*
* The break flag is emulated during by the COMMAND processor and
* only set to the users value when a program is loaded or when
* leaving COMMAND.COM using the EXIT command.
*/
GLOBAL VOID CDECL cmd_break(cmd)
REG BYTE *cmd;
{
switch(onoff(cmd)) { /* Check for "=on/off" */
case YES: /* Turn Flag ON */
break_flag = YES;
break;
case NO: /* Turn Flag OFF */
break_flag = NO;
break;
default:
if(*deblank(cmd)) /* Display an error message */
printf(MSG_ONOFF); /* for a non blank commnad */
else
printf(MSG_BREAK, break_flag ? MSG_ON : MSG_OFF);
break;
}
}
/*
* VERIFY [ON|OFF]
*/
GLOBAL VOID CDECL cmd_verify(cmd)
REG BYTE *cmd;
{
switch(onoff(cmd)) { /* Check for "=on/off" */
case YES: /* Turn Flag ON */
ms_f_verify(YES);
break;
case NO: /* Turn Flag OFF */
ms_f_verify(NO);
break;
default:
if(*deblank(cmd)) /* Display an error message */
printf(MSG_ONOFF); /* for a non blank commnad */
else
printf(MSG_VERIFY, ms_f_getverify() ? MSG_ON : MSG_OFF);
break;
}
}
#endif
#if defined(DOSPLUS)
/*
* CHCP [CodePage]
*
* CHCP displays or changes the current global codepage
*
*/
GLOBAL VOID CDECL cmd_chcp(cmd)
REG BYTE *cmd;
{
UWORD systemcp, globalcp;
WORD ret;
zap_spaces(cmd);
if(*cmd) {
if(check_num(cmd, 0, 999, &globalcp))
printf(INV_NUM);
else {
if((ret = ms_x_setcp(globalcp)) < 0)
if (ret == ED_FILE)
printf (MSG_CPNF);
else
printf(MSG_BADCP, globalcp);
}
}
else {
ms_x_getcp(&globalcp, &systemcp);
printf(MSG_CURCP, globalcp);
}
}
/*
* CTTY Device Name
*
* CTTY redirects all console output to the specified character
* device. Note CTTY will only allow a DEVICE to be specified.
*
*/
GLOBAL VOID CDECL cmd_ctty(cmd)
REG BYTE *cmd;
{
BYTE device[MAX_FILELEN];
WORD h, j;
get_filename(device, deblank(cmd), NO); /* Extract the Device Name */
FOREVER {
if((h = ms_x_open(device, OPEN_RW)) < 0)
break;
j = ms_x_ioctl(h); /* Check the user specified a */
if((j & 0x0080) == 0) { /* device or not. If a file was */
ms_x_close(h); /* Close the handle and quit */
break;
}
j |= 0x03;
ms_x_setdev(h,j);
ms_x_fdup(STDIN, h); /* Force duplicate this handle */
ms_x_fdup(STDOUT, h); /* onto STDIN, STDOUT and */
ms_x_fdup(STDERR, h); /* STDERR. */
/*
* Update the internal variables which contain the handle
* table index to be updated with the new values. So that
* all the Command Processor error messages go to the right
* device.
*/
in_handle = out_handle = psp_poke(h, 0xFF);
psp_poke(h, in_handle);
ms_x_close(h); /* Finally close the handle and */
return; /* return to the caller. */
}
crlfflg = YES; /* Display the Device Name */
printf(MSG_NEEDDEV); /* required error message and */
return; /* Terminate. */
}
/*#if 0 #NOIDLE#*/
/*
* IDLE [ON|OFF]
*/
GLOBAL VOID CDECL cmd_idle(cmd)
REG BYTE *cmd;
{
IDLE_STATE FAR *idle;
idle = ms_idle_ptr ();
if (idle->flags & IDLE_ENABLE) {
printf(MSG_DISABLED); /* say if idle is installed */
return;
}
switch(onoff(cmd)) { /* Check for "=on/off" */
case YES: /* Reset flag */
idle->flags &= ~IDLE_ON;
break;
case NO: /* Set flag */
idle->flags |= IDLE_ON;
break;
default:
if(*deblank(cmd)) /* Display an error message */
printf(MSG_ONOFF); /* for a non blank commnad */
else
printf(MSG_IDLE, idle->flags & IDLE_ON ? MSG_OFF : MSG_ON);
break;
}
}
/*#endif #NOIDLE#*/
#endif
#if defined(CDOSTMP) || defined(CDOS)
/*
* Enforce the current PRINTER and AUX mapping for LPT1 and COM1.
* Using the console number and the number of devices supported
* update the correct mapping byte in the table.
*/
#define INT17_PTR 0x0C46 /* List Mapping Table */
#define INT14_PTR 0x0C48 /* Aux Mapping Table */
MLOCAL VOID map_device(tbl, dev)
UWORD tbl;
UWORD dev;
{
UBYTE console;
tbl = *SYSDATW(tbl);
console = (UBYTE) bdos(C_GET, 0);
*SYSDATB(tbl + (*SYSDATB(tbl) * console) +1) = (BYTE) dev;
}
GLOBAL VOID CDECL cmd_stop(cmd)
REG BYTE *cmd;
{
UWORD vc_base, vc_num, pc_num, i;
struct {
UWORD pd; /* PD address */
UWORD term; /* Process termination Code */
UWORD cns; /* Console Number and Zero field*/
BYTE name[8]; /* Process Name */
} apb;
cmd = deblank(cmd); /* Get the Process Name ABORT */
if(!*cmd) { /* If no command line options */
printf(MSG_BADSTOP); /* return with syntax error */
return; /* disk based version of STOP. */
}
memset(apb.name, ' ', 8); /* Blank fill the Name Buffer */
for(i=0; i < 8 && is_filechar(cmd); cmd++, i++)
apb.name[i] = toupper(*cmd);
if(i == 0) { /* If no valid process name was */
printf(MSG_BADSTOP); /* given then return with a */
return; /* syntax error. */
}
vc_data(&vc_base, &vc_num, &pc_num);
if(check_num(cmd, 1, vc_num, &apb.cns)) {
printf(MSG_BADSTOP);
return;
}
apb.pd = 0; /* Zero Process Descriptor Field */
apb.term = 0; /* Only Abort User Process's */
apb.cns += vc_base - 1; /* Force console number base 0 */
if(bdos(P_ABORT, &apb)) /* Abort the Process */
printf(MSG_BADSTOP);
}
/*
* BANK [ON|OFF]
*/
GLOBAL VOID CDECL cmd_bank(cmd)
REG BYTE *cmd;
{
setflag(cmd, MSG_BANK, (UWORD FAR *) &pd->P_PCMFLAG, PIDF_BANK);
}
/*
* SUSPEND [ON|OFF]
*/
GLOBAL VOID CDECL cmd_suspend(cmd)
REG BYTE *cmd;
{
setflag(cmd, MSG_SUSPEND, (UWORD FAR *) &pd->P_PCMFLAG, PIDF_SUSPEND);
}
/*
* IDLE [ON|OFF]
*/
GLOBAL VOID CDECL cmd_idle(cmd)
REG BYTE *cmd;
{
setflag(cmd, MSG_IDLE, (UWORD FAR *) &pd->P_PCMFLAG, PIDF_IDLE);
}
/*
* MEMSIZE [Memory Size (Kb)]
*/
GLOBAL VOID CDECL cmd_memsize(cmd)
REG BYTE *cmd;
{
UWORD kb, mmp; /* number in kilobytes */
mmp = *SYSDATW(MMP)/64; /* Per Process Maximum in Kb */
kb = (pd->P_PCMMEM + 0x0A)/64; /* Convert to number of Kb */
zap_spaces(cmd);
if(*cmd) {
if(check_num(cmd, 0, MAX_MEMSIZE, &kb))
printf (INV_NUM);
else {
if(kb == 0 || kb > mmp) /* If MEMSIZE specified was */
kb = mmp; /* out of range or was Zero */
pd->P_PCMMEM = kb * 64 - 0x0A; /* then use the MMP */
}
}
else
printf (MSG_MEMSIZE, kb);
}
/*
* LIMSIZE [Memory Size (Kb)]
*
* This command sets the Maximum number of blocks to be allocated
* to a process using the LIM memory. The maximum field is fixed for
* Concurrent DOS XM to MAX_LIMSIZE but for Concurrent DOS 386 the
* LIMMAX field in the 386 data area is used.
*/
GLOBAL VOID CDECL cmd_limsize(cmd)
REG BYTE *cmd;
{
UWORD kb, limmax; /* number in kilobytes */
kb = pd->P_LIMMEM * 16; /* get number of kilobytes */
if(*SYSDATW(V386_PTR)) { /* If this is Concurrent DOS 386 */
if (*SYSDATW(*SYSDATW(V386_PTR) + 15)!=0xff) {
printf (MSG_LIMOFF);
return;
}
else
limmax = *SYSDATW(*SYSDATW(V386_PTR) + 18) * 16;
}
else
limmax = MAX_LIMSIZE;
zap_spaces(cmd);
if(*cmd) {
if(check_num(cmd, 0, limmax, &kb))
printf (INV_NUM);
else
pd->P_LIMMEM = (kb+15)/16;
}
else
printf (MSG_LIMSIZE, kb);
}
/*
* NETDRIVE d: [/A|/R|/L]
*
* This command displays and modifies the current "network" status
* of all physical drives currently logged in.
*
* NETDRIVE d: /R Treat as Networked Media
* NETDRIVE d: /L Treat as Local Media
* NETDRIVE [d:|/A] Display Network Status
*/
#define NETDRIVE_ALL (flags == 1) /* Display ALL */
#define NETDRIVE_LOCAL (flags & 2) /* Treat as LOCAL media */
#define NETDRIVE_REMOTE (flags & 4) /* Treat as REMOTE media*/
#define CCBLIST 0x0c3e
#define CCB_NETVEC 0x0010
GLOBAL VOID CDECL cmd_netdrive(s)
REG BYTE *s;
{
BYTE *cp;
UWORD login, network; /* Login Vector */
WORD ret; /* General purpose variable */
UWORD flags; /* Command Flags */
UWORD ccbptr; /* address of CCB */
UWORD netvec; /* address pseudo-net drive vec */
/* We bodge flags to all "/Local" and "/Remote" by making "emotc" */
/* into flags as well - we are only interested in the "alr" flags */
f_check (s, "alremotc", &flags, YES);
s = deblank(s); /* Deblank after the Flag Check */
ccbptr = *SYSDATW(CCBLIST) + 2*pd->P_CNS;
netvec = *SYSDATW(ccbptr) + CCB_NETVEC;
login = network = (UWORD) network_drvs();
login |= (UWORD) physical_drvs(); /* Physical Drive Vector */
network |= *SYSDATW(netvec); /* Logically Remote Drives */
/*
* if NETDRIVE_ALL then display the network status of all the currently
* logged in physical drives.
*/
if(NETDRIVE_ALL || !*s) {
for(ret = 0; ret < 16; ret++, login >>= 1, network >>=1)
if(login & 1L) {
printf("Netdrive %c: %s\n", ret + 'A',
network & 1 ? MSG_REMOTE : MSG_LOCAL);
}
return;
}
if(nofiles(s, ATTR_ALL, NO, NO))/* Abort if an illegal drive is */
return; /* selected. */
login &= ~((UWORD) network_drvs()); /* Invalidate Remote Drives */
ret = 1 << ddrive; /* Generate Bit vector and then */
if((login & ret) == 0) { /* check that this is a logged in */
e_check(ED_DRIVE); /* physical drive */
return;
}
if(NETDRIVE_LOCAL) {
*SYSDATW(netvec) &= ~ret; /* Local Drive */
}
else if(NETDRIVE_REMOTE) {
*SYSDATW(netvec) |= ret; /* Remote Drive */
}
else {
printf("Netdrive %c: %s\n", ddrive + 'A',
network & ret ? MSG_REMOTE : MSG_LOCAL);
}
}
#endif
#if !defined(FINAL) && !defined(DOSPLUS)
/*
* DBG [ON|OFF]
*/
GLOBAL VOID CDECL cmd_dbg(cmd)
REG BYTE *cmd;
{
setflag(cmd, MSG_DEBUG, (UWORD FAR *) &pd->P_SFLAG, PSF_DEBUG);
}
#endif
#if defined(CPM)
/*.pa*/
/*
*
*/
EXTERN UWORD user; /* Current User area */
GLOBAL VOID CDECL cmd_user(s)
REG BYTE *s;
{
if(*s && check_num(s, 0, 15, &user)) /* If command line and its not */
printf(INV_USER); /* a valid user area then invalid user */
printf(CUR_USER, user);
}
#endif

589
COMMAND/CRIT.ASM Normal file
View File

@@ -0,0 +1,589 @@
; File : $Workfile: CRIT.ASM$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
; CRIT.ASM 1.11 94/12/01 10:05:21
; Changed critical error message display so that the default message
; is 'I/O error' and that all share-related codes are converted to
; 'File sharing conflict'
;
; CRIT.ASM 1.9 93/09/10 15:56:08
; Use device driver header at BP:SI instead of AH to determine if disk/char device
; That way we get "device NETWORK" rather than "drive D" on VLM critical errors
; ENDLOG
;
; 19/Sep/88 Move the messages into a separate module
; 15/Dec/88 Critical Error messages processed by STDERR
; 06/Apr/89 DR DOS version taken from PCMODE & put in COMMAND.COM
; 10/Aug/89 Issue INT 2F's so application can give it's own error message
; 08/Sep/89 'No FCBs' message
; 02/Nov/89 abort_char etc become ABS rather than CHAR (saves a few bytes)
; 13/Nov/89 Reduced number of external messages referenced to one
; (crit_top) to aid Dual Language Support.
; 12/Feb/90 Changed code to avoid problems with double byte character sets.
; 8/Mar/90 Remove extra pair of CR/LF's that were output after error
; 20/Apr/90 DLS data into R_TEXT for Watcom C v7.0
; 9/May/90 Critical errors go to STDERR on command PSP, not current_psp
include msdos.equ
include mserror.equ
include driver.equ
;
dataOFFSET equ offset DGROUP:
PSP_XFTPTR equ es:dword ptr 34h ; from i:PSP.DEF
; Critical Error responses from the default INT 24 handler and
; the DO_INT24 routine.
;
ERR_IGNORE equ 0 ; Ignore Error
ERR_RETRY equ 1 ; Retry the Operation
ERR_ABORT equ 2 ; Terminate the Process
ERR_FAIL equ 3 ; Fail Function
;
OK_FAIL equ 00001000b ; Fail is a Valid Response
OK_RETRY equ 00010000b ; Retry is a Valid Response
OK_IGNORE equ 00100000b ; Ignore is a valid Response
OK_RIF equ 00111000b ; All Responsese are Valid
OK_RI equ 00110000b ; Retry and Ignore are Valid
OK_RF equ 00011000b ; Retry and Fail are Valid
;
;
; The following equates allow us to access the users registers
; and flags during normal system call emulation.
;
;NOTE:- The users INT21 structure is not normally available because of the
; stack switch which occurs on entry and only the general purpose
; registers are copied to the new stack.
;
dos_AX equ word ptr 0[bp]
dos_BX equ word ptr 2[bp]
dos_CX equ word ptr 4[bp]
dos_DX equ word ptr 6[bp]
dos_SI equ word ptr 8[bp]
dos_DI equ word ptr 10[bp]
dos_BP equ word ptr 12[bp]
dos_DS equ word ptr 14[bp]
dos_ES equ word ptr 16[bp]
;
;
;
ifdef CDOSTMP
DGROUP GROUP R_TEXT
R_TEXT SEGMENT byte public 'CDOS_DATA'
else
DGROUP GROUP _DATA, R_TEXT, ED_TEXT
R_TEXT SEGMENT byte public 'CDOS_DATA'
R_TEXT ENDS
_DATA SEGMENT byte public 'DATA'
endif
extrn _country:WORD
extrn __psp:WORD
ifdef DLS
TEXT_LEN equ 320 ; it needs to be this size for Japanese
Public _crit_msgs
; crit_table gives offset into crit_msgs table.
crit_table db 0 ; (00) Write to Read Only Disk
db 2 ; (01) Unknown Unit
db 4 ; (02) Drive Not Ready
db 2 ; (03) Unknown Command
db 6 ; (04) Data Error (CRC)
db 2 ; (05) Bad Request Length Structure
db 8 ; (06) Seek Error
db 10 ; (07) Unknown Media Type
db 12 ; (08) Sector Not Found
db 14 ; (09) Printer Out Of Paper
db 2 ; (0A) Write Fault
db 2 ; (0B) Read Fault
db 2 ; (0C) General Failure
db 16 ; (0D) File Sharing Error
db 16 ; (0E) Locking Error
db 18 ; (0F) FCB Unavailable
_crit_msgs dw TEXT_LEN ; size of this message buffer
crit_top dw 0,0,0,0,0,0,0,0,0,0
msg_crlf dw 0
readmsg dw 0
writemsg dw 0
drivemsg dw 0
charmsg dw 0
abort_char dw 0
abort_msg dw 0
retry_char dw 0
retry_msg dw 0
ignore_char dw 0
ignore_msg dw 0
fail_char dw 0
fail_msg dw 0
prompt_msg dw 0
dw 0 ; end of list
public _crit_text
_crit_text db TEXT_LEN dup(?) ; message text is placed here
CRIT_LEN equ $-crit_top
else
extrn msg0:byte, msg2:byte, msg3:byte, msg4:byte
extrn msg6:byte, msg7:byte, msg8:byte
extrn msg20:byte, msg21:byte, msg22:byte
crit_top dw offset DGROUP:msg0 ; (00) Write to Read Only Disk
dw offset DGROUP:msg3 ; (01) Unknown Unit
dw offset DGROUP:msg2 ; (02) Drive Not Ready
dw offset DGROUP:msg3 ; (03) Unknown Command
dw offset DGROUP:msg4 ; (04) Data Error (CRC)
dw offset DGROUP:msg3 ; (05) Bad Request Length Structure
dw offset DGROUP:msg6 ; (06) Seek Error
dw offset DGROUP:msg7 ; (07) Unknown Media Type
dw offset DGROUP:msg8 ; (08) Sector Not Found
dw offset DGROUP:msg21 ; (09) Printer Out Of Paper
dw offset DGROUP:msg3 ; (0A) Write Fault
dw offset DGROUP:msg3 ; (0B) Read Fault
dw offset DGROUP:msg3 ; (0C) General Failure
dw offset DGROUP:msg20 ; (0D) File Sharing Error
dw offset DGROUP:msg20 ; (0E) Locking Error
dw offset DGROUP:msg22 ; (0F) FCB Unavailable
Extrn msg_crlf:byte
Extrn readmsg:byte, writemsg:byte, drivemsg:byte, charmsg:byte
Extrn abort_char:byte, abort_msg:byte
Extrn retry_char:byte, retry_msg:byte
Extrn ignore_char:byte, ignore_msg:byte
Extrn fail_char:byte, fail_msg:byte, prompt_msg:byte
endif
ifndef CDOSTMP
_DATA ends
ED_TEXT SEGMENT para public 'CDATA'
endif
assume cs:DGROUP, ds:nothing, es:nothing, ss:nothing
;
; This is the default critical error handler which will prompt
; the user with an error message and wait for a response. This handler
; is usually replaced by the DOS application
;
; +++++++++++++++++++++++++++++++
; Int 24 - Critical Error Handler
; +++++++++++++++++++++++++++++++
;
; INT 24 Critical Error:-
; On Entry:- AH/7 0 = Disk Device
; AH/5 0 = IGNORE is an Invalid Response
; AH/4 0 = RETRY in an Invalid Response
; AH/3 0 = FAIL is an Invalid Response
; AH/2-1 00= DOS Area
; 01= File Allocation Table
; 10= Directory
; 11= Data
; AH/0 0 = Read, 1 = Write
;
; AL Failing Disk Drive if AH/7 == 0
; BP:SI Device Header Control Block
; DI High Byte DRNET server (inverted, CDOS only)
; Low Byte Error Code
;
; On Exit:- AL 0 = IGNORE Error
; 1 = RETRY the Operation
; 2 = TERMINATE using INT 23
; 3 = FAIL the current DOS function
;
;
Public com_criterr
com_criterr:
;
; This is called by the int24 handler 'critical_error', in CSTART.ASM.
;
sti
cld
push es
push ds
push bp
push di
push si
push dx
push cx
push bx
push ax
mov bp,sp
mov ah,MS_P_GETPSP
int DOS_INT ; Get PSP into DS
mov ds,cs:__psp
mov al,ds:byte ptr 1ah ; use COMMAND STDERR for Console INPUT
mov ah,al ; and OUTPUT
mov es,bx
lds bx,PSP_XFTPTR ; Get the handle table pointer
push word ptr [bx] ; Save the current Values
mov word ptr [bx],ax
push cs
pop ds ; DS == CS
call i24_crlf ;output carriage return - line feed
mov ah,MS_F_ERROR
xor bx,bx
int DOS_INT ; Get extended error code
mov cx,ax ; Get the Real Error Code (ie INT21/59)
mov bx,0Fh ; assume FCB unavailable
cmp al,-(ED_NOFCBS) ; if FCB exhausted/closed then generate
je int24_e10 ; a more appropriate error message
dec bx
dec bx
cmp al,-(ED_SHAREFAIL) ; check for sharing failure which
je int24_e10 ; is forced to be a DRIVE NOT READY
cmp al,-(ED_NOLOCKS) ; check for sharing buffer overflow
je int24_e10
dec bx ; BX = 0Ch, default error
mov ax,dos_DI ; get the REAL error code
cmp ax,0Eh ; is it a sensible value ?
ja int24_e10 ; no, return GENERAL FAILURE
xchg ax,bx ; yes, use it
int24_e10:
call int24_errmsg ; print out the offending error msg
call i24_crlf ; Print CR/LF
;
; This section of the Critical Error handler prints the correct
; prompt repeatedly until the user responds with a correct
; response. This value is returned to the PCMODE.
;
i24_query:
ifdef DLS
mov dx,abort_msg ; Print "Abort" as this is always
else
mov dx,dataOFFSET abort_msg ; Print "Abort" as this is always
endif
call i24_print ; a valid response
test bh,OK_RETRY
jz i24_q10 ; Display ", Retry" if RETRY
ifdef DLS
mov dx,retry_msg ; is a Valid Response
else
mov dx,dataOFFSET retry_msg ; is a Valid Response
endif
call i24_print
i24_q10:
test bh,OK_IGNORE
jz i24_q20 ; Display ", Ignore" if IGNORE
ifdef DLS
mov dx,ignore_msg ; is a valid response
else
mov dx,dataOFFSET ignore_msg ; is a valid response
endif
call i24_print
i24_q20:
test bh,OK_FAIL
jz i24_q30 ; Display ", Fail" if FAIL is
ifdef DLS
mov dx,fail_msg ; a valid response
else
mov dx,dataOFFSET fail_msg ; a valid response
endif
call i24_print
i24_q30:
ifdef DLS
mov dx,prompt_msg
else
mov dx,dataOFFSET prompt_msg
endif
call i24_print
mov ah,MS_C_FLUSH ; Clear type ahead buffer
mov al,MS_C_READ ; and then get a character
int DOS_INT
; In case we get double byte characters...
; If we had access to the dbcs_lead() routine (in the non-resident code)
; we could test for a double byte character and consume the second byte.
; Since we can't do this I have used the following code, which simply
; consumes and displays all bytes in type-ahead buffer.
push ax ; save first character received
dbcs_loop:
mov ah, MS_C_RAWIO ; char in type-ahead buffer?
mov dl, 0FFh
int DOS_INT
jz dbcs_exit ; no - exit loop
mov dl, al
mov ah, MS_C_WRITE ; yes - display char
int DOS_INT
jmp short dbcs_loop ; loop until type-ahead buffer empty
dbcs_exit:
pop ax ; restore the first character
; Check that character lies in the range 'a' <= ch <= 'z' before anding it
; with 5Fh to uppercase it (incase the character is a DBCS lead byte).
cmp al, 'a' ; ch < 'a' ?
jb uc_done ; yes - skip upper casing
cmp al, 'z' ; ch > 'z' ?
ja uc_intl ; yes - may be intl
and al, 5Fh ; uppercase ch
jmp short uc_done
uc_intl:
cmp al, 80h ; international char?
jb uc_done
; ch >= 80h -- call international routine
UCASE equ 18 ; offset of dword ptr to uppercase func
call dword ptr [_country+UCASE]
uc_done:
push ax
call i24_crlf
pop dx
mov ah,bh
xor al,al ; AL == 0 IGNORE Error
ifdef DLS
test ah,OK_IGNORE
jz i24_q40 ; Is it a valid response
mov bx,ignore_char
cmp dl,[bx]
else
test bh,OK_IGNORE
jz i24_q40 ; Is it a valid response
cmp dl,ignore_char
endif
jz i24_exit
i24_q40:
inc ax ; AL == 1 RETRY Function
ifdef DLS
test ah,OK_RETRY
jz i24_q50 ; Is it a valid response
mov bx,retry_char
cmp dl,[bx]
else
test bh,OK_RETRY
jz i24_q50 ; Is it a valid response
cmp dl,retry_char
endif
jz i24_exit
i24_q50:
inc ax ; AL == 2 ABORT Process
ifdef DLS
mov bx,abort_char
cmp dl,[bx]
else
cmp dl,abort_char
endif
jz i24_exit
inc ax ; AL == 3 FAIL Function
ifdef DLS
test ah,OK_FAIL
jz i24_query_again ; Is it a valid response
mov bx,fail_char
cmp dl,[bx]
jz i24_exit
i24_query_again:
mov bh, ah ; restore valid response bit set
jmp i24_query
else
test bh,OK_FAIL
jz i24_query_again ; Is it a valid response
cmp dl,fail_char
jz i24_exit
i24_query_again:
jmp i24_query
endif
i24_exit:
mov dos_AX,ax
mov ah,MS_P_GETPSP
int DOS_INT ; Get PSP into DS
mov es,bx
lds bx,PSP_XFTPTR ; the handle table pointer
pop word ptr [bx] ; Restore the original handle Values
pop ax
pop bx
pop cx
pop dx
pop si
pop di
pop bp
pop ds
pop es
ret
int24_errmsg:
; Print out an appropriate error message (eg. "Drive not ready")
; Call INT 2F functions in case system extentions (eg. CDROM) wish to
; give another error message.
push bx ; save error code
push cx
mov ax,500h
int 2fh ; query if user msg handler installed
cmp al,0ffh ; yes if FF returned
pop cx
pop bx
jne int24_errmsg10
push bx
push cx
if 0
; the DOS 3 way
mov ah,5 ; OK. now we ask for a message
mov al,cl ; with the error code in AL
else
; the DOS 5 way
mov ax,501h
mov bx,cx
endif
int 2fh ; ES:DI -> msg
pop cx
pop bx
jc int24_errmsg10 ; did they give us a msg ?
mov si,di ; ES:SI -> msg
mov ah,MS_C_WRITE ; write it out
int24_errmsg1:
lods es:byte ptr [si] ; get a character
test al,al ; until end of an ASCIIZ string
jz int24_errmsg2
mov dl,al ; character into DL
int DOS_INT ; write it
jmp short int24_errmsg1
int24_errmsg2:
mov bx,dos_AX ; get original AX for Abort/Retry etc
ret
int24_errmsg10:
; No-one wants to supply a message - we'd better generate one ourselves
;
xor bh,bh
ifdef DLS
mov bl, crit_table[bx]
else
shl bx,1
endif
mov dx, crit_top[bx]
call i24_print
mov bx,dos_AX ; Get the Original AX
test bh,01h ; check to see if the error occured
jnz prwrite ; while reading or writing
ifdef DLS
mov dx,readmsg ; print 'reading'
else
mov dx,dataOFFSET readmsg ; print 'reading'
endif
jmp short prread
prwrite:
ifdef DLS
mov dx,writemsg ; print 'writing'
else
mov dx,dataOFFSET writemsg ; print 'writing'
endif
prread:
call i24_print ; appropriate string
;; test bh,80h
mov es,dos_BP ; ES:SI = driver header
test es:DH_ATTRIB[si],DA_CHARDEV
jz disk_error ; Was this a DISK error
;
; For Character Device errors print the failing Device Name
; and then prompt the user for a valid response.
;
;character_error:
ifdef DLS
mov dx,charmsg
else
mov dx,dataOFFSET charmsg
endif
call i24_print
;; mov es,dos_BP ; ES:SI = driver header
mov cx,8 ; Print the 8 Character device name
char_name:
mov dl,DH_NAME[si] ; Get the next character and
mov ah,MS_C_WRITE ; display on the console
int DOS_INT
inc si ; Increment the character pointer
loop char_name ; and Loop till complete name displayed
ret ; Now query the user
;
; For DISK errors print the failing drive code and then
; prompt the user for a valid response.
;
disk_error:
ifdef DLS
mov dx,drivemsg ;
else
mov dx,dataOFFSET drivemsg ;
endif
call i24_print ; print 'drive d'
mov dl,bl ; Get the Drive Code
add dl,'A' ; convert drive to ascii
mov ah,MS_C_WRITE ; print the drive
int DOS_INT
ret
i24_crlf:
ifdef DLS
mov dx,msg_crlf
else
mov dx,dataOFFSET msg_crlf
endif
i24_print:
mov ah,MS_C_WRITESTR
int DOS_INT
ret
ifdef CDOSTMP
R_TEXT ENDS
else
ED_TEXT ENDS
endif
end

3837
COMMAND/CSTART.ASM Normal file

File diff suppressed because it is too large Load Diff

756
COMMAND/CSUP.ASM Normal file
View File

@@ -0,0 +1,756 @@
; File : $Workfile: CSUP.ASM$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
; ENDLOG
;
; 28 Jan 88 Change the validation check for the environment. Now we look
; for a valid DOS Memory Descriptor which is owned by the
; Command Processor.
; 12 May 88 Handle Empty environments correctly (Thanks DesqView)
; 26 May 88 ach _stack is only defined for MSC
; 16 Jun 88 Support TURBO C Stack checking and enable CHKSTK for
; MSC only.
; 26 Aug 88 Make the Minimum Stack Address Public
; 14 Apr 89 Make heap_top public
; 14 Jul 89 Move findeof to assembler
; 09 Oct 90 Write heap_size() to return remaining bytes on heap at
; any given instance
;
_DLS_INCLS_ equ 1
include message.def
CGROUP GROUP _TEXT
DGROUP GROUP _DATA
codeOFFSET equ offset CGROUP:
dataOFFSET equ offset DGROUP:
STACKSLOP equ 128 ; Minimum Stack Size
jmps macro label ; Define a Macro to generate the
jmp SHORT label ; Short Jmp instruction
endm
_TEXT SEGMENT byte public 'CODE'
ifdef MWC
extrn longjmp:near ; MetaWare does not preceed library
LONGJUMP equ longjmp ; functions with an UNDERSCORE
else
ifdef WATCOMC
extrn longjmp_:near
LONGJUMP equ longjmp_
else
extrn _longjmp:near
LONGJUMP equ _longjmp
endif
endif
assume cs:CGROUP, ds:DGROUP, es:nothing
public _debug
_debug proc near
out 0fdh,al
ret
_debug endp
; Environment manipulation routines
; =================================
;
;BOOLEAN env_entry(BYTE *buf, WORD entry);
;
; Copy entry number ENTRY into the buffer BUF. Return FAILURE
; if ENTRY cannot be found.
;
assume cs:CGROUP, ds:DGROUP, es:nothing
public _env_entry
_env_entry PROC near
cld
push bp
mov bp,sp
push ds
push si
push es
push di
call get_env ; Get the environment segment
mov es,bx ; Initialise ES
mov cx,ax ; Check the environment size - 1
dec cx ; and FFFF bytes if no env header
xor di,di ; Offset to start scaning for data
xor ax,ax
env_e10:
cmp es:byte ptr [di],al ; Is this a Null string
jz env_fail ; Then hit the end of the search
cmp word ptr 06[bp],0 ; Is this the entry required
jz env_e20
repnz scasb ; Scan for the next zero byte
jcxz env_fail ; and abort if out of space
dec word ptr 06[bp] ; Decrement the string count
jmps env_e10
env_e20: ; Found the correct entry now copy
mov si,di ; Get the correct source offset
push ds
push es
pop ds
pop es
mov di,04[bp]
env_e30:
lodsb
stosb ; Copy byte through AL
or al,al
jnz env_e30 ; and check for end of string
jmps env_exit
_env_entry ENDP
;BOOLEAN env_scan(BYTE *key, BYTE *buf);
;
; Scan through the environment searching for the string KEY then copy
; the result into buffer.
Public _env_scan
_env_scan PROC near
cld
push bp
mov bp,sp
push ds
push si
push es
push di
call get_env ; Get the environment segment
call get_key ; Find the key
jz env_fail ; Abort if an error occurs
add di,dx ; Add the Key length and just copy
mov si,di ; The key definition into the
push ds ; Buffer
push es
pop ds
pop es
mov di,06[bp]
env_s10:
lodsb
stosb ; Copy byte through AL
or al,al
jnz env_s10 ; and check for end of string
jmps env_exit
_env_scan ENDP
;
; Environment handling exit routines
env_err: ; Invalid Environment descriptor
mov ax,-1 ; return with -1
jmps env_ret
env_fail: ; Environment fail the operation
mov ax,1 ; requested has failed.
jmps env_ret
env_exit:
xor ax,ax
env_ret PROC near
pop di
pop es
pop si
pop ds
pop bp
ret
env_ret ENDP
;
;BOOLEAN env_del(BYTE *key);
; Delete the entry matching KEY from the environment and return
; success or failure
;
public _env_del
_env_del PROC near
cld
push bp
mov bp,sp
push ds
push si
push es
push di
call get_env ; Get the environment segment
jz env_err ; Stop if not the real thing
call get_key ; Find the key
jz env_fail ; Abort if an error occurs
mov ds,bx ; Point DS at the environment
mov si,di ; save the destination offset
add di,dx ; and search for the end of this string
xor ax,ax
mov cx,-1
repnz scasb ; Now search for the end of string
xchg si,di ; Swap the source and destination
env_d10:
cmp al,[si] ; Is this the end of the environment
jz env_d20 ; Yes so terminate
env_d15:
lodsb
stosb ; Copy through AL checking for the end
or al,al
jnz env_d15 ; of the environment after each
jmps env_d10 ; end of string.
env_d20:
stosw ; Force 0 word to be placed here to
jmps env_exit ; terminate the string
_env_del ENDP
;BOOLEAN env_ins(BYTE *str);
; Insert the string at the end of the current environment
; checking if there is enough room to save the string.
;
public _env_ins
_env_ins PROC near
cld
push bp
mov bp,sp
push ds
push si
push es
push di
call get_env ; Get the environment segment
jz env_err ; and its segment
sub ax,2 ; Decrement the size of the env
mov cx,ax ; to make sure we can store a 0
xor ax,ax ; word terminator
mov es,bx ; Find the end of the current env
xor di,di
env_i10:
repnz scasb
jcxz env_fail
cmp al,es:byte ptr [di]
jnz env_i10
cmp di,1 ; Is this an empty Environment
jnz env_i25 ; No. If yes then start from offset 0
dec di
env_i25:
mov bx,di ; Save the starting address of string
mov si,04[bp] ; Get the source string offset
env_i20:
lodsb
stosb ; Copy the String until a zero byte
or al,al ; then add the environment terminator
loopnz env_i20
mov es:word ptr [di],0
jz env_exit ; Exit with no error if the string is
mov es:byte ptr [bx],00 ; terminated correctly otherwise remove
jmps env_fail ; all traces of this string and exit
_env_ins ENDP
;
page
;
; Returns environment size in Bytes in AX or zero if error
; and BX is the Environment segment.
;
get_env PROC near
push es
mov dx,__psp ; Get the Current PSP in DX
mov es,dx ; and point ES at Our PSP
xor ax,ax ; and assume an error condition
mov bx,es:002Ch ; get environment segment
dec bx ; Check for memory descriptor
mov es,bx
inc bx
cmp es:byte ptr 00h,'M' ; Byte 0 must contains either an
jz get_e10 ; M or Z and the DMD be owned by
cmp es:byte ptr 00h,'Z' ; the Command Processor
jnz get_e20
get_e10:
if 0
cmp dx,es:word ptr 1h ; Is this "OUR" PSP if not then
jnz get_e20 ; complain bitterly.
endif
mov ax,es:word ptr 3h ; Get the memory size in paragraphs
shl ax,1 ; convert to size in bytes and exit.
shl ax,1
shl ax,1
shl ax,1
get_e20:
pop es
or ax,ax
ret
get_env ENDP
;
; enter this search function with BX == ENVIRONMENT SEGMENT
; 04[bp] == Key string offset
; On exit AX == 0 Failure
; else DX is Key string Length
; DI is Offset
;
get_key PROC near
push ds
pop es ; Calculate the length of the
mov di,04[bp] ; key by scaning the string for
mov al,0 ; a zero byte.
mov cx,-1
repnz scasb
neg cx ; CX is the length of the sting + 2
sub cx,2
mov dx,cx ; Save the count in dx
xor ax,ax
mov es,bx ; Point ES at the environment
xor di,di ; and start from the begining
get_k10:
push di ; Save incase this is a match
mov cx,dx ; Get the string length
mov si,04[bp] ; and offset and check for a match
repz cmpsb
jnz get_k20 ; No match so get the next string
pop di ; This is the starting offset
or ax,-1 ; All ok
ret
get_k20:
pop cx ; Throw away the old DI
mov cx,-1 ; Set the count to maximum
repnz scasb ; and search for the end of the string
cmp al,es:[di] ; exit with error if this is the end
jnz get_k10 ; of the environment
ret
get_key ENDP
page
assume cs:CGROUP, ds:DGROUP, es:nothing
ifdef MSC
;
;
; STACK(WORD) allocates memory from the C STACK if at any stage
; the stack grows to within STACKSLOP of the top of the heap this
; function executes a LONGJUMP using the BREAK_ENV buffer. This will
; terminate any internal function.
;
PUBLIC _stack
_stack:
pop bx ; Get the return address
pop cx ; and the number of bytes required
add cx,1 ; Force CX to be a even value to
and cx,not 1 ; ensure the stack is word aligned
mov ax,sp ; Get the Stack
sub ax,STACKSLOP ; Include STACKSLOP
sub ax,cx ; Subtract requested buffer
jc heap_error ; Exit with error if Carry
cmp ax,heap_top ; Are we still above the heap
jc heap_error ; No
pop ax ; Get possible saved SI
pop dx ; Get possible saved DI
push dx ; Restore the stack to its
push ax ; origibnal format
sub sp,cx ; All OK so update SP
push dx ; Save possible saved DI
push ax ; Save possible saved SI
mov ax,sp ; Return pointer
add ax,4 ; Adjust pointer for saved SI/DI
push cx ; Restore the entry parameter
jmp bx ; and return to the caller
endif
;
; HEAP_GET(WORD) allocates memory from the C HEAP if at any stage
; the heap grows to within STACKSLOP of the base of the stack this
; function executes a LONGJUMP using the BREAK_ENV buffer. This will
; terminate any internal function.
;
PUBLIC _heap_get
_heap_get:
push bp
mov bp,sp
mov ax,heap_top
add ax,04[bp] ; Add in the requested value
jc heap_error ; Exit with error if Carry
sub bp,STACKSLOP ; now check that the stack
cmp bp,ax ; is still well above the
jc heap_error ; heap.
mov stack_min,ax ; Update the Stack Minimum Variable
add stack_min,STACKSLOP ; for the CHKSTK routine
xchg ax,heap_top ; Return the existing heap top
pop bp ; and update the local variable
ret ; with the new value.
heap_error:
mov dx,3 ; Return the Heap Overflow error
push dx
mov ax,dataOFFSET _break_env ; using the JMP_BUF
push ax
call LONGJUMP ; We are never coming back
;
; HEAP_SIZE returns the size remaining on the C HEAP
;
PUBLIC _heap_size
_heap_size:
push bp
mov bp,sp
mov ax,heap_top
add ax,STACKSLOP
sub bp,ax
jnc noprobs
xor bp,bp
noprobs:
mov ax,sp
pop bp
ret
;
; HEAP() can only return a pointer to the top of the C Heap
; and is identical in function to HEAP_GET(0) except that no
; overflow checking is required and the calling overhead is
; minimal.
;
PUBLIC _heap
_heap:
mov ax,heap_top
ifndef FINAL
ifdef WATCOMC
add ax,STACKSLOP ; we'd better do some stack checking
cmp ax,sp ; 'cause the C isn't doing it now
jae heap_error
sub ax,STACKSLOP
endif
endif
ret
;
; VOID HEAP_SET(BYTE *) forces the heap to a specified value
;
PUBLIC _heap_set
_heap_set:
push bp
mov bp,sp
mov ax,04[bp] ; Get the new value for the HEAP
cmp ax,dataOFFSET _end ; base and check against the
jnb heap_s10 ; absolute base. If below then force
mov ax,dataOFFSET _end ; the heap to the absolute base
heap_s10:
mov heap_top,ax
mov stack_min,ax
add stack_min,STACKSLOP
pop bp
ret
page
ifdef MSC
;
; This is our own Stack Check routine which is called on
; entry to every C routine. AX contains the number of bytes
; to be reseved on the stack.
;
PUBLIC __chkstk
__chkstk:
pop cx ; Get the Return Address
mov bx,sp ; Calculate the new SP value
sub bx,ax ; AX contains the number of bytes
jc OVERFLOW@ ; to reserve.
cmp bx,stack_min ; Check we are still above the heap
jc OVERFLOW@ ; No !!! Help
mov sp,bx ; Update the Stack pointer
jmp cx ; Its Ok lets go back
endif
ifdef WATCOMC
Public __STK
__STK:
cmp ax,sp
jnb OVERFLOW@
sub ax,sp
neg ax
cmp ax,stack_min
jbe OVERFLOW@
ret
endif
ifdef TURBOC
Public OVERFLOW@ ; Public TURBOC Stack Error Handler
endif
OVERFLOW@:
mov dx,2 ; Return the STACK Overflow error
push dx
mov ax,dataOFFSET _break_env ; using the JMP_BUF
push ax
call LONGJUMP ; We are never coming back
; MLOCAL UWORD CDECL findeof(s, count) /* find ^Z in buffer */
; BYTE FAR *s; /* buffer to search */
; UWORD count; /* # of bytes in buffer */
; {
; REG UWORD i;
;
; i = count;
; while(i) { /* Scan through the data */
; if(*s++ == (BYTE) 0x1A) /* looking for a Control-Z */
; break;
; i--;
; }
;
; return (count - i);
; }
PUBLIC _findeof
_findeof:
push bp ; establish a stack frame
mov bp,sp ; s dword 04[bp]
push es ; count word 08[bp]
push di ; save important registers
cld
les di,4[bp] ; load up the pointer
mov cx,8[bp] ; and the count
mov al,26 ; looking for EOF mark in the buffer
repne scasb ; scan until we find one
jne findeof10 ; if we do find one
inc cx ; then include it in the count
findeof10:
mov ax,8[bp] ; we wanted this many
sub ax,cx ; subtract any past EOF
pop di
pop es
pop bp
ret
ifdef DLS
public _my_dls_init
; void my_dls_init()
;extrn _dls_init:near
;extrn _dls_get_table:near
_my_dls_init proc far
push ds
push cs
pop ds
call _dls_init
mov ax,1
push ax
call _dls_get_table
pop ax
pop ds
ret
_my_dls_init endp
public _copy_crit_msgs
_copy_crit_msgs proc near
extrn _crit_msgs:word
extrn _crit_text:byte
push ds
push es
push di
push si
push ds
pop es
push cs
pop ds
mov si,_dls_table
add si,msg0
mov si,[si]
mov di,offset DGROUP:_crit_text
add di,2
mov bx,offset DGROUP:_crit_msgs
add bx,2
mov cx,24
ccm_loop1:
mov es:[bx],di
add bx,2
ccm_loop2:
lodsb
stosb
cmp al,'$'
jne ccm_loop2
loop ccm_loop1
pop si
pop di
pop es
pop ds
ret
_copy_crit_msgs endp
public _copy_rld_msgs
_copy_rld_msgs proc near
extrn _rld_msgs:word
extrn _rld_text:byte
push ds
push es
push di
push si
push ds
pop es
push cs
pop ds
mov si,_dls_table
add si,reload_msgs
mov si,[si]
mov di,offset DGROUP:_rld_text
add di,2
mov bx,offset DGROUP:_rld_msgs
add bx,2
mov cx,3
crm_loop1:
mov es:[bx],di
add bx,2
crm_loop2:
lodsb
stosb
cmp al,0
jne crm_loop2
loop crm_loop1
pop si
pop di
pop es
pop ds
ret
_copy_rld_msgs endp
public _dls_msg1
; char *dls_msg1(int)
_dls_msg1:
push bp
mov bp,sp
push bx
mov ax,4[bp]
shl ax,1
mov bx,cs:_dls_table
add bx,ax
mov ax,cs:[bx]
pop bx
pop bp
ret
endif ; ifdef DLS
public _dos_parse_filename
_dos_parse_filename proc near
push bp
mov bp,sp
sub sp,30h
push es
push ds
pop es
lea di,-30h[bp]
mov si,4[bp]
mov ax,2901h
int 21h
mov ah,0
pop es
add sp,30h
pop bp
ret
_dos_parse_filename endp
public _flush_cache
_flush_cache proc near
push si
push di
push bp
mov ax,4a10h
mov bx,0
mov cx,0edch
int 2fh
cmp ax,6756h ; NWCACHE
je do_flush
cmp ax,0BABEh ; SmartDrive
jne skip_flush
do_flush:
mov ax,4a10h
mov bx,1
mov cx,0edch
int 2fh
skip_flush:
pop bp
pop di
pop si
ret
_flush_cache endp
_TEXT ENDS
page
_DATA SEGMENT byte public 'DATA'
extrn __psp:word
extrn _end:byte
extrn _break_env:word
extrn low_seg:word
public stack_min
public heap_top
ifdef TURBOC
public ___brklvl ; Turbo C does an inline check against
___brklvl label word ; ___brklvl and id SP < ___brklvl then
endif ; it calls OVERFLOW@
stack_min dw dataOFFSET _end + STACKSLOP
heap_top dw dataOFFSET _end ; Current Top of Heap
_DATA ENDS
END

38
COMMAND/DEFINES.H Normal file
View File

@@ -0,0 +1,38 @@
/*
; File : $Workfile$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
*/
#define DOSPLUS 1
#define BETA 1

116
COMMAND/DOS.H Normal file
View File

@@ -0,0 +1,116 @@
/*
; File : $Workfile$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
*/
#define MS_P_TERMCPM 0x00
#define MS_C_READ 0x01
#define MS_C_WRITE 0x02
#define MS_A_READ 0x03
#define MS_A_WRITE 0x04
#define MS_L_WRITE 0x05
#define MS_C_RAWIO 0x06
#define MS_C_RAWIN 0x07
#define MS_C_NOECHO 0x08
#define MS_C_WRITESTR 0x09
#define MS_C_READSTR 0x0a
#define MS_C_STAT 0x0b
#define MS_C_FLUSH 0x0c
#define MS_DRV_ALLRESET 0x0d
#define MS_DRV_SET 0x0e
#define MS_F_OPEN 0x0f
#define MS_F_CLOSE 0x10
#define MS_F_SFIRST 0x11
#define MS_F_SNEXT 0x12
#define MS_F_DELETE 0x13
#define MS_F_READ 0x14
#define MS_F_WRITE 0x15
#define MS_F_MAKE 0x16
#define MS_F_RENAME 0x17
#define MS_DRV_GET 0x19
#define MS_F_DMAOFF 0x1a
#define MS_DRV_ALLOC 0x1b
#define MS_DRV_ALLOCSPEC 0x1c
#define MS_F_READRAND 0x21
#define MS_F_WRITERAND 0x22
#define MS_F_SIZE 0x23
#define MS_F_RANDREC 0x24
#define MS_S_SETINT 0x25
#define MS_P_MKPSP 0x26
#define MS_F_READBLK 0x27
#define MS_F_WRITEBLK 0x28
#define MS_F_PARSE 0x29
#define MS_T_GETDATE 0x2a
#define MS_T_SETDATE 0x2b
#define MS_T_GETTIME 0x2c
#define MS_T_SETTIME 0x2d
#define MS_F_VERIFY 0x2e
#define MS_F_DMAGET 0x2f
#define MS_S_BDOSVER 0x30
#define MS_P_TERMKEEP 0x31
#define MS_S_BREAK 0x33
#define MS_S_GETINT 0x35
#define MS_DRV_SPACE 0x36
#define MS_S_COUNTRY 0x38
#define MS_X_MKDIR 0x39
#define MS_X_RMDIR 0x3a
#define MS_X_CHDIR 0x3b
#define MS_X_CREAT 0x3c
#define MS_X_OPEN 0x3d
#define MS_X_CLOSE 0x3e
#define MS_X_READ 0x3f
#define MS_X_WRITE 0x40
#define MS_X_UNLINK 0x41
#define MS_X_LSEEK 0x42
#define MS_X_CHMOD 0x43
#define MS_X_IOCTL 0x44
#define MS_X_DUP 0x45
#define MS_X_DUP2 0x46
#define MS_X_CURDIR 0x47
#define MS_M_ALLOC 0x48
#define MS_M_FREE 0x49
#define MS_M_SETBLOCK 0x4a
#define MS_X_EXEC 0x4b
#define MS_X_EXIT 0x4c
#define MS_X_WAIT 0x4d
#define MS_X_FIRST 0x4e
#define MS_X_NEXT 0x4f
#define MS_F_GETVERIFY 0x54
#define MS_F_DATETIME 0x56
#define MS_F_ERROR 0x59
#define MS_X_MKTEMP 0x5a
#define MS_X_MKNEW 0x5b
#define MS_F_LOCK 0x5c
#define MS_P_GETPSP 0x62

2907
COMMAND/DOSIF.ASM Normal file

File diff suppressed because it is too large Load Diff

181
COMMAND/DOSIF.H Normal file
View File

@@ -0,0 +1,181 @@
/*
; File : $Workfile$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
*/
EXTERN VOID CDECL debug(VOID);
#define EXT_SUBST 1
#if defined(MSC) || defined(MWC) || defined(TURBOC) || defined(__WATCOMC__)
#define bdos _BDOS
EXTERN BYTE * CDECL heap_get(WORD);
EXTERN BYTE * CDECL heap(VOID);
EXTERN VOID CDECL heap_set(BYTE *);
#endif
#if !defined(MWC)
EXTERN BYTE * CDECL stack(WORD);
#endif
#if defined(CPM)
#define ms_drv_space cpm_drv_space
#define ms_x_mkdir cpm_x_mkdir
#define ms_x_rmdir cpm_x_rmdir
#define ms_x_creat cpm_x_creat
#define ms_x_open cpm_x_open
#define ms_x_close cpm_x_close
#define far_read cpm_far_read
#define far_write cpm_far_write
#define ms_x_read cpm_x_read
#define ms_x_write cpm_x_write
#define ms_x_unlink cpm_x_unlink
#define ms_x_lseek cpm_x_lseek
#define ms_x_ioctl cpm_x_ioctl
#define ms_x_chmod cpm_x_chmod
#define ms_x_curdir cpm_x_curdir
#define ms_x_first cpm_x_first
#define ms_x_next cpm_x_next
#define ms_x_rename cpm_x_rename
#define ms_x_datetime cpm_x_datetime
#endif
EXTERN VOID CDECL ms_drv_set(WORD);
EXTERN WORD CDECL ms_drv_get(VOID);
EXTERN WORD CDECL ms_drv_space(UWORD, UWORD * ,UWORD *, UWORD *);
EXTERN WORD CDECL ms_x_chdir(BYTE *);
EXTERN WORD CDECL ms_x_mkdir(BYTE *);
EXTERN WORD CDECL ms_x_rmdir(BYTE *);
EXTERN WORD CDECL ms_s_country(INTERNAT *);
EXTERN BYTE CDECL toupper(BYTE);
EXTERN WORD CDECL ms_x_creat(BYTE *, UWORD);
EXTERN WORD CDECL ms_x_open(BYTE *, UWORD);
EXTERN WORD CDECL ms_x_close(WORD);
EXTERN WORD CDECL ms_x_fdup(UWORD, UWORD);
EXTERN WORD CDECL ms_x_unique(BYTE *, UWORD);
EXTERN WORD CDECL far_read(UWORD, BYTE FAR *, UWORD);
EXTERN WORD CDECL far_write(UWORD, BYTE FAR *, UWORD);
EXTERN WORD CDECL ms_x_read(UWORD, BYTE *, UWORD);
EXTERN WORD CDECL ms_x_write(UWORD, BYTE *, UWORD);
EXTERN WORD CDECL ms_x_unlink(BYTE *);
EXTERN LONG CDECL ms_x_lseek(UWORD, LONG, UWORD);
EXTERN WORD CDECL ms_x_ioctl(UWORD);
EXTERN WORD CDECL ms_x_setdev(UWORD, UBYTE);
EXTERN WORD CDECL ms_x_chmod(BYTE *, UWORD, UWORD);
EXTERN WORD CDECL ms_x_curdir(UWORD, BYTE *);
EXTERN WORD CDECL ms_x_wait(VOID);
EXTERN WORD CDECL ms_x_first(BYTE *, UWORD, DTA *);
EXTERN WORD CDECL ms_x_next(DTA *);
EXTERN WORD CDECL ms_x_rename(BYTE *, BYTE *);
EXTERN WORD CDECL ms_x_datetime(BOOLEAN, UWORD, UWORD *, UWORD *);
EXTERN WORD CDECL ms_settime(SYSTIME *);
EXTERN WORD CDECL ms_setdate(SYSDATE *);
EXTERN VOID CDECL ms_gettime(SYSTIME *);
EXTERN VOID CDECL ms_getdate(SYSDATE *);
EXTERN VOID FAR * CDECL ms_idle_ptr(VOID);
EXTERN WORD CDECL ms_switchar(VOID);
EXTERN WORD CDECL ms_x_expand(BYTE *, BYTE *);
EXTERN VOID CDECL mem_alloc(BYTE FAR * NEAR *, UWORD *, UWORD, UWORD);
EXTERN VOID CDECL mem_free (BYTE FAR * NEAR *);
EXTERN UWORD CDECL psp_poke(UWORD, UWORD); /* Poke Handle Table */
EXTERN BOOLEAN CDECL dbcs_expected(VOID);
EXTERN BOOLEAN CDECL dbcs_lead(BYTE);
#if !defined(CDOSTMP)
EXTERN UWORD CDECL ioctl_ver(VOID);
EXTERN VOID CDECL ms_x_exit();
EXTERN VOID CDECL ms_f_verify(BOOLEAN);
EXTERN BOOLEAN CDECL ms_set_break(BOOLEAN);
EXTERN WORD CDECL ms_f_getverify(VOID);
EXTERN WORD CDECL ms_f_parse (BYTE *, BYTE *, UBYTE);
EXTERN WORD CDECL ms_f_delete (BYTE *);
EXTERN VOID CDECL restore_term_addr();
#endif
#if defined(DOSPLUS)
EXTERN WORD CDECL ms_x_getcp(UWORD *, UWORD *);
EXTERN WORD CDECL ms_x_setcp(UWORD);
/*EXTERN VOID CDECL hiload_set(BOOLEAN);*/
EXTERN WORD CDECL get_upper_memory_link(VOID);
EXTERN VOID CDECL set_upper_memory_link(WORD);
EXTERN WORD CDECL get_alloc_strategy(VOID);
EXTERN VOID CDECL set_alloc_strategy(WORD);
EXTERN WORD CDECL alloc_region();
EXTERN VOID CDECL free_region(WORD);
#endif
EXTERN BOOLEAN CDECL env_entry(BYTE *, UWORD); /* CSUP.ASM */
EXTERN BOOLEAN CDECL env_scan(BYTE *, BYTE *); /* CSUP.ASM */
EXTERN BOOLEAN CDECL env_del(BYTE *); /* CSUP.ASM */
EXTERN BOOLEAN CDECL env_ins(BYTE *); /* CSUP.ASM */
#if defined(CDOSTMP)
#define system bdos /* Call the BDOS Function for Common routines */
#else
#define system msdos /* Call the MSDOS Function for Common routines */
EXTERN WORD CDECL msdos();
EXTERN WORD CDECL readline(BYTE *);
#endif
#if defined(CDOSTMP) || defined(CDOS)
EXTERN VOID CDECL vc_data(UWORD *, UWORD *, UWORD *);
EXTERN WORD CDECL bdos(WORD,...);
#endif
#if !defined(DOSPLUS) || !defined(EXT_SUBST)
EXTERN ULONG CDECL physical_drvs(VOID);
EXTERN ULONG CDECL network_drvs(VOID);
#endif
#if !defined(EXT_SUBST)
EXTERN ULONG CDECL logical_drvs(VOID);
EXTERN UWORD CDECL pdrive(UWORD);
#endif
EXTERN UWORD CDECL exec(BYTE *, UWORD, BYTE *, BOOLEAN);
#if !defined(DOSPLUS)
EXTERN UWORD FAR * CDECL sysdat(UWORD);
#define SYSDATW(x) sysdat(x)
#define SYSDATB(x) ((UBYTE FAR *) sysdat(x))
#endif
EXTERN BOOLEAN CDECL physical_drive(WORD);
EXTERN BOOLEAN CDECL logical_drive(WORD);
EXTERN BOOLEAN CDECL network_drive(WORD);
EXTERN BOOLEAN CDECL extended_error(VOID);
EXTERN WORD CDECL get_lines_page(VOID);
EXTERN WORD CDECL get_scr_width(VOID);
EXTERN WORD CDECL novell_copy(WORD,WORD,ULONG);

59
COMMAND/DRIVER.EQU Normal file
View File

@@ -0,0 +1,59 @@
; File : $DRIVER.EQU$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
; ENDLOG
; Device driver header offsets.
DH_NEXT equ es:dword ptr 0 ; Dword Pointer to Next DEV
DH_NEXTOFF equ es:word ptr 0 ; Offset of next device
DH_NEXTSEG equ es:word ptr 2 ; Segment of next device
DH_ATTRIB equ es:word ptr 4 ; device attribute bits
DH_STRATEGY equ es:word ptr 6 ; offset of strategy entry
DH_INTERRUPT equ es:word ptr 8 ; offset of interupt entry
DH_NAME equ es:byte ptr 10 ; 8-BYTE device name
DA_CHARDEV equ 8000h ; 1=character device, 0=block device
DA_IOCTL equ 4000h ; device supports IOCTL string I/O
DA_NONIBM equ 2000h ; dosen't require FAT for login
DA_OTILBSY equ 2000h ; supports "output until busy"
DA_REMOVE equ 0800h ; supports "removable media" check
DA_QUERY equ 0080h ; supports query ioctl
DA_GETSET equ 0040h ; supports 3.2 level functionality
DA_SPECIAL equ 0010h ; fast console ouput via INT 29h
DA_ISCLK equ 0008h ; device is current clock device
DA_ISNUL equ 0004h ; device is NUL device (reserved)
DA_BIGDRV equ 0002h ; supports > 65535 sector per drive
DA_ISCOT equ 0002h ; device is standard output device
DA_ISCIN equ 0001h ; device is standard input device
FASTCON_INT equ 29h ; fast console output interrupt

88
COMMAND/F52DATA.DEF Normal file
View File

@@ -0,0 +1,88 @@
; File : $F52DATA.DEF$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
; The following equates define the Data Area whose address is
; returned by function 52.
;
F52_BCBBUF equ es:dword ptr -0008h[bx] ; current buffer
F52_BCBOFF equ es:word ptr -0008h[bx] ; current buffer
F52_BCBSEG equ es:word ptr -0006h[bx] ; current buffer
F52_DMDROOT equ es:word ptr -0002h[bx] ; Memory Descriptor Root (Seg)
F52_DDSCPTR equ es:dword ptr 0000h[bx] ; DDSC Table Address
F52_FILEPTR equ es:dword ptr 0004h[bx] ; File Handle Table Address
F52_CLKDEV equ es:dword ptr 0008h[bx] ; Clock Device Header
F52_CONDEV equ es:dword ptr 000Ch[bx] ; Console Device Header
F52_SECSIZE equ es:word ptr 0010h[bx] ; Maximum Sector Size
F52_BUFINFOPTR equ es:dword ptr 0012h[bx] ; Buffer Info pointer
F52_PATHPTR equ es:dword ptr 0016h[bx] ; Path Control Table Address
F52_PATHOFF equ es:word ptr 0016h[bx]
F52_PATHSEG equ es:word ptr 0018h[bx]
F52_FCBPTR equ es:dword ptr 001Ah[bx] ; FCB Table Address
; equ es:word ptr 001Eh[bx] ; #Entries in FCB Table
F52_PHYDRV equ es:byte ptr 0020h[bx] ; Last Physical Drive
F52_LASTDRV equ es:byte ptr 0021h[bx] ; Last Logical Drive
F52_DEVROOT equ es:dword ptr 0022h[bx] ; Root Device Header
F52_JOINDRV equ es:byte ptr 0034h[bx] ; Number of JOIN'd drives
F52_SETVER equ es:dword ptr 0037h[bx] ; SETVER table pointer
F52_NUM_BUF equ es:word ptr 003Fh[bx] ; number of disk buffers
F52_READ_AHEAD equ es:word ptr 0041h[bx] ; size of read-ahead buffer
F52_BOOTDRV equ es:byte ptr 0043h[bx] ; boot drive (1-26)
F52_CPU_TYPE equ es:byte ptr 0044h[bx] ; 01 if >= 386SX
F52_EXT_MEM equ es:word ptr 0045h[bx] ; Int 15h, AH=87h
F52_BUF_INFO equ es:dword ptr 0047h[bx] ; points at Buffer Info
F52_HMAFLAG equ es:byte ptr 0053h[bx] ; 1 if buffers in HMA
F52_DEBLOCK equ es:word ptr 0056h[bx] ; deblock if buffers in HMA
F52_DMD_UPPER equ es:word ptr 0066h[bx] ; upper memory chain
F52_SHARE_STUB equ es:dword ptr 006Ah[bx] ; Share Stub Entries*15
;DRDOS Specific
DRDOS_CRITSTUBS equ es:word ptr 0000h[bx] ; Offset of end of instance data
DRDOS_HIST1CTL equ es:word ptr 0004h[bx] ; History 1 Control
DRDOS_HIST2CTL equ es:word ptr 0006h[bx] ; History 2 Control
DRDOS_HISTFLG equ es:byte ptr 0008h[bx] ; History Buffer Flag
DRDOS_DUAL_LANG equ es:byte ptr 0009h[bx] ; Utils Dual Language Support
DRDOS_CUR_LANG equ es:byte ptr 000Ah[bx] ; Current Language
DRDOS_EXT_MEM equ es:word ptr 000Bh[bx] ; Total Extended Memory
DRDOS_HIMEM_ROOT equ es:word ptr 0010h[bx] ; High memory chain
DRDOS_ENVSEG equ es:word ptr 0012h[bx] ; Seg of environment
DRDOS_DMD_BASE equ es:word ptr 0016h[bx] ; base memory freed at
DRDOS_DMD_UPPER equ es:word ptr 0018h[bx] ; upper memory chain
DRDOS_MACHINE_ID equ es:word ptr 001Ah[bx] ; local machine ID
DRDOS_COUNTRY_FILE equ es:word ptr 001Eh[bx] ; offset of filename
DRDOS_HASHOFF equ es:word ptr 0020h[bx] ; fastopen hash root
DRDOS_HASHSEG equ es:word ptr 0022h[bx] ; pointer
DRDOS_HASHMAX equ es:word ptr 0024h[bx] ; max # dir entries
DRDOS_DEBLOCK equ es:word ptr 0026h[bx] ; himem deblock buffer
DRDOS_INT2F equ es:word ptr 002Ch[bx] ; internal Int 2F hook

168
COMMAND/GLOBAL.C Normal file
View File

@@ -0,0 +1,168 @@
/*
; File : $Workfile: GLOBAL.C$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
*/
/*
Date Comments
--------- ------------------------------------------------------------
21 Mar 88 Modify IN_PIPE and OUT_PIPE to be compatible with NOVELL 2.1
21 Sep 88 Change the default ECHO state to be ON.
*/
#include "defines.h"
#include <portab.h>
#include <command.h> /* Command Definitions */
/*.pa*/
/* General Purpose Variables */
GLOBAL BOOLEAN initflg = FALSE; /* Initial Load Flag */
GLOBAL WORD drive = 0; /* Current default Drive */
GLOBAL UWORD echoflg = ECHO_ON; /* Current Echo Status */
GLOBAL BOOLEAN crlfflg = FALSE; /* No CR/LF Required before prompt */
/* Batch File Processing Variables */
GLOBAL UWORD batchflg = 0; /* Currently processing Batch File */
/* FOR Sub-Command Variables */
GLOBAL BOOLEAN for_flag = NO; /* FOR Sub-command Active */
/* I/O Redirection Control */
GLOBAL WORD in_flag = NULL;
GLOBAL WORD out_flag = NULL;
GLOBAL UWORD in_handle = NULL;
GLOBAL UWORD out_handle = NULL;
/* Pipe Control Data */
GLOBAL BOOLEAN pipe_out = NO; /* Activate Pipe output */
GLOBAL BOOLEAN pipe_in = NO; /* Activate Pipe Input */
GLOBAL BOOLEAN preserve_pipe = NO;
/*
* The following two structures are patched by NOVELL Version 2.1
* to force the creation of the PIPE files in the current sub-directory
* rather than the root. The '/' is patched to a '.' by the NET3.COM
* program.
*/
GLOBAL BYTE out_pipe[64] = "_:/\0_______.___"; /* Output Pipe Name "x:\filename.ext" */
GLOBAL BYTE *old_pipe; /* old pipe file name */
GLOBAL BYTE pathchar[] = "\\"; /* The current path character. This */
/* can be accessed as a byte using */
/* "*pathchar" or as a string using */
/* "pathchar". */
#if defined(PASSWORD)
GLOBAL BYTE pwdchar[] = ";"; /* The Password delimiter. Which can*/
/* be accessed in the same way as */
/* pathchar. */
#endif
GLOBAL BYTE switchar[] = "/"; /* Switch Character */
GLOBAL BYTE dotdot[] = "..";
GLOBAL BYTE d_slash_stardotstar[] = "x:\\*.*";
GLOBAL BOOLEAN back_flag = FALSE; /* Execute a BackGround Task*/
GLOBAL BOOLEAN execed;
GLOBAL WORD page_len = 24; /* Screen Length */
GLOBAL WORD page_wid = 80; /* Screen Width */
GLOBAL BOOLEAN break_flag;
GLOBAL BOOLEAN err_flag;
GLOBAL UWORD err_ret;
GLOBAL WORD ddrive;
GLOBAL BYTE FAR *bufaddr; /* External Copy Buffer Address */
GLOBAL UWORD bufsize; /* External Copy Buffer Size */
GLOBAL INTERNAT country; /* country data structure */
#if defined(DOSPLUS)
GLOBAL BYTE *ftypes[] = { "com", "exe", "bat", NULL};
#else
GLOBAL BYTE *ftypes[] = { "cmd", "com", "exe", "bat", NULL};
#endif
/* This pointer is initialized by the Startup routine and */
/* would be defined there if I could persuade the compiler */
/* to reference it correctly. */
#if !defined(DOSPLUS)
#include <pd.h> /* PD Structure Declaration */
GLOBAL PD FAR * CDECL pd = (PD FAR *) 1234L; /* FAR pointer to our PD */
GLOBAL WORD CDECL sysdat_seg = 0; /* Segment address of SYSDAT */
#endif
GLOBAL BOOLEAN c_option = FALSE;
GLOBAL BOOLEAN k_option = FALSE;
GLOBAL BOOLEAN n_option = FALSE;
GLOBAL BOOLEAN allow_pexec = FALSE;
GLOBAL BYTE FAR *gp_far_buff = 0L;
GLOBAL BYTE FAR *show_file_buf = 0L;
GLOBAL UWORD FAR *parent_psp;
GLOBAL UWORD save_parent;
#define FCONTROL struct fcc
MLOCAL FCONTROL {
BOOLEAN sflg; /* FOR File Search Flag */
DTA search; /* FOR Search structure */
BYTE *files; /* FOR File list */
BYTE *cmd; /* FOR Command Line */
BYTE forvar; /* FOR variable char */
};
#define BCONTROL struct bcc
GLOBAL BCONTROL {
BCONTROL FAR *bcontrol; /* Previous Batch Control Structure */
BOOLEAN eof; /* End of File Flag */
LONG offset; /* Offset in BATCH file */
LONG ret_offset[4]; /* return offset from gosub */
BYTE *batcmd; /* Batch File Input parameters */
UWORD batshift; /* Shift Offset */
BYTE batfile[MAX_PATHLEN]; /* Batch File Name */
UWORD stream; /* Stream for this Batch File */
FCONTROL *fcontrol; /* Pointer to previous FOR command */
BYTE *heap_start; /* Heap pointer before extra bytes */
WORD heap_size; /* are added to shift to segment */
BYTE save_area[1]; /* boundary. - EJH */
} FAR *batch, FAR *batch_save; /* Master Batch Control Stucture */
WORD global_link;
WORD global_strat;
WORD global_in_hiload = 0;
WORD hidden_umb[10];

155
COMMAND/GLOBAL.H Normal file
View File

@@ -0,0 +1,155 @@
/*
; File : $Workfile$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
*/
EXTERN BOOLEAN initflg; /* Initial Load Flag */
EXTERN WORD drive; /* Current default Drive */
EXTERN UWORD echoflg; /* Current Echo Status */
EXTERN BOOLEAN crlfflg; /* CR/LF Required before prompt */
/* Batch File Processing Variables */
EXTERN UWORD batchflg; /* Currently processing Batch File */
/* FOR Sub-Command Variables */
EXTERN BOOLEAN for_flag; /* FOR Sub-command Active */
/* I/O Redirection Control */
EXTERN WORD in_flag;
EXTERN WORD out_flag;
EXTERN WORD in_handle;
EXTERN WORD out_handle;
/* Pipe Control Data */
EXTERN BOOLEAN pipe_out; /* Activate Pipe output */
EXTERN BOOLEAN pipe_in; /* Activate Pipe Input */
EXTERN BOOLEAN preserve_pipe;
EXTERN BYTE out_pipe[]; /* Output Pipe Name "x:\filename.ext" */
EXTERN BYTE *old_pipe;
EXTERN BYTE pathchar[]; /* The current path character. This */
/* can be accessed as a byte using */
/* "*pathchar" or as a string using */
/* "pathchar". */
#if defined(PASSWORD)
EXTERN BYTE pwdchar[]; /* The Password delimiter. Which can*/
/* be accessed in the same way as */
/* pathchar. */
#endif
EXTERN BYTE switchar[]; /* Switch Character */
EXTERN BYTE dotdot[];
EXTERN BYTE d_slash_stardotstar[];
EXTERN BOOLEAN back_flag; /* Execute a BackGround Task*/
EXTERN BOOLEAN execed; /* were we execed from DOS? */
EXTERN WORD page_len; /* Screen Length */
EXTERN WORD page_wid; /* Screen Width */
EXTERN BOOLEAN break_flag;
EXTERN BOOLEAN err_flag;
EXTERN UWORD err_ret;
EXTERN WORD ddrive;
EXTERN BYTE FAR *bufaddr; /* External Copy Buffer Address */
EXTERN UWORD bufsize; /* External Copy Buffer Size */
EXTERN INTERNAT country; /* country data structure */
#define JAPAN 81 /* country.code for Japan */
EXTERN BYTE *ftypes[];
EXTERN BOOLEAN c_option;
EXTERN BOOLEAN k_option;
EXTERN BOOLEAN n_option;
EXTERN BOOLEAN allow_pexec;
EXTERN BYTE FAR *gp_far_buff;
EXTERN BYTE FAR *show_file_buf;
EXTERN UWORD FAR *parent_psp;
EXTERN UWORD save_parent;
#define FCONTROL struct fcc
FCONTROL {
BOOLEAN sflg; /* FOR File Search Flag */
DTA search; /* FOR Search structure */
BYTE *files; /* FOR File list */
BYTE *cmd; /* FOR Command Line */
BYTE forvar; /* FOR variable char */
};
#define BCONTROL struct bcc
BCONTROL {
BCONTROL FAR *bcontrol; /* Previous Batch Control Structure */
BOOLEAN eof; /* End of File Flag */
LONG offset; /* Offset in BATCH file */
LONG ret_offset[4]; /* return offset from gosub */
BYTE *batcmd; /* Batch File Input parameters */
UWORD batshift; /* Shift Offset */
BYTE batfile[MAX_PATHLEN]; /* Batch File Name */
UWORD stream; /* Stream for this Batch File */
FCONTROL *fcontrol; /* Pointer to previous FOR command */
BYTE *heap_start; /* Heap pointer before extra bytes */
WORD heap_size; /* are added to shift to segment */
BYTE save_area[1]; /* boundary. - EJH */
};
EXTERN BCONTROL FAR *batch;
EXTERN BCONTROL FAR *batch_save;
EXTERN WORD global_link;
EXTERN WORD global_strat;
EXTERN WORD global_in_hiload;
EXTERN WORD hidden_umb[10];
/*
* File type index's returned by the Concurrent DOS P_PATH function
* and emulated in the findfile function. DOSPLUS does not search
* for the ".CMD" and therefore uses a modified index.
*
*/
#if defined(DOSPLUS) || defined(NETWARE)
#define COM_FILETYPE 0 /* MicroSoft .COM */
#define EXE_FILETYPE 1 /* MicroSoft .EXE */
#define BAT_FILETYPE 2 /* Batch File */
#else
#define CMD_FILETYPE 0 /* Digital Reseach .CMD */
#define COM_FILETYPE 1 /* MicroSoft .COM */
#define EXE_FILETYPE 2 /* MicroSoft .EXE */
#define BAT_FILETYPE 3 /* Batch File */
#endif
#define ERROR_EXIT 0x0200 /* Exit because of a Critical Error */
#define BREAK_EXIT 0x0100 /* Exit because of a Control-Break */

198
COMMAND/HELP.H Normal file
View File

@@ -0,0 +1,198 @@
/*
; File : $Workfile$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
*/
#include <portab.h>
#if !defined(CDOS) || defined(NOHELP)
#define HELP_AND NULL
#define HELP_APPEND NULL
#define HELP_ASSIGN NULL
#define HELP_BANK NULL
#define HELP_BREAK NULL
#define HELP_CALL NULL
#define HELP_CHDIR NULL
#define HELP_CLS NULL
#define HELP_COM NULL
#define HELP_COPY NULL
#define HELP_DATE NULL
#define HELP_DBG NULL
#define HELP_DEL NULL
#define HELP_DELQ NULL
#define HELP_DIR NULL
#define HELP_ECHO NULL
#define HELP_ECHOERR NULL
#define HELP_ERAQ NULL
#define HELP_ERASE NULL
#define HELP_EXIT NULL
#define HELP_FOR NULL
#define HELP_GOTO NULL
#define HELP_IDLE NULL
#define HELP_IF NULL
#define HELP_INPUT NULL
#define HELP_INPUTC NULL
#define HELP_LIMSIZE NULL
#define HELP_MEMSIZE NULL
#define HELP_MKDIR NULL
#define HELP_MORE NULL
#define HELP_NETDRIVE NULL
#define HELP_NETOFF NULL
#define HELP_NETON NULL
#define HELP_OR NULL
#define HELP_PATH NULL
#define HELP_PAUSE NULL
#define HELP_PAUSEERR NULL
#define HELP_PROMPT NULL
#define HELP_REM NULL
#define HELP_RENAME NULL
#define HELP_RMDIR NULL
#define HELP_SET NULL
#define HELP_SHIFT NULL
#define HELP_STOP NULL
#define HELP_SUBST NULL
#define HELP_SUSPEND NULL
#define HELP_TIME NULL
#define HELP_TRUENAME NULL
#define HELP_TYPE NULL
#define HELP_VER NULL
#define HELP_VERIFY NULL
#define HELP_VOL NULL
#else
#define HELP_AND help_and
#define HELP_APPEND help_append
#define HELP_ASSIGN help_assign
#define HELP_BANK help_bank
#define HELP_BREAK help_break
#define HELP_CALL help_call
#define HELP_CHDIR help_chdir
#define HELP_CLS help_cls
#define HELP_COM help_com
#define HELP_COPY help_copy
#define HELP_DATE help_date
#define HELP_DBG help_dbg
#define HELP_DEL help_del
#define HELP_DELQ help_delq
#define HELP_DIR help_dir
#define HELP_ECHO help_echo
#define HELP_ECHOERR help_echoerr
#define HELP_ERAQ help_eraq
#define HELP_ERASE help_erase
#define HELP_EXIT help_exit
#define HELP_FOR help_for
#define HELP_GOTO help_goto
#define HELP_IDLE help_idle
#define HELP_IF help_if
#define HELP_INPUT help_input
#define HELP_INPUTC help_inputc
#define HELP_LIMSIZE help_limsize
#define HELP_MEMSIZE help_memsize
#define HELP_MKDIR help_mkdir
#define HELP_MORE help_more
#define HELP_NETDRIVE help_netdrive
#define HELP_NETOFF help_netoff
#define HELP_NETON help_neton
#define HELP_OR help_or
#define HELP_PATH help_path
#define HELP_PAUSE help_pause
#define HELP_PAUSEERR help_pauseerr
#define HELP_PROMPT help_prompt
#define HELP_REM help_rem
#define HELP_RENAME help_rename
#define HELP_RMDIR help_rmdir
#define HELP_SET help_set
#define HELP_SHIFT help_shift
#define HELP_STOP help_stop
#define HELP_SUBST help_subst
#define HELP_SUSPEND help_suspend
#define HELP_TIME help_time
#define HELP_TRUENAME help_truename
#define HELP_TYPE help_type
#define HELP_VER help_ver
#define HELP_VERIFY help_verify
#define HELP_VOL help_vol
EXTERN BYTE help_and [];
EXTERN BYTE help_append [];
EXTERN BYTE help_assign [];
EXTERN BYTE help_bank [];
EXTERN BYTE help_break [];
EXTERN BYTE help_call [];
EXTERN BYTE help_chdir [];
EXTERN BYTE help_cls [];
EXTERN BYTE help_com [];
EXTERN BYTE help_copy [];
EXTERN BYTE help_date [];
EXTERN BYTE help_dbg [];
EXTERN BYTE help_del [];
EXTERN BYTE help_delq [];
EXTERN BYTE help_dir [];
EXTERN BYTE help_echo [];
EXTERN BYTE help_echoerr[];
EXTERN BYTE help_eraq [];
EXTERN BYTE help_erase [];
EXTERN BYTE help_exit [];
EXTERN BYTE help_for [];
EXTERN BYTE help_goto [];
EXTERN BYTE help_idle [];
EXTERN BYTE help_if [];
EXTERN BYTE help_input [];
EXTERN BYTE help_inputc [];
EXTERN BYTE help_limsize[];
EXTERN BYTE help_memsize[];
EXTERN BYTE help_mkdir [];
EXTERN BYTE help_more [];
EXTERN BYTE help_netdrive[];
EXTERN BYTE help_netoff [];
EXTERN BYTE help_neton [];
EXTERN BYTE help_or [];
EXTERN BYTE help_path [];
EXTERN BYTE help_pause [];
EXTERN BYTE help_pauseerr [];
EXTERN BYTE help_prompt [];
EXTERN BYTE help_rem [];
EXTERN BYTE help_rename [];
EXTERN BYTE help_rmdir [];
EXTERN BYTE help_set [];
EXTERN BYTE help_shift [];
EXTERN BYTE help_stop [];
EXTERN BYTE help_subst [];
EXTERN BYTE help_suspend[];
EXTERN BYTE help_time [];
EXTERN BYTE help_truename [];
EXTERN BYTE help_type [];
EXTERN BYTE help_ver [];
EXTERN BYTE help_verify [];
EXTERN BYTE help_vol [];
#endif

62
COMMAND/HELPSTUB.ASM Normal file
View File

@@ -0,0 +1,62 @@
; File : $Workfile: HELPSTUB.ASM$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
; ENDLOG
; HELPSTUB.ASM
;
; The word value defined here is the first word in the help segment.
; It is a pointer to the message table which contains pointers to the
; actual messages.
include txhelp.def
CHELP GROUP _HELP
_HELP SEGMENT para public 'HELP'
ifdef DLS
extrn _pri_table:word
extrn _alt_table:word
dw offset CHELP:_pri_table
dw offset CHELP:_alt_table
else
extrn _single_table:word
help_list dw offset CHELP:_single_table
endif
_HELP ENDS
END

52
COMMAND/IDLE.H Normal file
View File

@@ -0,0 +1,52 @@
/*
; File : $Workfile$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
*/
#include <portab.h>
#define IDLE_COMMAND 0x0001
#define IDLE_DOSFUNC 0x0002
#define IDLE_ON 0x4000
#define IDLE_ENABLE 0x8000
typedef struct _idle_state {
WORD count;
WORD max;
WORD flags;
VOID FAR *vec;
WORD delay;
WORD reload;
WORD indos;
} IDLE_STATE;

151
COMMAND/LOGIN.H Normal file
View File

@@ -0,0 +1,151 @@
/*
; File : $Workfile$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
*/
/* the following constants are in alphabetical order */
#define ABORT_CODE 0
#define CR 0xd
#define CMNT_LGTH 32
#define DAY_LGTH 4
#define ENABLED 0xff
#define EOF_CHAR 0x1a
#define ENTER 0xd
#define FLAGS 0x0056 /* addr. Flag Table */
#define FNAME_LEN 12
#define LDATE_LGTH 11
#define LF 0xa
#define MAX_LINE 128
#define MXWIDTH 19
#define OKAY 0
#define PROCNAME_LGTH 12
#define ROOT_DIR "\\"
#define SEEK_END 2
#define STIME_LGTH 8
#define SUPERUSER 0
#define SUPERUSERSTR "0000"
#define TYPE_PAGE (flags & 1)
#define TIME_LGTH 8
#define USERID_LGTH 4
#define OWN_PROT_READ 0x0008 /* Owner */
#define OWN_PROT_WRITE 0x0004
#define OWN_PROT_EXEC 0x0002
#define OWN_PROT_DEL 0x0001
#define GRP_PROT_READ 0x0080 /* Group */
#define GRP_PROT_WRITE 0x0040
#define GRP_PROT_EXEC 0x0020
#define GRP_PROT_DEL 0x0010
#define WOR_PROT_READ 0x0800 /* World */
#define WOR_PROT_WRITE 0x0400
#define WOR_PROT_EXEC 0x0200
#define WOR_PROT_DEL 0x0100
#define ALL_PROT_READ 0x0888 /* Owner + Group + World */
#define ALL_PROT_WRITE 0x0444
#define ALL_PROT_EXEC 0x0222
#define ALL_PROT_DEL 0x0111
#define ALL_PROT 0x0FFF /* all groups, all access modes */
#define AUTOEXEC_BAT "AUTOEXEC.BAT"
EXTERN USER_INF_ENTRY user_info;
EXTERN UWORD station; /* station number */
EXTERN UBYTE login_enabled(VOID); /* LOGIN.C */
EXTERN VOID login_station(VOID); /* LOGIN.C */
EXTERN VOID login_consoles(VOID); /* LOGIN.C */
EXTERN VOID lock_station(VOID); /* LOGIN.C */
EXTERN WORD get_user_info(UWORD); /* LOGIN.C */
EXTERN VOID time_stamp(UBYTE**,UBYTE*,UBYTE*); /* LOGIN.C */
EXTERN VOID wait_for_enter(BOOLEAN); /* LOGIN.C */
EXTERN WORD logout_user(VOID); /* LOGIN.C */
EXTERN VOID login_save_initial_state(VOID); /* LOGIN.C */
EXTERN BOOLEAN chk_mail(VOID); /* LOGIN.C */
EXTERN UWORD aschextobin(BYTE*); /* LOGIN.C */
EXTERN WORD sysnamecmp(UBYTE*,UBYTE*); /* LOGIN.C */
EXTERN VOID logout(VOID); /* LOGIN.C */
EXTERN VOID lock(VOID); /* LOGIN.C */
EXTERN VOID cmd_logout(VOID); /* LOGIN.C */
EXTERN VOID cmd_lock(VOID); /* LOGIN.C */
EXTERN VOID logevent(UBYTE*,WORD); /* LOGIN.C */
EXTERN BOOLEAN logged_in(VOID); /* LOGIN.C */
EXTERN BOOLEAN waiting_on_login(VOID); /* LOGIN.C */
EXTERN UWORD get_user_on_station(VOID); /* LOGIN.C */
EXTERN BOOLEAN lock_requested(VOID); /* LOGIN.C */
EXTERN VOID error_code(UWORD); /* COM.C */
EXTERN VOID show_file(UWORD, BOOLEAN); /* COMINT.C */
EXTERN VOID CDECL cmd_set(BYTE *); /* COMINT.C */
EXTERN VOID CDECL cmd_cd(BYTE *); /* COMINT.C */
EXTERN VOID CDECL cmd_exit(BYTE *); /* COMINT.C */
EXTERN BOOLEAN CDECL ansi_screen(VOID); /* LOGINASM.ASM */
EXTERN VOID CDECL get_sys_path(UBYTE*); /* LOGINASM.ASM */
EXTERN UBYTE CDECL background_proc(VOID); /* LOGINASM.ASM */
EXTERN VOID CDECL disable_vc_switch(); /* LOGINASM.ASM */
EXTERN VOID CDECL enable_vc_switch(); /* LOGINASM.ASM */
EXTERN VOID CDECL disable(VOID); /* LOGINASM.ASM */
EXTERN VOID CDECL enable(VOID); /* LOGINASM.ASM */
EXTERN UWORD CDECL s_memory(UWORD); /* LOGINASM.ASM */
EXTERN UWORD CDECL heap_size(VOID); /* CSUP.ASM */
EXTERN PD FAR * CDECL pd; /* Far pointer to Current PD */
EXTERN UWORD CDECL sysdat_seg; /* System Data Page */
EXTERN UWORD _psp; /* PSP Segment */
struct qpb {
UWORD internal0;
UWORD id;
UWORD internal1;
UWORD *buffer;
UBYTE name[9];
} ;
struct apd {
UWORD pd; /* PD address */
UWORD term; /* Process termination Code */
UWORD cns; /* Console Number and Zero field*/
BYTE name[PROCNAME_LGTH+1]; /* Process Name */
};

122
COMMAND/MAKE.BAT Normal file
View File

@@ -0,0 +1,122 @@
@ECHO off
SET TOOLS=C:\TOOLS
SET MASM=%TOOLS%\MASM.EXE
SET WATCOM=%TOOLS%\WATCOMC
SET WATCOMH=%TOOLS%\WATCOMC\H
SET WCG=%WATCOM%\BIN\WCGL.EXE
SET WCC=%WATCOM%\BIN\WCC.EXE
SET LINK510=%TOOLS%\LINK.EXE
SET BCC20=%TOOLS%\BCC.EXE
SET BCC20H=%TOOLS%\BCC20\H
REM
REM YOU SHOULD NOT HAVE TO CHANGE ANYTHING BELOW THIS LINE.
REM
REM Define local Caldera tools
SET LOCTOOLS=..\LTOOLS
IF NOT EXIST BIN\*.* MD BIN
REM Check if tools exist
ECHO Checking for %MASM%
if not exist %MASM% goto badtool
ECHO Checking for %WCC%
if not exist %WCC% goto badtool
ECHO Checking for %LINK510%
if not exist %LINK510% goto badtool
ECHO Checking for %BCC20%
if not exist %BCC20% goto badtool
%MASM% message,.\bin\message;
IF ERRORLEVEL 1 GOTO FAILED
%MASM% resident,.\bin\resident;
IF ERRORLEVEL 1 GOTO FAILED
%MASM% txhelp,.\bin\txhelp;
IF ERRORLEVEL 1 GOTO FAILED
%MASM% /DDOSPLUS /DWATCOMC /DPASCAL /DFINAL /MX /I.\ .\cstart.asm,.\bin\cstart.obj;
IF ERRORLEVEL 1 GOTO FAILED
%MASM% /DDOSPLUS /DWATCOMC /DPASCAL /DFINAL /MX /I.\ .\csup.asm,.\bin\csup.obj;
IF ERRORLEVEL 1 GOTO FAILED
%MASM% /DDOSPLUS /DWATCOMC /DPASCAL /DFINAL /MX /I.\ .\dosif.asm,.\bin\dosif.obj;
IF ERRORLEVEL 1 GOTO FAILED
%MASM% /DDOSPLUS /DWATCOMC /DPASCAL /DFINAL /MX /I.\ .\crit.asm,.\bin\crit.obj;
IF ERRORLEVEL 1 GOTO FAILED
%WCC% /s /DFINAL /i=. /ms /os /dWATCOMC /i=%WATCOMH% /fo.\bin\com.obj .\com.c
IF ERRORLEVEL 1 GOTO FAILED
%WCC% /s /DFINAL /i=. /ms /os /dWATCOMC /i=%WATCOMH% /fo.\bin\comint.obj .\comint.c
IF ERRORLEVEL 1 GOTO FAILED
%WCC% /s /DFINAL /i=. /ms /os /dWATCOMC /i=%WATCOMH% /fo.\bin\support.obj .\support.c
IF ERRORLEVEL 1 GOTO FAILED
%WCC% /s /DFINAL /i=. /ms /os /dWATCOMC /i=%WATCOMH% /fo.\bin\printf.obj .\printf.c
IF ERRORLEVEL 1 GOTO FAILED
%WCC% /s /DFINAL /i=. /ms /os /dWATCOMC /i=%WATCOMH% /fo.\bin\batch.obj .\batch.c
IF ERRORLEVEL 1 GOTO FAILED
%WCC% /s /DFINAL /i=. /ms /os /dWATCOMC /i=%WATCOMH% /fo.\bin\global.obj .\global.c
IF ERRORLEVEL 1 GOTO FAILED
%WCC% /s /DFINAL /i=. /ms /os /dWATCOMC /i=%WATCOMH% /fo.\bin\config.obj .\config.c
IF ERRORLEVEL 1 GOTO FAILED
%WCC% /s /DFINAL /i=. /ms /os /dWATCOMC /i=%WATCOMH% /fo.\bin\comcpy.obj .\comcpy.c
IF ERRORLEVEL 1 GOTO FAILED
ECHO -w -d -f- -K -O -X -Z -c -ms -I%BCC20H% -DMESSAGE -DDOSPLUS -zSCGROUP -zTCODE -zR_MSG > RESP1
ECHO -I.\ >> RESP1
ECHO -o.\bin\cmdlist.obj .\cmdlist.c >> RESP1
%BCC20% @resp1
IF ERRORLEVEL 1 GOTO FAILED
ECHO .\bin\cstart.obj .\bin\com.obj .\bin\csup.obj +> RESP2
ECHO .\bin\dosif.obj .\bin\comint.obj .\bin\support.obj+>> RESP2
ECHO .\bin\cmdlist.obj .\bin\printf.obj+>> RESP2
ECHO .\bin\message.obj +>> RESP2
ECHO .\bin\batch.obj .\bin\global.obj .\bin\config.obj+>> RESP2
ECHO .\bin\comcpy.obj .\bin\crit.obj +>> RESP2
ECHO +>> RESP2
ECHO .\bin\resident.obj>> RESP2
ECHO .\bin\command.exe>> RESP2
ECHO .\command.map>> RESP2
ECHO %WATCOM%\LIB\CLIBs>> RESP2
%LINK510% /MAP @resp2;
IF ERRORLEVEL 1 GOTO FAILED
%MASM% /DDOSPLUS /DWATCOMC /DPASCAL /DFINAL /MX /I.\ .\helpstub.asm,.\bin\helpstub.obj;
IF ERRORLEVEL 1 GOTO FAILED
ECHO .\bin\helpstub.obj+> RESP3
ECHO .\bin\txhelp.obj>> RESP3
ECHO .\bin\txhelp.exe>> RESP3
%LINK510% @resp3;
IF ERRORLEVEL 1 GOTO FAILED
%LOCTOOLS%\exe2bin /S0000 .\bin\txhelp.exe .\bin\txhelp.bin
IF ERRORLEVEL 1 GOTO FAILED
copy /b .\bin\command.exe+.\bin\txhelp.bin .\bin\command.com
goto exit
:failed
ECHO Error in Build!
goto exit
:badtool
ECHO Can't find that tool!
:exit
REM **********************
REM CLEAN UP THE AREA
REM **********************
SET TOOLS=
SET MASM=
SET WCC=
SET LINK510=
SET BCC20=
SET WATCOMH=
SET BCC20H=
SET LOCTOOLS=


514
COMMAND/MESSAGE.ASM Normal file
View File

@@ -0,0 +1,514 @@
NUL equ 0
BS equ 8
TAB equ 9
LF equ 10
CR equ 13
CGROUP group _MSG
_MSG segment word public 'CODE'
assume ds:CGROUP, cs:CGROUP
; Source .TFT file: 'TMP1.$$$'
public _msg_ver111
public msg_ver111
msg_ver111 label byte
_msg_ver111 db NUL , NUL
public _msg_lbl
public msg_lbl
msg_lbl label byte
_msg_lbl db LF, " Volume in drive %c ", NUL
public _msg_oklbl
public msg_oklbl
msg_oklbl label byte
_msg_oklbl db "is %s", NUL
public _msg_nolbl
public msg_nolbl
msg_nolbl label byte
_msg_nolbl db "does not have a label", NUL
public _msg_files
public msg_files
msg_files label byte
_msg_files db "File(s)", NUL
public _msg_free
public msg_free
msg_free label byte
_msg_free db "bytes free", NUL
public _msg_invalid_file
public msg_invalid_file
msg_invalid_file label byte
_msg_invalid_file db "Destination must be a file", NUL
public _msg_exist
public msg_exist
msg_exist label byte
_msg_exist db "%s files exist", LF, NUL
public _msg_ndir
public msg_ndir
msg_ndir label byte
_msg_ndir db "System", NUL
public _msg_nsys
public msg_nsys
msg_nsys label byte
_msg_nsys db "Directory", NUL
public _msg_badopt
public msg_badopt
msg_badopt label byte
_msg_badopt db "Invalid option: `%c%c'", NUL
public _msg_full
public msg_full
msg_full label byte
_msg_full db LF, "Disk full", LF, NUL
public _msg_devfail
public msg_devfail
msg_devfail label byte
_msg_devfail db LF, "Failure writing to device", LF, NUL
public _msg_syntax
public msg_syntax
msg_syntax label byte
_msg_syntax db "Syntax Error", LF, NUL
public _msg_badcmd
public msg_badcmd
msg_badcmd label byte
_msg_badcmd db "Command or filename not recognized", LF, NUL
public _msg_pathdrv
public msg_pathdrv
msg_pathdrv label byte
_msg_pathdrv db "Search path contains invalid drive", LF, NUL
public _msg_optline
public msg_optline
msg_optline label byte
_msg_optline db "%s (Y/N) ? ", NUL
public _msg_batterm
public msg_batterm
msg_batterm label byte
_msg_batterm db "Halt Batch Process (Y/N) ? ", NUL
public _msg_batmiss
public msg_batmiss
msg_batmiss label byte
_msg_batmiss db "Batch file %s missing", LF, NUL
public _msg_batnest
public msg_batnest
msg_batnest label byte
_msg_batnest db LF, "Batch files nested too deeply", LF, NUL
public _msg_dir
public msg_dir
msg_dir label byte
_msg_dir db " Directory of %s\%s", LF, NUL
public _msg_echo
public msg_echo
msg_echo label byte
_msg_echo db "ECHO = %s", LF, NUL
public _msg_xbatch
public msg_xbatch
msg_xbatch label byte
_msg_xbatch db "Batch Enhancer is %s", LF, NUL
public _msg_eraq
public msg_eraq
msg_eraq label byte
_msg_eraq db "%s (Y/N) ? ", NUL
public _msg_eraall
public msg_eraall
msg_eraall label byte
_msg_eraall db "Are you sure (Y/N) ? ", NUL
public _msg_era
public msg_era
msg_era label byte
_msg_era db "File not erased: %s - ", NUL
public _msg_label
public msg_label
msg_label label byte
_msg_label db "Label ""%s"" not found", NUL
public _msg_gosub
public msg_gosub
msg_gosub label byte
_msg_gosub db "GOSUBs nested too deeply", LF, NUL
public _msg_return
public msg_return
msg_return label byte
_msg_return db "RETURN without GOSUB encountered", LF, NUL
public _msg_mkdir
public msg_mkdir
msg_mkdir label byte
_msg_mkdir db "Unable to create directory", LF, NUL
public _msg_path
public msg_path
msg_path label byte
_msg_path db "No Path", LF, NUL
public _path_template
public path_template
path_template label byte
_path_template db "%.122s", LF, NUL
public _msg_ren
public msg_ren
msg_ren label byte
_msg_ren db "File already exists", LF, NUL
public _msg_use_rendir
public msg_use_rendir
msg_use_rendir label byte
_msg_use_rendir db "Use RENDIR to rename directories", LF, NUL
public _msg_rmdir
public msg_rmdir
msg_rmdir label byte
_msg_rmdir db "Directory invalid, in use, or not empty", LF, NUL
public _msg_break
public msg_break
msg_break label byte
_msg_break db "BREAK = %s", LF, NUL
public _msg_verify
public msg_verify
msg_verify label byte
_msg_verify db "VERIFY = %s", LF, NUL
public _msg_idle
public msg_idle
msg_idle label byte
_msg_idle db "IDLE detection is %s", LF, NUL
public _help_prog
public help_prog
help_prog label byte
_help_prog db "help$.exe", NUL
public _msg_nohelpprog
public msg_nohelpprog
msg_nohelpprog label byte
_msg_nohelpprog db "Cannot find help file HELP$.EXE", LF, NUL
public _help_com
public help_com
help_com label byte
_help_com db "COMMAND", TAB, "Executes a second copy of the default command processor.", LF, LF, "Syntax:", TAB, "COMMAND /H", LF, TAB, "COMMAND [dirpath][ /E:n][ /P[:filename]][ /Mx][ /Ccommand]", LF, LF, TAB
db "/H", TAB, "gives this screen.", LF, TAB, "dirpath", TAB, "drive and path to be used to reload COMMAND.COM.", LF, TAB, "/E:n", TAB, "allocate n number of bytes to the environment (512 default).", LF
db TAB, "/P", TAB, "Makes COMMAND.COM permanent. EXIT will not terminate it.", LF, TAB, TAB, "Optional filename causes filename to be used instead of", LF, TAB, TAB, "AUTOEXEC.BAT.", LF, TAB, "/"
db "C", TAB, "Executes ""command"" then terminates.", LF, TAB, "/ML", TAB, "Force resident portion to be in conventional (low) memory.", LF, TAB, "/MU", TAB, "Force resident portion to be in UPPER "
db "memory.", LF, TAB, "/MH", TAB, "Force resident portion to be in HIGH memory.", LF, LF, "Examples:", LF, TAB, "COMMAND /E:1024 /P", LF, TAB, "COMMAND /Cdir c:", LF, NUL
public _msg_curcp
public msg_curcp
msg_curcp label byte
_msg_curcp db "Active Code Page is %d", LF, NUL
public _msg_badcp
public msg_badcp
msg_badcp label byte
_msg_badcp db "Code Page %d has not been prepared", LF, NUL
public _msg_cpnf
public msg_cpnf
msg_cpnf label byte
_msg_cpnf db "Invalid Code Page, NLSFUNC not loaded, or COUNTRY.SYS not found", LF, NUL
public _msg_netsubst
public msg_netsubst
msg_netsubst label byte
_msg_netsubst db "Cannot SUBST a Networked Drive", LF, NUL
public _msg_netassign
public msg_netassign
msg_netassign label byte
_msg_netassign db "Cannot ASSIGN a Networked Drive", LF, NUL
public _msg_cpyright
public msg_cpyright
msg_cpyright label byte
_msg_cpyright db "Copyright (c) 1976, 1997 Caldera, Inc. ", LF, "All rights reserved.", LF, NUL
public _msg_serialno
public msg_serialno
msg_serialno label byte
_msg_serialno db "Serial number %s", LF, NUL
public _msg_oempatch
public msg_oempatch
msg_oempatch label byte
_msg_oempatch db "SeRiAlNuMbEr=", NUL
public _msg_serno
public msg_serno
msg_serno label byte
_msg_serno db 0, "XXX-0000-987654321X", NUL
public _msg_oemcpyrt
public msg_oemcpyrt
msg_oemcpyrt label byte
_msg_oemcpyrt db LF, "LICENSED FOR NON-COMMERCIAL USE ONLY", LF, 0, "FILLERFILLERFILLERFILLER", NUL
public _msg_version
public msg_version
msg_version label byte
_msg_version db LF, "Caldera OpenDOS %s.01", LF, NUL
public _msg_cpyself
public msg_cpyself
msg_cpyself label byte
_msg_cpyself db "Source and Destination cannot be the same file", LF, NUL
public _msg_fcopied
public msg_fcopied
msg_fcopied label byte
_msg_fcopied db " File(s) copied", LF, NUL
public _msg_envfull
public msg_envfull
msg_envfull label byte
_msg_envfull db "Environment Full", NUL
public _msg_enverr
public msg_enverr
msg_enverr label byte
_msg_enverr db "Environment error", NUL
public _msg_bados
public msg_bados
msg_bados label byte
_msg_bados db "Incorrect version of Operating System", LF, NUL
public _msg_loadpath
public msg_loadpath
msg_loadpath label byte
_msg_loadpath db "Invalid COMMAND search directory specified", LF, LF, NUL
public _msg_inop
public msg_inop
msg_inop label byte
_msg_inop db "Wrong number of parameters", LF, NUL
public _msg_binrd
public msg_binrd
msg_binrd label byte
_msg_binrd db "Binary reads from a device are not allowed", LF, NUL
public _msg_dlost
public msg_dlost
msg_dlost label byte
_msg_dlost db "Destination file contents lost before copy", LF, NUL
public _msg_onoff
public msg_onoff
msg_onoff label byte
_msg_onoff db "ON or OFF parameter required", LF, NUL
public _err_file
public err_file
err_file label byte
_err_file db "Filename too long", LF, NUL
public _err02
public err02
err02 label byte
_err02 db "File not found", NUL
public _err03
public err03
err03 label byte
_err03 db "Invalid directory specified", NUL
public _err04
public err04
err04 label byte
_err04 db "Too many files open", NUL
public _err05
public err05
err05 label byte
_err05 db "Access denied", NUL
public _err08
public err08
err08 label byte
_err08 db "Not enough Memory", NUL
public _err15
public err15
err15 label byte
_err15 db "Invalid drive specified", NUL
public _err19
public err19
err19 label byte
_err19 db "Disk write-protected", NUL
public _err20
public err20
err20 label byte
_err20 db "File Sharing Conflict", NUL
public _err83
public err83
err83 label byte
_err83 db "Physical Media Error", NUL
public _err86
public err86
err86 label byte
_err86 db "Invalid Password", NUL
public _msg_needpath
public msg_needpath
msg_needpath label byte
_msg_needpath db "Path required", NUL
public _msg_needfile
public msg_needfile
msg_needfile label byte
_msg_needfile db "Filename(s) required", NUL
public _msg_needdev
public msg_needdev
msg_needdev label byte
_msg_needdev db "Device name required", NUL
public _msg_drv_invalid
public msg_drv_invalid
msg_drv_invalid label byte
_msg_drv_invalid db "Current drive is no longer valid", NUL
public _sun_d
public sun_d
sun_d label byte
_sun_d db "Sun", NUL
public _mon_d
public mon_d
mon_d label byte
_mon_d db "Mon", NUL
public _tue_d
public tue_d
tue_d label byte
_tue_d db "Tue", NUL
public _wed_d
public wed_d
wed_d label byte
_wed_d db "Wed", NUL
public _thu_d
public thu_d
thu_d label byte
_thu_d db "Thu", NUL
public _fri_d
public fri_d
fri_d label byte
_fri_d db "Fri", NUL
public _sat_d
public sat_d
sat_d label byte
_sat_d db "Sat", NUL
public _jan_m
public jan_m
jan_m label byte
_jan_m db "January", NUL
public _feb_m
public feb_m
feb_m label byte
_feb_m db "February", NUL
public _mar_m
public mar_m
mar_m label byte
_mar_m db "March", NUL
public _apr_m
public apr_m
apr_m label byte
_apr_m db "April", NUL
public _may_m
public may_m
may_m label byte
_may_m db "May", NUL
public _jun_m
public jun_m
jun_m label byte
_jun_m db "June", NUL
public _jul_m
public jul_m
jul_m label byte
_jul_m db "July", NUL
public _aug_m
public aug_m
aug_m label byte
_aug_m db "August", NUL
public _sep_m
public sep_m
sep_m label byte
_sep_m db "September", NUL
public _oct_m
public oct_m
oct_m label byte
_oct_m db "October", NUL
public _nov_m
public nov_m
nov_m label byte
_nov_m db "November", NUL
public _dec_m
public dec_m
dec_m label byte
_dec_m db "December", NUL
public _am_time
public am_time
am_time label byte
_am_time db "am", NUL
public _pm_time
public pm_time
pm_time label byte
_pm_time db "pm", NUL
public _greeting_morning
public greeting_morning
greeting_morning label byte
_greeting_morning db "morning", NUL
public _greeting_afternoon
public greeting_afternoon
greeting_afternoon label byte
_greeting_afternoon db "afternoon", NUL
public _greeting_evening
public greeting_evening
greeting_evening label byte
_greeting_evening db "evening", NUL
public _cur_time
public cur_time
cur_time label byte
_cur_time db "Time: ", NUL
public _new_time
public new_time
new_time label byte
_new_time db LF, "Enter time: ", NUL
public _inv_time
public inv_time
inv_time label byte
_inv_time db LF, "Invalid time specified", NUL
public _cur_date
public cur_date
cur_date label byte
_cur_date db "Date: ", NUL
public _new_date
public new_date
new_date label byte
_new_date db LF, "Enter date (%s): ", NUL
public _inv_date
public inv_date
inv_date label byte
_inv_date db LF, "Invalid date specified", NUL
public _us_date
public us_date
us_date label byte
_us_date db "mm-dd-yy", NUL
public _euro_date
public euro_date
euro_date label byte
_euro_date db "dd-mm-yy", NUL
public _jap_date
public jap_date
jap_date label byte
_jap_date db "yy-mm-dd", NUL
public _inv_num
public inv_num
inv_num label byte
_inv_num db "Invalid Number", LF, NUL
public _msg_inactive
public msg_inactive
msg_inactive label byte
_msg_inactive db "Input Redirection Already Active", NUL
public _msg_outactive
public msg_outactive
msg_outactive label byte
_msg_outactive db "Output Redirection Already Active", NUL
public _msg_on
public msg_on
msg_on label byte
_msg_on db "on", NUL
public _msg_off
public msg_off
msg_off label byte
_msg_off db "off", NUL
public _yes_no
public yes_no
yes_no label byte
_yes_no db "YN", NUL
public _msg_pause
public msg_pause
msg_pause label byte
_msg_pause db "Strike a key when ready . . . ", NUL
public _msg_disabled
public msg_disabled
msg_disabled label byte
_msg_disabled db "IDLE is disabled", NUL
public _msg_internal
public msg_internal
msg_internal label byte
_msg_internal db "Internal Error Code %03d", NUL
public _msg_network
public msg_network
msg_network label byte
_msg_network db "Network Error %03d", NUL
public _msg_debug
public msg_debug
msg_debug label byte
_msg_debug db "DEBUG is %s", LF, NUL
public _msg_longjmp
public msg_longjmp
msg_longjmp label byte
_msg_longjmp db "LONGJMP Error %d", LF, NUL
public _msg_nohelp
public msg_nohelp
msg_nohelp label byte
_msg_nohelp db "Unable to give Help. Cannot find file %s.", LF, NUL
_MSG ends
end


246
COMMAND/MESSAGE.DEF Normal file
View File

@@ -0,0 +1,246 @@
extrn _am_time : byte
extrn am_time : byte
extrn _apr_m : byte
extrn apr_m : byte
extrn _aug_m : byte
extrn aug_m : byte
extrn _cur_date : byte
extrn cur_date : byte
extrn _cur_time : byte
extrn cur_time : byte
extrn _dec_m : byte
extrn dec_m : byte
extrn _err02 : byte
extrn err02 : byte
extrn _err03 : byte
extrn err03 : byte
extrn _err04 : byte
extrn err04 : byte
extrn _err05 : byte
extrn err05 : byte
extrn _err08 : byte
extrn err08 : byte
extrn _err15 : byte
extrn err15 : byte
extrn _err19 : byte
extrn err19 : byte
extrn _err20 : byte
extrn err20 : byte
extrn _err83 : byte
extrn err83 : byte
extrn _err86 : byte
extrn err86 : byte
extrn _err_file : byte
extrn err_file : byte
extrn _euro_date : byte
extrn euro_date : byte
extrn _feb_m : byte
extrn feb_m : byte
extrn _fri_d : byte
extrn fri_d : byte
extrn _greeting_afternoon : byte
extrn greeting_afternoon : byte
extrn _greeting_evening : byte
extrn greeting_evening : byte
extrn _greeting_morning : byte
extrn greeting_morning : byte
extrn _help_com : byte
extrn help_com : byte
extrn _help_prog : byte
extrn help_prog : byte
extrn _inv_date : byte
extrn inv_date : byte
extrn _inv_num : byte
extrn inv_num : byte
extrn _inv_time : byte
extrn inv_time : byte
extrn _jan_m : byte
extrn jan_m : byte
extrn _jap_date : byte
extrn jap_date : byte
extrn _jul_m : byte
extrn jul_m : byte
extrn _jun_m : byte
extrn jun_m : byte
extrn _mar_m : byte
extrn mar_m : byte
extrn _may_m : byte
extrn may_m : byte
extrn _mon_d : byte
extrn mon_d : byte
extrn _msg_badcmd : byte
extrn msg_badcmd : byte
extrn _msg_badcp : byte
extrn msg_badcp : byte
extrn _msg_badopt : byte
extrn msg_badopt : byte
extrn _msg_bados : byte
extrn msg_bados : byte
extrn _msg_batmiss : byte
extrn msg_batmiss : byte
extrn _msg_batnest : byte
extrn msg_batnest : byte
extrn _msg_batterm : byte
extrn msg_batterm : byte
extrn _msg_binrd : byte
extrn msg_binrd : byte
extrn _msg_break : byte
extrn msg_break : byte
extrn _msg_cpnf : byte
extrn msg_cpnf : byte
extrn _msg_cpyright : byte
extrn msg_cpyright : byte
extrn _msg_cpyself : byte
extrn msg_cpyself : byte
extrn _msg_curcp : byte
extrn msg_curcp : byte
extrn _msg_debug : byte
extrn msg_debug : byte
extrn _msg_devfail : byte
extrn msg_devfail : byte
extrn _msg_dir : byte
extrn msg_dir : byte
extrn _msg_disabled : byte
extrn msg_disabled : byte
extrn _msg_dlost : byte
extrn msg_dlost : byte
extrn _msg_drv_invalid : byte
extrn msg_drv_invalid : byte
extrn _msg_echo : byte
extrn msg_echo : byte
extrn _msg_enverr : byte
extrn msg_enverr : byte
extrn _msg_envfull : byte
extrn msg_envfull : byte
extrn _msg_era : byte
extrn msg_era : byte
extrn _msg_eraall : byte
extrn msg_eraall : byte
extrn _msg_eraq : byte
extrn msg_eraq : byte
extrn _msg_exist : byte
extrn msg_exist : byte
extrn _msg_fcopied : byte
extrn msg_fcopied : byte
extrn _msg_files : byte
extrn msg_files : byte
extrn _msg_free : byte
extrn msg_free : byte
extrn _msg_full : byte
extrn msg_full : byte
extrn _msg_gosub : byte
extrn msg_gosub : byte
extrn _msg_idle : byte
extrn msg_idle : byte
extrn _msg_inactive : byte
extrn msg_inactive : byte
extrn _msg_inop : byte
extrn msg_inop : byte
extrn _msg_internal : byte
extrn msg_internal : byte
extrn _msg_invalid_file : byte
extrn msg_invalid_file : byte
extrn _msg_label : byte
extrn msg_label : byte
extrn _msg_lbl : byte
extrn msg_lbl : byte
extrn _msg_loadpath : byte
extrn msg_loadpath : byte
extrn _msg_longjmp : byte
extrn msg_longjmp : byte
extrn _msg_mkdir : byte
extrn msg_mkdir : byte
extrn _msg_ndir : byte
extrn msg_ndir : byte
extrn _msg_needdev : byte
extrn msg_needdev : byte
extrn _msg_needfile : byte
extrn msg_needfile : byte
extrn _msg_needpath : byte
extrn msg_needpath : byte
extrn _msg_netassign : byte
extrn msg_netassign : byte
extrn _msg_netsubst : byte
extrn msg_netsubst : byte
extrn _msg_network : byte
extrn msg_network : byte
extrn _msg_nohelp : byte
extrn msg_nohelp : byte
extrn _msg_nohelpprog : byte
extrn msg_nohelpprog : byte
extrn _msg_nolbl : byte
extrn msg_nolbl : byte
extrn _msg_nsys : byte
extrn msg_nsys : byte
extrn _msg_oemcpyrt : byte
extrn msg_oemcpyrt : byte
extrn _msg_oempatch : byte
extrn msg_oempatch : byte
extrn _msg_off : byte
extrn msg_off : byte
extrn _msg_oklbl : byte
extrn msg_oklbl : byte
extrn _msg_on : byte
extrn msg_on : byte
extrn _msg_onoff : byte
extrn msg_onoff : byte
extrn _msg_optline : byte
extrn msg_optline : byte
extrn _msg_outactive : byte
extrn msg_outactive : byte
extrn _msg_path : byte
extrn msg_path : byte
extrn _msg_pathdrv : byte
extrn msg_pathdrv : byte
extrn _msg_pause : byte
extrn msg_pause : byte
extrn _msg_ren : byte
extrn msg_ren : byte
extrn _msg_return : byte
extrn msg_return : byte
extrn _msg_rmdir : byte
extrn msg_rmdir : byte
extrn _msg_serialno : byte
extrn msg_serialno : byte
extrn _msg_serno : byte
extrn msg_serno : byte
extrn _msg_syntax : byte
extrn msg_syntax : byte
extrn _msg_use_rendir : byte
extrn msg_use_rendir : byte
extrn _msg_ver111 : byte
extrn msg_ver111 : byte
extrn _msg_verify : byte
extrn msg_verify : byte
extrn _msg_version : byte
extrn msg_version : byte
extrn _msg_xbatch : byte
extrn msg_xbatch : byte
extrn _new_date : byte
extrn new_date : byte
extrn _new_time : byte
extrn new_time : byte
extrn _nov_m : byte
extrn nov_m : byte
extrn _oct_m : byte
extrn oct_m : byte
extrn _path_template : byte
extrn path_template : byte
extrn _pm_time : byte
extrn pm_time : byte
extrn _sat_d : byte
extrn sat_d : byte
extrn _sep_m : byte
extrn sep_m : byte
extrn _sun_d : byte
extrn sun_d : byte
extrn _thu_d : byte
extrn thu_d : byte
extrn _tue_d : byte
extrn tue_d : byte
extrn _us_date : byte
extrn us_date : byte
extrn _wed_d : byte
extrn wed_d : byte
extrn _yes_no : byte
extrn yes_no : byte

123
COMMAND/MESSAGE.H Normal file
View File

@@ -0,0 +1,123 @@
extern char near am_time[];
extern char near apr_m[];
extern char near aug_m[];
extern char near cur_date[];
extern char near cur_time[];
extern char near dec_m[];
extern char near err02[];
extern char near err03[];
extern char near err04[];
extern char near err05[];
extern char near err08[];
extern char near err15[];
extern char near err19[];
extern char near err20[];
extern char near err83[];
extern char near err86[];
extern char near err_file[];
extern char near euro_date[];
extern char near feb_m[];
extern char near fri_d[];
extern char near greeting_afternoon[];
extern char near greeting_evening[];
extern char near greeting_morning[];
extern char near help_com[];
extern char near help_prog[];
extern char near inv_date[];
extern char near inv_num[];
extern char near inv_time[];
extern char near jan_m[];
extern char near jap_date[];
extern char near jul_m[];
extern char near jun_m[];
extern char near mar_m[];
extern char near may_m[];
extern char near mon_d[];
extern char near msg_badcmd[];
extern char near msg_badcp[];
extern char near msg_badopt[];
extern char near msg_bados[];
extern char near msg_batmiss[];
extern char near msg_batnest[];
extern char near msg_batterm[];
extern char near msg_binrd[];
extern char near msg_break[];
extern char near msg_cpnf[];
extern char near msg_cpyright[];
extern char near msg_cpyself[];
extern char near msg_curcp[];
extern char near msg_debug[];
extern char near msg_devfail[];
extern char near msg_dir[];
extern char near msg_disabled[];
extern char near msg_dlost[];
extern char near msg_drv_invalid[];
extern char near msg_echo[];
extern char near msg_enverr[];
extern char near msg_envfull[];
extern char near msg_era[];
extern char near msg_eraall[];
extern char near msg_eraq[];
extern char near msg_exist[];
extern char near msg_fcopied[];
extern char near msg_files[];
extern char near msg_free[];
extern char near msg_full[];
extern char near msg_gosub[];
extern char near msg_idle[];
extern char near msg_inactive[];
extern char near msg_inop[];
extern char near msg_internal[];
extern char near msg_invalid_file[];
extern char near msg_label[];
extern char near msg_lbl[];
extern char near msg_loadpath[];
extern char near msg_longjmp[];
extern char near msg_mkdir[];
extern char near msg_ndir[];
extern char near msg_needdev[];
extern char near msg_needfile[];
extern char near msg_needpath[];
extern char near msg_netassign[];
extern char near msg_netsubst[];
extern char near msg_network[];
extern char near msg_nohelp[];
extern char near msg_nohelpprog[];
extern char near msg_nolbl[];
extern char near msg_nsys[];
extern char near msg_oemcpyrt[];
extern char near msg_oempatch[];
extern char near msg_off[];
extern char near msg_oklbl[];
extern char near msg_on[];
extern char near msg_onoff[];
extern char near msg_optline[];
extern char near msg_outactive[];
extern char near msg_path[];
extern char near msg_pathdrv[];
extern char near msg_pause[];
extern char near msg_ren[];
extern char near msg_return[];
extern char near msg_rmdir[];
extern char near msg_serialno[];
extern char near msg_serno[];
extern char near msg_syntax[];
extern char near msg_use_rendir[];
extern char near msg_ver111[];
extern char near msg_verify[];
extern char near msg_version[];
extern char near msg_xbatch[];
extern char near new_date[];
extern char near new_time[];
extern char near nov_m[];
extern char near oct_m[];
extern char near path_template[];
extern char near pm_time[];
extern char near sat_d[];
extern char near sep_m[];
extern char near sun_d[];
extern char near thu_d[];
extern char near tue_d[];
extern char near us_date[];
extern char near wed_d[];
extern char near yes_no[];

131
COMMAND/MSDOS.EQU Normal file
View File

@@ -0,0 +1,131 @@
; File : $Workfile: MSDOS.EQU$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; MSDOS.EQU 1.1 92/11/10 10:48:56
; Added to appslib source directory.
; ENDLOG
MS_P_TERMCPM equ 00H
MS_C_READ equ 01H
MS_C_WRITE equ 02H
MS_A_READ equ 03H
MS_A_WRITE equ 04H
MS_L_WRITE equ 05H
MS_C_RAWIO equ 06H
MS_C_RAWIN equ 07H
MS_C_NOECHO equ 08H
MS_C_WRITESTR equ 09H
MS_C_READSTR equ 0aH
MS_C_STAT equ 0bH
MS_C_FLUSH equ 0cH
MS_DRV_ALLRESET equ 0dH
MS_DRV_SET equ 0eH
MS_F_OPEN equ 0fH
MS_F_CLOSE equ 10H
MS_F_SFIRST equ 11H
MS_F_SNEXT equ 12H
MS_F_DELETE equ 13H
MS_F_READ equ 14H
MS_F_WRITE equ 15H
MS_F_MAKE equ 16H
MS_F_RENAME equ 17H
MS_DRV_GET equ 19H
MS_F_DMAOFF equ 1aH
MS_DRV_ALLOC equ 1bH
MS_DRV_ALLOCSPEC equ 1cH
MS_F_READRAND equ 21H
MS_F_WRITERAND equ 22H
MS_F_SIZE equ 23H
MS_F_RANDREC equ 24H
MS_S_SETINT equ 25H
MS_P_MKPSP equ 26H
MS_F_READBLK equ 27H
MS_F_WRITEBLK equ 28H
MS_F_PARSE equ 29H
MS_T_GETDATE equ 2aH
MS_T_SETDATE equ 2bH
MS_T_GETTIME equ 2cH
MS_T_SETTIME equ 2dH
MS_F_VERIFY equ 2eH
MS_F_DMAGET equ 2fH
MS_S_BDOSVER equ 30H
MS_P_TERMKEEP equ 31H
MS_S_BREAK equ 33H
MS_S_GETINT equ 35H
MS_DRV_SPACE equ 36H
MS_S_COUNTRY equ 38H
MS_X_MKDIR equ 39H
MS_X_RMDIR equ 3aH
MS_X_CHDIR equ 3bH
MS_X_CREAT equ 3cH
MS_X_OPEN equ 3dH
MS_X_CLOSE equ 3eH
MS_X_READ equ 3fH
MS_X_WRITE equ 40H
MS_X_UNLINK equ 41H
MS_X_LSEEK equ 42H
MS_X_CHMOD equ 43H
MS_X_IOCTL equ 44H
MS_X_DUP equ 45H
MS_X_DUP2 equ 46H
MS_X_CURDIR equ 47H
MS_M_ALLOC equ 48H
MS_M_FREE equ 49H
MS_M_SETBLOCK equ 4aH
MS_X_EXEC equ 4bH
MS_X_EXIT equ 4cH
MS_X_WAIT equ 4dH
MS_X_FIRST equ 4eH
MS_X_NEXT equ 4fH
MS_P_SETPSP equ 50H
MS_F_GETVERIFY equ 54H
MS_X_RENAME equ 56H
MS_X_DATETIME equ 57H
MS_M_STRATEGY equ 58h
MS_F_ERROR equ 59H
MS_X_MKTEMP equ 5aH
MS_X_MKNEW equ 5bH
MS_F_LOCK equ 5cH
MS_X_EXPAND equ 60H
MS_P_GETPSP equ 62H
MS_X_GETCP equ 6601h
MS_X_SETCP equ 6602h
MS_X_SETHC equ 67h
MS_X_COMMIT equ 68h
DOS_INT equ 21h ; DOS Entry Point
;
STDIN equ 0 ; Standard Console Input Handle
STDOUT equ 1 ; Standard Console Output Handle
STDERR equ 2 ; Standard Error Output
STDAUX equ 3 ; Auxilary Device Handle
STDPRN equ 4 ; Printer Device Handle

121
COMMAND/MSERROR.EQU Normal file
View File

@@ -0,0 +1,121 @@
; File : $MSERROR.EQU$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
ED_FUNCTION equ -01 ; invalid function number
ED_FILE equ -02 ; file not found
ED_PATH equ -03 ; path not found
ED_HANDLE equ -04 ; too many open files
ED_ACCESS equ -05 ; file access denied
ED_H_MATCH equ -06 ; invalid handle number
ED_DMD equ -07 ; memory descriptor destroyed
ED_MEMORY equ -08 ; insufficient memory
ED_BLOCK equ -09 ; invalid memory block addr
ED_ENVIRON equ -10 ; invalid environment
ED_FORMAT equ -11 ; invalid format
ED_ACC_CODE equ -12 ; invalid access code
ED_DATA equ -13 ; invalid data
ED_DRIVE equ -15 ; invalid drive specified
ED_DIR equ -16 ; can't remove current dir
ED_DEVICE equ -17 ; not same device
ED_ROOM equ -18 ; no more files
ED_PROTECT equ -19 ; disk write protected
ED_BADUNIT equ -20 ; invalid drive specified
ED_NOTREADY equ -21 ; drive doesn't respond
ED_BADCMD equ -22 ; invalid command to driver
ED_BADDATA equ -23 ; data CRC error
ED_BADRHLEN equ -24 ; (shouldn't happen)
ED_BADSEEK equ -25 ; can't seek to track
ED_BADMEDIA equ -26 ; unrecognizable medium
ED_RNF equ -27 ; record/sector not found
ED_NOPAPER equ -28 ; printer error
ED_WRFAIL equ -29 ; write failed
ED_RDFAIL equ -30 ; read failed
ED_GENFAIL equ -31 ; anything failed
ED_SHAREFAIL equ -32 ; sharing conflict
ED_LOCKFAIL equ -33 ; locking conflict
ED_DISKCHG equ -34 ; invalid disk change
ED_NOFCBS equ -35 ; FCB table exhausted
ED_NOLOCKS equ -36 ; lock list items exhausted
ED_NET equ -50 ; Network Request Not Supported
ED_NETACCESS equ -65 ; file access denied
ED_NETPWD equ -73 ; Server Password Error
ED_NETVER equ -74 ; Incorrect Server version
ED_NETREQ equ -75 ; No Local Network Resources
ED_NETTIME equ -76 ; Network Time Out Error
ED_NETCOMM equ -77 ; Network Communications Error
ED_NETSRVR equ -78 ; No Server Network Resources
ED_NETLOG equ -79 ; Server Not Logged In
ED_EXISTS equ -80 ; file already exists
ED_MAKE equ -82 ; Cannot Make (Files ??)
ED_FAIL equ -83 ; FAIL code returned from INT 24
ED_STRUCT equ -84 ; Out of Structures
ED_ASSIGN equ -85 ; Already Assigned
ED_PASSWORD equ -86 ; Invalid Password
ED_PARAM equ -87 ; Invalid Parameter
ED_NETWRITE equ -88 ; Network write fault
ED_NETFUNC equ -89 ; Function not supported on network
ED_COMPONENT equ -90 ; system component not installed
ED_LASTERROR equ -90 ; Last Error Number Used
CLASS_RESOURCE equ 1 ; Out of Resource
CLASS_TEMP equ 2 ; Temporary Situation
CLASS_AUTHOR equ 3 ; Authorization Error
CLASS_INTERNAL equ 4 ; Internal System Software Error
CLASS_HARDWARE equ 5 ; Hardware Failure
CLASS_SYSTEM equ 6 ; Serious System Failure
CLASS_APPLIC equ 7 ; Application Program Error
CLASS_LOST equ 8 ; File/Item Not Found
CLASS_FORMAT equ 9 ; File/Item Illegal Format
CLASS_LOCKED equ 10 ; File/Item Locked
CLASS_MEDIA equ 11 ; Media Failure
CLASS_EXISTS equ 12 ; Item Already Exists
CLASS_UNKNOWN equ 13 ; Unknown Classification
ACT_RETRY equ 1 ; Retry a few times then prompt user
ACT_DELAY equ 2 ; Delay then as ACT_RETRY
ACT_USER equ 3 ; Prompt user to re-enter data
ACT_ABORT equ 4 ; Clean Up then ABORT the process
ACT_TERM equ 5 ; Terminate immeadiately NO CLEAN UP
ACT_IGNORE equ 6 ; Ignore the Error
ACT_URETRY equ 7 ; Retry the error after user intervention
LOC_UNKNOWN equ 1 ; Unknown error location
LOC_BLOCK equ 2 ; Block Device Failure
LOC_NET equ 3 ; Network Failure
LOC_CHAR equ 4 ; Related to Serial/Character devices
LOC_MEMORY equ 5 ; Failure related to Memory

102
COMMAND/MSERROR.H Normal file
View File

@@ -0,0 +1,102 @@
/* File : $Workfile: MSERROR.H$
*
* Description : Part of APPSLIB.
*
* Original Author : DIGITAL RESEARCH
*
* Last Edited By : $CALDERA$
*
*-----------------------------------------------------------------------;
* Copyright Work of Caldera, Inc. All Rights Reserved.
*
* THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
* PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
* ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
* WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
* THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
* HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
* AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
* AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
* COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
* CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
* TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
* CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
* AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
* CIVIL LIABILITY.
* ----------------------------------------------------------------------;
*
* *** Current Edit History ***
* *** End of Current Edit History ***
*
* $Log$
*
* MSERROR.H 1.1 92/11/09 13:39:14 AHAY
* Converted to new build environment and version control system.
*
*
* ENDLOG
*/
#define ED_OK 0 /* no error occured */
#define ED_FUNCTION (-1) /* invalid function number */
#define ED_FILE (-2) /* file not found */
#define ED_PATH (-3) /* path not found */
#define ED_HANDLE (-4) /* too many open files */
#define ED_ACCESS (-5) /* file access denied */
#define ED_H_MATCH (-6) /* invalid handle number */
#define ED_DMD (-7) /* memory descriptor destroyed */
#define ED_MEMORY (-8) /* insufficient memory */
#define ED_BLOCK (-9) /* invalid memory block addr */
#define ED_ENVIRON (-10) /* invalid environment */
#define ED_FORMAT (-11) /* invalid format */
#define ED_ACC_CODE (-12) /* invalid access code */
#define ED_DATA (-13) /* invalid data */
#define ED_DRIVE (-15) /* invalid drive specified */
#define ED_DIR (-16) /* can't remove current dir */
#define ED_DEVICE (-17) /* not same device */
#define ED_ROOM (-18) /* no more files */
#define ED_PROTECT (-19) /* disk write protected */
#define ED_BADUNIT (-20) /* invalid drive specified */
#define ED_NOTREADY (-21) /* drive doesn't respond */
#define ED_BADCMD (-22) /* invalid command to driver */
#define ED_BADDATA (-23) /* data CRC error */
#define ED_BADSEEK (-25) /* can't seek to track */
#define ED_BADMEDIA (-26) /* unrecognizable medium */
#define ED_RNF (-27) /* record/sector not found */
#define ED_NOPAPER (-28) /* printer error */
#define ED_WRFAIL (-29) /* write failed */
#define ED_RDFAIL (-30) /* read failed */
#define ED_GENFAIL (-31) /* anything failed */
#define ED_SHAREFAIL (-32) /* sharing conflict */
#define ED_LOCKFAIL (-33) /* locking conflict */
#define ED_DISKCHG (-34) /* invalid disk change */
#define ED_NOFCBS (-35) /* FCB table exhausted */
#define ED_NOLOCKS (-36) /* lock list items exhausted */
#define ED_NET (-50) /* Network request not supported */
#define ED_NETACCESS (-65) /* file access denied */
#define ED_NETPWD (-73) /* Server Password Error */
#define ED_NETVER (-74) /* Incorrect Server version */
#define ED_NETREQ (-75) /* No Local Network Resources */
#define ED_NETTIME (-76) /* Network Time Out Error */
#define ED_NETCOMM (-77) /* Network Communications Error */
#define ED_NETSRVR (-78) /* No Server Network Resources */
#define ED_NETLOG (-79) /* Server Not Logged In */
#define ED_EXISTS (-80) /* file already exists */
#define ED_MAKE (-82) /* cannot make (files ??) */
#define ED_FAIL (-83) /* FAIL code returned from INT 24 */
#define ED_STRUCT (-84) /* out of structures */
#define ED_ASSIGN (-85) /* already assigned */
#define ED_PASSWORD (-86) /* invalid password */
#define ED_PARAM (-87) /* invalid parameter */
#define ED_NETWRITE (-88) /* network write fault */
#define ED_NETFUNC (-89) /* function not supported on network */
#define ED_COMPONENT (-90) /* component not installed */
#define ED_LASTERROR (-90) /* last error number used */
#define ACTION_USER 3 /* ask user to reenter input */
#define ACTION_USER_INT 7 /* user intervention required */

209
COMMAND/PORTAB.H Normal file
View File

@@ -0,0 +1,209 @@
/****************************************************************************
; File : $Workfile$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
*
* C P / M C R U N T I M E L I B H E A D E R F I L E
* -------------------------------------------------------------
*
* This is an include file for assisting the user to write portable
* programs for C. All processor dependencies should be located here.
*
****************************************************************************/
#ifdef drc
#define DRC
#endif
/*
* Standard type definitions
*/
#define BYTE char /* Signed byte */
#ifdef DRC
#define UBYTE char /* Unsigned byte */
#else
#define UBYTE unsigned char /* Unsigned byte */
#endif
#define BOOLEAN int /* 2 valued (true/false) */
#define WORD int /* Signed word (16 bits) */
#define UWORD unsigned int /* unsigned word */
#define LONG long /* signed long (32 bits) */
#ifdef DRC
#define ULONG long /* Unsigned long */
#else
#define ULONG unsigned long /* Unsigned long */
#endif
#define REG register /* register variable */
#define LOCAL auto /* Local var on 68000 */
#define EXTERN extern /* External variable */
#define MLOCAL static /* Local to module */
#define GLOBAL /**/ /* Global variable */
#define VOID void
#define DEFAULT int /* Default size */
#define FLOAT float /* Floating Point */
#define DOUBLE double /* Double precision */
#ifdef __WATCOMC__ /* Watcom C Version 7.00 */
/* define pragma for 'cdecl' keyword to match Microsoft conventions */
#pragma aux cdecl "_*" parm caller []\
value struct float struct routine [ax] modify [ax bx cx dx es];
#pragma aux pascal "*" parm routine reverse []\
value struct float struct routine [ax] modify [ax bx cx dx es];
/*#define WATCOMC 1 /* Watcom C v7.0 */
#define CDECL cdecl /* C calling convention */
#define PASCAL pascal /* Pascal Calling Convention */
#define FAR far /* FAR pointer or Function */
#define NEAR near /* NEAR pointer or Function */
#define CONST /**/ /* CONSTANT Value */
#define VOLATILE /**/ /* VOLATILE must Always Read */
#else
#ifdef MSC
#define CDECL cdecl /* C calling convention */
#define PASCAL pascal /* Pascal Calling Convention */
#define FAR far /* FAR pointer or Function */
#define NEAR near /* NEAR pointer or Function */
#define CONST /**/ /* CONSTANT Value */
#define VOLATILE /**/ /* VOLATILE must Always Read */
#else
#ifdef MSC5
#define CDECL cdecl /* C calling convention */
#define PASCAL pascal /* Pascal Calling Convention */
#define FAR far /* FAR pointer or Function */
#define NEAR near /* NEAR pointer or Function */
#define CONST const /* CONSTANT value -- R/O */
#define VOLATILE volatile /* VOLATILE must always read */
#else
#ifdef __TURBOC__ /* Borland TurboC Ver 1.50 */
#define TURBOC 1 /* Define TURBOC */
#define CDECL cdecl /* C calling convention */
#define PASCAL pascal /* Pascal Calling Convention */
#define FAR far /* FAR pointer or Function */
#define NEAR near /* NEAR pointer or Function */
#define CONST const /* CONSTANT value -- R/O */
#define VOLATILE volatile /* VOLATILE must always read */
#else
#ifdef __HIGHC__ /* MetaWare High C */
#define METAWARE 1 /* High C version 1.4 */
#define _PASCAL_CONV _CALLEE_POPS_STACK|_SAVE_REGS
#define _C_CONV _REVERSE_PARMS
#define FIXFUNC pragma Global_aliasing_convention("%C%r");
#define VARFUNC pragma Global_aliasing_convention("_%a%r");
/********************************/
#define CDECL _cc (_C_CONV|_SAVE_REGS)/* MS C conventions */
#define PASCAL _cc (_PASCAL_CONV) /* MS Pascal conventions */
#define FAR _far /* FAR pointer or function */
#define NEAR _near /* NEAR pointer or function */
#define CONST const /* CONSTANT value -- R/O */
#define VOLATILE volatile /* VOLATILE must always read */
/********************************/
pragma Calling_convention (_C_CONV,_DEFAULT);
VARFUNC /* set default to C */
/********************************/
pragma On (Optimize_for_space); /* space, not speed */
pragma On (Quiet); /* don't be too verbose */
pragma Off (Public_var_warnings); /* referenced before set */
pragma Code ("_TEXT"); /* MSC compatible */
pragma Static_segment ("_DATA"); /* MSC compatible */
pragma Literals ("_DATA"); /* put constants into _DATA */
pragma On (Char_default_unsigned); /* unsigned is safer */
pragma Off (Push_regsize); /* push [mem] is safe */
/********************************/
#ifdef QUIET /********************************/
pragma On (PCC_msgs); /* don't talk too much - */
#endif /* UNIX PCC errors only... */
/********************************/
#ifdef REG /* if register defined already */
#undef REG /* redefine register variables */
#endif /* */
#define REG /**/ /* make it ignore register vars */
pragma Off (Use_reg_vars); /* allocate vars to SI, DI */
pragma Off (Auto_reg_alloc); /* HC figures out SI,DI */
/* */
#ifndef NOPROTO /* */
pragma Off (Prototype_override_warnings);
#define LINT_ARGS YES /* ANSI prototype checking */
#endif /* */
/********************************/
#else /* all other compilers */
/* (might not support ANSI) */
#define CDECL /**/ /* C calling convention */
#define PASCAL /**/ /* Pascal calling convention */
#define FAR /**/ /* FAR pointer or function */
#define NEAR /**/ /* NEAR pointer or function */
#define CONST /**/ /* CONSTANT value */
#define VOLATILE /**/ /* VOLATILE must always read */
/********************************/
#ifndef DRC /* If DRC not specified, */
#define DRC /* assume it's it anyway */
#endif /* */
/********************************/
#endif /* MetaWare C */
#endif /* Borland TurboC */
#endif /* MicroSoft C Version 5.00 */
#endif /* MicroSoft C Version 4.00 */
#endif /* Watcom C Version 7.00 */
#ifndef FIXFUNC
#define FIXFUNC /* Nothing */
#define VARFUNC /* Nothing */
#endif
/****************************************************************************/
/* Miscellaneous Definitions: */
/****************************************************************************/
#define FAILURE (-1) /* Function failure return val */
#define SUCCESS (0) /* Function success return val */
#define YES 1 /* "TRUE" */
#define NO 0 /* "FALSE" */
#define FOREVER for(;;) /* Infinite loop declaration */
#undef NULL /* Remove previous definition */
#define NULL 0 /* Null character value */
#ifdef DRC /************************************/
#define NULLPTR (BYTE *) 0 /* Null pointer value */
#else /************************************/
#define NULLPTR (VOID *) 0 /* Null pointer value */
#endif /************************************/
#define EOF (-1) /* EOF Value */
#define TRUE (1) /* Function TRUE value */
#define FALSE (0) /* Function FALSE value */
/****************************************************************************/
/****************************************************************************/

560
COMMAND/PRINTF.C Normal file
View File

@@ -0,0 +1,560 @@
/*
; File : $Workfile: PRINTF.C$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
*/
/*
* 26 Apr 88 Modify the Long conversion routine to display all 10
* digits of a 32 bit integer when displayed in decimal
* 27 May 88 Added string undefs.
* 1? Jun 88 Support for CODE relative messages using the FARPTR routine.
* 05 Jun 89 Add EPRINTF routine to display messages on STDERR
* 30 Oct 89 dispense with digits & uc_digits in resident portion
* 8 Nov 89 Replaced ASCII calculation with to_dec(), etc. as used
* in APPALIB printf module. Much faster (eg dir /l 10% faster).
* 8 Jan 90 Added parameter order indexing option.
* 6-Mar-90 Watcom C v 7.0
* 26-Mar-90 Make _printf CDECL again, otherwise arg processing screws up
* 23-May-90 increase printf buffers from 128 to 130
* 02-Dec-90 Re-work, to flush buffer on \n to allow large input strings
* 28-May-91 local buffer is now on the stack instead of static. Reduces
* resident size by 128 bytes.
* 29-Jul-91 Buffer is now a far one, so output redirection to a file works
* on a NOVELL drive when we are in seg FFFF.
*/
#include "defines.h"
#include <string.h>
#if defined(MWC) && defined(strlen)
#undef strcmp /* These are defined as macros in string.h */
#undef strcpy /* which are expaneded in line under */
#undef strlen /* Metaware C. These undefs avoid this. */
#endif
#include <portab.h>
#include "command.h"
#include "dosif.h"
#include "global.h"
#define PRINTF -1
#define EPRINTF -2
#define SPRINTF -3
EXTERN VOID c_write (BYTE *, WORD);
EXTERN BYTE FAR * CDECL farptr (BYTE *);
EXTERN BOOLEAN isdigit (BYTE);
EXTERN BOOLEAN err_flag;
/* forward references */
MLOCAL UWORD CDECL _printf (BYTE *, UWORD *, UWORD);
MLOCAL VOID arg_ptrs (BYTE FAR *, UWORD *, UWORD **);
MLOCAL BYTE FAR * arg_siz (BYTE FAR *, UBYTE *);
MLOCAL BYTE FAR * arg_num (BYTE FAR *, UWORD *);
MLOCAL BYTE * to_hex (ULONG, BYTE *, BYTE);
MLOCAL BYTE * to_dec (ULONG, BYTE *);
MLOCAL BYTE * to_udec (ULONG, BYTE *);
#define UPPER_CASE ('A'-10)
#define LOWER_CASE ('a'-10)
#define MAX_ARG_NUM 10 /* max args with order indxs */
MLOCAL BYTE FAR *buff = NULLPTR;
/*GLOBAL BYTE str[130];*/
MLOCAL BYTE FAR *str;
GLOBAL WORD CDECL printf(fmt,args)
BYTE *fmt;
UWORD args;
{
UWORD totlen,len;
/*BYTE local_buff[130];*/
UWORD bufsize;
/*str = (BYTE FAR *) local_buff;*/
str = gp_far_buff;
buff = str; /* use local buffer for printing */
totlen = _printf (fmt,&args,PRINTF); /* build up output string */
len=(UWORD) buff - (UWORD) str;
if(len) /* if anything in the buffer */
far_write(err_flag ? STDERR:STDOUT, str, len);
/* then flush it */
return totlen+len; /* Return the String Length */
}
GLOBAL WORD CDECL eprintf(fmt,args)
BYTE *fmt;
UWORD args;
{
UWORD totlen, len;
BYTE local_buff[130];
str = (BYTE FAR *) local_buff;
buff = str; /* use local buffer for printing */
err_flag = TRUE;
totlen = _printf (fmt,&args,EPRINTF); /* build up output string */
len = buff-str;
if(len) { /* if anything in the buffer */
far_write(STDERR,str,len);
}
err_flag = FALSE;
return totlen+len; /* Return the String Length */
}
GLOBAL WORD CDECL fprintf(handle, fmt, args)
UWORD handle;
BYTE *fmt;
UWORD args;
{
UWORD totlen,len;
UWORD bufsize;
str = gp_far_buff;
buff = str; /* use local buffer for printing */
totlen =_printf (fmt,&args,handle); /* build up output string */
len = (UWORD) buff - (UWORD) str;
if(len) /* if anything in the buffer */
far_write(handle, str, len); /* then flush it */
return totlen+len; /* Return the String Length */
}
GLOBAL WORD CDECL sprintf(strg, fmt, args)
BYTE *strg;
BYTE *fmt;
UWORD args;
{
buff = (BYTE FAR *) strg; /* Point buffer at String */
return _printf (fmt,&args,SPRINTF); /* Generate the String */
}
MLOCAL UWORD CDECL _printf(fmt_near, args, type)
BYTE *fmt_near;
UWORD *args;
UWORD type;
{
BYTE FAR *fmt;
WORD rjust; /* if string/number is right justified */
WORD maxwidth, width;
BOOLEAN long_arg; /* true if next argument is long */
ULONG value;
UWORD uvalue;
WORD i, k;
BYTE FAR *cp;
BYTE c, filler;
BYTE s[40], *sp;
LONG *lp;
UWORD *arg_list[MAX_ARG_NUM];
UWORD arg_idx;
UWORD totlen=0;
fmt = farptr(fmt_near); /* get full address of format string */
arg_ptrs(fmt, args, arg_list); /* init table of argument addresses */
while ((c = *fmt++) != 0) /* scan format string */
{
if (c == '%') { /* formatting code found */
s[14] = 0;
rjust = YES;
filler = ' ';
maxwidth = 0x7fff;
fmt = arg_num(fmt, &arg_idx); /* get argument index */
if (arg_idx < MAX_ARG_NUM) { /* valid index? */
fmt++; /* yes - skip '%' */
args = arg_list[arg_idx]; /* lookup address of arg */
}
if ((c = *fmt) == '-') { /* string is left justified */
rjust = NO; /* ... not right justified */
c = *fmt++; /* get the next character */
}
if (c == '0') /* if leading zeroes desired */
filler = '0'; /* use '0' instead of ' ' */
if (*fmt == '*') { /* if formatting width is parameter */
/* then get it from parameters */
width = (WORD)*args++;
fmt++; /* skip the asterisk */
c = *fmt++; /* get next character */
}
else /* get full width */
for (width = 0; (c = *fmt++) >= '0' && c <= '9'; )
width = width*10 + c - '0';
if (c == '.') { /* if decimal places specified */
if (*fmt == '*') { /* if width is a parameter */
maxwidth = (WORD)*args++;
fmt++; /* skip the asterisk */
c = *fmt++; /* get next character */
}
else /* get decimal places */
for (maxwidth = 0; (c = *fmt++) >= '0' && c <= '9' ;)
maxwidth = maxwidth*10 + c - '0';
}
/* "%ld", "%lu", "lx" specified */
long_arg = (c == 'l'); /* is the argument supplied long? */
if (long_arg) /* if long argument */
c = *fmt++; /* then skip the 'l' character */
switch (c) {
case 'd': /* signed argument */
if (!long_arg)
value = (WORD) *args++;
else {
lp = (LONG *) args;
value = *lp++;
args = (UWORD *) lp;
}
break;
case 'u': /* unsigned argument */
case 'x':
case 'X':
if (!long_arg)
value = (UWORD) *args++;
else {
lp = (LONG *) args;
value = (ULONG) *lp++;
args = (UWORD *) lp;
}
break;
default: /* "%s", "%c" */
uvalue = (UWORD) *args++; /* get string address of char */
}
switch (c) { /* now convert to ASCII */
case 'd': /* signed decimal */
sp = to_dec(value, s+14);
break;
case 'u': /* unsigned decimal */
sp = to_udec(value, s+14);
break;
case 'x': /* unsigned hexadecimal, lower case */
sp = to_hex(value, s+14, LOWER_CASE);
break;
case 'X': /* unsigned hexadecimal, upper case */
sp = to_hex(value, s+14, UPPER_CASE);
break;
case 's': /* string -- could be far */
cp = farptr((BYTE *)uvalue);
for (i=0; cp[i] != '\0'; i++)
;
goto havelen;
case 'c':
c = uvalue;
/* drop into "default:" */
default: /* normal characters */
sp = s+13;
*sp = c;
break;
}
i = (s+14) - sp; /* work out length of string */
cp = (BYTE FAR *) sp; /* convert to FAR pointer */
havelen:
if (i > maxwidth)
i = maxwidth;
if (rjust) {
while (width-- > i)
*buff++ = filler;
}
for (k = 0; *cp && k < maxwidth; ++k) {
if (*cp == '\n')
*buff++ = '\r';
*buff++ = *cp++;
}
if (!rjust) { /* if right justified */
while (width-- > i)
*buff++ = ' ';
}
}
else if (c == '\n') { /* expand newline to CR,LF then flush the buffer */
*buff++ = '\r';
*buff++ = '\n';
if (type!=SPRINTF) {
/* Flush the buffer */
*buff = '\0'; /* terminate the string */
switch (type) {
case PRINTF:
far_write(err_flag ? STDERR:STDOUT,str,
(UWORD) buff - (UWORD) str);
break;
case EPRINTF:
far_write(STDERR, str, buff-str);
break;
default:
far_write(type, str, buff-str);
break;
} /*ENDSWITCH*/
totlen+=buff-str;
buff=str;
}
}
else
*buff++ = c;
}
*buff = '\0'; /* terminate the string */
return totlen+=buff-str;
}
/* Initialise the table of pointers to all arguments (ptr_list).
The ptr_list table will not be filled in unless the format
string (fmt) contains parameter order indexes. */
MLOCAL VOID arg_ptrs(fmt, args, ptr_list)
REG BYTE FAR *fmt; /* ASCIIZ format string */
UWORD *args; /* pointer to first argument */
UWORD *ptr_list[]; /* list of pointers to all arguments */
{
UWORD arg_cnt; /* running count of parameters found */
UWORD num;
UBYTE size_list[MAX_ARG_NUM]; /* number bytes in each argument */
UWORD i;
/* Read through format string to determine the size of each argument. */
for (arg_cnt = 0; ; )
{
while (*fmt && *fmt != '%') /* find the next parameter */
fmt++;
if (!*fmt) /* patameter found? */
break; /* no - exit loop */
fmt++; /* skip '%' */
if (*fmt == '%') /* "%%" escape for percent? */
{
fmt++; /* yes - skip second '%' */
continue; /* and look for next parameter */
}
fmt = arg_num(fmt, &num); /* get this argument's index */
if (num >= MAX_ARG_NUM) /* arg index present and valid? */
break; /* no - go no further */
/* record this argument's size */
fmt = arg_siz(fmt, &size_list[num]);
arg_cnt++; /* one more argument found */
}
/* Loop once for each argument found in format string, filling in
the offset for that argument in the size_list table. */
for (i = 0; i < arg_cnt; i++)
{
ptr_list[i] = args; /* record the address of arg */
args += (UWORD)(size_list[i]); /* update ptr by size of arg */
}
}
/* Determine the size in bytes (siz) of the argument that corresponds to the
given format string (fmt). Return a pointer to the character following
the last in the format string. For example...
fmt siz
%d 2
%ld 4
%*d 4
*/
MLOCAL BYTE FAR * arg_siz(fmt, siz)
REG BYTE FAR *fmt; /* printf argument format string */
UBYTE *siz; /* returned argument size, in bytes */
{
*siz = 0; /* argument size not yet known */
if (*fmt != '%')
return fmt; /* format string must begin with '%' */
fmt++; /* skip '%' */
if (*fmt == '#') /* ignore various formatting ctrls */
fmt++;
if (*fmt == '-')
fmt++;
if (*fmt == '0')
fmt++;
if (*fmt == '*')
{ /* width argument also on stack */
*siz += sizeof(WORD); /* width argument is a WORD */
fmt++;
}
else /* ignore any static width control */
while (*fmt >= '0' && *fmt <= '9')
fmt++;
if (*fmt == '.')
{
fmt++;
if (*fmt == '*')
{ /* 2nd width argument on stack */
*siz += sizeof(WORD);
fmt++;
}
else /* ignore any static width control */
while (*fmt >= '0' && *fmt <= '9')
fmt++;
}
if (*fmt == 'l')
{
*siz += sizeof(LONG);
fmt++;
}
else
*siz += sizeof(WORD); /* assume sizeof(WORD)==sizeof(BYTE *) */
return ++fmt; /* skip final char: 'd', 's', etc. */
}
/* Determine the index number (num) of the argument given by the format
string (fmt). If the format string does not have a valid index number
num is set to MAX_ARG_NUM. Return a pointer to the character following
the last in the index number. For example...
fmt num returned pointer to...
3%4d 3 '%'
4d MAX_ARG_NUM '4'
% MAX_ARG_NUM '%'
*/
MLOCAL BYTE FAR * arg_num(fmt, num)
BYTE FAR *fmt;
UWORD *num;
{
REG BYTE FAR *cp;
REG UWORD n;
*num = MAX_ARG_NUM; /* argument index not yet known */
cp = fmt;
if (!isdigit(*cp)) /* at least one digit expected */
return fmt;
/* extract index number */
for (n = 0; *cp >= '0' && *cp <= '9'; cp++)
n = n * 10 + *cp - '0';
if (*cp != '%')
return fmt; /* number must be terminated by '%' */
*num = n; /* record the index number */
return cp; /* return pointer to last '%' */
}
MLOCAL BYTE * to_hex(n, s, hex_base)
ULONG n;
BYTE *s;
BYTE hex_base; /* 'a'-10 for lowercase, 'A'-10 uppercase */
{
REG UBYTE i;
do
{
i = (UBYTE)n & 0x0F;
*--s = (i > 9) ? (hex_base + i) : ('0' + i);
n >>= 4;
}
while (n != 0);
return s;
}
MLOCAL BYTE * to_dec(n, s)
ULONG n;
BYTE *s;
{
if ((LONG)n < 0)
{
s = to_udec(0 - (LONG)n, s);
*--s = '-'; /* preceed number with sign */
return s;
}
else
return to_udec(n, s);
}
MLOCAL BYTE * to_udec(n, s)
ULONG n;
BYTE *s;
{
do
{
*--s = '0' + (n % 10);
n /= 10;
}
while (n != 0);
return s;
}

126
COMMAND/RESIDENT.ASM Normal file
View File

@@ -0,0 +1,126 @@
NUL equ 0
BS equ 8
TAB equ 9
LF equ 10
CR equ 13
DGROUP group _DATA
_DATA segment word public 'DATA'
assume ds:DGROUP
; Source .TFT file: 'TMP1.$$$'
public _msg0
public msg0
msg0 label byte
_msg0 db "Write protect error$"
public _msg3
public msg3
msg3 label byte
_msg3 db "I/O error$"
public _msg2
public msg2
msg2 label byte
_msg2 db "Not ready error$"
public _msg4
public msg4
msg4 label byte
_msg4 db "Data error$"
public _msg6
public msg6
msg6 label byte
_msg6 db "Seek error$"
public _msg7
public msg7
msg7 label byte
_msg7 db "Bad media type$"
public _msg8
public msg8
msg8 label byte
_msg8 db "Sector not found$"
public _msg21
public msg21
msg21 label byte
_msg21 db "Printer out of paper$"
public _msg20
public msg20
msg20 label byte
_msg20 db "File Sharing Conflict$"
public _msg22
public msg22
msg22 label byte
_msg22 db "FCB table exhausted$"
public _msg_crlf
public msg_crlf
msg_crlf label byte
_msg_crlf db CR, LF, "$"
public _readmsg
public readmsg
readmsg label byte
_readmsg db " reading$"
public _writemsg
public writemsg
writemsg label byte
_writemsg db " writing$"
public _drivemsg
public drivemsg
drivemsg label byte
_drivemsg db " drive $"
public _charmsg
public charmsg
charmsg label byte
_charmsg db " device $"
public _abort_char
public abort_char
abort_char label byte
_abort_char db "A$"
public _abort_msg
public abort_msg
abort_msg label byte
_abort_msg db "Abort$"
public _retry_char
public retry_char
retry_char label byte
_retry_char db "R$"
public _retry_msg
public retry_msg
retry_msg label byte
_retry_msg db ", Retry$"
public _ignore_char
public ignore_char
ignore_char label byte
_ignore_char db "I$"
public _ignore_msg
public ignore_msg
ignore_msg label byte
_ignore_msg db ", Ignore$"
public _fail_char
public fail_char
fail_char label byte
_fail_char db "F$"
public _fail_msg
public fail_msg
fail_msg label byte
_fail_msg db ", Fail$"
public _prompt_msg
public prompt_msg
prompt_msg label byte
_prompt_msg db " ? $"
public _reload_msgs
public reload_msgs
reload_msgs label byte
_reload_msgs db CR, LF, "Cannot load the file ", 0
public _reload_msgf
public reload_msgf
reload_msgf label byte
_reload_msgf db CR, LF, "Insert correct disk and Strike any key", 0
public _reload_msgm
public reload_msgm
reload_msgm label byte
_reload_msgm db " No Memory", 0
_DATA ends
end


54
COMMAND/RESIDENT.DEF Normal file
View File

@@ -0,0 +1,54 @@
extrn _abort_char : byte
extrn abort_char : byte
extrn _abort_msg : byte
extrn abort_msg : byte
extrn _charmsg : byte
extrn charmsg : byte
extrn _drivemsg : byte
extrn drivemsg : byte
extrn _fail_char : byte
extrn fail_char : byte
extrn _fail_msg : byte
extrn fail_msg : byte
extrn _ignore_char : byte
extrn ignore_char : byte
extrn _ignore_msg : byte
extrn ignore_msg : byte
extrn _msg0 : byte
extrn msg0 : byte
extrn _msg2 : byte
extrn msg2 : byte
extrn _msg20 : byte
extrn msg20 : byte
extrn _msg21 : byte
extrn msg21 : byte
extrn _msg22 : byte
extrn msg22 : byte
extrn _msg3 : byte
extrn msg3 : byte
extrn _msg4 : byte
extrn msg4 : byte
extrn _msg6 : byte
extrn msg6 : byte
extrn _msg7 : byte
extrn msg7 : byte
extrn _msg8 : byte
extrn msg8 : byte
extrn _msg_crlf : byte
extrn msg_crlf : byte
extrn _prompt_msg : byte
extrn prompt_msg : byte
extrn _readmsg : byte
extrn readmsg : byte
extrn _reload_msgf : byte
extrn reload_msgf : byte
extrn _reload_msgm : byte
extrn reload_msgm : byte
extrn _reload_msgs : byte
extrn reload_msgs : byte
extrn _retry_char : byte
extrn retry_char : byte
extrn _retry_msg : byte
extrn retry_msg : byte
extrn _writemsg : byte
extrn writemsg : byte

27
COMMAND/RESIDENT.H Normal file
View File

@@ -0,0 +1,27 @@
extern char near abort_char[];
extern char near abort_msg[];
extern char near charmsg[];
extern char near drivemsg[];
extern char near fail_char[];
extern char near fail_msg[];
extern char near ignore_char[];
extern char near ignore_msg[];
extern char near msg0[];
extern char near msg2[];
extern char near msg20[];
extern char near msg21[];
extern char near msg22[];
extern char near msg3[];
extern char near msg4[];
extern char near msg6[];
extern char near msg7[];
extern char near msg8[];
extern char near msg_crlf[];
extern char near prompt_msg[];
extern char near readmsg[];
extern char near reload_msgf[];
extern char near reload_msgm[];
extern char near reload_msgs[];
extern char near retry_char[];
extern char near retry_msg[];
extern char near writemsg[];

3
COMMAND/RESP1 Normal file
View File

@@ -0,0 +1,3 @@
-w -d -f- -K -O -X -Z -c -ms -IC:\TOOLS\BCC20\H -DMESSAGE -DDOSPLUS -zSCGROUP -zTCODE -zR_MSG
-I.\
-o.\bin\cmdlist.obj .\cmdlist.c

11
COMMAND/RESP2 Normal file
View File

@@ -0,0 +1,11 @@
.\bin\cstart.obj .\bin\com.obj .\bin\csup.obj +
.\bin\dosif.obj .\bin\comint.obj .\bin\support.obj+
.\bin\cmdlist.obj .\bin\printf.obj+
.\bin\message.obj +
.\bin\batch.obj .\bin\global.obj .\bin\config.obj+
.\bin\comcpy.obj .\bin\crit.obj +
+
.\bin\resident.obj
.\bin\command.exe
.\command.map
C:\TOOLS\WATCOMC\LIB\CLIBs

3
COMMAND/RESP3 Normal file
View File

@@ -0,0 +1,3 @@
.\bin\helpstub.obj+
.\bin\txhelp.obj
.\bin\txhelp.exe

240
COMMAND/SECURITY.H Normal file
View File

@@ -0,0 +1,240 @@
/*
; File : $Workfile$
;
; Description : Definitions of common security related structures.
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
*/
/* All security information files have the following header before any
data entries. */
typedef struct
{
UWORD signature; /* file identifier, see SIG_ */
BYTE version; /* version No., see SECURE_VERSION */
BYTE crlf[2];
} INF_HEADER_ENTRY;
/* All security info files must be at the following version level
to be compatible with the definitions in this file. */
#define SECURE_VERSION '0'
#define FNAME_LOGIN_TXT "LOGIN.TXT"
#define FNAME_LOCK_TXT "LOCK.TXT"
#define FNAME_LOGIN_ERR "LOGIN.ERR"
#define FNAME_LOCK_ERR "LOCK.ERR"
/******************************************************************************
User information file.
******************************************************************************/
/* The following structure defines the contents of a single entry in the
user information file. This file associates user id numbers, user names,
group names, etc for all users on a secure Concurrent DOS system.
The file is in ASCII with one entry per line. Each variable is separated
by one space character and variables are all left justified space padded.
The lines are a fixed length, equal to sizeof(USER_INF_ENTRY).
Entries in the file are sorted on the userid field.
An example file (where ... indicates absent space padding) -
UI0
0100 RogerGross Stellar rwdr----- C \roger ... 08-23-1990 10:30:52 ...
0101 Ant Stellar rwdr----- C \ant ... 08-22-1990 16:10:08 ...
0200 Stan Accounts rwd------ C \stan ... 08-10-1990 09:27:00 ...
0900 Julie Doc rwdrwdr-- C \julie ... 08-22-1990 08:09:11 ...
*/
#define FNAME_USER_INF "USER.INF" /* user information file name */
#define SIG_USER_INF 0x4955 /* file signature "UI" in word order */
#define USERID_LGTH 4
#define SYS_NAME_LGTH 12
#define DEFACCESS_LGTH 9
#define DATE_LGTH 10
#define TIME_LGTH 8
#define CMNT_LGTH 32
typedef struct
{
BYTE userid [USERID_LGTH+1];
BYTE loginname [SYS_NAME_LGTH+1];
BYTE groupname [SYS_NAME_LGTH+1];
BYTE defaccess [DEFACCESS_LGTH+1];
BYTE homedrv [2];
BYTE homedir [PATH_LEN];
BYTE date [DATE_LGTH+1]; /* mm-dd-yyyy */
BYTE time [TIME_LGTH+1]; /* hh:mm:ss */
BYTE comment [CMNT_LGTH+1];
BYTE crlf [2];
} USER_INF_ENTRY;
#define DEFLT_SU_NAME "Superuser"
#define DEFLT_SU_GROUP "Supergroup"
/******************************************************************************
User password file.
******************************************************************************/
/* The following structure defines the contents of a single entry in the
user password file. This file associates user id numbers with passwords
for all users on a secure Concurrent DOS system.
The file is in a binary format.
Entries in the file are sorted on the userid field.
*/
#define FNAME_USER_SYS "USER.SYS" /* user password file name */
#define SIG_USER_SYS 0x5355 /* file signature "US" in word order */
typedef struct
{
UWORD userid;
ULONG pword;
} USER_SYS_ENTRY;
/******************************************************************************
Login history file.
******************************************************************************/
/* The following structure defines the contents of a single entry in the
login.log history file. This file is a history of events on the system
such as login/out lock and errors.
The file is in a binary format.
New Entries are appended to the file.
*/
#define FNAME_LOGIN_LOG "LOGIN.LOG"
#define SIG_LOGIN_LOG 0x4C4C /* file signature "LL" in word order */
typedef struct
{
UWORD year; /* 1980 - 2099 */
UBYTE month;
UBYTE day;
UBYTE day_of_week; /* Ignored by ms_setdate */
} SYSDAT;
typedef struct
{
UBYTE hour; /* (0 - 23) */
UBYTE minute; /* (0 - 59) */
UBYTE second; /* (0 - 59) */
UBYTE hundredth; /* (0 - 99) */
} SYSTIM;
typedef struct
{
UWORD userid;
UWORD station;
WORD event;
SYSTIM time;
SYSDAT date;
} LOGIN_LOG_ENTRY;
#define LOG_LOGIN 0
#define LOG_LOGOUT 1
#define LOG_LOCK 2
#define LOG_UNLOCK 3
#define LOG_REBOOT 4
#define LOG_POWERON 5
#define ERR_BASE 0
#define ERR_USERPWORD ERR_BASE-1
#define ERR_NOFILE ERR_BASE-2
#define ERR_OPENFILE ERR_BASE-3
#define ERR_BADFILE ERR_BASE-4
#define ERR_READFILE ERR_BASE-5
#define ERR_WRITEFILE ERR_BASE-6
#define ERR_BADID ERR_BASE-7
#define ERR_FATALSYSTEM ERR_BASE-8
#define ERR_LOGIN ERR_BASE-9
#define ERR_LOGOUT ERR_BASE-10
#define ERR_LOCK ERR_BASE-11
#define ERR_UNLOCK ERR_BASE-12
/******************************************************************************
Miscellaneous definitions.
******************************************************************************/
#define SYS_PWORD_MINLEN 3 /* minimum password length */
#define SYS_PWORD_MIN 6 /* minimum pw len (INSTALL only) */
#define SYS_PWORD_MAX SYS_NAME_LGTH
#define ID_NUM(n) ((n)&0x00FF) /* extract user No. from 16 bit id */
#define ID_GROUP(n) ((n)>>8) /* extract group No. from 16 bit id */
#define ID_GRP_USR(g,u) (((g)<<8)+(u)) /* convert group/user to 16 bit id */
/* The following definition is used when accessing USER.SYS, USER.INF, etc.
Because these files may be open by other processes in a mode which denies
access to any other several attempts must be made to open them before
giving up. This definition governs the number of attempts to be made.
Note that a utility should perform a P_DISPATCH after each unsuccessful
attempt. */
#define ACCESS_ATTEMPTS 1000
/******************* E N D O F S E C U R I T Y . H *******************/

89
COMMAND/STRUCT.H Normal file
View File

@@ -0,0 +1,89 @@
/*
; File : $Workfile$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
*/
/* FCB defines */
#define FCB_NAME 1
#define FCB_SIZE 32
#define FCB_NAME_SIZE 11
#define FCB_EXTENT 12
#define FCB_CS 13
#define FCB_RC 15
#define FCB_ALUS 16
struct xios_iopb {
UBYTE drv;
UBYTE mcnt;
UWORD track;
UWORD sector;
UBYTE FAR *dma_buffer;
};
struct xios_dpb {
UWORD spt; /* defined as per system guide */
UBYTE bsh; /* This Structure forces the use of */
UBYTE blm; /* the '/Zp' option on the compiler */
UBYTE exm; /* for Packed structures. */
UWORD dsm;
UWORD drm;
UBYTE al0;
UBYTE al1;
UWORD cks;
UWORD off;
UBYTE psh;
UBYTE prm;
};
struct segoff {
UWORD off;
UWORD seg;
};
struct f_data {
UBYTE srch_attrib; /* size 1 */
UBYTE cur_drive; /* size 1 */
UBYTE media; /* size 1 */
UBYTE pattern[FCB_NAME_SIZE]; /* size 11 */
UWORD cur_alu; /* size 2 */
UWORD cur_index; /* size 2 */
UBYTE filler[3]; /* size 3 */
UBYTE fnd_attrib; /* size 1 */
UWORD time; /* size 2 */
UWORD date; /* size 2 */
LONG file_size; /* size 4 */
UBYTE file_name[63]; /* size ? */
};

1302
COMMAND/SUPPORT.C Normal file

File diff suppressed because it is too large Load Diff

88
COMMAND/SUPPORT.H Normal file
View File

@@ -0,0 +1,88 @@
/*
; File : $Workfile$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
*/
EXTERN VOID disp_filetime(UWORD);
EXTERN VOID disp_filedate(UWORD);
EXTERN VOID disp_systime(VOID);
EXTERN VOID disp_sysdate(VOID);
EXTERN VOID revon(VOID);
EXTERN VOID revoff(VOID);
EXTERN VOID CDECL cmd_cls(VOID);
EXTERN BYTE tolower(BYTE);
EXTERN BOOLEAN isdigit(BYTE);
EXTERN BYTE * skip_char (BYTE *);
EXTERN BYTE * copy_char (BYTE **, BYTE **);
EXTERN WORD is_blank (BYTE *);
EXTERN BYTE * deblank (BYTE *);
EXTERN BOOLEAN iswild (BYTE *);
EXTERN VOID zap_spaces(BYTE *);
EXTERN VOID strip_path(BYTE *, BYTE *);
EXTERN BOOLEAN getdigit(WORD *, BYTE **);
EXTERN BOOLEAN check_num(BYTE *, UWORD, UWORD, UWORD *);
EXTERN BOOLEAN is_filechar(BYTE *);
EXTERN BOOLEAN is_pathchar(BYTE *);
EXTERN BYTE * get_filename(BYTE *, BYTE *, BOOLEAN);
EXTERN BYTE * fptr(BYTE *);
EXTERN VOID repwild(BYTE *, BYTE *);
EXTERN BOOLEAN yes(BOOLEAN ,BOOLEAN);
EXTERN WORD onoff(BYTE *);
EXTERN VOID syntax (VOID);
EXTERN VOID crlf (VOID);
EXTERN VOID putc (BYTE);
EXTERN VOID puts(BYTE *);
EXTERN BOOLEAN isdigit(BYTE);
EXTERN BYTE * strlwr(BYTE *);
EXTERN BYTE * strupr(BYTE *);
EXTERN WORD strnicmp(const BYTE *, const BYTE *, UWORD);
EXTERN WORD e_check(WORD);
EXTERN BYTE * d_check(BYTE *);
EXTERN BOOLEAN f_check(BYTE *, BYTE *, UWORD *, BOOLEAN);
EXTERN BOOLEAN nofiles(BYTE *, WORD, BOOLEAN, BOOLEAN);
EXTERN BOOLEAN file_exist(BYTE *);
EXTERN BOOLEAN isdev(UWORD);
EXTERN VOID CDECL printf(BYTE *, ...);
EXTERN VOID CDECL eprintf(BYTE *, ...);
EXTERN VOID CDECL sprintf(BYTE *, BYTE *, ...);
EXTERN UWORD CDECL findeof(BYTE FAR *, UWORD);
EXTERN VOID append_slash(BYTE *);
EXTERN VOID prompt_exec(VOID);
EXTERN VOID optional_line(BYTE *);
EXTERN BYTE *day_names(UWORD);

348
COMMAND/TOUPPER.H Normal file
View File

@@ -0,0 +1,348 @@
/*
; File : $Workfile$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
*/
#include <message.h>
#if defined(DLS)
EXTERN BYTE * cdecl dls_msg1(UWORD);
#define MSG_LBL dls_msg1(DLS_msg_lbl)
#define MSG_OKLBL dls_msg1(DLS_msg_oklbl)
#define MSG_NOLBL dls_msg1(DLS_msg_nolbl)
#define MSG_FILES dls_msg1(DLS_msg_files)
#define MSG_FREE dls_msg1(DLS_msg_free)
#define MSG_EXIST dls_msg1(DLS_msg_exist)
#define MSG_NDIR dls_msg1(DLS_msg_ndir)
#define MSG_NSYS dls_msg1(DLS_msg_nsys)
#define MSG_BADOPT dls_msg1(DLS_msg_badopt)
#define MSG_FULL dls_msg1(DLS_msg_full)
#define MSG_SYNTAX dls_msg1(DLS_msg_syntax)
#define MSG_BADCMD dls_msg1(DLS_msg_badcmd)
#define MSG_PATHDRV dls_msg1(DLS_msg_pathdrv)
#define MSG_BATTERM dls_msg1(DLS_msg_batterm)
#define MSG_BATMISS dls_msg1(DLS_msg_batmiss)
#define MSG_BATNEST dls_msg1(DLS_msg_batnest)
#define MSG_DIR dls_msg1(DLS_msg_dir)
#define MSG_ECHO dls_msg1(DLS_msg_echo)
#define MSG_ERAQ dls_msg1(DLS_msg_eraq)
#define MSG_ERAALL dls_msg1(DLS_msg_eraall)
#define MSG_ERA dls_msg1(DLS_msg_era)
#define MSG_LABEL dls_msg1(DLS_msg_label)
#define MSG_MKDIR dls_msg1(DLS_msg_mkdir)
#define MSG_PATH dls_msg1(DLS_msg_path)
#define MSG_REN dls_msg1(DLS_msg_ren)
#define MSG_USE_RENDIR dls_msg1(DLS_msg_use_rendir)
#define MSG_RMDIR dls_msg1(DLS_msg_rmdir)
#define MSG_BREAK dls_msg1(DLS_msg_break)
#define MSG_VERIFY dls_msg1(DLS_msg_verify)
#define MSG_IDLE dls_msg1(DLS_msg_idle)
#define MSG_CPYRIGHT dls_msg1(DLS_msg_cpyright)
#define MSG_VERSION dls_msg1(DLS_msg_version)
#define MSG_CPYSELF dls_msg1(DLS_msg_cpyself)
#define MSG_FCOPIED dls_msg1(DLS_msg_fcopied)
#define MSG_DISABLED dls_msg1(DLS_msg_disabled)
#define MSG_ENVFULL dls_msg1(DLS_msg_envfull)
#define MSG_ENVERR dls_msg1(DLS_msg_enverr)
#define MSG_BADOS dls_msg1(DLS_msg_bados)
#define MSG_LOADPATH dls_msg1(DLS_msg_loadpath)
#define MSG_INOP dls_msg1(DLS_msg_inop)
#define MSG_BINRD dls_msg1(DLS_msg_binrd)
#define MSG_DLOST dls_msg1(DLS_msg_dlost)
#define MSG_ONOFF dls_msg1(DLS_msg_onoff)
#define MSG_NETWORK dls_msg1(DLS_msg_network)
#define ERR_FILE dls_msg1(DLS_err_file)
#define ERR02 dls_msg1(DLS_err02)
#define ERR03 dls_msg1(DLS_err03)
#define ERR04 dls_msg1(DLS_err04)
#define ERR05 dls_msg1(DLS_err05)
#define ERR08 dls_msg1(DLS_err08)
#define ERR15 dls_msg1(DLS_err15)
#define ERR20 dls_msg1(DLS_err20)
#define ERR83 dls_msg1(DLS_err83)
#define ERR86 dls_msg1(DLS_err86)
#define ERR19 dls_msg1(DLS_err19)
#define MSG_NEEDPATH dls_msg1(DLS_msg_needpath)
#define MSG_NEEDFILE dls_msg1(DLS_msg_needfile)
#define MSG_NEEDDEV dls_msg1(DLS_msg_needdev)
#define SUN_D dls_msg1(DLS_sun_d)
#define MON_D dls_msg1(DLS_mon_d)
#define TUE_D dls_msg1(DLS_tue_d)
#define WED_D dls_msg1(DLS_wed_d)
#define THU_D dls_msg1(DLS_thu_d)
#define FRI_D dls_msg1(DLS_fri_d)
#define SAT_D dls_msg1(DLS_sat_d)
#define CUR_TIME dls_msg1(DLS_cur_time)
#define NEW_TIME dls_msg1(DLS_new_time)
#define INV_TIME dls_msg1(DLS_inv_time)
#define CUR_DATE dls_msg1(DLS_cur_date)
#define NEW_DATE dls_msg1(DLS_new_date)
#define INV_DATE dls_msg1(DLS_inv_date)
#define US_DATE dls_msg1(DLS_us_date)
#define EURO_DATE dls_msg1(DLS_euro_date)
#define JAP_DATE dls_msg1(DLS_jap_date)
#define INV_NUM dls_msg1(DLS_inv_num)
#define MSG_LONGJMP dls_msg1(DLS_msg_longjmp)
#define MSG_INACTIVE dls_msg1(DLS_msg_inactive)
#define MSG_OUTACTIVE dls_msg1(DLS_msg_outactive)
#define MSG_ON dls_msg1(DLS_msg_on)
#define MSG_OFF dls_msg1(DLS_msg_off)
#define YES_NO dls_msg1(DLS_yes_no)
#define MSG_PAUSE dls_msg1(DLS_msg_pause)
#define MSG_INTERNAL dls_msg1(DLS_msg_internal)
#define MSG_DEBUG dls_msg1(DLS_msg_debug)
#define MSG_DEVFAIL dls_msg1(DLS_msg_devfail)
#define HELP_COM dls_msg1(DLS_help_com)
#define MSG_GOSUB dls_msg1(DLS_msg_gosub)
#define MSG_RETURN dls_msg1(DLS_msg_return)
#define MSG_OPTLINE dls_msg1(DLS_msg_optline)
#define AM_TIME dls_msg1(DLS_am_time)
#define PM_TIME dls_msg1(DLS_pm_time)
#define GREETING_MORNING dls_msg1(DLS_greeting_morning)
#define GREETING_AFTERNOON dls_msg1(DLS_greeting_afternoon)
#define GREETING_EVENING dls_msg1(DLS_greeting_evening)
#define JAN_M dls_msg1(DLS_jan_m)
#define FEB_M dls_msg1(DLS_feb_m)
#define MAR_M dls_msg1(DLS_mar_m)
#define APR_M dls_msg1(DLS_apr_m)
#define MAY_M dls_msg1(DLS_may_m)
#define JUN_M dls_msg1(DLS_jun_m)
#define JUL_M dls_msg1(DLS_jul_m)
#define AUG_M dls_msg1(DLS_aug_m)
#define SEP_M dls_msg1(DLS_sep_m)
#define OCT_M dls_msg1(DLS_oct_m)
#define NOV_M dls_msg1(DLS_nov_m)
#define DEC_M dls_msg1(DLS_dec_m)
#define MSG_DRV_INVALID dls_msg1(DLS_msg_drv_invalid)
#define MSG_CURCP dls_msg1(DLS_msg_curcp)
#define MSG_BADCP dls_msg1(DLS_msg_badcp)
#define MSG_CPNF dls_msg1(DLS_msg_cpnf)
#define MSG_NETSUBST dls_msg1(DLS_msg_netsubst)
#define MSG_NETASSIGN dls_msg1(DLS_msg_netassign)
#define MSG_OEMCPYRT dls_msg1(DLS_msg_oemcpyrt)
#define MSG_SERNO dls_msg1(DLS_msg_serialno)
#else
#define MSG_LBL msg_lbl
#define MSG_OKLBL msg_oklbl
#define MSG_NOLBL msg_nolbl
#define MSG_FILES msg_files
#define MSG_FREE msg_free
#define MSG_EXIST msg_exist
#define MSG_NDIR msg_ndir
#define MSG_NSYS msg_nsys
#define MSG_BADOPT msg_badopt
#define MSG_FULL msg_full
#define MSG_DEVFAIL msg_devfail
#define MSG_SYNTAX msg_syntax
#define MSG_BADCMD msg_badcmd
#define MSG_PATHDRV msg_pathdrv
#define MSG_OPTLINE msg_optline
#define MSG_BATTERM msg_batterm
#define MSG_BATMISS msg_batmiss
#define MSG_BATNEST msg_batnest
#define MSG_DIR msg_dir
#define MSG_ECHO msg_echo
#define MSG_XBATCH msg_xbatch
#define MSG_ERAQ msg_eraq
#define MSG_ERAALL msg_eraall
#define MSG_ERA msg_era
#define MSG_LABEL msg_label
#define MSG_GOSUB msg_gosub
#define MSG_RETURN msg_return
#define MSG_MKDIR msg_mkdir
#define MSG_PATH msg_path
#define MSG_REN msg_ren
#define MSG_USE_RENDIR msg_use_rendir
#define MSG_RMDIR msg_rmdir
#define MSG_BREAK msg_break
#define MSG_VERIFY msg_verify
#define MSG_IDLE msg_idle
#define MSG_CPYRIGHT msg_cpyright
#define MSG_VERSION msg_version
#define MSG_CPYSELF msg_cpyself
#define MSG_FCOPIED msg_fcopied
#define MSG_DISABLED msg_disabled
#define MSG_ENVFULL msg_envfull
#define MSG_ENVERR msg_enverr
#define MSG_BADOS msg_bados
#define MSG_LOADPATH msg_loadpath
#define MSG_INOP msg_inop
#define MSG_BINRD msg_binrd
#define MSG_DLOST msg_dlost
#define MSG_ONOFF msg_onoff
#define ERR_FILE err_file
#define ERR02 err02
#define ERR03 err03
#define ERR04 err04
#define ERR05 err05
#define ERR08 err08
#define ERR15 err15
#define ERR20 err20
#define ERR83 err83
#define ERR86 err86
#define ERR19 err19
#define MSG_NEEDPATH msg_needpath
#define MSG_NEEDFILE msg_needfile
#define MSG_NEEDDEV msg_needdev
#define SUN_D sun_d
#define MON_D mon_d
#define TUE_D tue_d
#define WED_D wed_d
#define THU_D thu_d
#define FRI_D fri_d
#define SAT_D sat_d
#define JAN_M jan_m
#define FEB_M feb_m
#define MAR_M mar_m
#define APR_M apr_m
#define MAY_M may_m
#define JUN_M jun_m
#define JUL_M jul_m
#define AUG_M aug_m
#define SEP_M sep_m
#define OCT_M oct_m
#define NOV_M nov_m
#define DEC_M dec_m
#define CUR_TIME cur_time
#define NEW_TIME new_time
#define INV_TIME inv_time
#define CUR_DATE cur_date
#define NEW_DATE new_date
#define INV_DATE inv_date
#define US_DATE us_date
#define EURO_DATE euro_date
#define JAP_DATE jap_date
#define INV_NUM inv_num
#define MSG_INACTIVE msg_inactive
#define MSG_OUTACTIVE msg_outactive
#define MSG_ON msg_on
#define MSG_OFF msg_off
#define YES_NO yes_no
#define MSG_PAUSE msg_pause
#define MSG_INTERNAL msg_internal
#define MSG_NETWORK msg_network
#define MSG_DEBUG msg_debug
#define MSG_LONGJMP msg_longjmp
/*RG-05*/
#define HELP_COM help_com
#define HELP_PROG help_prog
#define MSG_NOHELPPROG msg_nohelpprog
/*RG-05-end*/
#define AM_TIME am_time
#define PM_TIME pm_time
#define GREETING_MORNING greeting_morning
#define GREETING_AFTERNOON greeting_afternoon
#define GREETING_EVENING greeting_evening
#define MSG_DRV_INVALID msg_drv_invalid
#if defined(CPM)
#define CUR_USER cur_user
#define INV_USER inv_user
#define MSG_SINGLECPM msg_singlecpm
#endif
#if defined(CDOSTMP) || defined(CPM)
#define MSG_CE_NO0 msg_ce_no0
#define MSG_CE_NO2 msg_ce_no2
#define MSG_CE_NO3 msg_ce_no3
#define MSG_CE_NO4 msg_ce_no4
#define MSG_CE_NO6 msg_ce_no6
#define MSG_CE_NO7 msg_ce_no7
#define MSG_CE_NO8 msg_ce_no8
#define MSG_DRIVE msg_drive
#define MSG_READ msg_read
#define MSG_WRITE msg_write
#define MSG_ABORT msg_abort
#define MSG_RETRY msg_retry
#define MSG_IGNORE msg_ignore
#define MSG_FAIL msg_fail
#define MSG_NE_NO0 msg_ne_no0
#define MSG_NE_NO1 msg_ne_no1
#define MSG_NE_NO2 msg_ne_no2
#define MSG_NE_NO3 msg_ne_no3
#define MSG_NE_NO4 msg_ne_no4
#define MSG_NE_NO5 msg_ne_no5
#define MSG_NE_NO6 msg_ne_no6
#define MSG_SERVER msg_server
#endif
#if defined(CDOSTMP) || defined(CDOS)
#define MSG_NOGOOD msg_nogood
#define MSG_NOFAIL msg_nofail
#define MSG_NOATCH msg_noatch
#define MSG_NFGOOD msg_nfgood
#define MSG_NFFAIL msg_nffail
#define MSG_NFATCH msg_nfatch
#define MSG_PWDPRMPT msg_pwdprmpt
#define MSG_BADSTOP msg_badstop
#define MSG_BANK msg_bank
#define MSG_SUSPEND msg_suspend
#define MSG_MEMSIZE msg_memsize
#define MSG_LIMSIZE msg_limsize
#define MSG_LOCAL msg_local
#define MSG_REMOTE msg_remote
#define MSG_APPEND msg_append
#define MSG_CPYPRMPT msg_cpyprmpt
#define ERR_RSC err_rsc
#define MSG_LIMOFF msg_limoff
/*RG-01*/
#if !defined(NOSECURITY)
#define MSG_UHAVEMAIL msg_uhavemail
#endif
/*RG-01-end*/
/*RG-05-*/
#define MSG_HELP msg_help
/*RG-05-end*/
#endif
#if defined(DOSPLUS)
#define MSG_CURCP msg_curcp
#define MSG_BADCP msg_badcp
#define MSG_CPNF msg_cpnf
#define MSG_NETSUBST msg_netsubst
#define MSG_NETASSIGN msg_netassign
#define MSG_OEMCPYRT msg_oemcpyrt
#define MSG_SERIALNO msg_serialno
#endif
#endif

312
COMMAND/TXHELP.ASM Normal file
View File

@@ -0,0 +1,312 @@
NUL equ 0
BS equ 8
TAB equ 9
LF equ 10
CR equ 13
PRI equ 0
ALT equ 1
DGROUP group _DATA
CHELP group _HELP
_DATA segment word public 'DATA'
assume ds:DGROUP, cs:DGROUP
public _single_table
public _dls_table
public _dls_init
public _dls_get_table
public _dls_language
_dls_table dw 0
__dls_init__ db 0
_single_table label word
; Source .TFT file: 'TMP1.$$$'
public help_aaa
help_aaa equ $ - _single_table
dw CHELP:_help_aaa
public help_and
help_and equ $ - _single_table
dw CHELP:_help_and
public help_break
help_break equ $ - _single_table
dw CHELP:_help_break
public help_call
help_call equ $ - _single_table
dw CHELP:_help_call
public help_chcp
help_chcp equ $ - _single_table
dw CHELP:_help_chcp
public help_chdir
help_chdir equ $ - _single_table
dw CHELP:_help_chdir
public help_cls
help_cls equ $ - _single_table
dw CHELP:_help_cls
public help_copy
help_copy equ $ - _single_table
dw CHELP:_help_copy
public help_ctty
help_ctty equ $ - _single_table
dw CHELP:_help_ctty
public help_date
help_date equ $ - _single_table
dw CHELP:_help_date
public help_del
help_del equ $ - _single_table
dw CHELP:_help_del
public help_delq
help_delq equ $ - _single_table
dw CHELP:_help_delq
public help_dir
help_dir equ $ - _single_table
dw CHELP:_help_dir
public help_echo
help_echo equ $ - _single_table
dw CHELP:_help_echo
public help_eraq
help_eraq equ $ - _single_table
dw CHELP:_help_eraq
public help_erase
help_erase equ $ - _single_table
dw CHELP:_help_erase
public help_exit
help_exit equ $ - _single_table
dw CHELP:_help_exit
public help_for
help_for equ $ - _single_table
dw CHELP:_help_for
public help_gosubreturn
help_gosubreturn equ $ - _single_table
dw CHELP:_help_gosubreturn
public help_goto
help_goto equ $ - _single_table
dw CHELP:_help_goto
public help_hiload
help_hiload equ $ - _single_table
dw CHELP:_help_hiload
public help_idle
help_idle equ $ - _single_table
dw CHELP:_help_idle
public help_if
help_if equ $ - _single_table
dw CHELP:_help_if
public help_mkdir
help_mkdir equ $ - _single_table
dw CHELP:_help_mkdir
public help_or
help_or equ $ - _single_table
dw CHELP:_help_or
public help_path
help_path equ $ - _single_table
dw CHELP:_help_path
public help_pause
help_pause equ $ - _single_table
dw CHELP:_help_pause
public help_prompt
help_prompt equ $ - _single_table
dw CHELP:_help_prompt
public help_rem
help_rem equ $ - _single_table
dw CHELP:_help_rem
public help_rename
help_rename equ $ - _single_table
dw CHELP:_help_rename
public help_rmdir
help_rmdir equ $ - _single_table
dw CHELP:_help_rmdir
public help_set
help_set equ $ - _single_table
dw CHELP:_help_set
public help_shift
help_shift equ $ - _single_table
dw CHELP:_help_shift
public help_switch
help_switch equ $ - _single_table
dw CHELP:_help_switch
public help_time
help_time equ $ - _single_table
dw CHELP:_help_time
public help_truename
help_truename equ $ - _single_table
dw CHELP:_help_truename
public help_type
help_type equ $ - _single_table
dw CHELP:_help_type
public help_ver
help_ver equ $ - _single_table
dw CHELP:_help_ver
public help_verify
help_verify equ $ - _single_table
dw CHELP:_help_verify
public help_vol
help_vol equ $ - _single_table
dw CHELP:_help_vol
_DATA ends
_HELP segment word public 'HELP'
assume ds:CHELP, cs:CHELP
; Source .TFT file: 'TMP1.$$$'
_help_aaa db "Available internal commands are:", LF, LF, NUL
_help_truename db "Reserved command.", NUL
_help_break db "BREAK", TAB, "Controls how you break out of programs using Ctrl+Break or Ctrl+C.", LF, LF, "Syntax:", LF, TAB, "BREAK /H", LF, TAB, "BREAK [ON|OFF]", LF, LF, TAB, "/H", TAB, "gives this scre"
db "en", LF, TAB, "ON", TAB, "turns break checking on (default)", LF, TAB, "OFF", TAB, "turns break checking off", LF, TAB, "none", TAB, "no parameters displays the state of break ON or OFF", LF
db LF, "Examples:", LF, TAB, "BREAK OFF", LF, TAB, "BREAK", NUL
_help_call db "CALL", TAB, "Used in batch files, this command will call another batch file and", LF, TAB, "return when it has finished executing it.", LF, LF, "Syntax:", LF, TAB, "CALL /H", LF, TAB, "CALL [d"
db ":][path]file[.BAT][ params[...]]", LF, LF, TAB, "/H", TAB, "gives this screen", LF, TAB, "d:", TAB, "drive where batch file resides", LF, TAB, "path", TAB, "path where batch file resides", LF
db TAB, "file", TAB, "name of batch file to call", LF, TAB, ".BAT", TAB, "optional filename extension", LF, TAB, "params", TAB, "parameter list read by called batch file as %%1 %%2 ... etc", LF, LF
db "Examples:", LF, TAB, "CALL doit.bat", LF, TAB, "CALL setdate 5 Nov 90", NUL
_help_chdir db "CHDIR", TAB, "Shows the path, or changes the current directory. Can be", LF, TAB, "abbreviated to CD.", LF, LF, "Syntax:", LF, TAB, "CHDIR /H", LF, TAB, "CHDIR [[d:]dirpath]", LF, LF, TAB, "/"
db "H", TAB, "gives this screen", LF, TAB, "d:", TAB, "drive on which dirpath resides", LF, TAB, "dirpath", TAB, "directory to change to", LF, TAB, "none", TAB, "no parameters displays the curre"
db "nt drive and directory", LF, LF, "Examples:", LF, TAB, "CHDIR c:\homedir", LF, TAB, "CD ..", LF, TAB, "CD", NUL
_help_cls db "CLS", TAB, "Clears the display screen.", LF, LF, "Syntax:", LF, TAB, "CLS /H", LF, LF, TAB, TAB, "/H", TAB, "gives this screen", LF, LF, "Example:", LF, TAB, "CLS", NUL
_help_copy db "COPY", TAB, "Copies or combines files", LF, LF, "Syntax:", LF, " COPY /H", LF, " COPY device|wildspec[+wildspec...][switches] [device|filespec[switches]]", LF, LF, " device", TAB, "is CON"
db ",LPTn,PRN,NUL,COMn or AUX", LF, " wildspec", TAB, "source device, file or list of files to be included", LF, " filespec", TAB, "destination file or device", LF, " switches", TAB, "/A treat"
db " file as ASCII", LF, TAB, TAB, "/B treat source file as binary (ignore Ctrl+Z in file)", LF, TAB, TAB, "/V verify source and destination match", LF, TAB, TAB, "/S include system or hidden fil"
db "es in copy", LF, TAB, TAB, "/C prompt for confirmation by user before copying", LF, TAB, TAB, "/Z zeros top bit of every byte in destination", LF, "Examples:", LF, TAB, "COPY file1+file2 file"
db "3", LF, TAB, "COPY *.txt c:dir1", NUL
_help_date db "DATE", TAB, "Displays and changes the date.", LF, LF, "Syntax:", LF, TAB, "DATE /H", LF, TAB, "DATE [mm-dd-yy] (US format)", LF, TAB, "DATE [dd-mm-yy] (European format)", LF, TAB, "DATE [yy-"
db "mm-dd] (Japanese format)", LF, LF, TAB, "/H", TAB, "gives this screen", LF, TAB, "mm", TAB, "month 1 to 12", LF, TAB, "dd", TAB, "day 1 to 31", LF, TAB, "yy", TAB, "2 or 4 digit year", LF
db TAB, "none", TAB, "no parameters displays date then prompts for new date", LF, LF, "Examples:", LF, TAB, "DATE 16-11-90", LF, TAB, "DATE", NUL
_help_del db "DEL", TAB, "Erases files.", LF, LF, "Syntax:", LF, TAB, "DEL /H", LF, TAB, "DEL wildspec [/C|/P][/S]", LF, LF, TAB, "/H", TAB, " gives this screen", LF, TAB, "/C|/P", TAB, " prompt befo"
db "re deletion", LF, TAB, "/S", TAB, " include system files", LF, TAB, "wildspec file to be deleted (wildcards allowed)", LF, LF, "Examples:", LF, TAB, "DEL *.EXE /CS", LF, TAB, "DEL MYFILE."
db "TXT", NUL
_help_delq db "DELQ", TAB, "Erases files but queries you before doing so.", LF, LF, "Syntax:", LF, TAB, "DELQ /H", LF, TAB, "DELQ wildspec [/S]", LF, LF, TAB, "/H", TAB, " gives this screen", LF, TAB, "/"
db "S", TAB, " include system files", LF, TAB, "wildspec file to be deleted (wildcards allowed)", LF, LF, "Examples:", LF, TAB, "DELQ *.EXE /S", LF, TAB, "DELQ MYFILE.TXT", NUL
_help_dir db "DIR", TAB, "Displays the files in a directory.", LF, LF, "Syntax:", TAB, "DIR /H", LF, TAB, "DIR [wildspec] [/L|/2|/W] [/P|/N] [/A|/D|/S] [/C|/R]", LF, LF, TAB, "/H", TAB, " gives this scree"
db "n", LF, TAB, "wildspec files to be displayed (wildcards allowed)", LF, TAB, "/A", TAB, " displays all files", LF, TAB, "/C or /R make other switches default for next time", LF, TAB, "/D", TAB
db " displays files without system attribute set (default)", LF, TAB, "/L", TAB, " long format. Include size, date and time (default)", LF, TAB, "/2", TAB, " as above except files are displayed i"
db "n two columns", LF, TAB, "/N", TAB, " return to default paging switch", LF, TAB, "/P", TAB, " pause at end of full page. Default is no paging", LF, TAB, "/S", TAB, " displays files with sy"
db "stem attribute set", LF, TAB, "/W", TAB, " wide format. Displays file and directory names only", LF, TAB, "none", TAB, " no parameters displays all files using current default", LF, TAB, TAB
db " switches", LF, "Example:", LF, TAB, "DIR /C /W", NUL
_help_echo db "ECHO", TAB, "Used in batch files, this command is used to display a message", LF, TAB, "to the screen.", LF, LF, "Syntax:", LF, TAB, "ECHO /H", LF, TAB, "ECHO [ON|OFF|string]", LF, LF, TAB, "/"
db "H", TAB, "gives this screen", LF, TAB, "ON", TAB, "turn echoing on (default)", LF, TAB, "OFF", TAB, "turn echoing off", LF, TAB, "string", TAB, "display ""string""", LF, LF, "Examples:", LF
db TAB, "ECHO OFF", LF, TAB, "ECHO You are running the %%OS%% operating system.", NUL
_help_eraq db "ERAQ", TAB, "Erases files but queries you before doing so.", LF, TAB, "ERAQ wildspec [/S]", LF, LF, TAB, "/H", TAB, " gives this screen", LF, TAB, "/S", TAB, " include system files", LF, TAB
db "wildspec file to be deleted (wildcards allowed)", LF, LF, "Examples:", LF, TAB, "ERAQ *.EXE /S", LF, TAB, "ERAQ MYFILE.TXT", NUL
_help_erase db "ERASE", TAB, "Erases files. Can be abbreviated to ERA.", LF, LF, "Syntax:", LF, TAB, "ERASE /H", LF, TAB, "ERASE wildspec [/C|/P][/S]", LF, LF, TAB, "/H", TAB, " gives this screen", LF, TAB
db "/C|/P", TAB, " prompt before deletion", LF, TAB, "/S", TAB, " include system files", LF, TAB, "wildspec file to be deleted (wildcards allowed)", LF, LF, "Examples:", LF, TAB, "ERASE *.EXE"
db " /CS", LF, TAB, "ERA MYFILE.TXT", NUL
_help_exit db "EXIT", TAB, "Terminates a batch file or secondary command processor.", LF, LF, "Syntax:", LF, TAB, "EXIT [/H]", LF, LF, TAB, "/H", TAB, "gives this screen", LF, LF, "Example:", LF, TAB, "E"
db "XIT", NUL
_help_for db "FOR", TAB, "Most commonly used in batch files, this command is used to repeat", LF, TAB, "a sequence of commands substituting a filename from a list with each", LF, TAB, "iteration of the loop.", LF
db LF, "Syntax:", LF, TAB, "FOR /H", LF, TAB, "FOR %%[%%]var IN (fileset) DO command", LF, LF, TAB, "%%%%var", TAB, " variable used to reference a filename in a batch file", LF, TAB, "%%var", TAB
db " variable used to reference a filename at the command line", LF, TAB, "fileset", TAB, " list of files to perform operation upon", LF, TAB, "command", TAB, " operation to be performed", LF, LF
db "Example:", LF, TAB, "FOR %%%%f IN (myprog.asm acct.bas acct2.bas)DO TYPE %%%%f", LF, TAB, "FOR %%f IN (myprog.asm acct.bas acct2.bas)DO TYPE %%f", NUL
_help_goto db "GOTO", TAB, "Used in batch files, this command causes execution of commands", LF, TAB, "to alter to a specified point in the batch file.", LF, LF, "Syntax:", LF, TAB, "GOTO /H", LF, TAB, "GOTO"
db " label", LF, LF, TAB, "/H", TAB, "gives this screen", LF, TAB, "label", TAB, "label to jump to", LF, LF, "Example:", LF, TAB, ":start", LF, TAB, "type myfile.txt", LF, TAB, "goto start", NUL
_help_gosubreturn db "GOSUB/RETURN", LF, TAB, "The GOSUB command causes execution to jump to a specified point ", LF, TAB, "in a batch file. When a RETURN command is encountered, execution ", LF, TAB, "will continue f"
db "rom the line after the GOSUB.", LF, LF, "Syntax:", LF, TAB, "GOSUB label", LF, LF, "Example:", LF, TAB, "GOSUB myfunc", LF, TAB, "GOTO finished", LF, TAB, ":myfunc", LF, TAB, "ECHO Hello"
db LF, TAB, "RETURN", LF, TAB, ":finished", NUL
_help_switch db "SWITCH", TAB, "This command allows the user to select an entry from a menu ", LF, TAB, "in a batch file. The keys 1 - 9 will select the appropriate label ", LF, TAB, "from the command line. A RETU"
db "RN command returns execution to the ", LF, TAB, "line after the SWITCH command.", LF, LF, "Syntax:", LF, TAB, "SWITCH label [,label..]", LF, LF, "Example:", LF, TAB, "SWITCH label1,label2,la"
db "bel3,label4", LF, TAB, "GOTO finished", LF, TAB, ":label1", LF, TAB, "ECHO Hello", LF, TAB, "RETURN", LF, TAB, ":label2", LF, TAB, "ECHO World", LF, TAB, "RETURN", LF, TAB, "...", NUL
_help_idle db "IDLE", TAB, "Turns dynamic idle detection on or off.", LF, LF, "Syntax:", LF, TAB, "IDLE /H", LF, TAB, "IDLE [= ][ON|OFF]", LF, LF, TAB, "/H", TAB, "gives this screen", LF, TAB, "ON", TAB
db "enables idle detection", LF, TAB, "OFF", TAB, "disables idle detection", LF, TAB, "none", TAB, "no parameters displays the state ON or OFF", LF, LF, "Example:", LF, TAB, "IDLE = ON", LF, TAB
db "IDLE OFF", NUL
_help_if db "IF", TAB, "Used in batch files, this command allows conditional execution", LF, TAB, "of commands based upon specified conditions.", LF, LF, "Syntax:", TAB, "IF /H", LF, TAB, "IF [NOT] conditio"
db "n [AND [NOT] condition] [OR [NOT] condition] command", LF, LF, TAB, "/H", TAB, " gives this screen", LF, LF, TAB, "condition ERRORLEVEL [==] number", LF, TAB, TAB, " EXIST [==] filespec"
db LF, TAB, TAB, " string1 ==|!=|>|>=|<|<=|<> string2", LF, TAB, TAB, " #value1 ==|!=|>|>=|<|<=|<> #value2", LF, LF, "Examples: IF EXIST c:\bin\editor.exe c:\bin\editor %%1", LF, TAB, " IF "
db "NOT ""%%1"" == ""english"" ECHO Invalid Language Specified", LF, TAB, " IF #%%mem%% < #540 ECHO Not Enough Memory", NUL
_help_and db "AND", TAB, "Used with the IF command.", LF, TAB, "Enter IF /? for more information.", LF, NUL
_help_or db "OR", TAB, "Used with the IF command.", LF, TAB, "Enter IF /? for more information.", LF, NUL
_help_mkdir db "MKDIR", TAB, "Creates a subdirectory. Can be abbreviated to MD.", LF, LF, "Syntax:", LF, TAB, "MKDIR /H", LF, TAB, "MKDIR [d:]dirpath", LF, LF, TAB, "/H", TAB, " gives this screen", LF, TAB
db "d:", TAB, " drive", LF, TAB, "dirpath", TAB, " subdirectory to create", LF, LF, "Examples:", LF, TAB, "MKDIR \USERS\ROGER", LF, TAB, "MD ..\USERS\LESLEY", NUL
_help_path db "PATH", TAB, "Sets or displays a search path for commands or batch files.", LF, LF, "Syntax:", LF, TAB, "PATH /H", LF, TAB, "PATH [[d:]dirpath[;[d:]dirpath...]]", LF, LF, TAB, "d:", TAB, "dri"
db "ve on which dirpath resides", LF, TAB, "dirpath", TAB, "subdirectory path", LF, TAB, ";", TAB, "path separator, or on its own, sets PATH to nothing", LF, TAB, "none", TAB, "no parameters disp"
db "lays current path", LF, LF, "Examples:", LF, TAB, "PATH", LF, TAB, "PATH c:\osutils;c:\bin;d:\users\roger", LF, TAB, "PATH;", NUL
_help_pause db "PAUSE", TAB, "Used in batch files, this command halts execution of the batch", LF, TAB, "file until a key is pressed.", LF, LF, "Syntax:", LF, TAB, "PAUSE /H", LF, TAB, "PAUSE [comment]", LF, LF
db TAB, "/H", TAB, "gives this screen", LF, TAB, "comment", TAB, "displays ""comment"" if echo is on", LF, TAB, "none", TAB, "no parameters displays default pause message", LF, LF, "Examples:", LF
db TAB, "PAUSE", LF, TAB, "Strike a key when ready . . .", LF, LF, TAB, "PAUSE Put disk number 2 in drive A:", LF, TAB, "Strike a key when ready . . .", NUL
_help_prompt db "PROMPT", TAB, "Modifies the command prompt.", LF, LF, "Syntax:", TAB, "PROMPT /H or PROMPT [$list]", LF, LF, "Where list can be:", LF, " $ $ character", TAB, TAB, "t time", LF, " d date", TAB
db TAB, TAB, "p current directory", LF, " v OS version number", TAB, TAB, "n drive letter", LF, " g the "">"" character", TAB, TAB, "l the ""<"" character", LF, " b the ""|"" character", TAB
db TAB, "q the ""="" character", LF, " h backspace", TAB, TAB, TAB, "e the escape character (ASCII 27)", LF, " x run the program defined in the PEXEC environment variable", LF, " - turns th"
db "e prompt off", LF, LF, "Example:", LF, " PROMPT $p$g ==> C:\DIR>", NUL
_help_rem db "REM", TAB, "Used in batch files, this command causes the remainder of the", LF, TAB, "line to be ignored.", LF, LF, "Syntax:", LF, TAB, "REM /H", LF, TAB, "REM [comment]", LF, LF, TAB, "/H", TAB
db TAB, "gives this screen", LF, TAB, "comment", TAB, TAB, "comment text", LF, LF, "Examples:", LF, TAB, "REM Ignore the rest of this line", LF, TAB, "REM XDEL \*.* /sdrn THIS IS SAFE SINCE IT "
db "WONT GET EXECUTED", NUL
_help_rename db "RENAME", TAB, "Renames files, or moves files between subdirectories on the same", LF, TAB, "disk. Can be abbreviated to REN.", LF, LF, "Syntax:", LF, TAB, "RENAME /H", LF, TAB, "RENAME oldwild"
db "spec newwildspec", LF, LF, TAB, "/H", TAB, TAB, "gives this screen", LF, TAB, "oldwildspec", TAB, "full path and filename of source file(s)", LF, TAB, "newwildspec", TAB, "full path and fil"
db "ename of destination file(s)", LF, LF, "Examples:", LF, TAB, "RENAME *.TXT *.DOC", LF, TAB, "REN AUTOEXEC.BAT *.SAV", LF, TAB, "REN \MYFILE.BAT \ARCHIVE\MYFILE.BAT", NUL
_help_rmdir db "RMDIR", TAB, "Removes specified subdirectory. Can be abbreviated to RD.", LF, LF, "Syntax:", LF, TAB, "RMDIR /H", LF, TAB, "RMDIR [d:]dirpath", LF, LF, TAB, "/H", TAB, TAB, "gives this scre"
db "en", LF, TAB, "d:", TAB, TAB, "drive upon which dirpath resides", LF, TAB, "dirpath", TAB, TAB, "subdirectory to remove", LF, LF, "Examples:", LF, TAB, "RMDIR \users\ian", LF, TAB, "RD \"
db "work\test", NUL
_help_set db "SET", TAB, "Inserts strings into the command processors environment.", LF, LF, "Syntax:", LF, TAB, "SET /H", LF, TAB, "SET [name=[string]]", LF, LF, TAB, "/H", TAB, "gives this screen", LF, TAB
db "name=", TAB, "environment variable name to be assigned", LF, TAB, "string", TAB, "string to assign to name", LF, TAB, "none", TAB, "no parameters displays all environment strings", LF, LF, "E"
db "xamples:", LF, TAB, "SET archive=c:\archive\", LF, TAB, "SET flags=-b-t$r", LF, TAB, "SET backup=", NUL
_help_shift db "SHIFT", TAB, "Used in batch files, this command allows you to change the", LF, TAB, "position of command line parameters to access more than 10", LF, TAB, "(%%0 through %%9) replacement variables."
db LF, LF, "Syntax:", LF, TAB, "SHIFT [/H]", LF, LF, TAB, "/H", TAB, "gives this screen", LF, LF, "Example:", LF, TAB, ":loop", LF, TAB, "if ""%%1"" == """" goto done", LF, TAB, "copy %%1 "
db "c:\archive", LF, TAB, "shift", LF, TAB, "goto loop", LF, TAB, ":done", NUL
_help_time db "TIME", TAB, "Displays and changes the time of day.", LF, LF, "Syntax:", LF, TAB, "TIME /H", LF, TAB, "TIME [hh[:mm[:ss]][a|p] [/C]", LF, LF, TAB, "/H", TAB, "gives this screen", LF, TAB, "h"
db "h", TAB, "hours 0 to 23 (24 hour clock) or 1 to 12 if a or p specified", LF, TAB, "mm", TAB, "minutes 0 to 59", LF, TAB, "ss", TAB, "seconds 0 to 59", LF, TAB, "a|p", TAB, "am|pm", LF, TAB
db "/C", TAB, "displays time continuously", LF, TAB, "none", TAB, "no parameters displays the current time, then prompts for a", LF, TAB, TAB, "new time. Press Return to leave the time unchanged", LF
db LF, "Examples:", LF, TAB, "TIME 5:23:8", LF, TAB, "TIME 7:32", LF, TAB, "TIME", NUL
_help_type db "TYPE", TAB, "Displays the contents of a text file on screen.", LF, LF, "Syntax:", LF, TAB, "TYPE /H", LF, TAB, "TYPE wildspec [/P]", LF, LF, TAB, "/H", TAB, " gives this screen", LF, TAB, "w"
db "ildspec file to be displayed (wildcards allowed)", LF, TAB, "/P", TAB, " pause when screen full", LF, LF, "Examples:", LF, TAB, "TYPE *.TXT /P", LF, TAB, "TYPE C:\AUTOEXEC.BAT", NUL
_help_ver db "VER", TAB, "Displays the version number of the operating system in use.", LF, LF, "Syntax:", LF, TAB, "VER [/H]", LF, LF, TAB, "/H", TAB, "gives this screen", LF, LF, "Example:", LF, TAB, "V"
db "ER", NUL
_help_verify db "VERIFY", TAB, "Switches the Verify option on or off, which causes the operating", LF, TAB, "system to check that data is correctly written to disk after each", LF, TAB, "disk write operation.", LF
db LF, "Syntax:", LF, TAB, "VERIFY /H", LF, TAB, "VERIFY [ON|OFF]", LF, LF, TAB, "/H", TAB, "gives this screen", LF, TAB, "ON", TAB, "turns VERIFY on", LF, TAB, "OFF", TAB, "turns VERIFY of"
db "f (default)", LF, TAB, "none", TAB, "no parameters displays the current VERIFY state, on or off", LF, LF, "Examples:", LF, TAB, "VERIFY ON", LF, TAB, "VERIFY", NUL
_help_vol db "VOL", TAB, "Displays the disk volume label.", LF, LF, "Syntax:", LF, TAB, "VOL /H", LF, TAB, "VOL [d:]", LF, LF, TAB, "/H", TAB, "gives this screen", LF, TAB, "d:", TAB, "drive to display"
db " volume label", LF, TAB, "none", TAB, "no parameters displays the volume label of the default drive", LF, LF, "Example:", LF, TAB, "VOL", NUL
_help_chcp db "CHCP", TAB, "Change the active Code Page.", LF, LF, "Syntax:", LF, TAB, "CHCP /H", LF, TAB, "CHCP [cp]", LF, LF, TAB, "/H", TAB, "gives this screen", LF, TAB, "cp", TAB, "new active Code "
db "Page", LF, TAB, "none", TAB, "no parameters displays the current active Code Page", LF, LF, "Example:", LF, TAB, "CHCP 850", NUL
_help_ctty db "CTTY", TAB, "Redirect console input and output to a port.", LF, LF, "Syntax:", LF, TAB, "CTTY /H", LF, TAB, "CTTY port", LF, LF, TAB, "/H", TAB, "gives this screen", LF, TAB, "port", TAB, "p"
db "ort to redirect to", LF, LF, "Example:", LF, TAB, "CTTY COM1:", NUL
_help_hiload db "HILOAD", TAB, "Load and execute a program in upper memory.", LF, LF, "Syntax:", LF, TAB, "HILOAD /H", LF, TAB, "HILOAD fname", LF, LF, TAB, "/H", TAB, "gives this screen", LF, TAB, "fname", TAB
db "filename of program to load", LF, LF, TAB, "(LOADHIGH and LH can be used instead of HILOAD)", LF, LF, "HILOAD only has an effect if MemoryMAX software is present and there is", LF, "upper memory"
db " available. If this is not so then the program will load and", LF, "execute in conventional memory.", LF, LF, "Example:", LF, TAB, "HILOAD CURSOR", NUL
_HELP ends
_TEXT segment word public 'CODE'
assume cs:_TEXT, ds:DGROUP
; unsigned dls_language(void)
_dls_language proc near
xor ax, ax
ret
_dls_language endp
; void dls_init(void)
_dls_init proc near
inc __dls_init__
ret
_dls_init endp
; void * dls_get_table(unsigned param)
_dls_get_table proc near
mov al, __dls_init__
cbw
test al, al
je dls_gt_end
mov ax, offset DGROUP:_single_table
mov word ptr _dls_table, ax
dls_gt_end:
ret
_dls_get_table endp
_TEXT ends
end


57
COMMAND/TXHELP.DEF Normal file
View File

@@ -0,0 +1,57 @@
ifndef _DLS_INCLS_
; DLS parameters passed to _dls_get_table function.
DLS_NO equ 0
DLS_YES equ 1
endif ; !_DLS_INCLS_
; DLS system functions.
extrn _dls_init : near
extrn _dls_get_table : near
extrn _dls_language : near
; DLS system variables.
extrn _dls_table : word
; Component messages equated to entries in _dls_table.
help_aaa equ 0
help_and equ 2
help_break equ 4
help_call equ 6
help_chcp equ 8
help_chdir equ 10
help_cls equ 12
help_copy equ 14
help_ctty equ 16
help_date equ 18
help_del equ 20
help_delq equ 22
help_dir equ 24
help_echo equ 26
help_eraq equ 28
help_erase equ 30
help_exit equ 32
help_for equ 34
help_gosubreturn equ 36
help_goto equ 38
help_hiload equ 40
help_idle equ 42
help_if equ 44
help_mkdir equ 46
help_or equ 48
help_path equ 50
help_pause equ 52
help_prompt equ 54
help_rem equ 56
help_rename equ 58
help_rmdir equ 60
help_set equ 62
help_shift equ 64
help_switch equ 66
help_time equ 68
help_truename equ 70
help_type equ 72
help_ver equ 74
help_verify equ 76
help_vol equ 78

111
COMMAND/TXHELP.H Normal file
View File

@@ -0,0 +1,111 @@
#ifndef _DLS_INCLS_
#ifdef __cplusplus
extern "C" {
#endif
/* DLS system functions. */
extern void near cdecl dls_init(void);
extern void near * near cdecl dls_get_table(unsigned);
extern unsigned near cdecl dls_language(void);
#ifdef __cplusplus
};
#endif
/* DLS parameters passed to dls_get_table() function. */
#define DLS_NO 0
#define DLS_YES 1
#define _DLS_INCLS_
#endif /* !_DLS_INCLS_ */
/* DLS system variables. */
extern void near * near * near cdecl dls_table;
/* DLS static initialisation macros. */
#define DLS_number(n) (*(unsigned int near *)dls_table[n])
#define DLS_char(n) (*(char near *)dls_table[n])
#define DLS_string(n) ((char near *)dls_table[n])
#define DLS_array(n) ((char near * near *)dls_table[n])
/* Component messages equated to table entries. */
#define DLS_help_aaa 0
#define help_aaa ((char near *)dls_table[0])
#define DLS_help_and 1
#define help_and ((char near *)dls_table[1])
#define DLS_help_break 2
#define help_break ((char near *)dls_table[2])
#define DLS_help_call 3
#define help_call ((char near *)dls_table[3])
#define DLS_help_chcp 4
#define help_chcp ((char near *)dls_table[4])
#define DLS_help_chdir 5
#define help_chdir ((char near *)dls_table[5])
#define DLS_help_cls 6
#define help_cls ((char near *)dls_table[6])
#define DLS_help_copy 7
#define help_copy ((char near *)dls_table[7])
#define DLS_help_ctty 8
#define help_ctty ((char near *)dls_table[8])
#define DLS_help_date 9
#define help_date ((char near *)dls_table[9])
#define DLS_help_del 10
#define help_del ((char near *)dls_table[10])
#define DLS_help_delq 11
#define help_delq ((char near *)dls_table[11])
#define DLS_help_dir 12
#define help_dir ((char near *)dls_table[12])
#define DLS_help_echo 13
#define help_echo ((char near *)dls_table[13])
#define DLS_help_eraq 14
#define help_eraq ((char near *)dls_table[14])
#define DLS_help_erase 15
#define help_erase ((char near *)dls_table[15])
#define DLS_help_exit 16
#define help_exit ((char near *)dls_table[16])
#define DLS_help_for 17
#define help_for ((char near *)dls_table[17])
#define DLS_help_gosubreturn 18
#define help_gosubreturn ((char near *)dls_table[18])
#define DLS_help_goto 19
#define help_goto ((char near *)dls_table[19])
#define DLS_help_hiload 20
#define help_hiload ((char near *)dls_table[20])
#define DLS_help_idle 21
#define help_idle ((char near *)dls_table[21])
#define DLS_help_if 22
#define help_if ((char near *)dls_table[22])
#define DLS_help_mkdir 23
#define help_mkdir ((char near *)dls_table[23])
#define DLS_help_or 24
#define help_or ((char near *)dls_table[24])
#define DLS_help_path 25
#define help_path ((char near *)dls_table[25])
#define DLS_help_pause 26
#define help_pause ((char near *)dls_table[26])
#define DLS_help_prompt 27
#define help_prompt ((char near *)dls_table[27])
#define DLS_help_rem 28
#define help_rem ((char near *)dls_table[28])
#define DLS_help_rename 29
#define help_rename ((char near *)dls_table[29])
#define DLS_help_rmdir 30
#define help_rmdir ((char near *)dls_table[30])
#define DLS_help_set 31
#define help_set ((char near *)dls_table[31])
#define DLS_help_shift 32
#define help_shift ((char near *)dls_table[32])
#define DLS_help_switch 33
#define help_switch ((char near *)dls_table[33])
#define DLS_help_time 34
#define help_time ((char near *)dls_table[34])
#define DLS_help_truename 35
#define help_truename ((char near *)dls_table[35])
#define DLS_help_type 36
#define help_type ((char near *)dls_table[36])
#define DLS_help_ver 37
#define help_ver ((char near *)dls_table[37])
#define DLS_help_verify 38
#define help_verify ((char near *)dls_table[38])
#define DLS_help_vol 39
#define help_vol ((char near *)dls_table[39])

127
COMMAND/TXLOGIN.H Normal file
View File

@@ -0,0 +1,127 @@
/*
; File : $Workfile$
;
; Description : login security extensions
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
*/
#if defined(CDOSTMP) || defined(CDOS)
#define STD_MSG std_msg
#define MSG_BADHOMEDRV msg_badhomedrv
#define MSG_BADHOMEDIR msg_badhomedir
#define MSG_LOGGEDIN msg_loggedin
#define NAME_PROMPT name_prompt
#define PWORD_PROMPT pword_prompt
#define MSG_BADUSERPWORD msg_baduserpword
#define MSG_LOGINFAILED msg_loginfailed
#define MSG_SEP msg_sep
#define MSG_LOGGEDOUT msg_loggedout
#define MSG_BADFILE msg_badfile
#define MSG_NOFILE msg_nofile
#define MSG_BADREADFILE msg_badreadfile
#define MSG_BADWRITEFILE msg_badwritefile
#define MSG_BADOPENFILE msg_badopenfile
#define MSG_ENTERTOCONT msg_entertocont
#define MSG_LOGLOCKED msg_loglocked
#define MSG_LOCKED msg_locked
#define MSG_UNLOCKFAILED msg_unlockfailed
#define MSG_UNLOCKED msg_unlocked
#define SUN_D sun_d
#define MON_D mon_d
#define TUE_D tue_d
#define WED_D wed_d
#define THU_D thu_d
#define FRI_D fri_d
#define SAT_D sat_d
#define MSG_PROCRUNNING msg_procrunning
#define MSG_VCNUM msg_vcnum
#define MSG_PROCNAME msg_procname
#define MSG_STOPPROC msg_stopproc
#define MSG_FAILABORT msg_failabort
#define UNKNOWN msg_unknown
#define MSG_GETSUPERPWORD1 msg_getsuperpword1
#define MSG_GETSUPERPWORD2 msg_getsuperpword2
#define MSG_CANNOTLOCK msg_cannotlock
#define MSG_CANNOTLOGOUT msg_cannotlogout
#define MSG_TYPEEXIT msg_typeexit
#define MSG_HEAPSIZE msg_heapsize
#define MSG_WILLNOTLOCK msg_willnotlock
EXTERN BYTE yesch;
EXTERN BYTE noch;
EXTERN BYTE std_msg[];
EXTERN BYTE err_msg[];
EXTERN BYTE log_msg[];
EXTERN BYTE msg_baduserpword[];
EXTERN BYTE msg_badhomedir[];
EXTERN BYTE msg_badhomedrv[];
EXTERN BYTE msg_loggedin[];
EXTERN BYTE name_prompt[];
EXTERN BYTE pword_prompt[];
EXTERN BYTE msg_loginfailed[];
EXTERN BYTE msg_sep[];
EXTERN BYTE msg_loggedout[];
EXTERN BYTE msg_erroccurred[];
EXTERN BYTE msg_badfile[];
EXTERN BYTE msg_nofile[];
EXTERN BYTE msg_badreadfile[];
EXTERN BYTE msg_badwritefile[];
EXTERN BYTE msg_badopenfile[];
EXTERN BYTE msg_entertocont[];
EXTERN BYTE msg_loglocked[];
EXTERN BYTE msg_locked[];
EXTERN BYTE msg_unlockfailed[];
EXTERN BYTE msg_unlocked[];
EXTERN BYTE sun_d[];
EXTERN BYTE mon_d[];
EXTERN BYTE tue_d[];
EXTERN BYTE wed_d[];
EXTERN BYTE thu_d[];
EXTERN BYTE fri_d[];
EXTERN BYTE sat_d[];
EXTERN BYTE msg_procrunning[];
EXTERN BYTE msg_vcnum[];
EXTERN BYTE msg_procname[];
EXTERN BYTE msg_stopproc[];
EXTERN BYTE msg_failabort[];
EXTERN BYTE msg_unknown[];
EXTERN BYTE msg_getsuperpword1[];
EXTERN BYTE msg_getsuperpword2[];
EXTERN BYTE msg_cannotlock[];
EXTERN BYTE msg_cannotlogout[];
EXTERN BYTE msg_typeexit[];
EXTERN BYTE msg_heapsize[];
EXTERN BYTE msg_willnotlock[];
#endif

573
IBMBIO/BDOSLDR.A86 Normal file
View File

@@ -0,0 +1,573 @@
; File : $BDOSLDR.A86$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
include i:reqhdr.equ
include i:driver.equ
include config.equ
; MISC constants
CR equ 0dh ;the usual
LF equ 0ah
DATTS equ byte ptr 11
DA_VOLUME equ 08h
DA_DIR equ 10h
DBLOCK1 equ word ptr 26
eject
CGROUP group INITCODE, INITDATA
INITCODE cseg 'INITCODE'
eject
if DOS5
VER_MUSTBE equ 1072h
else
VER_MUSTBE equ 1071h
endif
Public dos_version_check
Public read_dos ; read BDOS from disk
;--------
read_dos: ; read in the BDOS
;--------
call login_drive ; build BPB for the boot drive
mov si,offset dos_name ; get name of file to open
call open_file ; open the BDOS file
call read_file ; read in the system file
ret
login_drive:
;-----------
les di,boot_device ; get device driver address
mov dl,boot_drv ; get the boot drive sub unit
mov ax,es
or ax,di ; make sure boot device is initialised
jnz login_drive10
jmp dev_fail
login_drive10:
mov ax,es:6[di] ; get strategy offset
mov strat_off,ax
mov strat_seg,es ; get strategy segment
mov ax,es:8[di] ; get interrupt offset
mov intrpt_off,ax
mov intrpt_seg,es ; get interrupt segment
mov bx,offset req_hdr
mov ds:RH_UNIT,dl ; save logical unit to use
mov ds:RH_CMD,CMD_BUILD_BPB
call device_request ; tell it to build a BPB
jc dev_fail ; return if can't determine BPB
push ds ! push si
push ds ! pop es
mov di,offset local_bpb ; ES:DI -> local BPB copy
mov cx,BPB_LENGTH
lds si,ds:RH2_BPB ; copy BPB to local memory
rep movsb
pop si ! pop ds
; Now we have to figure out whether the media uses 12 or 16 bit FATs.
; To that end, we need to compute the # of clusters on the drive:
mov fat16,0 ; assume 12 bit FAT
mov al,BT_nfats ; compute FAT size
mov ah,0 ; AX = # of FAT copies (usually 2)
mul BT_fat_size ; AX/DX = size of FAT in sectors
add ax,BT_reserved_sectors ; add in bootstrap sectors
adc dx,0
mov cx,ax ; CX/BP = sector address of root dir
mov bp,dx
mov ax,32 ; compute root directory size
mul BT_dirsize ; AX/DX = bytes in directory
mov bx,BT_bytes_per_sector
dec bx ; BX = sector size - 1 for rounding
add ax,bx ; round up to next sector size
adc dx,0
inc bx ; BX = sector size in bytes
div bx ; AX = # of root directory sectors
add cx,ax ; CX/BP = sectors before data area
adc bp,0
mov ax,BT_total_sectors ; AX/DX = total disk size in sectors
sub dx,dx
test ax,ax ; is it actually larger than 65535?
jnz dev_small ; no, AX/DX is correct
mov ax,BT_total_long ; else get real size from extension
mov dx,BT_total_long+2
dev_small: ; AX/DX = disk size in sectors
sub ax,cx ; AX/DX = data sectors
sbb dx,bp
; now convert this to clusters
mov bl,BT_sctr_per_cluster
mov bh,0 ; BX = sectors per clusters
div bx ; AX = # of data clusters
inc ax
inc ax ; cluster 0,1 are reserved
cmp ax,0FF6h ; is this too large for 12 bits?
jbe dev_12bit ; skip if 12 bits will do
mov fat16,-1 ; else we use 16 bits
dev_12bit:
ret
dos_version_check:
;-----------------
mov ax,4452h
int 21h ; try and get DRDOS version number
jc dev_fail ; it's not DRDOS !
cmp ax,VER_MUSTBE ; version check the DRDOS BDOS
jne dev_fail ; reject all but the one we want
ret ; return now I'm happy
dev_fail: ; any error has occurred loading the BDOS
;--------
; Print '$' terminated message at offset DX to console without using the BDOS
;
mov dx,offset dos_msg
les di,resdev_chain ; get first device driver address
fail_scan:
test es:DH_ATTRIB[di],DA_CHARDEV
jz fail_next ; skip if not a character device
test es:DH_ATTRIB[di],DA_ISCOT
jnz fail_found ; skip if console device found
fail_next:
les di,es:[di] ; get next device
jmps fail_scan
fail_found:
mov ax,es:6[di] ; get strategy offset
mov strat_off,ax
mov strat_seg,es ; get strategy segment
mov ax,es:8[di] ; get interrupt offset
mov intrpt_off,ax
mov intrpt_seg,es ; get interrupt segment
mov bx,offset req_hdr
mov ds:RH_CMD,CMD_OUTPUT ; write to console
mov ds:RH_LEN,RH4_LEN ; set request header length
mov ds:RH4_BUFOFF,dx ; set address of string
mov ds:RH4_BUFSEG,ds
mov ds:RH4_COUNT,-1
mov si,dx ; now find the end of the string
fail_count_chars:
inc ds:RH4_COUNT ; print another char
lodsb ; examine the next one
cmp al,'$' ; terminating char ?
jnz fail_count_chars
call device_request ; call the console driver
sti
jmps $ ; wait for reboot
device_request: ; general device driver interface
;--------------
; entry: BX -> request header
; exit: CY = 1 if error
push ds ! push es
push ds ! pop es
mov ds,strat_seg
callf cs:strat_ptr
callf cs:intrpt_ptr
pop es ! pop ds
test ds:RH_STATUS,RHS_ERROR
jnz devreq_err
clc
ret
devreq_err:
jmp dev_fail ; print error message
ret
open_file: ; open BDOS system file
;---------
; entry: SI -> 11 byte file name
mov al,BT_nfats
cbw
mul BT_fat_size ; DX:AX = # FAT sectors
mov cx,ax ; CX = rel_sctr dir start
mov dx,BT_dirsize ; dx = # entries to scan
open_f1: ; CX = current dir sector
; DX = current dir count
; SI -> file name
push cx ! push dx ! push si
push ds ! pop es ; ES:BX -> sector buffer
mov bx,offset sector_buffer
mov dx,1 ; read one directory sector
call rd_sector_rel ; via disk driver
pop si ! pop dx ! pop cx
inc cx ; increment sector for next time
sub bx,bx ; start at beginning of sector
open_f2:
lea di,sector_buffer[bx] ; ES:DI -> directory entry
push si ! push di ! push cx ; save name ptr and count
push ds ! pop es
mov cx,11
repe cmpsb ; check if name matches
pop cx ! pop di ! pop si
jne open_f3 ; skip if name doesn't match
test DATTS[di],DA_DIR+DA_VOLUME
jz open_foundit ; skip if matches
open_f3:
dec dx ; count down root directory entries
jz open_fail ; skip if root directory done
add bx,32 ; next entry in directory sector
cmp bx,BT_bytes_per_sector ; sector complete?
jb open_f2 ; loop back while more
jmps open_f1 ; read next directory sector
open_fail: ; file not found
jmp dev_fail
open_foundit: ; found the open file handle
mov ax,DBLOCK1[di] ; get first disk block
mov start_cluster,ax ; save starting cluster
xor ax,ax
ret ; return success
read_file: ; read BDOS files into memory at MEM_CURRENT:0000
;---------
mov ax,current_dos ; Get the Segment address to
mov dta_seg,ax ; load the BDOS at
sub ax,ax
mov dta_off,ax
rd_file1:
mov cluster_count,1 ; we can read at least one cluster
mov cx,start_cluster
rd_file2: ; check if next cluster contiguous
push cx ; save current cluster number
call next_cluster ; get link to next cluster
pop dx ; get previous cluster #
inc dx ; is current cluster contiguous?
cmp cx,dx ; contiguos if CX == DX
jne rd_file3 ; no, need a separate read
inc cluster_count ; else read one more cluster
jmps rd_file2 ; try again with next cluster
rd_file3: ; CX = next chain, multi cluster read
push cx ; save start of next chain
les bx,dta_ptr ; ES:BX -> transfer address
mov cx,start_cluster ; previous contiguous chain starts here
mov dx,cluster_count ; length of chain in clusters
call rd_cluster ; read DX clusters
mov al,BT_sctr_per_cluster
mov ah,0 ; AX = sectors per cluster
mul cluster_count ; AX = sectors in chain to read
mul BT_bytes_per_sector ; AX = bytes in chain to read
add dta_off,ax
pop cx ; CX = next (noncontiguous) cluster
mov start_cluster,cx ; start of new chain
inc cx ; was it end of file cluster number?
jnz rd_file1 ; go back for more if not
; else all clusters done
ret
get_FAT_byte:
;------------
; entry: BX = offset into FAT
mov ax,bx ; BX = offset into FAT
sub dx,dx ; AX/DX = 32 bit offset
div BT_bytes_per_sector ; AX = sector, DX = offset in sector
push dx ; save offset in sector
call locate_FAT ; read FAT sector AX
pop bx ; BX = offset in FAT sector
mov al,sector_buffer[bx] ; get byte from FAT buffer
ret
locate_FAT:
;----------
; entry: AX = FAT sector to locate
cmp ax,current_fatsec ; AX = sector offset into FAT
je locate_FAT_match ; O.K. if same as last time
mov current_fatsec,ax ; set new sector for next time
push cx ! push si ; preserve FAT index
mov cx,ax ; CX = sector number
mov bx,offset sector_buffer
push ds ! pop es ; ES:BX -> sector buffer
mov dx,1 ; DX = single sector
call rd_sector_rel ; read FAT sector
pop si ! pop cx ; restore FAT index
locate_FAT_match: ; return with right sector in buffer
ret
eject
; reads sectors relative to start of DOS area on disk (start=0)
; same parameters as rd_sector
rd_sector_rel:
;-------------
; entry: CX = sector address relative to first FAT sector
; DX = sector count
sub bp,bp ;overflow word = 0
add cx,BT_reserved_sectors
adc bp,0
; jmps rd_sector
; reads absolute sectors from hard disk using rom bios
rd_sector:
;---------
; entry: DX = number of sectors
; ES:BX -> data transfer buffer
; DS -> program global data segment
; CX/BP = absolute sector # (32 bit) (low/high)
push cx ! push dx ; save parameters
mov req3_bufoff,bx ; save transfer offset
mov req3_bufseg,es ; save transfer segment
mov req3_count,dx ; set sector count
mov bx,offset req_hdr ; BX -> request header
mov ds:RH_CMD,CMD_INPUT ; read from disk device
mov req3_sector,cx ; set requested sector address
if DOS5
mov req_hdr,RH4_LEN
mov req3_sector32,cx ; with 32 sector number
mov req3_sector32+2,bp
test bp,bp ; large sector number?
jz rd_sec1 ; no, normal request header
mov req3_sector,0FFFFh ; mark as a large request
rd_sec1:
else
mov req3_sector+2,bp ; (support large DOS drives)
mov req_hdr,24 ; indicate large request
endif
call device_request ; tell it to read sectors
pop cx ! pop dx
ret ; if CY, AH=error code
rd_cluster:
;----------
; entry: CX = DOS cluster number.
; DX = cluster count
; ES:BX -> transfer buffer
push bx ! push es
mov al,BT_sctr_per_cluster
mov ah,0 ; AX = sectors per cluster
mul dx ; AX = sectors in all clusters
push ax ; save the sector count
sub cx,2 ; cluster 2 is data area start
mov al,BT_sctr_per_cluster
cbw
mul cx ; AX,DX = relative sector #
mov cx,ax
mov bp,dx ; CX,BP = data area sector #
mov al,BT_nfats ; compute FAT size
mov ah,0 ; AX = # of FAT copies (usually 2)
mul BT_fat_size ; AX/DX = size of FAT in sectors
add cx,ax
adc bp,dx ; CX,BP = end of FAT sectors
mov ax,32
mul BT_dirsize ; AX,DX = bytes in root directory
mov bx,BT_bytes_per_sector
dec bx
add ax,bx ; round up directory size
adc dx,0
inc bx
div bx ; AX = root directory sectors
add cx,ax
adc bp,0 ; add root directory size
add cx,BT_reserved_sectors ; add in boot sector(s)
adc bp,0
pop dx ! pop es ! pop bx ; sector count, disk address
jmp rd_sector ; DX secs from CX/BP to ES:BX
; Finds the NEXT cluster after the one passed in CX in an allocation
; chain by using the FAT. Returns the carry set if the end of chain
; mark is found, otherwise returns the NEW cluster # in CX.
next_cluster:
;------------
push dx ! push bx ; save some registers
cmp fat16,0 ; check if this is 12 bit media
je next_cluster12 ; skip if old fashioned 12 bit
mov ax,2
mul cx ; AX/DX = byte offset in FAT (max. 128K)
div BT_bytes_per_sector ; AX = FAT sector #, DX = byte offset
push dx ; save byte offset within sector
call locate_FAT ; get FAT sector AX
pop bx ; BX = offset within sector
mov cx,word ptr sector_buffer[bx]
; get 16 bit from FAT
cmp cx,0FFF7h ; check if too large for #
jae next_cluster_eof ; set carry, EOF
clc
jmps next_cluster_ret ; good link
next_cluster12: ; DOS 2.x disk
push cx ; save cluster number
mov bx,cx
add bx,bx ; BX = cluster# * 2
add bx,cx ; BX = cluster# * 3
shr bx,1 ; BX = cluster# * 1.5
push bx ; save offset in the FAT
inc bx ; BX = offset of high byte
call get_FAT_byte ; get the high byte in AL
pop bx ; BX = offset of low byte
push ax ; save high byte on stack
call get_FAT_byte ; get the low byte in AL
pop bx ; pop off high byte into BL
mov ah,bl ; set high byte, AX = word
pop cx ; restore cluster number
shr cx,1 ; test if even or odd
jnc even_fat ; if even entry, done
mov cl,4 ; odd entry, shift down one nibble
shr ax,cl ; else need to justify
even_fat: ; even entry, strip off top bits
and ax,0fffh ; bx[0..11] are cluster
mov cx,ax ; CX = cluster number
cmp cx,0ff7h ; compare with largest legal 12 bit #
jae next_cluster_eof ; check for end mark
clc
jmps next_cluster_ret ; return value in CX, CY = 0
next_cluster_eof:
mov cx,-1 ; indicate end of chain
stc ; end of chain
next_cluster_ret:
pop bx ! pop dx
ret
eject
;
; INITIALIZED DATA SEGMENT
; ========================
INITDATA dseg 'INITDATA'
extrn resdev_chain:dword ; resident device driver root
extrn current_dos:word ; current BDOS segment
extrn boot_device:dword ; device driver we boot from
extrn boot_drv:byte ; boot drive
extrn dos_name:byte ; name of BDOS file
strat_ptr rd 0
strat_off rw 1
strat_seg rw 1
intrpt_ptr rd 0
intrpt_off rw 1
intrpt_seg rw 1
dta_ptr rd 0
dta_off rw 1
dta_seg rw 1
start_cluster rw 1
cluster_count rw 1
current_fatsec dw -1 ; no FAT sector read yet
fat16 dw 0 ; defaults to 12 bit FAT
; single error message if BDOS can't be loaded:
include initmsgs.def ; Include TFT Header File
;dos_msg db CR,LF,'Can''t load DOS file.$'
; static request header for DOS device driver I/O
req_hdr db 22
req_unit rb 1
req_cmd rb 1
req_status rw 1
rd 2
req_media rb 1
rb 16
req1_return equ byte ptr req_media+1
req1_volid equ word ptr req_media+2
req2_bufoff equ word ptr req_media+1
req2_bufseg equ word ptr req_media+3
req2_bpb equ word ptr req_media+5
req3_buffer equ dword ptr req_media+1
req3_bufoff equ word ptr req_media+1
req3_bufseg equ word ptr req_media+3
req3_count equ word ptr req_media+5
req3_sector equ word ptr req_media+7
req3_volid equ word ptr req_media+9
req3_sector32 equ word ptr req_media+13
; local copy of the BPB for the boot device
local_bpb rb 0
BT_bytes_per_sector rw 1
BT_sctr_per_cluster rb 1
BT_reserved_sectors rw 1
BT_nfats rb 1
BT_dirsize rw 1
BT_total_sectors rw 1
BT_fatid rb 1
BT_fat_size rw 1
BT_sectors_per_track rw 1
BT_nheads rw 1
BT_hidden_sectors rw 2
BT_total_long rw 2
BPB_LENGTH equ (offset $-offset local_bpb)
extrn sector_buffer:byte
end

48
IBMBIO/BDOSSTUB.A86 Normal file
View File

@@ -0,0 +1,48 @@
; File : $BDOSSTUB.A86$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
CGROUP group INITCODE
INITCODE cseg 'INITCODE'
public read_bdos
read_bdos:
ret
public bdos_version_check
bdos_version_check:
ret
end

BIN
IBMBIO/BIN/BDOSLDR.OBJ Normal file

Binary file not shown.

BIN
IBMBIO/BIN/BDOSSTUB.OBJ Normal file

Binary file not shown.

418
IBMBIO/BIN/BIOS.MAP Normal file
View File

@@ -0,0 +1,418 @@
LINK : warning L4021: no stack segment
Start Stop Length Name Class
00000H 00616H 00617H CODE CODE
00617H 00617H 00000H ENDCODE ENDCODE
00620H 0171FH 01100H RCODE_ALIGN RCODE
01720H 02692H 00F73H RCODE RCODE
026A0H 027AFH 00110H RESUMECODE RESUMECODE
027B0H 031DFH 00A30H RESBIOS RESBIOS
031E0H 03905H 00726H ICODE ICODE
03910H 0391FH 00010H IDATA IDATA
03920H 064F5H 02BD6H INITCODE INITCODE
06500H 06637H 00138H STACKS STACKS
06640H 079A6H 01367H INITDATA INITDATA
079B0H 07A1FH 00070H INITPSP INITDATA
07A20H 07B9DH 0017EH INITENV INITDATA
07BA0H 07BA0H 00000H DATAEND INITDATA
Origin Group
0000:0 CGROUP
Address Publics by Name
0000:0000 A20ENABLE
0000:4043 ALLOCHMA
0000:417C ALLOC_HISEG
0000:414F ALLOC_INSTSEG
0000:41A4 ALLOC_SEG
0000:77C4 BAD_BREAK
0000:77EA BAD_BUFFERS
0000:7746 BAD_COMMAND
0000:7931 BAD_COUNTRY
0000:787F BAD_DRIVPARM
0000:7948 BAD_EXEC
0000:782E BAD_FCBS
0000:776B BAD_FILENAME
0000:7806 BAD_FILES
0000:7848 BAD_FOPEN
0000:78E8 BAD_HISTORY
0000:779A BAD_LASTDRIVE
0000:7781 BAD_SHELL
0000:396E BIOSINIT
0000:7BA0 BIOSINIT_END
0000:66B8 BIOS_SEG
0000:667A BIOS_TARGET_SEG
0000:6C08 BLKDEV_TABLE
0000:474E BLOCK_DEVICE
0000:6BE7 BOOT_DEVICE
0000:6BEB BOOT_DRV
0000:7B80 BOOT_OPTIONS
0000:0434 BPB160
0000:0491 BPB360
0000:04CF BPB720
0000:31E0 BPBS
0000:0537 BPBTBL
0000:6BE2 BUFFERSIN
0000:4BCA BUILD_CMD_TAIL
0000:7203 CFG_FILE
0000:724F CFG_FILE_END
0000:001A CLEANUP
0000:6BF0 CLKDEV_OFF
0000:6BF2 CLKDEV_SEG
0000:17DC CLOCKTABLE
0000:669C CODE_PAGE
0000:668F COMSPEC_DRV
0000:6BF4 CONDEV_OFF
0000:6BF6 CONDEV_SEG
0000:443B CONFIG
0000:4978 CONFIG_FINISH
0000:4400 CONFIG_INIT
0000:4C50 CONFIG_PROCESS
0000:1900 CONSOLETABLE
0000:022A CONTROLBREAK
0000:669A COUNTRY_CODE
0000:4401 COUNTRY_INIT
0000:5A4A CRLF
0000:7175 CTRY_INFO
0000:6676 CURRENT_DOS
0000:1722 DATASEGMENT
0000:0232 DAYCOUNT
0000:7171 DBCS_TBL
0000:0184 DEBLOCKSEG
0000:71CA DEBLOCKSETBYUSER
0000:461C DEVICE_INIT
0000:4947 DEVICE_INSERT
0000:6684 DEVICE_ROOT
0000:6BE3 DEV_COUNT
0000:6D6C DEV_EPB
0000:6D6C DEV_LOAD_SEG
0000:6D1C DEV_NAME
0000:6D6E DEV_RELOC_SEG
0000:1B97 DISKTABLE
0000:262A DISK_MSGA
0000:2647 DISK_MSGB
0000:266E DIV_BY_ZERO_MSG
0000:7A00 DOSVERSION
0000:66BC DOS_DSEG
0000:798F DOS_MSG
0000:669E DOS_NAME
0000:6678 DOS_TARGET_SEG
0000:61E3 DOS_VERSION_CHECK
0000:6664 DRDOS_PTR
0000:1724 DRIVERFUNCTION
0000:0602 ENDBIOS
0000:668A EXT_MEM_SIZE
0000:020C FASTCONSOLE
0000:6660 FUNC52_PTR
0000:66D0 HIDOS
0000:6ADA HISTORY_FLG
0000:6ADB HISTORY_SIZE
0000:3F43 HOOKINT2F
0000:00B4 I13OFF_SAVE
0000:00B4 I13POINTER
0000:00B6 I13SEG_SAVE
0000:0610 I13_AX
0000:6670 ICODE_LEN
0000:31F4 INIT0
0000:6420 INITSTACKS
0000:6BE0 INIT_BUF
0000:668E INIT_DRV
0000:66BA INIT_DSEG
0000:668C INIT_FLAGS
0000:391A INIT_RUNIT
0000:46D2 INIT_STATIC_REQUEST
0000:1A11 INT13DEBLOCK
0000:01C0 INT13TRAP
0000:1A04 INT13UNSURE
0000:1B2D INT2FHANDLER
0000:01F7 INT2FTRAP
0000:01B6 INTDISKTABLE
0000:6CF6 INTERRUPT
0000:6CF6 INTERRUPT_OFF
0000:6CF8 INTERRUPT_SEG
0000:66D5 LAST_DRV
0000:0537 LAYOUT_TABLE
0000:0234 LOCAL_BUFFER
0000:0600 LOCAL_CHAR
0000:0601 LOCAL_FLAG
0000:0432 LOCAL_ID
0000:052C LOCAL_PARMS
0000:03F2 LOCAL_PT
0000:6BEE MAX_CLSIZE
0000:6BEC MAX_SECSIZE
0000:66C2 MEM_CURRENT
0000:66C0 MEM_CURRENT_BASE
0000:66C4 MEM_MAX
0000:6688 MEM_SIZE
0000:0008 Abs NBPBS
0000:6BE4 NEXT_DRV
0000:5EF0 NLS_HOOK
0000:6D70 NLS_TEMP_AREA
0000:5F0C NLS_UNHOOK
0000:7743 NO_CHAR
0000:0178 NUMDISKUNITS
0000:6BE5 NUM_BLKDEV
0000:6696 NUM_FCBS
0000:6694 NUM_FILES
0000:6698 NUM_FOPEN
0000:6BE1 NUM_READ_AHEAD_BUF
0000:6690 NUM_STACKS
0000:0106 ORGINT13
0000:0533 PARMS_GPL
0000:0530 PARMS_SPT
0000:71D2 PRELOAD_DRV
0000:6674 RCODE_FIXUPS
0000:6672 RCODE_LEN
0000:666C RCODE_OFFSET
0000:666E RCODE_SEG
0000:6132 READ_DOS
0000:18E0 READ_SYSTEM_TICKS
0000:6C06 REL_UNIT
0000:6CFE REQUEST_HDR
0000:00B8 REQ_OFF
0000:00B8 REQ_PTR
0000:00BA REQ_SEG
0000:6C00 RESDEV_CHAIN
0000:462F RESIDENT_DEVICE_INIT
0000:26A0 RESUMEHANDLER
0000:6668 RES_DDSC_PTR
0000:6D70 SECTOR_BUFFER
0000:001F SERPARCHAR
0000:24CE SERPARCOMMONTABLE
0000:001B SERPARFLAG
0000:40B8 SETUPHMA
0000:48AE SETUP_LDT
0000:45C2 SETUP_STACKS
0000:7A22 SHELL
0000:670F SHELL_CLINE
0000:6692 STACK_SIZE
0000:267F STARTING_DOS_MSG
0000:00BC STRAT
0000:6CF2 STRATEGY
0000:6CF2 STRATEGY_OFF
0000:6CF4 STRATEGY_SEG
0000:3F68 UNHOOKINT2F
0000:43E8 VERIFY386
0000:4BBF WHITESPACE
0000:7740 YES_CHAR
0000:77C4 _BAD_BREAK
0000:77EA _BAD_BUFFERS
0000:7746 _BAD_COMMAND
0000:7931 _BAD_COUNTRY
0000:787F _BAD_DRIVPARM
0000:7948 _BAD_EXEC
0000:782E _BAD_FCBS
0000:776B _BAD_FILENAME
0000:7806 _BAD_FILES
0000:7848 _BAD_FOPEN
0000:78E8 _BAD_HISTORY
0000:779A _BAD_LASTDRIVE
0000:7781 _BAD_SHELL
0000:262A _DISK_MSGA
0000:2647 _DISK_MSGB
0000:266E _DIV_BY_ZERO_MSG
0000:798F _DOS_MSG
0000:7743 _NO_CHAR
0000:267F _STARTING_DOS_MSG
0000:7740 _YES_CHAR
Address Publics by Value
0000:0000 A20ENABLE
0000:0008 Abs NBPBS
0000:001A CLEANUP
0000:001B SERPARFLAG
0000:001F SERPARCHAR
0000:00B4 I13OFF_SAVE
0000:00B4 I13POINTER
0000:00B6 I13SEG_SAVE
0000:00B8 REQ_PTR
0000:00B8 REQ_OFF
0000:00BA REQ_SEG
0000:00BC STRAT
0000:0106 ORGINT13
0000:0178 NUMDISKUNITS
0000:0184 DEBLOCKSEG
0000:01B6 INTDISKTABLE
0000:01C0 INT13TRAP
0000:01F7 INT2FTRAP
0000:020C FASTCONSOLE
0000:022A CONTROLBREAK
0000:0232 DAYCOUNT
0000:0234 LOCAL_BUFFER
0000:03F2 LOCAL_PT
0000:0432 LOCAL_ID
0000:0434 BPB160
0000:0491 BPB360
0000:04CF BPB720
0000:052C LOCAL_PARMS
0000:0530 PARMS_SPT
0000:0533 PARMS_GPL
0000:0537 LAYOUT_TABLE
0000:0537 BPBTBL
0000:0600 LOCAL_CHAR
0000:0601 LOCAL_FLAG
0000:0602 ENDBIOS
0000:0610 I13_AX
0000:1722 DATASEGMENT
0000:1724 DRIVERFUNCTION
0000:17DC CLOCKTABLE
0000:18E0 READ_SYSTEM_TICKS
0000:1900 CONSOLETABLE
0000:1A04 INT13UNSURE
0000:1A11 INT13DEBLOCK
0000:1B2D INT2FHANDLER
0000:1B97 DISKTABLE
0000:24CE SERPARCOMMONTABLE
0000:262A DISK_MSGA
0000:262A _DISK_MSGA
0000:2647 DISK_MSGB
0000:2647 _DISK_MSGB
0000:266E _DIV_BY_ZERO_MSG
0000:266E DIV_BY_ZERO_MSG
0000:267F _STARTING_DOS_MSG
0000:267F STARTING_DOS_MSG
0000:26A0 RESUMEHANDLER
0000:31E0 BPBS
0000:31F4 INIT0
0000:391A INIT_RUNIT
0000:396E BIOSINIT
0000:3F43 HOOKINT2F
0000:3F68 UNHOOKINT2F
0000:4043 ALLOCHMA
0000:40B8 SETUPHMA
0000:414F ALLOC_INSTSEG
0000:417C ALLOC_HISEG
0000:41A4 ALLOC_SEG
0000:43E8 VERIFY386
0000:4400 CONFIG_INIT
0000:4401 COUNTRY_INIT
0000:443B CONFIG
0000:45C2 SETUP_STACKS
0000:461C DEVICE_INIT
0000:462F RESIDENT_DEVICE_INIT
0000:46D2 INIT_STATIC_REQUEST
0000:474E BLOCK_DEVICE
0000:48AE SETUP_LDT
0000:4947 DEVICE_INSERT
0000:4978 CONFIG_FINISH
0000:4BBF WHITESPACE
0000:4BCA BUILD_CMD_TAIL
0000:4C50 CONFIG_PROCESS
0000:5A4A CRLF
0000:5EF0 NLS_HOOK
0000:5F0C NLS_UNHOOK
0000:6132 READ_DOS
0000:61E3 DOS_VERSION_CHECK
0000:6420 INITSTACKS
0000:6660 FUNC52_PTR
0000:6664 DRDOS_PTR
0000:6668 RES_DDSC_PTR
0000:666C RCODE_OFFSET
0000:666E RCODE_SEG
0000:6670 ICODE_LEN
0000:6672 RCODE_LEN
0000:6674 RCODE_FIXUPS
0000:6676 CURRENT_DOS
0000:6678 DOS_TARGET_SEG
0000:667A BIOS_TARGET_SEG
0000:6684 DEVICE_ROOT
0000:6688 MEM_SIZE
0000:668A EXT_MEM_SIZE
0000:668C INIT_FLAGS
0000:668E INIT_DRV
0000:668F COMSPEC_DRV
0000:6690 NUM_STACKS
0000:6692 STACK_SIZE
0000:6694 NUM_FILES
0000:6696 NUM_FCBS
0000:6698 NUM_FOPEN
0000:669A COUNTRY_CODE
0000:669C CODE_PAGE
0000:669E DOS_NAME
0000:66B8 BIOS_SEG
0000:66BA INIT_DSEG
0000:66BC DOS_DSEG
0000:66C0 MEM_CURRENT_BASE
0000:66C2 MEM_CURRENT
0000:66C4 MEM_MAX
0000:66D0 HIDOS
0000:66D5 LAST_DRV
0000:670F SHELL_CLINE
0000:6ADA HISTORY_FLG
0000:6ADB HISTORY_SIZE
0000:6BE0 INIT_BUF
0000:6BE1 NUM_READ_AHEAD_BUF
0000:6BE2 BUFFERSIN
0000:6BE3 DEV_COUNT
0000:6BE4 NEXT_DRV
0000:6BE5 NUM_BLKDEV
0000:6BE7 BOOT_DEVICE
0000:6BEB BOOT_DRV
0000:6BEC MAX_SECSIZE
0000:6BEE MAX_CLSIZE
0000:6BF0 CLKDEV_OFF
0000:6BF2 CLKDEV_SEG
0000:6BF4 CONDEV_OFF
0000:6BF6 CONDEV_SEG
0000:6C00 RESDEV_CHAIN
0000:6C06 REL_UNIT
0000:6C08 BLKDEV_TABLE
0000:6CF2 STRATEGY
0000:6CF2 STRATEGY_OFF
0000:6CF4 STRATEGY_SEG
0000:6CF6 INTERRUPT_OFF
0000:6CF6 INTERRUPT
0000:6CF8 INTERRUPT_SEG
0000:6CFE REQUEST_HDR
0000:6D1C DEV_NAME
0000:6D6C DEV_LOAD_SEG
0000:6D6C DEV_EPB
0000:6D6E DEV_RELOC_SEG
0000:6D70 NLS_TEMP_AREA
0000:6D70 SECTOR_BUFFER
0000:7171 DBCS_TBL
0000:7175 CTRY_INFO
0000:71CA DEBLOCKSETBYUSER
0000:71D2 PRELOAD_DRV
0000:7203 CFG_FILE
0000:724F CFG_FILE_END
0000:7740 YES_CHAR
0000:7740 _YES_CHAR
0000:7743 _NO_CHAR
0000:7743 NO_CHAR
0000:7746 _BAD_COMMAND
0000:7746 BAD_COMMAND
0000:776B _BAD_FILENAME
0000:776B BAD_FILENAME
0000:7781 _BAD_SHELL
0000:7781 BAD_SHELL
0000:779A BAD_LASTDRIVE
0000:779A _BAD_LASTDRIVE
0000:77C4 _BAD_BREAK
0000:77C4 BAD_BREAK
0000:77EA BAD_BUFFERS
0000:77EA _BAD_BUFFERS
0000:7806 _BAD_FILES
0000:7806 BAD_FILES
0000:782E BAD_FCBS
0000:782E _BAD_FCBS
0000:7848 BAD_FOPEN
0000:7848 _BAD_FOPEN
0000:787F _BAD_DRIVPARM
0000:787F BAD_DRIVPARM
0000:78E8 _BAD_HISTORY
0000:78E8 BAD_HISTORY
0000:7931 _BAD_COUNTRY
0000:7931 BAD_COUNTRY
0000:7948 _BAD_EXEC
0000:7948 BAD_EXEC
0000:798F _DOS_MSG
0000:798F DOS_MSG
0000:7A00 DOSVERSION
0000:7A22 SHELL
0000:7B80 BOOT_OPTIONS
0000:7BA0 BIOSINIT_END
Program entry point at 0000:0000

BIN
IBMBIO/BIN/BIOSGRPS.OBJ Normal file

Binary file not shown.

BIN
IBMBIO/BIN/BIOSINIT.OBJ Normal file

Binary file not shown.

BIN
IBMBIO/BIN/BIOSMSGS.OBJ Normal file

Binary file not shown.

BIN
IBMBIO/BIN/BIOSSTUB.LIB Normal file

Binary file not shown.

BIN
IBMBIO/BIN/CLOCK.OBJ Normal file

Binary file not shown.

BIN
IBMBIO/BIN/CONFIG.OBJ Normal file

Binary file not shown.

BIN
IBMBIO/BIN/CONFSTUB.OBJ Normal file

Binary file not shown.

BIN
IBMBIO/BIN/CONSOLE.OBJ Normal file

Binary file not shown.

BIN
IBMBIO/BIN/DISK.OBJ Normal file

Binary file not shown.

BIN
IBMBIO/BIN/GENERCFG.OBJ Normal file

Binary file not shown.

BIN
IBMBIO/BIN/IBMBIO.COM Normal file

Binary file not shown.

BIN
IBMBIO/BIN/INIT.OBJ Normal file

Binary file not shown.

BIN
IBMBIO/BIN/INITMSGS.OBJ Normal file

Binary file not shown.

BIN
IBMBIO/BIN/NLSFUNC.OBJ Normal file

Binary file not shown.

BIN
IBMBIO/BIN/SERPAR.OBJ Normal file

Binary file not shown.

BIN
IBMBIO/BIN/STACKS.OBJ Normal file

Binary file not shown.

4
IBMBIO/BIOS.LNK Normal file
View File

@@ -0,0 +1,4 @@
.\bin\biosgrps+.\bin\init+.\bin\clock+.\bin\console+.\bin\disk+
.\bin\serpar+.\bin\biosmsgs+.\bin\biosinit+.\bin\config+.\bin\genercfg+
.\bin\nlsfunc+.\bin\bdosldr+.\bin\stacks+.\bin\initmsgs
.\bin\bios,.\bin\bios,.\bin\biosstub.lib /MAP;

39
IBMBIO/BIOSGRPS.ASM Normal file
View File

@@ -0,0 +1,39 @@
; File : $BIOSGRPS.ASM$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
CGROUP group CODE,ENDCODE,RCODE_ALIGN,RCODE,RESUMECODE,RESBIOS,ICODE,IDATA,INITCODE,STACKS,INITDATA,INITPSP,INITENV,DATAEND
include BIOSGRPS.EQU
end

75
IBMBIO/BIOSGRPS.EQU Normal file
View File

@@ -0,0 +1,75 @@
; File : $BIOSGRPS.EQU$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
CODE segment public byte 'CODE'
CODE ends
ENDCODE segment public byte 'ENDCODE'
ENDCODE ends
RCODE_ALIGN segment public para 'RCODE'
RCODE_ALIGN ends
RCODE segment public word 'RCODE'
RCODE ends
RESUMECODE segment public para 'RESUMECODE'
RESUMECODE ends
RESBIOS segment public para 'RESBIOS'
RESBIOS ends
ICODE segment public word 'ICODE'
ICODE ends
IDATA segment public para 'IDATA'
IDATA ends
INITCODE segment public para 'INITCODE'
INITCODE ends
STACKS segment public para 'STACKS'
STACKS ends
INITDATA segment public para 'INITDATA'
INITDATA ends
INITPSP segment public para 'INITDATA'
INITPSP ends
INITENV segment public para 'INITDATA'
INITENV ends
DATAEND segment public para 'INITDATA'
DATAEND ends

1805
IBMBIO/BIOSINIT.A86 Normal file

File diff suppressed because it is too large Load Diff

36
IBMBIO/BIOSMSGS.ASM Normal file
View File

@@ -0,0 +1,36 @@
NUL equ 0
BS equ 8
TAB equ 9
LF equ 10
CR equ 13
include BIOSGRPS.EQU
CGROUP group RCODE
RCODE segment word public 'RCODE'
; Source .TFT file: 'TMP1.$$$'
public _disk_msgA
public disk_msgA
disk_msgA label byte
_disk_msgA db CR, LF, "Insert diskette for drive ", NUL
public _disk_msgB
public disk_msgB
disk_msgB label byte
_disk_msgB db ": and", CR, LF, " strike any key when ready", CR, LF, LF, NUL
public _div_by_zero_msg
public div_by_zero_msg
div_by_zero_msg label byte
_div_by_zero_msg db CR, LF, "Divide Error", CR, LF, NUL
public _starting_dos_msg
public starting_dos_msg
starting_dos_msg label byte
_starting_dos_msg db CR, LF, "Starting DOS...", CR, LF, NUL
RCODE ends
end


8
IBMBIO/BIOSMSGS.DEF Normal file
View File

@@ -0,0 +1,8 @@
extrn _disk_msgA : byte
extrn disk_msgA : byte
extrn _disk_msgB : byte
extrn disk_msgB : byte
extrn _div_by_zero_msg : byte
extrn div_by_zero_msg : byte
extrn _starting_dos_msg : byte
extrn starting_dos_msg : byte

4
IBMBIO/BIOSMSGS.H Normal file
View File

@@ -0,0 +1,4 @@
extern char near disk_msgA[];
extern char near disk_msgB[];
extern char near div_by_zero_msg[];
extern char near starting_dos_msg[];

BIN
IBMBIO/BIOSSTUB.LIB Normal file

Binary file not shown.

50
IBMBIO/BPB.EQU Normal file
View File

@@ -0,0 +1,50 @@
; File : $BPB.EQU$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
; ENDLOG
BPB struc
BPB_SECSIZ dw ? ; # of bytes per sector
BPB_ALLOCSIZ db ? ; # of sectors per allocation unit
BPB_FATADD dw ? ; # of reserved sectors (1)
BPB_NFATS db ? ; # of fats
BPB_DIRMAX dw ? ; # of directory entries
BPB_TOTSEC dw ? ; # of sectors total in image
BPB_FATID db ? ; holds a copy of the fat id byte
BPB_FATSEC dw ? ; # of sectors in a fat
BPB_SPT dw ? ; # of sectors per track
BPB_HEADS dw ? ; # of heads
BPB_HIDDEN dd ? ; disk offset (32 bit)
BPB_SIZE dd ? ; disk size (32 bit)
BPB_RESRVD2 db 6 dup (?)
BPB ends
BPB_LENGTH equ size BPB

74
IBMBIO/CHAR.DEF Normal file
View File

@@ -0,0 +1,74 @@
; File : $CHAR.DEF$
;
; Description :
;
; Original Author : DIGITAL RESEARCH
;
; Last Edited By : $CALDERA$
;
;-----------------------------------------------------------------------;
; Copyright Work of Caldera, Inc. All Rights Reserved.
;
; THIS WORK IS A COPYRIGHT WORK AND CONTAINS CONFIDENTIAL,
; PROPRIETARY AND TRADE SECRET INFORMATION OF CALDERA, INC.
; ACCESS TO THIS WORK IS RESTRICTED TO (I) CALDERA, INC. EMPLOYEES
; WHO HAVE A NEED TO KNOW TO PERFORM TASKS WITHIN THE SCOPE OF
; THEIR ASSIGNMENTS AND (II) ENTITIES OTHER THAN CALDERA, INC. WHO
; HAVE ACCEPTED THE CALDERA OPENDOS SOURCE LICENSE OR OTHER CALDERA LICENSE
; AGREEMENTS. EXCEPT UNDER THE EXPRESS TERMS OF THE CALDERA LICENSE
; AGREEMENT NO PART OF THIS WORK MAY BE USED, PRACTICED, PERFORMED,
; COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
; CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST,
; TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF
; CALDERA, INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT
; AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO CRIMINAL AND
; CIVIL LIABILITY.
;-----------------------------------------------------------------------;
;
; *** Current Edit History ***
; *** End of Current Edit History ***
;
; $Log$
;
; ENDLOG
;************************************************;
;* *;
;* Character Definitions *;
;* *;
;************************************************;
CTLA equ 'A' - '@'
CTLB equ 'B' - '@'
CTLC equ 'C' - '@'
CTLD equ 'D' - '@'
CTLE equ 'E' - '@'
CTLF equ 'F' - '@'
CTLG equ 'G' - '@'
BELL equ 'G' - '@'
CTLH equ 'H' - '@'
CTLI equ 'I' - '@'
TAB equ 'I' - '@'
CTLJ equ 'J' - '@'
LF equ 'J' - '@'
CTLK equ 'K' - '@'
CTLM equ 'M' - '@'
CR equ 'M' - '@'
CTLP equ 'P' - '@'
CTLQ equ 'Q' - '@'
CTLR equ 'R' - '@'
CTLS equ 'S' - '@'
CTLT equ 'T' - '@'
CTLU equ 'U' - '@'
CTLV equ 'V' - '@'
CTLW equ 'W' - '@'
CTLX equ 'X' - '@'
CTLY equ 'Y' - '@'
CTLZ equ 'Z' - '@'
ESC equ '[' - '@'
CTLBS equ '\' - '@'
CTLUB equ '_' - '@'
CTLUP equ '^' - '@'
DEL equ 07Fh
RUBOUT equ DEL
CTL equ '^'

Some files were not shown because too many files have changed in this diff Show More