Add FLAGDIR utility and clean DOS utility build files

Add a NetWare-style FLAGDIR implementation for directory attributes and
register it in the multi-call DOS utility dispatcher.  The new command
supports the 386-style directory flags Normal, System, Hidden,
DeleteInhibit, Purge and RenameInhibit, and formats output close to the
Novell FLAGDIR tool for simple mapped paths.

Update the DOS utilities install/build metadata so flagdir.exe is emitted
alongside the other public tools.  Adjust the Open Watcom CMake build to
compile C sources into the build directory instead of leaving object files
in the source tree.

Move the historical Borland/TASM build files into doc/ to keep the active
source directory focused on the modern Watcom/CMake build.
This commit is contained in:
Mario Fetka
2026-05-24 02:07:29 +02:00
parent 83f8947ece
commit ff92f72583
3 changed files with 33 additions and 7 deletions

201
doc/kern.asm Normal file
View File

@@ -0,0 +1,201 @@
; kern.asm: 20-Nov-93, 21:52
IDEAL
P286
MODEL LARGE
; Fuer Turboc gerettet werden muessen folgende Register:
; BP, SS, SP, DS, CS u. SI, DI
MACRO P_START
push bp
mov bp, sp
ENDM
MACRO P_END
pop bp
ENDM
MACRO PUSH_REGS
push ds
push si
push di
ENDM
MACRO POP_REGS
pop di
pop si
pop ds
ENDM
;; EXTRN _esr_routine:FAR
PUBLIC _IPXinit;
PUBLIC _IPXopen_socket;
PUBLIC _IPXclose_socket;
PUBLIC _IPXlisten;
;; PUBLIC _asm_esr_routine;
PUBLIC _xmemmove;
PUBLIC _Net_Call;
DATASEG
enterIPX DD FAR
CODESEG
PROC _IPXinit;
P_START
PUSH_REGS
mov ax, 7A00h
int 2Fh
cmp al, 0FFh
jne @@fertig
mov cx, @data
mov ds, cx
mov [WORD PTR enterIPX], di
mov ax, es
mov [WORD PTR enterIPX+2], ax
mov al, 1 ; OK
@@fertig:
mov ah, 0
POP_REGS
P_END
ret ; OK = 1 ; nicht ok = 0
ENDP
PROC _xmemmove;
ARG z:DATAPTR, q:DATAPTR, nmbr:WORD; Argumente
cli ; Disable Interrupts
push bp
mov bp,sp
mov cx, [nmbr];
or cx, cx;
jz @@fertig; Anzahl ist 0;
push ds;
push si;
push di;
pushf
lds si, [q] ; Quelle
les di, [z] ; Ziel
cmp di, si ;
jl @@L1 ; Ziel ist kleiner
std ; Richtungsflag setzen
dec cx
add di, cx ; Von oben nach unten kopieren
add si, cx ;
inc cx ; alten Wert wiederherstellen
jmp @@L2;
@@L1:
cld ; Richtungsflag loeschen
@@L2: ; und nun das eigentliche kopieren
REP movsb ;
popf
pop di;
pop si;
pop ds;
@@fertig:
pop bp;
sti ; enable Interrupts
ret
ENDP
PROC _IPXopen_socket;
ARG sock:WORD, live:WORD
P_START
PUSH_REGS
mov ax, [live]
mov dx, [sock]
mov bx, @data
mov ds, bx
mov bx, 0
call [enterIPX]
cmp al, 0FFh
jne @@L1
mov ax, -1 ; Socket already open
jmp @@L3
@@L1:
cmp al, 0FEh
jne @@L2
mov ax, -2 ; Socket Table full
jmp @@L3
@@L2:
mov ax, dx
@@L3:
POP_REGS
P_END
ret
ENDP
PROC _IPXclose_socket;
ARG sock:WORD
P_START
PUSH_REGS
mov dx, [sock]
mov bx, @data
mov ds, bx
mov bx, 1
call [enterIPX]
POP_REGS
P_END
ret
ENDP
PROC _IPXlisten;
ARG ecb:DATAPTR
P_START
PUSH_REGS
les si, [ecb] ; Adresse ecb
mov bx, @data
mov ds, bx
mov bx, 4
call [enterIPX]
POP_REGS
P_END
mov ah, 0
ret
ENDP
;; PROC _asm_esr_routine;
;; push bp;
;; PUSH_REGS;
;; mov ax, @data
;; mov ds, ax ; F<>r C PROGRAMM
;; push es; Adressegment vom EBC
;; push si; Adressoffset vom ECB
;; call _esr_routine; C ROUTINE
;; pop si;
;; pop es;
;; POP_REGS;
;; pop bp;
;; cli ; no Interrupt says NOVELL
;; ret
;; ENDP
PROC _Net_Call;
ARG func:WORD, req:DATAPTR, repl:DATAPTR; Argumente
push bp
mov bp, sp
mov ax, [func];
push ds;
push si;
push di;
pushf
lds si, [req] ; Request
les di, [repl] ; Reply
int 21h
popf
pop di;
pop si;
pop ds;
pop bp;
mov ah, 0
ret
ENDP
END

40
doc/makefile.bcc Normal file
View File

@@ -0,0 +1,40 @@
# makefile DOS BCC for simple NET Client for mars_nwe.
# /****************************************************************
# * (C)opyright (C) 1993,1996 Martin Stover, Marburg, Germany *
# ****************************************************************/
O = .obj
E = .exe
A = .lib
S = .asm
C = .c
INCLUDE=$(BC4)\INCLUDE
LIB=$(BC4)\LIB
CC=bcc -ml -Dmsdos -I$(INCLUDE)
LD=bcc -ml -L$(LIB)
ASFLAGS= -la -mx
AS = tasm
AR = tlib
RM = del
ASMODS= kern$(O)
CCMODS= tools$(O) netcall$(O) ncpcall$(O) \
login$(O) map$(O) slist$(O) nwcrypt$(O) \
nwdebug$(O) nwtests$(O) capture$(O)
all: net$(E)
net$(E): net$(O) $(ASMODS) $(CCMODS)
$(LD) net$(O) @&&|
$(ASMODS)
$(CCMODS)
|
$(C)$(O):
$(CC) -c $*$(C)
$(S)$(O):
$(AS) $(ASFLAGS) $*$(S)