ACT Apricot disk image㐞VR 1.3.2 F v㐞  @`! #@%`')+-1 3@5`79;=?A C@E`G_KMOQ SU`WY[]a c@egkmoq s@u`w{}/O` @ ` @ ` @ ` @ ` ǀ ɠ @ ` ׀ ٠  @`@`!Aa   !Aa!!#A%a'+-/1!3A5a79;=?A!CAEaGIKMOQ!SAUa㐞WY[]a!cAeagikmoq!sAuawy{}!Aa!Aa!Aa/A㐞  @`! #@%`')+-1 3@5`79;=?A C@E`G_KMOQ SU`WY[]a c@egkmoq s@u`w{}/O` @ ` @ ` @ ` @ ` ǀ ɠ @ ` ׀ ٠  @`@`!Aa   !Aa!!#A%a'+-/1!3A5a79;=?A!CAEaGIKMOQ!SAUa㐞WY[]a!cAeagikmoq!sAuawy{}!Aa!Aa!Aa/A㐞Bhole3 v2.2(N ISKID BAK u%  DOS3BAS DOC oM BDOS3BAS OBJ 4`D DOS3BAS ASM *O& /ADOSEQU INC 2M IDOSMACS INC J T DEM BAS z ZDEM EXE u% (M LOCKTESTRND fLIBTEST ASM iRELSPL ASM n yRELSPL OBJ n VSYSTEM3 DOC NM FONT EXE {[ KEYS EXE q 㐞POINT32 DOC ,)aDOSADD DOC )M )lREAD ME _EBASRUN EXE {q`SWSTRIP EXE -A TGDISKID r`D  Z>Z> Z>Z>Z>Z>㐞 BLACK HOLE DISK NUMBER 3 ---------------------------------------------------------------------------- VERSION: 2.1 DATE: 5th September 1985 ---------------------------------------------------------------------------- DISK CONTENTS ------------- Filename size date Description DOS3BAS DOC 16896 23-05-85 9:43p Documentation for routines DOS3BAS OBJ 1549 5-09-85 2:38p Assembled routines DOS3BAS ASM 16768 5-09-85 㐞2:37p Source file for routines DOSEQU INC 5504 17-05-85 9:41a Include files for above DOSMACS INC 2688 17-05-85 9:23a " " " DEM BAS 2176 17-05-85 3:20p Basic program to show record locking DEM EXE 3405 9-09-85 2:40p compiled version of above LOCKTEST RND 1280 12-07-85 2:53a sample file for use with above LIBTEST ASM 7808 6-06-85 9:20p Library test program in assembler RELSPL ASM 3968 24-06-85 1:54p Release spool file from C㐞ompiled Basic RELSPL OBJ 598 24-06-85 1:55p Compiled version of above. SYSTEM3 DOC 53632 6-06-85 9:42a MS-DOS 3.x system call documentation. FONT EXE 3072 27-02-84 3:30p Version which runs across network KEYS EXE 3072 17-03-84 4:04p " " " POINT32 DOC 24832 24-01-85 12:17p Point 32 Overview DOSADD DOC 27648 16-07-85 9:91a Documentation of additional commands READ ME 325 5-02-84 10:36p BASRUN EXE 21376 7-08-8㐞4 2:11p Compiled Basic run-time V5.36 DISKID 16-07-85 This file. WSTRIP EXE 18260 16-07-85 8:09a Program to convert WordStar files to straight text. Use of WSTRIP: If you do not want to print the documentation using WordStar, then you can convert the files to straight text using WSTRIP. E.g. WSTRIP POINT32.DOC would convert the Point 32 overview to straight text suitable for display on the screen, leaving the ori㐞 ginal version as POINT32.BAK.  @ ` @ ` ǀ ɠ @ ` ׀ ٠  @`@``!Aa   !Aa!!#A%a')+-/1!3A5a79;=?A!CAEaGIKMOQSAUa㐞DOS3BAS Documentation. ---------------------- Comments about the routines. ---------------------------- 1. Thes堠 routine ar intende t replac堠 th堠 MSBASI input/outpu statement use t acces relativ (random files The d no attemp t suppor sequentia files. 2.Th routine allo th programme t us pathnames whil MSBASI normall onl allow acces t th curren director o eac drive. 3.Not tha BASIC' dis erro handle㐞 wil remai i force I thes circumstances problem ma occu wit file opene usin th norma Basi I/ commands o i compatabilit mode whe wha appear t b dis erro occur (e.g attemp t ope fil whic i ope alread b anothe station) Th usua occurrenc i tha a erro i reporte bac a physica dis error. 4.Th followin sampl macr i suggested: BASCO %1; LIN %1+DOS3BAS; .pa 5.㐞Car ha bee take i orde t minimis th recodin neccessar fo conversio o existin applications b allowin th retentio o mos o th origina coding wit simpl editin o th OPEN GET PU an CLOS verb bein required an additio o recor lock an unlock wher necessary. 6.I orde t allo maximu applicability th routine chec whic operatin syste i i use an behav correctl unde MS-DOӠ 2.x㐞 I thes circumstances th fil sharin feature hav n effect Fo example recor loc wil always return "successful" under MS-DOS 2. 7.T us th FIEL statement i i necessar t ope dumm file Th nam NU i translate b MS-DO int a acces t n dis driv a all Fo speed us loca driv lette a well. E.g. 1 OPE "R",#1,"RANDOM.FIL",95 2 FIEL #1,1 A F1$,8 A F2$ 3 RNUM 5 㐞 4 GE #1,RNUM% Woul b replace by: 1 FN "RANDOM.FIL FL1 9 DOSMODE &H42 2 CAL DOSOPE DOSMODE% FN$ DOSERR% HANDLE1 ) 2 OPE "R",#1,"A:NUL",95 2 FIEL #1,1 A F1$,8 A F2$ 3 RNUM 5 4 CAL DOSGE F1$ FL1% RNUM% DOSERR% HANDLE1 ) Th firs strin i th FIEL statemen shoul alway b use i DOSGE an DOSPU calls Sinc th item i FIEL statement ar al㐞way contiguous th othe string wil b rea an writte correctly I thi i adhere to n change ar require fo LSE commands. Th sampl Basi progra DEM.BA demonstrate th us o th routines. ---------------------------------------------------------------------- .pa BASIC COMPILER LIBRARY Th followin routine ca b calle fro Compile Basi i orde t proces share file unde MS-DO 3.x Th ca b foun i th fil DOS3BAS.OBJ I㐞 preferred MS-LI ma b use t produc .LIB file. .pa DOSOPEN Ope dat fil o behal o BASIC Th fil handl returne b th cal mus b specifie fo accesse t the file by subsequent routines. Th fil i opene i th require mod i possible I i wis t avoi "Compatibility modes sinc Basic' error handler will be entered they fail. Mode an ar provide fo convenience sinc 㐞mode 0- wil no creat fil i non exist (unlik Basic' OPEN verb). Creat mode ar "Compatiblity modes I i i require t creat fil i sharin mode i shoul b created close an reopene i sharin mode Mod ca no fai wit file-sharin relate error. Use: CALL DOSOPEN ( MODE%, NAME$, ERRNUM%, HANDLE% ) where MODE% can be: 0 for read only 㐞  1 for write only 2 for read/write 3 for create & read/write 4 for create NEW & read/write 0-3 can have additive access modes: 00h "compatibility" mode 10h "deny read" 20h "deny write" 30h "deny read/write" 40h "deny not㐞hing" NAME$ holds the path name of the file to open ERRNUM% is to hold any error number (0 if read OK) HANDLE% is the file handle returned for other routines. Se SYSTEM3.DOà fo ful descriptio o th file- sharing access modes. Th additiv acces mode ar ignore o MS-DO 2 o i SHARŠ i no loade o th machin wher th fil resides. They are also ignore㐞d on modes 3 and 4. Mode 4 is treated as mode 3 on MS-DOS 2. Example: 10 FN1$ = "D:\SOFTWARE\WORK.FIL" 20 MODE% = &H42 30 CALL DOSOPEN (MODE%,FN1$,ERRNUM%,HANDLE1%) 40 IF ERRNUM% = 2 THEN MODE% = 3 : GOTO 30 .pa DOSCLOSE Close a file on behalf of BASIC. Th fil handl specifie i close (provide i i open). Th routin doe no chec tha th handl belong t 㐞fil whic wa opene usin DOSOPEN I particular problem ma occu i yo clos th standar syste handle t 4. Use: CALL DOSCLOSE ( ERRNUM%, HANDLE% ) where ERRNUM% is to hold any error number (0 if closed OK) HANDLE% is the file handle returned from DOSOPEN Example: 900 CAL DOSCLOS (ERRNUM%,HANDLE1%) 901 I ERRNUM < THE PRIN "Error F㐞il wa no open!" .pa DOSGET Read data on behalf of BASIC. Th routin read th numbe o byte require fro th fil int th strin given N chec i mad o th lengt o th string sinc i i likel t b par o FIELĠ statement I i th user' responsibilit t ensur tha th transfe doe no corrup an othe fields. I th en o th fil i reached th lengt fiel wil 㐞be updated to reflect the number of bytes actually read. Use: CALL DOSGET ( DATA$, LENGTH%, RECORDNO%, ERRNUM%, HANDLE% ) where DATA$ is already long enough to hold the data LENGTH% is the number of bytes to read RECORDNO% is the number of the record to read ERRNUM% is to hold any error number (0 if read OK) HANDLE% is the file handle returned from DOSOPEN 㐞 Example: 100 RECLEN1% = 128 110 BUFFER1$ = STRING$(RECLEN1%,0) 120 RECNO1% = 1 130 IOLENGTH% = RECLEN1% 140 CALL DOSGET (BUFFER1$,IOLENGTH%,RECNO1%,ERRNUM%,HANDLE1%) 150 IF READLEN% = 0 THEN EOF%1 = 1 ELSE EOF1% = 0 .pa DOSPUT Write data on behalf of BASIC Th routin write th numbe o byte require t th fil fro th strin given N chec i mad o th㐞 lengt o th string sinc i i likel t b par o FIEL statement. I th dis become full th lengt fiel wil b update t reflec th numbe o byte actuall written. Use: CALL DOSPUT ( DATA$, LENGTH%, RECORDNO%, ERRNUM%, HANDLE% ) where DATA$ is holds the data to be written LENGTH% is the number of bytes to write RECORDNO% is the number of the record 㐞to write ERRNUM% is to hold any error number (0 if written OK) HANDLE% is the file handle returned from DOSOPEN Example: 200 RECLEN1% = 128 210 BUFFER1$ = STRING$(RECLEN1%,0) 220 RECNO1% = 1 230 IOLENGTH% = RECLEN1% 240 CALL DOSPUT (BUFFER1$,IOLENGTH%,RECNO1%,ERRNUM%,HANDLE1%) 250 IF IOLENGTH <> RECLEN1% THEN PRINT "Error: Disk Full." .pa DOSLOCK㐞  Lock a record on behalf of BASIC. Th routin lock th require numbe o byte o th specifie file Th regio locke ma b outsid th curren exten o th file allowin extension t b done safely. Use: CALL DOSLOCK ( LENGTH%, RECORDNO%, ERRNUM%, HANDLE% ) where LENGTH% is the number of bytes to be locked RECORDNO% is the number of the record to lock 㐞 ERRNUM% is to hold any error number (0 if locked OK) HANDLE% is the file handle returned from DOSOPEN Th routin wil simpl se ERRNUM t zer unde MS-DO 2 o i th fil reside o machin wher SHAR i no loaded. Example: 300 RECLEN1% = 128 310 RECNO1% = 1 320 CALL DOSLOCK (RECLEN1%,RECNO1%,ERRNUM%,HANDLE1%) 330 IF ERRNUM% <> 0 THEN PRINT "That record㐞 is locked." DOSUNLOCK Unlock a record on behalf of BASIC. Th routin unlock regio o fil previousl locke using DOSLOCK. Use: CALL DOSUNLOCK ( LENGTH%, RECORDNO%, ERRNUM%, HANDLE% ) where LENGTH% is the number of bytes to unlock RECORDNO% is the number of the record to unlock ERRNUM% is to hold any error number (0 if unlocked OK) HANDLE% is㐞 the file handle returned from DOSOPEN Th routin wil simpl se ERRNUM t zer unde MS-DO 2 o i th fil reside o machin wher SHAR i no loaded. Example: 400 RECLEN1% = 128 410 RECNO1% = 1 420 CALL DOSUNLOCK (RECLEN1%,RECNO1%,ERRNUM%,HANDLE1%) 430 IF ERRNUM% <> 0 THEN PRINT "Error: Record wasn't locked." .pa DOSKILL Erase fil o behal o BASIC. Th nam㐞 specifie ma includ th ful pathnam (includin subdirectories). Wildcard ar no allowed. Use: CALL DOSKILL ( FILENAME$, ERRNUM% ) where FILENAME$ is the name of the file to be erased ERRNUM% is to hold any error number (0 if erased OK) Example: 1400 FN1$ = "X:WORKFILE.1" 1410 CALL DOSKILL (FN1$,ERRNUM%) 1420 IF ERRNUM% <> 0 THEN PRINT "Error: File 㐞not removed." DOSRENAME Renames a file on behalf of BASIC. ful pathnam (includin subdirectories ma b specifie fo bot filenames Not tha th renam wil mov th fil fro on subdirector t anothe i th pathname fo th tw filename ar no th same. Wildcards are not allowed. Use: CALL DOSRENAME ( OLDNAME$, NEWNAME$, ERRNUM% ) where OLDNAME$ is the original pathname 㐞 NEWNAME$ is the new pathname (must be same drive!) ERRNUM% is to hold any error number (0 if renamed OK) Example: 1500 FN1$ = "X:\WORKFILE.2" 1510 FN2$ = "X:\SOFTWARE\BACKUPS\WF2.OLD" 1520 CALL DOSRENAME (FN1$,FN2$,ERRNUM%) 1530 IF ERRNUM% <> 0 THEN PRINT "Error: File not renamed." .pa DOSCHATTR Change the attributes of a file on behalf of BASIC. Th attribut bit㐞 associate wit fil ca b manipulate usin thi routine File ca b hidden mad read-only etc., when required by an application. Use: CALL DOSCHATTR ( FILENAME$, ATTRIB%, ERRNUM% ) where FILENAME$ is the name of the file to be adjusted ATTRIB% contains the attribute bits. If negative, then the call will return the current attributes without c㐞hanging them. Significance of (additive) values: &H01 1 Read-only &H02 2 Hidden &H04 4 System file &H08 8 Volume-ID (not changeable) &H10 16 Subdirectory (not changeable) &H20 32 Updated since last archive ERRNU㐞 M% is to hold any error number (0 if erased OK) Example: 1600 FN1$ = "X:\SOFTWARE\BACKUPS\WF2.OLD" 1610 ATTR% = &H22 'Mark as read-only, updated. 1620 CALL DOSCHATTR (FN1$,ATTR%,ERRNUM%) 1630 IF ERRNUM% <> 0 THEN PRINT "Error: File attributes wrong." .pa DOSMKDIR Creates subdirectory o behal o BASIC. Th nam specifie ma includ th ful pathnam (includin subdirectories). 㐞 Use: CALL DOSMKDIR ( PATHNAME$, ERRNUM% ) wher PATHNAME i th nam o th subdirector t b created ERRNUM% is to hold any error number (0 if created OK) Example: 1700 FN1$ = "X:\SOFTWARE" 1710 CALL DOSMKDIR (FN1$,ERRNUM%) 1720 IF ERRNUM% <> 0 THEN 1760 1730 FN1$ = "X:\SOFTWARE\BACKUPS" 1710 CALL DOSMKDIR (FN1$,ERRNUM%) 1750 IF ERRNUM㐞% = 0 THEN 1770 1760 PRINT "Error: Subdirectory not created" DOSRMDIR Erase subdirectory o behal o BASIC. Th nam specifie ma includ th ful pathnam (includin subdirectories). The subdirectory must be empty before it can be removed. Use: CALL DOSRMDIR ( PATHNAME$, ERRNUM% ) where PATHNAME$ is the name of the subdirectory to be erased ERRNUM% is to hold any 㐞error number (0 if erased OK) Example: 1800 FN1$ = "X:\SOFTWARE\BACKUPS" 1810 CALL DOSRMDIR (FN1$,ERRNUM%) 1820 IF ERRNUM% <> 0 THEN 1860 1830 FN1$ = "X:\SOFTWARE" 1810 CALL DOSRMDIR (FN1$,ERRNUM%) 1850 IF ERRNUM% = 0 THEN 1870 1860 PRINT "Error: Subdirectory not removed" .pa DOSCHDIR Changes the default directory o behal o BASIC. Th nam specifie ma 㐞includ th ful pathnam (includin subdirectories). Th defaul director o th specifie driv wil b changed Eac driv ha defaul director whic i remembere unti th dis i changed. Use: CALL DOSCHDIR ( PATHNAME$, ERRNUM% ) where PATHNAME$ is the name of the subdirectory to be the new default. ERRNUM% is to hold any error number (0 if ch㐞anged OK) Example: 1800 FILES "X:*.*" 1810 FN1$ = "X:\SOFTWARE\BACKUPS" 1820 CALL DOSCHDIR (FN1$,ERRNUM%) 1830 IF ERRNUM% <> 0 THEN PRINT "Error: Didn't CHDIR." 1840 FILES "X:*.*" .pa DOSNAME Get the machine name on behalf of Basic. Thi routin wil retur th nam o th machin a specifie a networ statio startu an know t th res o th network Th㐞 nam i lef justifie an spacefilled. Use: 10 MACHINE$ = SPACE$(16) 20 CALL DOSNAME ( MACHINE$ ) where MACHINE$ is at least 16 characters long. I th machin i no par o network th nam returne wil b 1 spaces I th machin i runnin under MS-DOS 2, the string will be unchanged. ----------------------------------------------------------------- 㐞MZM #)j4G@EPq|㐞bm{@ @ @ @ f p U/6=B ?=?B ?Fp t ?1?J?p ?J3=F ?=F P6? ?FF ?J?p ?J ??J ?N P R BR PJ PP PN P6>P tQ? ?F=T ?=p ?>t T ?>tJ ?>tI##trR ?p ?J>P u? ?FP ?IC ??X ?: > @ X > ?Z X ?H ??^ ?>^ }` b X P^ PP PN Pc6>P uE?Z ?J=T ?=p ?>t T ?>tJ ?>tI##twb 㐞 X d Z Pd P^ PP PN P 6>d t? ?J? ?J=?Z d = ?J>P u? ?FP ?I>b t? ?J=T ?=p ?>t T ?>uJ ?>uI #te T ?>tJ ?>tI##u?p ?J? ?Jp ?T ?6T Z ?7Z PX P^ PP PN P6?p ?JX P^ PP PN Pk64P PN P6>>@(#) BASCOM DOS 3 Interface V3.0 5th September 85 (C) Apricot (UK) Ltd.U0!,.Av .㐞@.>Au.&@v t>2=.@Ѐ|$<t .>At[!r~3<t~]@.@?.@@Uv Hv $ʋдBv!vTv .&@!r~ 3~] .@.@U.>At%vv Hv $ʋЋv <3\.@!r3<tB~]UUv>!r3!~]t.@A.@9.@:.@;Uv T5.&@!r3~]$Uv t>&v t4V>!r3~]Uv }v T5ٴC!r3㐞v D~]WU0!<|&^!~& |&}]^V t<s.>AtY! u^Ì....ˎӋ......>.Ћ..ڋ. +=r^_+бҋWV-P@X.  _^&VW_^[VW67t x E@(#) Test Record Locking V2.0 This machine is called  Path nam㐞e of test file File cannot be opened. Create? Y0 y File cannot be opened : Error" How long are the records> RBD NUL L Record number,^ That record has been locked. Read it anyway? Past end of file! Add to file? Error code: Change contents? Ni n New Contents:&>W  3_ ! t= ! t0 !"" !>#u$$,@t<wբ 3; = @( ! '! %; (  J+С 㐞Љ +֋܃;s3Ҵ!  '!) u& ; (  !> t"' ! ui>  Ŏ&- u[. ݹ3{ع+|33ь+ȁv{36 !3P Error in EXE file $ Program too large $ Cannot find A:BASRUN.EXE Enter new drive letter: $BASRUN EXE&>W  3_ ! t= ! t0 !"" !>#u$$,@t<wբ 3; = @( ! '! %; (  J+С 㐞page 60, 132 Title MS-DOS 3 Interface library for file handling in Compiled Basic Subttl (C) Copyright ACT (U.K.) Ltd. 1985 V3.1 name DOS Comment + The following routines have been written to allow users of Compiled Microsoft Basic to access files on Point 32 systems safely. The routines shoud be used in place of the standard OPEN, GET, PUT and CLOSE verbs for relative (random) files. The routines are made freely available in order that software writers can get on with developing t㐞he logic of their software instead of getting bogged down in the low-level stuff. If, however, the routines don't quite suit your way of working, or your language, then you are welcome to make changes to these routines, or use them as a model for your version. ACT makes no representations or warranties with respect to the contents hereof and specifically disclaims any implied warranties of merchantability or fitness of these routines for any particular purpose. It is the respons㐞ibility of the user of these routines to determine their applicability for their purpose. They are however, believed to be in a usable state. Amendment History: V1.0 Original version. V1.1 Remove Interrupt 24h handler, use LEA instead of OFFSET. V2.0 Add KILL, RENAME, CHATTR, MKDIR, RMDIR, CHDIR. V2.1 Bug fix in RENAME. V3.0 Stack switching to cure String Space Corrupt in large programs. V3.1 Ensure direction flag points in right direction. + ; ; Public DOSOPEN ;Ope㐞n file Public DOSGET ;Read record Public DOSPUT ;Write record Public DOSLOCK ;Lock record Public DOSUNLOCK ;Unlock record Public DOSCLOSE ;Close file Public DOSNAME ;Get name of machine Public DOSKILL ;Erase file Public DOSRENAME ;Rename file Public DOSCHATTR ;Get/Set attributes of file Public DOSMKDIR ;Create subdirectory Public DOSRMDIR ;Remove subdirectory Public DOSCHDIR ;Change subdirectory ;---------------------------------------------------------------------------- ;-㐞 ---- Commonly Used Equates ----- ;---------------------------------------------------------------------------- Lf equ 0AH ;line feed Cr equ 0DH ;carriage return Space equ 20H ;space Hyphen equ 2DH ;hyphen FullStop equ 2EH ;period ZeroChar equ 30H ;Decimal Zero Colon equ 3AH ; .xlist include DOSEQU.INC include DOSMACS.INC .list ; ; Ensure our data segment and code segment will be grouped with ; any others of the same type ; Cgroup GROUP Code ;******************************㐞********************************************** ;***** Code Segment ***** ;**************************************************************************** code segment Public 'Code' assume CS:Cgroup ; PathName db 64 dup (?) ;copy of pathname SubFunction db ? ;used to differentiate various options ;of similar functions DOSVersion db 0 ;0 if DOS 2.x, 1 if DOS 3.x ; The following line is included in order that the version ; number can be picked up by the Microsoft program WHAT.EXE. Ve㐞rsionText db '@(#) BASCOM DOS 3 Interface ' db 'V3.1 6th January 86 ' db '(C) Apricot (UK) Ltd.',0 page ; ; ; Open a data file on behalf of BASIC ; ; Use: ; CALL DOSOPEN ( MODE%, NAME$, ERRNUM%, HANDLE% ) ; ; where MODE% can be: 0 for read only ; 1 for write only ; 2 for read/write ; 3 for create & read/write ; 4 for create NEW & read/write ; 0-3 can have additive access modes: ; 00h "compatibility" mode ; 10h "deny read" ; 20h "deny write" ; 30h "deny read㐞/write" ; 40h "deny nothing" ; NAME$ holds the path name of the file to open ; ERRNUM% is to hold any error number (0 if read OK) ; HANDLE% is the file handle returned for other routines. ; ; DOSOPEN PROC FAR ; ; call StackSwapIn ;change to our stack push BP mov AH,Get_Version int DOS_Function sub AL,2 mov CS:DOSVersion,AL mov BP,SP mov SI,12[BP] mov AX,[SI] ;get Open Mode mov CS:SubFunction,AL cmp CS:DOSVersion,0 jne DOS3Open DOS2Open: and SubFunction,07h ;I㐞f DOS 2.x, additive modes not allowed DOS3Open: mov SI,10[BP] ;Get address of PathName string mov CX,[SI] ;get length of string mov SI,2[SI] ;Get address of actual PathName lea DI,CS:PathName push DS push ES push CS pop ES rep movsb ;move pathname from Basic to this seg. xor AL,AL stosb ;add Null to the end pop ES push CS pop DS mov AH,Open mov AL,CS:SubFunction ;Get open mode mov DL,AL and DL,07h ;throw away additive mode cmp DL,3 jl OpenModeOK ;J if rea㐞d, write, read/write and AL,0F0h ;keep open additive modes mov AH,Create cmp DL,3 je OpenModeOK ;J if create file mode cmp CS:DOSVersion,0 je OpenModeOK ;J if DOS 2 (CreateNew not available) mov AH,CreateNewFile OpenModeOK: lea DX,CS:PathName ;point to pathname in this segment int DOS_Function ;OPEN the file pop DS jc OpenErr ;J if file not opened mov DI,6[BP] stosw ;put handle back in BASIC and... xor AX,AX OpenErr: cmp AL,1 ;Was function recognised? If not, j㐞e DOS2Open ;then we are on a local drive. call ErrSet ;test for DOS 3 errors mov DI,8[BP] ;set error reply stosw pop BP call StackSwapOut ;Back to Basic's stack and... ret 8 ; ...Back to BASIC ; DOSOPEN ENDP page ; ; Read data on behalf of BASIC ; ; Use: ; CALL DOSGET ( DATA$, LENGTH%, RECORDNO%, ERRNUM%, HANDLE% ) ; ; where DATA$ is already long enough to hold the data ; LENGTH% is the number of bytes to read ; RECORDNO% is the number of the record to read ; ERRNUM% 㐞 is to hold any error number (0 if read OK) ; HANDLE% is the file handle returned from DOSOPEN ; DOSGET PROC FAR ; mov CS:SubFunction,Read jmp short DoTransfer ; DOSGET ENDP ; ; Write data on behalf of BASIC ; ; Use: ; CALL DOSPUT ( DATA$, LENGTH%, RECORDNO%, ERRNUM%, HANDLE% ) ; ; where DATA$ is holds the data to be written ; LENGTH% is the number of bytes to write ; RECORDNO% is the number of the record to write ; ERRNUM% is to hold any error number (0 if written OK) ; HAN㐞DLE% is the file handle returned from DOSOPEN ; DOSPUT PROC FAR ; mov CS:SubFunction,Write DoTransfer: call StackSwapIn ;change to our stack push BP mov BP,SP mov SI,10[BP] ;Get address of record number mov AX,[SI] ;get record number dec AX ;record 0 is byte 0 in file mov SI,12[BP] mul word ptr [SI] ;DX:AX is byte within file mov CX,DX mov DX,AX ;CX:DX is byte within file mov AH,LSeek mov AL,0 ;Move to absolute byte number... mov SI,6[BP] mov BX,[SI] ;Get han㐞 dle of file int DOS_Function ;move to the relevant byte in the file mov SI,14[BP] ;Point to string descriptor mov DX,2[SI] ;Get address of buffer mov SI,12[BP] mov CX,[SI] ;get length to write mov AH,CS:SubFunction int DOS_Function ;write to the file jc TranErr ;J if error mov DI,12[BP] stosw ;Update number of bytes read, since xor AX,AX ;we need to spot end-of-file. TranErr: call ErrSet mov DI,8[BP] ;set error reply stosw pop BP call StackSwapOut ;Back to Bas㐞ic's stack and... ret 10 ; ...Back to BASIC ; DOSPUT ENDP page ; ; Lock a record on behalf of BASIC ; ; Use: ; CALL DOSLOCK ( LENGTH%, RECORDNO%, ERRNUM%, HANDLE% ) ; ; where LENGTH% is the number of bytes to be locked ; RECORDNO% is the number of the record to lock ; ERRNUM% is to hold any error number (0 if locked OK) ; HANDLE% is the file handle returned from DOSOPEN ; DOSLOCK PROC FAR ; mov CS:SubFunction,0 jmp short DoLocking ; DOSLOCK ENDP ; ; Unlock a record on b㐞ehalf of BASIC ; ; Use: ; CALL DOSUNLOCK ( LENGTH%, RECORDNO%, ERRNUM%, HANDLE% ) ; ; where LENGTH% is the number of bytes to unlock ; RECORDNO% is the number of the record to unlock ; ERRNUM% is to hold any error number (0 if unlocked OK) ; HANDLE% is the file handle returned from DOSOPEN ; DOSUNLOCK PROC FAR ; mov CS:SubFunction,1 DoLocking: call StackSwapIn ;change to our stack push BP mov BP,SP mov SI,6[BP] mov BX,[SI] ;Get file handle mov SI,10[BP] ;Get address of㐞 record number mov AX,[SI] ;get record number dec AX ;record 0 is byte 0 in file mov SI,12[BP] mul word ptr [SI] ;DX:AX is byte within file mov CX,DX mov DX,AX ;CX:DX is byte within file mov SI,12[BP] ;Get length of record mov DI,[SI] ;in DI xor SI,SI ;not more than 64K mov AH,LockOper mov AL,CS:SubFunction ;subfunction - Lock or unlock int DOS_Function jc LockErr LockNoErr: xor AX,AX LockErr: cmp AL,1 ;If function not supported, je LockNoErr ;treat as if no 㐞error occurred call ErrSet ;check other errors mov DI,8[BP] ;set error reply stosw pop BP call StackSwapOut ;Back to Basic's stack and... ret 8 ; ...Back to BASIC ; DOSUNLOCK ENDP page ; ; Close a file on behalf of BASIC ; ; Use: ; CALL DOSCLOSE ( ERRNUM%, HANDLE% ) ; ; where ERRNUM% is to hold any error number (0 if closed OK) ; HANDLE% is the file handle returned from DOSOPEN ; DOSCLOSE PROC FAR ; call StackSwapIn ;change to our stack push BP mov BP,SP mov S㐞I,6[BP] ;Get address of handle mov BX,[SI] mov AH,Close int DOS_Function jc CloseErr ;J if error xor AX,AX CloseErr: call ErrSet mov DI,8[BP] ;set error reply stosw pop BP call StackSwapOut ;Back to Basic's stack and... ret 4 ; ...Back to BASIC ; DOSCLOSE ENDP page ; ; Erase a file on behalf of BASIC ; ; Use: ; CALL DOSKILL ( FILENAME$, ERRNUM% ) ; ; where FILENAME$ is the name of the file to be erased ; ERRNUM% is to hold any error number (0 if erased OK) ; DO㐞SKILL PROC FAR ; mov CS:SubFunction,Unlink jmp Short KillAndSubDir ; DOSKILL ENDP ; ; Create a Subdirectory on behalf of BASIC ; ; Use: ; CALL DOSMKDIR ( PATHNAME$, ERRNUM% ) ; ; where PATHNAME$ is the name of the subdirectory to be created ; ERRNUM% is to hold any error number (0 if created OK) ; DOSMKDIR PROC FAR ; mov CS:SubFunction,MkDir jmp Short KillAndSubDir ; DOSMKDIR ENDP ; ; Erase a Subdirectory on behalf of BASIC ; ; Use: ; CALL DOSRMDIR ( PATHNAME$, ERRNUM% ) 㐞 ; ; where PATHNAME$ is the name of the subdirectory to be removed ; ERRNUM% is to hold any error number (0 if removed OK) ; DOSRMDIR PROC FAR ; mov CS:SubFunction,RmDir jmp Short KillAndSubDir ; DOSRMDIR ENDP ; ; Change the current Subdirectory on behalf of BASIC ; ; Use: ; CALL DOSCHDIR ( PATHNAME$, ERRNUM% ) ; ; where PATHNAME$ is the name of the subdirectory to be created ; ERRNUM% is to hold any error number (0 if created OK) ; DOSCHDIR PROC FAR ; mov CS:SubFunction,ChDir㐞 ; ; KillAndSubDir: call StackSwapIn ;change to our stack push BP mov BP,SP mov SI,8[BP] ;Get address of string descriptor mov CX,[SI] ;get length of string mov DX,2[SI] ;get address of string mov DI,DX add DI,CX push word ptr [DI] ;remember byte past string mov byte ptr [DI],0 ;add Null to the end mov AH,CS:SubFunction int DOS_Function jc KillErr ;J if error xor AX,AX KillErr: pop word ptr [DI] ;replace word following string call ErrSet mov DI,6[BP] ;set err㐞 or reply stosw pop BP call StackSwapOut ;Back to Basic's stack and... ret 4 ; ...Back to BASIC ; DOSCHDIR ENDP page ; ; Rename a file on behalf of BASIC ; ; Use: ; CALL DOSRENAME ( OLDNAME$, NEWNAME$, ERRNUM% ) ; ; where OLDNAME$ is the original pathname ; NEWNAME$ is the new pathname (must be same drive!) ; ERRNUM% is to hold any error number (0 if renamed OK) ; DOSRENAME PROC FAR ; call StackSwapIn ;change to our stack push BP mov BP,SP mov SI,8[BP] ;Get address o㐞 f newname descriptor mov CX,[SI] ;get length of newname string mov SI,2[SI] ;get address of string lea DI,CS:PathName ;Point to our working buffer push ES ;save Basic's Extra Seg push CS pop ES ;Point to our code segment rep movsb ;move the new name to our buffer mov byte ptr ES:[DI],0 ;add Null to the end mov SI,10[BP] ;Get pointer to oldname string mov CX,[SI] ;get length of oldname string mov SI,2[SI] ;get address of string mov DX,SI ;Want DX here for DOS Call. a㐞 dd SI,CX ;Point to end of string push word ptr [SI] ;remember byte past string mov byte ptr [SI],0 ;add Null to the end mov AH,Rename lea DI,CS:PathName ;DS:DX is old name, ES:DI is new one int DOS_Function ;Do the renaming jc RenErr ;J if error xor AX,AX ;else set reply 0 RenErr: pop word ptr [SI] ;replace the bit of program we zeroised pop ES ;and Basic's Extra Segment call ErrSet ;Check any funny errors mov DI,6[BP] ;set error reply stosw pop BP call StackSwap㐞 Out ;Back to Basic's stack and... ret 6 ; ...Back to BASIC ; DOSRENAME ENDP page ; ; Change the attributes of a file on behalf of BASIC ; ; Use: ; CALL DOSCHATTR ( FILENAME$, ATTRIB%, ERRNUM% ) ; ; where FILENAME$ is the name of the file to be adjusted ; ATTRIB% contains the attribute bits. If negative, ; then the call will return the current ; attributes without changing them. ; ERRNUM% is to hold any error number (0 if erased OK) ; DOSCHATTR PROC FAR ; call StackSwapIn㐞 ;---------------------------------------------------------------------------- ; ; This file is a set of equates for MS-DOS functions etc. ; These are the names for the MS-DOS functions as used in the ; Microsoft Documentation. ; Valid for versions of MS-DOS upto 3.10. ; ; Version 1.3 Andrew Alston, ACT (UK) Ltd. ; ;---------------------------------------------------------------------------- ;----- MsDos Interrupts ----- ;-----------------------------------------------------------------------㐞 ----- prg_trm equ 20H ;Msdos program terminate DOS_Function equ 21H ;function request trm_adr equ 22H ;terminate address ctl_adr equ 23H ;control C exit address ftl_err equ 24H ;fatal error abort vector abs_dsr equ 25H ;absolute disk read abs_dsw equ 26H ;absolute disk write trm_res equ 27H ;terminate but stay resident ;---------------------------------------------------------------------------- ;----- MsDos Function Requests ----- ;--------------------------------㐞 -------------------------------------------- Abort equ 00H ;program terminate (abort) Std_Con_Input equ 01H ;keyboard input Std_Con_Output equ 02H ;video output Std_Aux_Input equ 03H ;auxilliary input Std_Aux_output equ 04H ;auxilliary output Std_printer_output equ 05H ;printer output Raw_Con_IO equ 06H ;direct console I/O Raw_Con_Input equ 07H ;direct keyboard input Std_Con_Input_No_Echo equ 08H ;keyboard input without echo Std_Con_String_Output equ 09H ;print string Std_Con_String_Inp㐞 ut equ 0AH ;buffered keyboard input Std_Con_Input_status equ 0BH ;keyboard status Std_Con_Input_Flush equ 0CH ;keyboard input with buffer flush Disk_Reset equ 0DH ;disk reset Set_Default_Drive equ 0EH ;select disk Fcb_Open equ 0FH ;open file Fcb_Close equ 10H ;close file Fcb_search_First equ 11H ;search for first entry Fcb_search_next equ 12H ;search for next entry Fcb_delete equ 13H ;delete file Fcb_Seq_Read equ 14H ;sequential read Fcb_Seq_Write equ 15H ;sequential write Fcb_create eq㐞 u 16H ;create a file Fcb_rename equ 17H ;rename a file Get_Default_drive equ 19H ;current disk Set_DMA equ 1AH ;set disk transfer address allc_addr equ 1BH ;allocation table address Fcb_random_read equ 21H ;random read Fcb_random_write equ 22H ;random write Get_Fcb_file_length equ 23H ;file size Get_Fcb_position equ 24H ;set random record field Set_Interrupt_Vector equ 25H ;set vector Create_Process_Data_blk equ 26H ;create new program segment Fcb_random_Read_block equ 27H ;random block read㐞 Fcb_random_Write_Block equ 28H ;random block write Parse_file_Descriptor equ 29H ;parse file name Get_date equ 2AH ;get date Set_date equ 2BH ;set date Get_time equ 2CH ;get time Set_time equ 2DH ;set time Set_Verify_On_Write equ 2EH ;set/reset verify flag ; Extended Functionality Group Get_DMA equ 2FH ;Get current disk transfer address Get_Version equ 30H ;Get version of MS-DOS Keep_Process equ 31H ;terminate but stay resident get_dpb equ 32H ;Get DPB *** Set_Control_C_Trapping eq㐞 u 33H ;set/reset control/C trapping Get_InDOS_Flag equ 34H ;ask if we are in dangerous DOS Get_Interrupt_Vector equ 35H ;get interrupt vector Get_Drive_Freespace equ 36H ;get drive freespace Char_Oper equ 37H ;change incompatible configuration params International equ 38H ;get country-dependent characters ;------------------------------------------------------------------------------ ; XENIX calls ;------------------------------------------------------------------------------ ; Directory Group: 㐞 MKDir equ 39H ;make directory RMDir equ 3AH ;remove directory CHDir equ 3BH ;change current directory ; File Group: Create equ 3CH ;create a new file Open equ 3DH ;open file for read or write Close equ 3EH ;close a file Read equ 3FH ;read s equentially Write equ 40H ;write sequentially Unlink equ 41H ;delete file LSeek equ 42H ;move data pointer down file CHMod equ 43H ;set file properties IOCtl equ 44H ;send/receive I/O control info to device XDup equ 45H ;duplicate 㐞 a handle XDup2 equ 46H ;force handle duplication Current_Dir equ 47H ;get text of current directory name ; Memory Group: Alloc equ 48H ;get a memory block Dealloc equ 49H ;free a memory block Setblock equ 4AH ;adjust an existing allocated block ; Process Group: Exec equ 4BH ;load & execute a program Exit equ 4CH ;return from daughter process Wait equ 4DH ;await daughter process ; More Files: Find_First equ 4EH ;find matching handle Find_Next equ 4FH ;find next matching handle ;㐞 Special System Group: Set_curr_pdb equ 50H ; *** Get_curr_pdb equ 51H ; *** Get_invars equ 52H ; *** Set_pdb equ 53H ; *** Get_Verify_On_Write equ 54H ;get value of verify Dup_pdb equ 55H ; *** ; More Files: Rename equ 56H ;move a file from one handle to another File_Times equ 57H ;get & set file times. AllocOper equ 58h ; GetExtendedError equ 59H ;Get extended error from MS-DOS 3.x CreateTempFile equ 5AH ;Create a temporary file CreateNewFile equ 5BH ;Create a (gu㐞 aranteed new) file LockOper equ 5CH ;Lock & Unlock range of a file UserOper equ 5EH ;Net info set & change. AssignOper equ 5Fh ;On, Off, Get, Set & cancel PathParse equ 61h GetCurrentPSP equ 62h Hongeul equ 63h ;I wonder what this is? ;--------------------------------------------------------------------------- FONT EXE z KEYS EXE j POINT32 DOC ,)aREADME DOC S?  㐞 ;---------------------------------------------------------------------------- ;----- Msdos Function Macros ----- ;---------------------------------------------------------------------------- ; These macros are intended to make assembler language programming ; simpler and faster (but not necessarily run-time efficient). ; They are based on the macros used in the Microsoft MS-DOS ; Programmer's Reference manual. ; ; Version 1.3 Andrew Alston, ACT (UK) Ltd. ; read_kbd_echo MACRO mov AH,Std_C㐞 on_Input int DOS_Function ENDM display_char MACRO char mov DL,char mov AH,Std_Con_Output int DOS_Function ENDM aux_input MACRO mov AH,Std_Aux_Input int DOS_Function ENDM aux_output MACRO mov AH,Std_Aux_Output int DOS_Function ENDM print_char MACRO char mov DL,char mov AH,Std_Printer_Output int DOS_Function ENDM Read_kbd MACRO mov AH,Raw_Con_Input int DOS_Function ENDM display MACRO string lea DX,string mov AH,Std_Con_String_Output int DOS_Functi㐞 on ENDM Get_string MACRO limit,string mov string,limit lea DX,string mov AH,Std_Con_String_Input int DOS_Function ENDM Reset_disk MACRO mov AH,Disk_Reset int DOS_Function ENDM select_disk MACRO disk mov DL,disk[-65] mov AH,Set_Default_Drive int DOS_Function ENDM FCBopen MACRO fcb lea DX,fcb mov AH,Fcb_Open int DOS_Function ENDM FCBclose MACRO fcb lea DX,fcb mov AH,Fcb_Close int DOS_Function ENDM FCBsearchfirst MACRO fcb lea DX,fcb mov AH,Fcb_s㐞 earch_First int DOS_Function ENDM FCBSearchnext MACRO fcb lea DX,fcb mov AH,Fcb_search_next int DOS_Function ENDM FCBdelete MACRO fcb lea DX,fcb mov AH,Fcb_delete int DOS_Function ENDM FCBread_seq MACRO fcb lea DX,fcb mov AH,Fcb_seq_read int DOS_Function ENDM FCBwrite_seq MACRO fcb lea DX,fcb mov AH,Fcb_seq_write int DOS_Function ENDM FCBcreate MACRO fcb lea DX,fcb mov AH,Fcb_create int DOS_Function ENDM FCBrename MACRO fcb lea DX,fcb mov A㐞 H,Fcb_rename_file int DOS_Function ENDM current_disk MACRO mov AH,Get_Default_Drive int DOS_Function ENDM set_dta MACRO buffer lea DX,buffer mov AH,Set_DMA int DOS_Function ENDM FCBread_ran MACRO fcb lea DX,fcb mov AH,Fcb_random_read int DOS_Function ENDM FCBwrite_ran MACRO fcb lea DX,fcb mov AH,Fcb_random_write int DOS_Function ENDM file_size MACRO fcb lea DX,fcb mov AH,Get_Fcb_file_length int DOS_Function ENDM Serial MACRO function,todata mov㐞 BX,52 mov CX,function mov DX,todata int 0FCH ENDM DOSEQU INC 2M DOSMACS INC J  DEM BAS z DOS3BAS DOC oM BOGFILE 001{a b -OGFILE 002 Ib /㐞 100 ' LOCKDEM 110 ' ======= 120 ' 130 ' MS-DOS 3.x Demonstration & test program. 140 ' The program is intended to allow use of the 150 ' Record Locking features of MS-DOS 3.x 160 ' 170 '************************* INITIALISATION **************** 180 ES$ = CHR$(27) 190 PRINT ES$;"E@(#) Test Record Locking V2.0"+"" 200 PRINT 210 MACHINE$ = STRING$(16,0) 220 CALL DOSNAME (MACHINE$) 230 PRINT "This machine is called ";MACHINE$ 240 PRINT 250 INPUT "Path name of test file";PATH$ 260 HANDLE% = 0 : E㐞 RRNUM% = 0 : MODE% = &H42 270 CALL DOSOPEN( MODE%,PATH$,ERRNUM%,HANDLE% ) 280 IF ERRNUM% <> 2 THEN 350 290 PRINT "File cannot be opened. Create?"; 300 Q$ = INKEY$ : IF Q$ = "" THEN 300 310 IF Q$ <> "Y" AND Q$ <> "y" THEN 240 320 MODE% = 4 330 PRINT 340 GOTO 270 350 IF ERRNUM% <> 0 THEN PRINT "File cannot be opened : Error";ERRNUM% : GOTO 240 360 INPUT "How long are the records";RELEN% 370 OPEN "R",#9,"NUL",RELEN% 380 FIELD #9,RELEN% AS RECORD$ 390 '********************** MAIN LOOP *************㐞 *********** 400 INPUT "Record number";RECNO% 410 IF RECNO% < 1 THEN 710 420 REPLY% = 0 430 UNLOCKED% = 0 440 CALL DOSLOCK ( RELEN%,RECNO%,ERRNUM%,HANDLE% ) 450 IF ERRNUM% = 0 THEN 500 460 PRINT "That record has been locked. Read it anyway?" 470 Q$ = INKEY$ : IF Q$ = "" THEN 470 480 IF Q$ <> "Y" AND Q$ <> "y" THEN 400 490 UNLOCKED% = 1 500 READLEN% = RELEN% 510 CALL DOSGET ( RECORD$,READLEN%,RECNO%,ERRNUM%,HANDLE% ) 520 IF READLEN% <> 0 THEN 560 530 PRINT "Past end of file!" 540 PRINT "Add to 㐞 file?" 550 GOTO 600 560 PRINT LEFT$(RECORD$,READLEN%) 570 IF ERRNUM% <> 0 THEN PRINT "Error code:";ERRNUM% 580 IF UNLOCKED% <> 0 THEN 400 590 PRINT "Change contents?" 600 Q$ = INKEY$ : IF Q$ = "" THEN 600 610 IF Q$ = "N" OR Q$ = "n" THEN 670 620 IF Q$ <> "Y" AND Q$ <> "y" THEN 600 630 PRINT : PRINT "New Contents:" 640 LINE INPUT Q$ 650 LSET RECORD$ = Q$ 660 CALL DOSPUT ( RECORD$,RELEN%,RECNO%,ERRNUM%,HANDLE%) 670 PRINT 680 CALL DOSUNLOCK ( RELEN%,RECNO%,ERRNUM%,HANDLE% ) 690 GOTO 400 700 '**㐞 ******************* END OF RUN *********************** 710 CALL DOSCLOSE ( ERRNUM%,HANDLE% ) 720 END  690 GOTO 400 700 '**㐞 ;change to our stack push BP mov BP,SP mov SI,8[BP] mov CX,[SI] ;get attribute word mov AL,1 cmp CX,0 jge ChSet mov AL,0 ChSet: mov SI,10[BP] ;Get address of string descriptor mov BX,[SI] ;get length of string mov DX,2[SI] ;get address of string mov DI,DX add DI,BX push word ptr [DI] ;remember byte past string mov byte ptr [DI],0 ;add Null to the end mov BX,CX mov AH,ChMod int DOS_Function jc ChmodErr ;J if error xor AX,AX ChmodErr: pop word ptr [DI] ;㐞 replace word following string mov SI,8[BP] ;set reply for enquiry mode mov Word ptr [SI],CX call ErrSet mov DI,6[BP] ;set error reply stosw pop BP call StackSwapOut ;Back to Basic's stack and... ret 6 ; ...Back to BASIC ; DOSCHATTR ENDP page ; ; Get the machine name on behalf of Basic ; ; Use: ; CALL DOSNAME ( MACHINE$ ) ; ; where MACHINE$ is at least 16 characters long ; ; DOSNAME PROC FAR call StackSwapIn ;change to our stack push BP mov AH,Get_Version int DOS㐞 _Function cmp AL,3 jl NoName mov BP,SP push DS push CS pop DS lea DX,CS:PathName mov AH,UserOper mov AL,0 ;GetMachineName int DOS_Function ;at DS:DX mov SI,DX mov DI,6[BP] ;Get address of Machine Name string mov CX,ES:[DI] ;get length of string cmp CX,16 jl LenOK ;J if not enough room mov CX,16 ;Max len of string LenOK: mov DI,ES:2[DI] ;get address of actual string rep movsb ;move string into Basic pop DS NoName: pop BP call StackSwapOut ;Back to Basi㐞 c's stack and... ret 2 ; DOSNAME ENDP page ; ; The following routine is used to set any MS-DOS 3.x errors ; ErrSet: push SI or AX,AX ;any error already? je ErrSetEx ;j if not cmp AL,18 ;If it is an MS-DOS 3.x error, jae ErrSetEx ;then let the user deal with it. cmp CS:DOSVersion,0 je ErrSetEx ;skip if DOS 2.x mov SI,AX ;save possible error code mov AH,GetExtendedError push ES ;GetExtendedError corrupts ES int DOS_Function pop ES or AX,AX jnz ErrSetEx ;J if 㐞 original error was not right mov AX,SI ;put original err back ErrSetEx: pop SI ret page ; ; The following routines swap stacks, since Compiled Basic's ; stack is too small in certain circumstances to call DOS. ; StackSwapIn: cld mov BX,SS mov CS:RealSS,BX mov BX,SP mov CS:RealSP,BX mov CS:SaveES,ES mov CS:SaveDS,DS push CS pop ES ;point ES at our stack segment lea AX,LocalStack ;fix SP in the middle of the stack mov SI,SP mov DI,AX mov CX,20 rep movsw ;copy th㐞 e stack to our stack mov BX,CS mov SS,BX ;set our SS mov SP,AX ;set our SP mov AX,CS:SaveDS ;put other segments back mov DS,AX mov AX,CS:SaveES mov ES,AX ret ;continue processing StackSwapOut: mov CS:SaveES,ES mov CS:SaveDS,DS push CS pop DS ;point DS at our stack segment mov SI,SP ;DS:SI points to our stack mov AX,CS:RealSS mov ES,AX mov DI,CS:RealSP ;ES:DI points to real stack mov CX,20 rep movsw ;copy our stack to Basic's mov BX,CS:RealSP mov SS,AX 㐞 ;Put Basic's stack back in force mov SP,BX mov AX,CS:SaveDS mov DS,AX ;restore segments. mov AX,CS:SaveES mov ES,AX ret dw 30 dup (?) ;our stack LocalStack label word ;this is where SP will point. dw 22 dup (?) ;copy of Basic's stack. RealSP dw ? RealSS dw ? SaveDS dw ? SaveES dw ? ; code ends end ONFIG BAK c? ACT8X8 CHR n THIN CHR r  NORTON e4  㐞 Record 1 record 2 DEREK2 Yes this really is the Fourth Record. no certainty should be attached to any retrospective reality Record number 6 THIS IS RECORD SEVEN WITH CAPITA㐞 L LETTERS This is the original record number 8. It is eighty characters long. This really IS record 000009 Record number 10 is eighty characters loooonnnnnggggggg...... Cont'dRecord 11 is here. The twelfth record existeth. Record 13 is the one between record 12 and record 14. 㐞 Added record 14 Record number 15!!!! record 16 㐞 page 55, 132 title MS-DOS 3.x Record Locking Demonstration Program subttl Copyright (C) 1984 A.C.T. (U.K.) Ltd. name LIBTEST2 ;**************************************************************************** ;***** This program demonstrates the record locking facilities of ***** ;***** MS-DOS 3.x. ***** ;***** Written 1984 by Andrew Alston (U.K.) Ltd. ***** ;***** ***** ;***** ***** ;**************************************************************************** extrn DOSOPEN㐞 : far extrn DOSCLOSE : far extrn DOSGET : far extrn DOSPUT : far extrn DOSLOCK : far extrn DOSUNLOCK : far ;---------------------------------------------------------------------------- ;----- Commonly Used Equates ----- ;---------------------------------------------------------------------------- Bel equ 07H ;Make a noise BS equ 08H ;Backspace Lf equ 0AH ;line feed Cr equ 0DH ;carriage return Esc equ 1BH ;Escape Space equ 20H ;space Hyphen equ 2DH ;hyphen FullStop e㐞 qu 2EH ;period Colon equ 3AH ; include DOSEQU.INC ; ;---------------------------------------------------------------------------- ;----- Equates, Structures & Macros ----- ;---------------------------------------------------------------------------- include DOSMACS.INC ; ; Ensure our data segment and code segment will be grouped with ; any others of the same type ; Dgroup GROUP Data Cgroup GROUP Code ;************************************************************************㐞 **** ;***** Data Segment ***** ;**************************************************************************** Data SEGMENT Public 'Data' RecBuff db 256 dup (0) Handle dw 0 Reply dw 0 Reclen dw 128 ReadLen dw 128 RecNo dw 0 Mode dw 2 PathNameGet db 65,0 PathName db 66 dup (?) Header db esc,'E',esc,'(',esc,'0' db '@(#) Test MS-DOS 3 file and record locking V2.0' db esc,')',esc,'1',Cr,Lf,Lf,'$' PathEnq db Cr,Lf,'Path name of test file? $' ModeEnq db Cr,Lf,'Opening mo㐞 de (2 digits) : $' NotFound db Cr,Lf,'File can not be opened - error $' CrLf db Cr,Lf,'$' RecKey db Cr,Lf,'Enter record key (A-Z) or Return to end : $' FailedLock db Cr,Lf,'That record has been locked',Cr,Lf,'$' FailedLockZZ db Cr,Lf,'Cannot Lock record - error $' FailedRead db Cr,Lf,'Cannot read record - error $' PastEof db Cr,Lf,'Record is past end of file.$' Continue db Cr,Lf,'Hit any key to continue...$' PathNameDesc dw ? PathNameDesc2 dw ? RecBuffDesc dw 129 RecBuffDesc2 dw ? DispFlag d㐞 b ? Data ENDS ;**************************************************************************** ;***** Code Segment ***** ;**************************************************************************** code segment Public 'Code' assume CS:Cgroup, DS:Dgroup ; LIBTEST2 PROC Near ; ; This program is intended to allow use of the ; Record Locking features of MS-DOS 3.x ; ; ************************* INITIALISATION **************** mov DX,Data mov DS,DX mov ES,DX display Header Getname㐞 : display PathEnq get_string 64,PathNameGet mov BL,PathNameGet[1] xor BH,BH mov PathNameDesc,BX lea BX,PathName[1] add BX,PathNameDesc xor AL,AL mov Byte ptr [BX],AL display ModeEnq M1: read_kbd_echo xor AH,AH sub AL,30H cmp AL,10 jl M1OK display_char BS jmp M1 M1OK: mov cx,4 shl AX,CL mov Mode,AX M2: read_kbd_echo xor AH,AH sub AL,30H cmp AL,10 jl M2OK display_char BS jmp M2 M2OK: or Mode,AX display CrLf lea DX,MODE push DX lea DX,PathName㐞 mov PathNameDesc2,DX lea DX,PathNameDesc push DX lea DX,Reply push DX lea DX,Handle push DX call DOSOPEN cmp Reply,0 je DoReading display NotFound mov SI,Reply call Deci4 jmp Getname ;********************* END OF RUN *********************** EndOfRun: lea DX,handle push DX lea DX,Reply push DX call DOSCLOSE mov AH,Exit int DOS_Function ;********************** MAIN LOOP ************************ DoReading: display RecKey read_kbd_echo cmp AL,Cr je En㐞 dOfRun TestAgen: cmp AL,41H jl DoReading cmp AL,5BH jl KeyOK sub AL,20H jmp Testagen KeyOK: sub AL,40H xor AH,AH mov RecNo,AX lea DX,RecLen push DX lea DX,RecNo push DX lea DX,Reply push DX lea DX,Handle push DX call DOSLOCK cmp reply,0 je LockedOK cmp reply,80 jl CantLock display FailedLock jmp DoReading CantLock: display FailedLockZZ mov SI,Reply call Deci4 LockedOK: push RecLen pop ReadLen lea DX,RecBuff mov RecBuffDesc2,DX lea DX,RecBuf㐞 fDesc push DX lea DX,ReadLen push DX lea DX,RecNo push DX lea DX,Reply push DX lea DX,Handle push DX call DOSGET ;Get the record cmp reply,0 je ReadOK display FailedRead mov SI,Reply call Deci4 jmp DoReading ReadOK: mov SI,ReadLen cmp SI,0 jne SomeRead ;Ok if some read. display PastEof call DoUnlock jmp DoReading SomeRead: display CrLf mov CX,ReadLen lea SI,RecBuff BuffOut: mov DL,[SI] inc SI mov AH,Std_Con_Output int DOS_Function loop Buf㐞fout display Continue read_kbd_echo call DoUnlock jmp DoReading ; DoUnlock: lea DX,RecLen push DX lea DX,RecNo push DX lea DX,Reply push DX lea DX,Handle push DX call DOSUNLOCK ret ; ; ;---------------------------------------------------------------------------- ;----- Subroutine to convert binary to decimal. ----- ;----- Entry with DI containing most significant 16 bits ----- ;----- SI containing least significant 16 bits ----- ;---------------------------------㐞------------------------------------------- ; Deci4: ;Variant for 4-digit o/p from SI only MOV BYTE PTR DispFlag,1 xor DI,DI Decimal: XOR AX,AX MOV BX,AX MOV BP,AX MOV CX,32 CONVLP: SHL SI,1 RCL DI,1 XCHG AX,BP CALL CONVWRD XCHG AX,BP XCHG AX,BX CALL CONVWRD XCHG AX,BX ADC AL,0 LOOP CONVLP ; Conversion comp㐞lete MOV CX,1310H ;Print 3-digit number with 2 leading blanks CMP BYTE PTR DispFlag,0 JNZ FOURDIG MOV CX,1810H ;Print 8-digit number with 2 leading blanks XCHG DX,AX CALL DIGIT XCHG AX,BX CALL OUTWORD FOURDIG: MOV AX,BP CALL OUTWORD mov DL,20H call PrtChr MOV BYTE PTR DispFlag,0 RET2: RET OUTWORD: PUSH AX MOV DL,AH 㐞 CALL OUTBYTE POP DX OUTBYTE: MOV DH,DL SHR DL,1 SHR DL,1 SHR DL,1 SHR DL,1 CALL DIGIT MOV DL,DH DIGIT: AND DL,0FH JZ BLANKZER MOV CL,0 BLANKZER: DEC CH AND CL,CH OR DL,30H SUB DL,CL CMP BYTE PTR DispFlag,0 JZ PRTCHR CMP DL,30H JL RET2 PRTCHR: M㐞OV AH,Std_Con_Output INT DOS_Function RET CONVWRD: ADC AL,AL DAA XCHG AL,AH ADC AL,AL DAA XCHG AL,AH RET PRINTCNT: LODSB MOV DL,AL INT DOS_Function LOOP PRINTCNT RET ; LIBTEST2 ENDP ; Code ends ; ;**************************************************************************** ;***** Stack Segment ***** ;*******************************㐞********************************************* stack SEGMENT stack 'Stack' assume ss:stack stack ends ; end LIBTEST2 DOSEQU INC 2M DOSMACS INC J  DEM BAS z DOS3BAS DOC oM BOGFILE 001{a b -OGFILE 002 Ib /㐞page 55, 132 Name RELSPL Title Release Point 32 spool file on behalf of Compiled Basic SubTtl (C) 1985 Apricot (UK) Ltd. Comment * The following routine is intended to close the current spoolfile on a Point 32 station, and open a new spoolfile on the same server. It is intended to be called from Compiled Basic programs, and assumes that the assignment for the current printer was made without use of any password. Use: 10 DEV$ = "PRN" 'or "AUX" 20 ERRC% = 0 30 CALL RELSPL ( DEV$, 㐞ERRC% ) The error reply variable will be set as follows: 0 No error 1 Incorrect DOS Version 2 Network not loaded 3 Not on Point 32. 4 NET PAUSE PRDR in operation 5 Printer could not be re-opened 6 Name not "PRN" or "AUX" 255 Other error. * .xlist include DOSEQU.INC .list public RELSPL Dgroup GROUP Data Data segment Public 'Data' Source db 5 dup (0) FindSource db 9 dup (0) FindDest db 64 dup (0) PrinterRealName db 'LPT1' AuxName db 'AUX' PrnName1 db 'PRN' PrnN㐞 ame2 db 'prn' AuxName1 db 'AUX' AuxName2 db 'aux' OurName db 0,0,0 Data ends Cgroup GROUP Code code segment Public 'Code' assume CS:Cgroup, DS:Dgroup RELSPL PROC FAR cld push BP mov BP,SP ;save BP push ES ;and segments push DS mov AH,Get_Version int DOS_Function ;find the version of DOS cmp AL,3 jge DosOk ;OK if DOS 3 or more mov AL,01 ;else error 1 jmp SetError DOSOk: mov SI,[BP+08] ;get address of device string mov AL,[SI] ;get length of device n㐞ame string cmp AL,3 jz LengthOk ;J if length OK mov AL,6 jmp SetError ;else error 6 LengthOk: inc SI inc SI ;point to string itself mov BX,[SI] mov SI,BX lea DI,OurName mov CX,3 rep movsb ;copy string to our area mov CX,3 lea SI,OurName lea DI,PrnName1 rep cmpsb je FoundName ;J if "PRN" mov CX,3 lea SI,OurName lea DI,PrnName2 rep cmpsb je FoundName ;J if "prn" mov CX,3 lea SI,OurName lea DI,AuxName1 rep cmpsb je FoundName2 ;J if "AUX" mov CX,3㐞 lea SI,OurName lea DI,AuxName2 rep cmpsb je FoundName2 ;J if "aux" mov AL,06 jmp SetError ;else error 6 FoundName: lea SI,PrinterRealName ;if "PRN" or "prn", use "LPT1" jmp GotaName FoundName2: lea SI,AuxName ;if "AUX" or "aux", use "AUX" GotaName: mov CX,4 lea DI,Source rep movsb ;move the right name to Source area xor BX,BX ;start with index zero push BX TrySearch: mov AH,AssignOper mov AL,02 ;GetAssignListEntry lea SI,FindSource lea DI,FindDest int DOS_㐞Function jnb EntryFound ;OK if entry found cmp AX,1 jnz NotNetNone ;Not too bad if DOS call understood mov AL,3 pop BX jmp SetError ;error 3 if DOS call unknown NotNetNone: cmp AX,12h je InvalidAccess ;J if invalid access mov AL,0FFh pop BX jmp SetError ;else set error 255 InvalidAccess: mov AL,4 pop BX jmp SetError ;set error 4 EntryFound: cmp BL,3 jz PrinterFound ;J if it's a printer TryAnother: pop BX inc BX push BX jmp TrySearch ;else keep looking Pri㐞nterFound: mov CX,4 lea DI,Source lea SI,FindSource rep cmpsb jne TryAnother ;J if this is not the one for us pop BX ;get the Index Number back mov AH,AssignOper mov AL,4 ;CancelMacro lea SI,Source int DOS_Function ;close the printer alias jnb ClosedOk ;j if done mov AL,0FFh jmp SetError ;else set error 255 ClosedOK: mov AH,AssignOper mov AL,3 ;DefineMacro mov BL,3 ;it's a printer xor CX,CX lea SI,FindSource lea DI,FindDest int DOS_Function ;assign the p㐞rinter jnb NoError ;J if OK mov AL,5 jmp SetError ;else set error 5 NoError: xor AL,AL ;No error SetError: xor AH,AH mov DI,[BP+06] ;get address of error variable mov ES:[DI],AX ;set the error pop DS pop ES pop BP ret 4 ;Back to BASIC RELSPL ENDP ; Code ends ; end 㐞RELSPLCGROUPCODEDATADGROUPfhdh_]G >@NLPT1AUXPRNprnAUXauxl U0!<}v<tFF>6>t26>t#6>t6>t 66>3S_6>!s=u[X=t[M[Gt[CSʹ>6u[_6!s_3ɍ6>!s22~&]z)a5a9UDaHXSaW[baf^o㐞sNzRāĎĒ RELSPLt;=?A C@E`GKMOQ SU`WY㐞SYSTEM3.DOC  MSDOS 3.10 SYSTEM CALLS I. CHANGES TO EXISTING SYSTEM CALLS AND INTERFACES I.1 FAIL ON INT 24  Pas version o MS-DO had som limitation wit regar t certai IN 24 situation whic DO 3. addresses Th primar additio i tha o FAI optio a retur i additio t th ol ABORT RETR an IGNORE FAI mean "Retur a erro o th curren syste call" i othe words FAI th curren call. Th FAI o㐞 ptio i specifie b retur o i A fro th IN 24 handler. The registers are set such that if an IRET is executed, DOS will respond according to (AL) as follows: (AL)=0 IGNORE the error (AL)=1 RETRY the operation (AL)=2 Terminate the current program (ABORT) (AL)=3 .FAIL the system call in progress NOT tha som o th ol 1. call i th 1-1 grou d NO hav erro㐞 returns Respondin FAI t a IN 24 resultin fro on o thes call wil b th sam a a IGNOR respons sinc i i no possibl t indicat a error. NOT als tha becaus o th DO buffe cach som interestin situation ca occur Fo instance a applicatio ma issu syste cal whic reference driv B bu i orde t proces thi cal buffe whic i associate wit driv mus b flushe ou t d㐞riv A I a IN 24 occur o thi flus t driv A an th IN 24 handle respond FAIL th cal associate wit driv wil fail Thi ma caus unexpecte an䠠 inappropriat behaviou o th par o th application. .PA I additio t th FAI option som potentia dat integrit problem associate wit IN 24 hav bee resolved I pr 3. DO i wa possibl t specif IGNOR o IN 24 error associate wit READin o WRIT㐞in FA o directory sectors. Unfortunately this can cause a sector to be buffered in the DOS sector cache which is marked as a directory or FAT sector but which contains garbage data due to the IGNORE. If this sector is ever flushed out it can destroy the information on the disk. This problem has been resolved in DOS 3.* by having some information around as to which of the 4 possible INT 24H responses (ABORT, RETRY, IGNORE and FAIL) are ALLOWED on a partic㐞ular error. In the case of READ and WRITEs of FAT and directory sectors the IGNORE response is NOT ALLOWED. There is information which is now given to the INT 24H handler about which responses are allowed, and some rules for what to do if a response which is not ALLOWED is given. At the time an INT 24H is issued bits in AH indicate which responses are ALLOWED if the error is a block or character device error (as opposed to a Bad FAT error in which case 㐞the bits are meaningless). Bit 5 = 1 if IGNORE is ALLOWED Bit 4 = 1 if RETRY is ALLOWED Bit 3 = 1 if FAIL is ALLOWED These bits were unused on previous DOS versions. NOTE that there is no ABORT bit, ABORT is ALWAYS allowed. In addition there are some rules for what happens if a response which is NOT ALLOWED is given: IF IGNORE is specified and IGNORE is not allowed, Change response to FAIL. IF RETRY i㐞s specified and RETRY is not allowed, Change response to FAIL. IF FAIL is specified (or given as a result of applying the above two rules) and FAIL is not allowed Change response to ABORT. Finall i need t b note tha th GetExtendedErro cal i appropriat t IN 24 (se below) Du t compatibilit consideration th D erro cod i constraine t b i th rang 0-1 inclusive Ther ar howeve certai NE IN 24 error o DO㐞 3.* Thes NE error ar mappe t on o th 0-1 errors th TRU erro i availabl vi GetExtendedError. .pa  I.2 FCB ACCESS TO R/O FILES  I DOӠ 2. th REAĠ ONL attribut wa adde t th fil attributes Unfortunatel ther wa hol i th implementatio whic allowe FC writ call t REA ONL fil t work an als allowe DELET o REA ONL fil t work Th REA ONL attribut onl effecte attempt t writ t th fil wit㐞 Xeni styl handl calls. Thi hol ha bee close i DO 3.* FC write t REAĠ ONL file wil fail an s wil delete o rea onl files Som 2. application hav bee laz abou thi (relie o th fac tha the coul actuall writ t rea onl fil wit a FCB) Thes application wil no wor o DO 3.* the wil hav t b modifie t us th CHMOD cal t tur of th REA ONL٠ bi befor attemptin t write. .pa  I.3 ACCES㐞 S MODES ON OPEN  Name: Open - gain read/write access to a file Assembler usage: MOV AH,3Dh MOV AL,access LDS DX,buffer INT 21h ; If carry is set then AX has the error code otherwise ; AX has the file handle. Description: Open associates a 16-bit file handle with a file. The following values are allowed for the low nibble of access: access㐞 function ------ -------- 0 file is opened for reading. This open will succeed only if the file is not previously open in deny read mode or in deny read/write mode (see below). 1 file is opened for writing. This open will succeed only if the file is not previously open in deny write mode or in deny read/write 㐞 mode (see below). 2 file is opened for both reading and writing. This open will succeed only if the file is not previously open in deny read mode or deny write mode or deny read/write mode (see below) Th hig orde bi indicate whethe o no thi fil i t b inherite b chil processe (create throug th EXE syste call) Th bi bein indicate th㐞a th chil proces wil inheri th ope file whil indicate tha th handl i privat t th curren process. .PA The remaining 3 bits (low 3 bits of high nibble) indicate the sharing mode for the file: mode sharing mode description ---- ------------------------ 0 "compatability" mode. Any process on a SPECIFIC machine may open the file any number of times wi㐞th this mode provided that the file was not opened previously with one of the four modes below. If the file was previously open in one of the other sharing modes below, an INT 24h is generated to signal this error. The base INT 24h error will indicate drive not ready and the extended error code will indicate that there 㐞 was a sharing violation. 1 "deny read/write" mode. This open sharing mode will succeed ONLY if the file is not already open in compatability mode or in read or write access by any other process (including the current process). In other operating systems this is known as exclusive mode I thi ca㐞l succeeds n othe proces wil b abl t ope th fil i an mod whatever. 2 "deny write" mode. This open sharing mode will succeed ONLY if the file is not already open in compatability mode or in write access by any other process. I thi cal succeeds n othe proces wil b abl t ope th fil i an mod㐞 whic allows writing. 3 "deny read" mode. This open sharing mode will succeed ONLY if the file is not already open in compatability mode or in read access by any other process. I thi cal succeeds n othe proces wil b abl t ope th fil i an mod whic allows reading. 4 "den㐞y none" mode. This open sharing mode will succeed only if the file is not already open in compatability mode. DS:DX point to an ASCIZ name of the file to be opened. Th read/writ pointe i se a th firs byt o th fil an th recor siz o th fil i byte Th returne fil handl mus b use fo subsequen I/ t th file. .pa Th DOS o initialization wil hav maximu numbe o files㐞  Se th configuratio fil documen fo informatio o changin thi default. Error returns: AX = error_invalid_access The low 4 bits of access specified in AL was not in the range 0:2. = error_file_not_found The path specified was invalid or not found. = error_access_denied The user attempted to open a directory or volume-id, or open a read-only fi㐞le for writing. = error_too_many_open_files There were no free handles available in the current process or the internal system tables were full. .pa  I.4 NEW IOCTL CALLS  Name: IOCtlIsChangeable - is a particular block device fixed or exchangeable? Assembler usage: MOV AX,IOCtl MOV 㐞AL,8 MOV BL,drive INT 21h ; If carry is set then AX has the error code otherwise ; the low bit of AX indicates whether the media is ; changeable. 0 means changeable, 1 means NOT changeable Description: Man program wis t issu messag whe the nee chang i disk Mos us th hardwar RO suppor provide b th OE whic i no machine-independent Th IOCt cal i 㐞 portabl metho o determinin whethe o no th devic ma suppor removabl media. Error returns: AX = error_invalid_drive The drive number passed in BL was invalid. .pa Name: IOCtlIsRedirectedBlock - is a logical device associated with a network directory? Assembler usage: MOV AH,IOCtl MOV AL,9 MOV㐞 BL,DriveNum ; 0=def 1=A INT 21h JC Error ; invalid drive TEST DX,1000h JZ Local JNZ Remote Description: The value returned in DX on local devices is the attribute word from the device header. On remote devices, only bit 12 (1000h) will be set. The other bits (for the time being) will be zero. DO NOT USE THE 㐞 CMP INSTRUCTION TO EXAMINE DX, IT IS A BIT FIELD, USE TEST. Error return: AX = error_invalid_drive The drive indicated in BL is not a valid drive. .pa Name: IOCtlIsRedirectedHandle - is a handle local or remote? Assembler usage: MOV AH,IOCtl MOV AL,10 MOV BX,Handle INT 21h JC Error ; invalid Handle TEST DX,8000H 㐞 JZ Local JNZ Remote Description: The value returned in DX is the normal IOCTL bit field. There is a new bit defined that indicates whether the handle is for a device across the network or not. DO NOT USE THE CMP INSTRUCTION TO EXAMINE DX, IT IS A BIT FIELD, USE TEST. It is strongly suggested that the programmer NEVER write code that will test this bit; the application 㐞 should be independent of the location of files (remote/local). Error return: AX = error_invalid_handle The handle in BX is not currently open. .pa Name: IOCTLRetry - change sharing retry count Assembler usage: MOV AH,IOCtl MOV AL,11 MOV BX,count INT 21h Description: During normal system functioning, sharing conflicts may 㐞 occur due to exclusion needs of the running applications. These conflicts are automatically retried for a specified count before they are passed on to the user as critical error. This retry count is modifiable through this system call. Error return: None. .pa  II. NEW SYSTEM CALLS AND INTERFACES  .pa  II.1 PUBLIC SYSTEM CALLS  .pa Name: GetCurrentPSP - return se㐞 g addr of PSP for current process Assembler usage: MOV AH,62h INT 21h ; BX now contains the current PSP address Description: The segment address of the 100H PSP of the currently executing process is returned. Error returns: None. .pa Name: PathParse - Parse path strings Assembler usage: MOV AH,61h LDS SI,string 㐞 LES DI,buffer INT 21h ; Carry set if error, AX is error code, otherwise ; AX is Flag word ; SI updated to point past the token just found ; Token copied to ES:DI ; All other registers are unchanged. Description: PathParse is a string parser. It copies the next token in the string into the buffer, updates the string pointer, and builds a flag word which describes the token. NOTE: It is 㐞the caller's responsibility to make sure DS:SI does not point to a null string. If it does, SI is incremented, a null byte is stored at ES:DI, and the routine returns. EQUs for AX flag word: ParseSwitch equ 8000H ; Switch class ParseSeparators equ 4000H ; Separator class ParsePathName equ 2000H ; Path class ParsePathSynErr equ 0001H ; Path has syntax error ParsePathWild 㐞equ 0002H ; Path has wildcards ParsePathSeparators equ 0004H ; Path has pseparators ParseInvalidDrive equ 0008H ; Path has invalid drive Error returns: .pa Name: Translate - perform name processing on a string Assembler usage: LDS SI,source LES DI,dest MOV AH,60h INT 21h ; the buffer at dest now contains the processed ; source string. Carry is set and AX is㐞 error ; if the string is malformed. Description: All name processing is performed on the input string: string substitution is performed on the components, current drive/directories are prepended, . and .. are removed. Error return: None. .pa Name: GetExtendedError - return extended error Assembler usage: MOV AH,59h MOV BX,0 INT 21h 㐞 ; AX now has the error code for the last system call ; WHICH GOT AN ERROR. ; BL is the recommended error action (see below equates) ; BH is the error class (see below equates) ; CH is the error locus (see below equates) ; ALL REGISTERS EXCEPT FOR STACK (SS:SP) ARE DESTROYED Description: With the addition of new functionality to the MSDOS/PCDOS operating system, it became quite clear that a gr㐞eat body of existing programs would not function correctly if a new error was returned for the old system calls. As a result, when new errors occur, they are mapped into a simpler (2.0) error. Programs that are written from now on are expected to handle errors by noting the error return on the original system call and then issue the GetExtended error system call. If the program does not recognise 㐞 the new error, it can use the mapping and behave accordingly, or it can determine what to do based on the CLASS ACTION and LOCUS returns. This system call is available during INT 24h and may be used to return network-related errors. Error return: None. .pa Name: CreateTemp - create a file with a unique name Assembler usage: MOV AH,5Ah LDS DX,Directory 㐞 MOV CX,Attribute INT 21h ; if no error occurred, then AX has the file handle ; and the name of the file has been appended to the ; directory string Description: CreateTemp generates a unique name and attempts to create a new file in the specified directory. If a file already exists in that directory, then another unique name is generated and the process is repeated. Prog㐞 rams that need temporary files must use this system call to generate them to prevent name conflicts in a multitask environment. Error return: AX = error_path_not_found The directory pointed to by DS:DX was not found. .pa Name: CreateNewFile - guarantee that a file is new Assembler usage: MOV AH,5Bh LDS DX,Name MOV CX,attributes INT 21h 㐞 ; AX has error code or file handle Description: This function is identical to the Create system call of 2.0 with the exception that it will fail if the file exists. In a multitasking system, it is necessary to be able use files and their existence as semaphores. The CreateNewFile system call may be used as a test-and-set semaphore. Error return: AX = error_file_already_exists The specified fi㐞le exists already regardless of the attributes given. .pa Name: Lock - prevent access of a range of a file Assembler usage: MOV AX,5C00h MOV BX,Handle MOV CX,OffsetHigh MOV DX,OffsetLow MOV SI,LengthHigh MOV DI,LengthLow INT 21h ; If carry is set then AX has the error code otherwise ; the region is locked㐞 for all other machine/process ; access. Description: Provide simpl mechanis fo excludin othe processe acces t region o th file Loc wil inhibi AL̠ acces read/write I anothe proces attempt t rea o writ i suc region thei syste cal wil ge a error_lock_violatio i th fil i ope i NE 3. mod (se OPEN) o a IN 24 erro i i i ope㐞 i compatibilit mode. Wit version o DO startin wit 3.10 i progra attempt t rea regio o fil locke b anothe process a erro wil b returned bu th dat wil b place i th user' buffer Thi enable th applicatio t obtai reasonabl up-to-dat informatio fo enquir purposes Write t suc regio wil alway b failed. Th locke region ma b anywher㐞 i th logica file Lockin beyon en o fil i no a error. I i expecte tha th tim i whic region ar locke wil b short indee i shoul b considere a erro i the ar locke fo mor tha 1 seconds. Dupin th handl wil duplicat acces t th locks Acces t th lock i no duplicate acros th EXE syste call. Closin fil wit lock stil i forc wil caus th 㐞lock t b removed Version prio t 3.1 wil produce undefined results. Exitin wit fil ope an an havin issue lock o tha fil ha undefine results Program tha ma b aborte vi INԠ 2 o IN 2 shoul tra thes an releas th lock befor exiting Versio 3.1 an late wil releas al lock owne b progra whic exits. .pa Th prope metho fo usin lo㐞ck i NO t rel o bein denie rea o writ access bu attemp t loc th regio desire an examinin th erro code. Error return: A error_invalid_handle The handle in BX was not a valid opened handle. = error_lock_violation The region (or a piece of the region) specified was previously locked either by the current process or by another process. 㐞 = error_too_many_locks Th DO i alread keepin trac o it maximu number of locks. .pa Name: Unlock - release guarded access to a region of a file Assembler usage: MOV AX,5C01h MOV BX,Handle MOV CX,OffsetHigh MOV DX,OffsetLow MOV SI,LengthHigh MOV DI,LengthLow INT 2㐞 1h ; If carry is set then AX has the error code otherwise ; the region is unlocked for all other machine/process ; access. Description: Unlock releases the lock issued in a previous Lock system call. The region specified must be exactly the same as the region specified in the previous lock. Closin fil wit lock stil i forc wil caus th lock t b removed Version o DO prio t 3.1 㐞wil produc undefine results. Exiting with a file open and and having issued locks on that file has undefined results. Programs that may be aborted via INT 23 or INT 24 should trap these and release the locks before exiting. The proper method for using locks is NOT to rely on being denied read or write access, but attempt to lock the region desired and examining the error code. Error return: 㐞 AX = error_invalid_handle The handle passed in BX was not open. = error_lock_violation The region specified was not identical to one that was locked by that process. .pa Name: GetMachineName - return the character identifier of the local machine Assembler usage: MOV AX,5E00h LDS DX,buffer INT 21h Description: 㐞 Return to the caller the text of the current machine name. The machine name is a 16 byte string padded with spaces and terminated will a NUL byte. Error return: None. .pa Name: PrinterSetup - specify initial string for printer files Assembler usage: MOV AX,5E02h LDS SI,buffer MOV CX,length ;Range 1 to 64 in V3.10. MOV BX,index ;Fr㐞om GetAssignListEntry INT 21h ; if carry is set then AX contains the error code Description: The string specified will be prepended to all files destined for a particular printer. This is intended for printers that may share several users and each user has his own configuration for the printer. The index number in BX is the index number as used in GetAssignListEntry for the particular printer of i㐞nterest. Error return: AX = error_invalid_function The network support is not present. = error_invalid_parameter Th lengt o th strin wa no i th correc range. .pa Name: GetAssignListEntry - return non-local network assignments Assembler usage: MOV AX,5F02h MOV BX,index ; zero based LDS SI,source 㐞 LES DI,dest INT 21h ; If carry is set then AX has error code otherwise ; DS:SI points to local name (MAY be NUL), ES:DI points ; to remote name, CX has the stored user value (see ; define macro) and BL has the macro type (3 or 4). Description: Step through the network assignments and retrieve their text and values. The contents of this list may change between calls. The end-of-list is dete㐞cted by the error_no_more_files return code. Error return: AX = error_invalid_function The network support is not present. = error_no_more_files The index passed in BX is greater than the number of network assignments. .pa Name: DefineMacro - perform name aliasing Assembler usage: MOV AX,5F03h MOV BL,type MOV CX,value 㐞 LDS SI,source LES DI,dest INT 21h ; if the carry flag is set then AX contains the error ; code Description: I B̠ the th sourc specifie printer th destinatio specifie networ director an th C registe ha wor tha MSDOS/PCDO wil maintai fo th programmer Thi wor ma b retrieve throug th GetAssignLis syste call Al outpu destin㐞 e fo th specifie printe wil b buffere an sen t th remot printe spoole fo tha device. Th sourc strin mus b on o th pre-define redirectabl printe names Th destinatio strin mus poin t networ nam strin o th for "\\machine\path" Immediatel followin th networ strin i th asci passwor fo acces t th remot device nul (zer length㐞 passwor i considere t b n password. I B̠ the th sourc eithe specifie driv lette an colo o i NU string Th destinatio specifie networ director an th C registe ha wor tha MSDOS/PCDO wil maintai fo th programmer Thi valu ma b retrieve throug th GetAssignLis syste call I th sourc wa driv letter th associatio i mad betwee th dr㐞iv lette an th networ directory Al subsequen reference t th driv lette wil b translate t reference t th networ directory I th sourc i no driv letter i mus b a empt string Th syste wil attemp t gran acces t th destinatio wit th specifie password. Immediatel followin th networ director i th passwor fo acces t tha directory nul p㐞asswor (zer length indicate n password. .pa Error return: AX = error_invalid_function The network support is not present, the value in BX was not in the range 1:4, the source string was in the wrong format, the destination string was in the wrong format, the source drive was already spliced or assigned to the network, or the printer was already assigned to the network. 㐞 = error_access_denied The network directory/password combination was not valid. This does NOT mean that the password itself was invalid. = error_not_enough_memory There is not enough memory for string substitutions. .pa Name: CancelMacro - unmake a previous assignment Assembler usage: MOV AX,5F04h LDS SI,buffer I㐞NT 21h ; if carry set, then AX has error code Description: The assignments created by the DefineMacro are removed through this call. If the buffer points to a drive letter then a colon and that drive is associated with a network name, then that association is terminated and the drive is restored to its physical meaning. If the buffer points to one of the pre defined printer names and that dev㐞ice has an association with a network device, then that association is terminated and the device is restored to its physical meaning. If the buffer points to a string which starts with two '\'s, The association between the local machine and the network directory is terminated. Error return: AX = error_invalid_function The buffer contained an unrecognised name or indicated 㐞a network name when no network support is available. .pa PROGRAMME INFORMATION Presenc o Argv[0] I wa alway difficul t determin wher particula progra wa loade from I particular wit man subdirectorie an PATHs som program woul lik t b abl t loa overlay fro thes area too. I th environmen space ther i wor o zero tha terminate th se o environmen 㐞strings Followin thi wor wil b th Initia argument passe t program I general thi wil contai wor coun an se o ASCI string tha correspon t th argument o th process Unde MS-DO 3. thi wil be: WOR o 1 BYT ASCI strin o th nam o th executabl progra a passe t th EXE syste call. Program ma the us thi informatio (alon wit 㐞  versio check t determin wher th堠 executabl progra wa loade from. .pa Access to files across a Network Wher th fil bein accesse i o differen machin (i.e fil server) ther ar mino difference i th result obtaine whe attemptin t acces th files. Sinc ther ma b severa application accessin particula file progra calle SHAR i ru o th 㐞server whic implement th file-sharin extention t MS-DOS. Th workstatio softwar (REDIR convert MS-DOӠ 1. call usin FCB t th equivalen Xenix-typ call using file handles. The results of these points are as follows: I th fil i opene usin FC calls the th fil i assume t b opene fo readin an writing an th fil i opene i compatability read/writ mod (㐞i allowed) Th exceptio i whe th fil i marke i th director a read-only whe th fil i opene i compatability read-onl mode Thi enable program whic hav overlay loade usin DO 1. call t ru in multiple machines without problem. I th fil i opene usin Xenix-typ calls th fil i opene usin th exac mod requeste (i allowed) I i no possibl t ope fil m㐞arke a read-onl in a mode which allows writing. Som application whic us MS-DO 1. call ar no well-behave i tha the d no clos of file whic wer onl use fo reading bu instea jus re-us th FC  fo anothe file WordStar fo instance neve close it .OVҠ files Whe th fil i acros network i i no possibl fo th softwar t spo tha th fil i n longe㐞 required an i remain ope unti eithe th applicatio i exited o ther ar n longe an fre FCB availabl fo openin ne file Whe thi poin i reached th softwar wil automaticall clos th FC whic wa leas recentl used Thi wil usuall b on o th file whic wa lef unclose b th application bu i problem occur i i possibl t adjus th syste t preven 㐞this (see FCBS parameter in CONFIG.SYS, below). .PA CONFIG.SYS parameters BREAK Thi statemen allow yo t tur o o of th Control- checkin don b MS-DO a certai points I se on MS-DO wil chec whethe th use ha presse Control-à wheneve th DO i entere fo an reason I se off th chec i onl carrie ou whe th DO call is an access to the screen or keyboard. 㐞Th synta o th statemen is:- BREAK= where is either ON or OFF. The default value is ON. BUFFERS Thi statemen allow yo t se th numbe o dis buffer allocate i memor a start-up Thes buffer ar use t hol dat bein rea fro o writte t dis wher th amoun o dat i no a exac multipl of the sector size. Th synta o th statemen is:- 㐞 BUFFERS= wher  wher  wher  wher  wher  wher t>t؎Îغ!R؋[HƎQYH،HË++ۋD t;r+ D‰+҃CC@Not enough memory$㐞3&&G.؎мR. !!д!:\r:ls<>] u/\ 󤺐!m t#؎3ػ7?+*3&??>m uj.%l 󤺐! [] is font to be loaded. is file to save current font into. $Specified Character Font not found. $Inappropriate Character Set. $Invalid drive(s) specified. $Fatal error reading disk, program terminated. $Fatal error writing disk, program terminate㐞d. $File creation error. $Disk full error saveing file. $CHR㐞MZ N 㐞),...+ۋЋDE tЋDE tЉUCCȡ++;s  !y;s+ۋ+CC*t<t SV^[KKu܎+߹|t HQY 㐞$*+CCΡ@\>t>t؎Îغ!R؋[HƎQYH،HË++ۋD t;r+ D‰+҃CC@Not enough memory$㐞3&l&G.{؎мR.y !!д!:\r:ls >] u\ 󤺅!m t#؎3ػ74+*3&?4>m uj.yl 󤺅! [] is keyboard table to be loaded. is file to save current keyboard table into. $Specified Keyboard Table not found. $Invalid drive(s) specified. $Fatal error reading disk, program terminated. $Fatal error writing disk, program terminated. $File creation error. $Disk full error saveing file. 㐞$KB 㐞 CONTENTS 1. Introduction 2. Point 32 Components 3. Using the Network 4. Network Printers 5. Physical Communication 6. Network Software 7. User Access to Network Files 8. Applications in the Network Environment 8.1 File Protection and Sharing 8.2 Sharing Control 9. Network Utilities 10. Network Architecture 10.1 Physical and Data-link Layers 㐞  10.2 Network and Transport Layers 10.3 Session and Presentation Layers .pa Point 32 Overview 1. Introduction This guide is an overview of the Point 32 Local Area Net work. Readers should already be familiar with the principles of computing, and ACT'S microcomputers. The Network consists of two or more computers physically linked together. Some advantages of using a network are: 㐞 - Sharing of resources (i.e. file-space, peripherals or software), allowing these resources to be used more efficiently. - Shared files; ensures consistency of data as only one file has to be updated. Also saves file-space. - Communication between users can streamline office procedures. The Point 32 Network is based on the Corvus Omninet and Microsoft's MS-NET. OmniNet implements the hardware and 㐞 lower level communication mechanism. MS-NET implements the user and application interface levels. Together they form an efficient communications system for interconnecting any Apricot computers. Physically, the communication medium is a twisted-pair trunk cable. The computers (with installed network hardware and software), together with the communication medium, make-up Point 32. All the facilities provided by the network are integral to a standard version of the㐞 MS-DOS Version 3.05 operating system. (Point 32 cannot be used with earlier versions of MS-DOS). It is advisable for one person, or a small team, to be allocated the post of network manager. The responsibilities should include installing and maintaining network software, allocating network resources, and ensuring the integrity and security of network data. A Point 32 Manager's Guide is provided for persons taking this role. In addition, a Wo㐞rkstation Users Guide is provided for users and operators. .pa Point 32 Overview 2. Point 32 Components. Computers in the network are divided into two classes. These are Servers which provide services or resources to the network, and Workstations (points where users can gain access to the resources provided by the servers). Standard models within the Apricot product range are converted in㐞to servers and workstations by the addition of a LAN Expansion Board and the appropriate network software. The boards are supplied with a Tap Cable to link into the network trunk. A Server is a central computer with a hard disk for mass storage; it is based on an Apricot Xi with a 10 Megabyte Winchester disk. Usually it has no keyboard or screen, and cannot be used as a workstation. A server may have a printer connected to it, and the servers'㐞 disks and printer are available to the users of the network. Each server may be fitted with one MSD 10Mb external Winchester disk, giving a total hard disk capacity of 20 Megabytes. Point 32 may support up to ten servers. The servers use a special control program that allows network access to the file space, controls user access to the server, and supervises printing etc. The hard disk stores users' files, files waiting to be printed (spooled prints㐞), and the server software. The floppy disk drive is used to initialize the server, and can be used for achiving files, and transferring files from other systems. Existing Apricot XIs may be used as servers, but must be fitted with a LAN board. A Workstation is a computer that is used to access the server. Any Apricot capable of running MS-DOS may be used as a workstation (PC, Xi, Portable or F1 but no F1e). As the stations are standard Apricot machines, they have s㐞torage and processing abilities independent of the network, and thus Point 32 implementation uses intelligent stations. The workstations may be used in local (normal stand-alone) mode, or in network access mode. A workstation is also used to issue commands to the servers and display the servers' status. Workstations must have a LAN board fitted and network software installed. The network supports up to 32 workstations, minus the number of servers. .pa Opti㐞 onally, Point 32 may support a number of Banks. The bank is a mass storage device that connects directly to the network, and is generally used for archiving files from the servers for backup purposes. It records data on a high- speed tape cartridge, and takes removable tape cartridge of 100 or 200 Megabytes capacity. The maximum number of devices that can be connected to the network is 2, of which up to ten may be servers. The minimum configuration 㐞 is one workstation and one server. Note that Point 32 is not dependent on any one station or server, and network control is distributed. Future network devices will include larger capacity file servers and gateway devices (for linking to the telephone network - thus providing the workstations access to mainframes, other networks, public/provate database services, etc). .pa Point 32 Overview 3. Using the Network. 㐞 This release of Point 32 (V1.0) allows users at a workstation to access files (both program and data) stored on one or more servers. Thus users may share common data files and load programs stored in the server. Note that applications cannot be run in the servers; they are dedicated to providing file and print services. All applications run on the workstations. The resources at the network servers are easily accessible to the network us㐞ers. A simple CONNECT command at the workstation is all that is required. Workstations can also be used in local mode without any loss of efficiency or functionality. The directories and files at the server are made to appear as local drives or pathnames at the workstation; the Point 32 software redirects all commands for remote (server) files and peripherals across the network. The user can perform most of the MS-DOS file commands (such as COPY 㐞 and DIR) on these directories, load applications into the local station, and generally use these files as if they were local to the station. The server directories and files must be made available to users by commands to the server, and these resources may be password protected. See the section on Resource Managment for further details. .pa Point 32 Overview 4. Network Printers. Each server can support on pr㐞inter that is available to network users. Users access the printer via a simple CONNECT command, and thereafter the printer appears as if it were local to the workstation. A spool queue in the server is used to hold print files until they can be printed, and the queue is handled is a 'first-in, first-out' fashion. Output can also be directed to a local printer (connected to the workstation) of one is present. .pa Poin㐞t 32 Overview 5. Physical Communication In Point 32, the physical communication mechanism is implemented by the Corvus OmniNet. The Corvus system is based upon an inexpensive twisted pair trunk cable as the transmission medium, using a common bus structure. This cable or bus forms the backbone of the network. Linking into the network requires a junction box (referred to as a Tap box) to provide the means on connecting a computer to the trunk. The Tap㐞 Boxes are passive devices and of a comparitively simple design. Figure 1 shows a simple network configuration. (as per h/ware installation guide) Figure 1. Basic Network Configuration Using passive Tap Boxes and unshielded twisted pair cable, the maximum length of the network can be up to 2000 feet (hence the term Local Area Network). Active junction boxes enable the network to be extended to 4000 feet. They will also allow branches to 㐞be made from the main network trunk, which is a feature not available using the passive devices. The LAN board is installed within the computers by simply plugging it into an available Expansion Slot. Connecting a new station or server into the network is a simple procedure and is achieved by plugging one end of the Tap Cable into the LAN board and the other end into a Tap Box. All workstations and servers on the network have to be assigned a unique physi㐞 cal address to allow the network software to identify the source and destination of data transferred over the network. .pa This address is set up via a series of microswitches on the LAN boards. This addressing technique allows stations and servers to be physically moved without effecting the network. The LAN boards provide an RS422 interface to the network bus, and a DMA channel for use in passing messages to and from its host processor. The active jun㐞ction boxes are standard RS422 repeaters. The protocol used is CSMA/CA with a transfer rate of 1 Megabit per second. See Section 10 for further details. .pa Point 32 Overview 6. Network Software. The communications features provided by the network are controlled by the networking software. This software has to be installed and configured before the network can be operational. Details of the installation 㐞of the network software is covered in a separate document, but the following sections give an overview of its structure and capabilities. The system software for both the servers abd workstations is provided by MS-DOS version 3.05 and MS-NET Version 1.0. MS-DOS 3.05 is an upgraded version of 2.11. It includes embedded basic network access functions and implements file and record locking. Version 3.05 is also a standard operating system for non-networked environment㐞s. MS-NET is only loaded in networked environments; it intercepts all MS-DOS calls and routes these calls across the network as and when necessary. .pa Point 32 Overview 7. User View of Network Files Resource management and file control in Point 32 are implemented by MS-NET and MS-DOS. The two major software components of MS-NET are server and redirector. Server runs as an application in a㐞ll servers, and provides file and print services to the network. Redirector is installed in every workstation, and performs transparent redirection of file and print requests from the workstation to the network. Directories at a server are 'offered' to the network to be used by remote users. The directory and the file structure beneath it are accessible to workstations. Unless so offered, directories and their substructure are not available to the us㐞ers. When offered, directories may have passwords and access controls placed on them. These are checked whenever an offered directory is accessed by a remote user. As an example, suppose the following file structure exists on a server:- A: = root ------------------------------------------- \accounts \payroll \customer ---------------- -------------- \in㐞voice \ledgers file1 \credit address The root directory (A:) can be offered on the network with a password that is only known to the network manager. Thus the manager has access to all files on that server. Another offer can be made for the directory\accounts, again with a password. Users connecting to\accounts are able to access this directory, and all directories and files in its substructure, but are not able to access (and may not even be aware of㐞) the file structures\payroll and\customer. .pa Offers also specify the access mode allowed for a directory or file structure. Access mode may be 'read only' or 'read and write'. All offer commands at a server may use an alias for the directory, and different passwords and access modes may be attached to each alias. Thus the directory\payroll may be given one alias with read and write access and associated password, and another alias with read 㐞 only access and a different password. Each server is assigned a name. This name is used in connect commands at workstations to identify the file as remote and the required server. It is preceeded by two backsplashes. A pathname to a remote file has the form:- \\server\directory\[directory\...] If the example file system resides on the server named BLUE, and \customer is offered without an alias, a connect command to \customer has the form:- 㐞  \\BLUE\CUSTOMER\ The connect command will include a password, if one is required, and all subsequent requests using this pathname will be redirected across the network. The connect command may also tie the pathname to an used local drive letter (e.g. C: to F:). All references to the drive are then redirected to the pathname. Pathnames will also be extended in further releases of Point 32 to include a network name, thus permitting internetworking. .pa㐞 Point 32 Overview 8. Applications in the Network Environment. Applications software and data may be stored on the server, and may make use of the disk and printer resources at the server; no applications may run in the server. Any applications written for MS-DOS 1.0, 1.25, 2.0, and 2.11 may run on Point 32, with the following caveats: 1) The application uses the MS-DOS environment, and particularly di㐞 sk accesses are done via MS-DOS. 2) Once the application has been loaded in the workstation it may access the printer, screen, keyboard, etc. via the BIOS, but I/O via the BIOS cannot be redirected. Print output must be through MS-DOS to use the server printers. 3) Applications stored on the server and used from multiple workstations must not be self-modifying. All code, overlay, and messag㐞 e files must be read only (and marked as such). Applications' remote data may not be used concurrently without amending the application to include record and file locking. Existing applications cannot interfere with each other, for example if a user is editing a file with WordStar then a second user attempting to open that file would be rejected. In order to utilise the full advantages of Point 32, applications should be upgraded 㐞 to include file and record locking. This can be easily done using an extension in MS-DOS 3.05. .pa Point 32 Overview 8.1 File Protection and Sharing. In the current release of Point 32, all resources on stations are assumed to be local to that station, and cannot be accessed from elsewhere in the network. This ensures somplete privacy of files on a station, and that no-one is able to 'steal' a local printer㐞 in the middle of a print job. Only resources on file servers are shareable, and can be accessed from more than one station at a time. MS-DOS 3.05 implements the functions of 'sharing control' (file locking) and 'locking control' (record and block locking). These are essential features for a networking environment, and are required for avoiding inconsistent data, and file contentions. Access modes offered with a file structure have been discus㐞 sed above. When a program opens a file in the structure, it must establish a 'use mode' The use mode may be Input-only, Output-only, or Input/output, and must conform with the access mode of the file itself. use mode is a property of the program opening the file. 8.2 Sharing Control. Once access has been granted, the sharing of files must be controlled. Access control limits what a user can do independent of other users: sharing control limits what a user can 㐞 do because of what other users are doing. The sharing mode is established when the file is opened. There are four sharing modes; these are 'deny all others' (DRW), 'deny all readers' (DR), 'deny other writers' (DW), and 'deny all' (ALL). Should the requested sharing mode not be allowed because it conflicts with a sharing mode used by another user that already has the file open, the file will not be opened. The four sharing modes,in conjunction with the 㐞 three use modes, provide a wide range of contention resolutions. Some of the possibilities are listed in Table 1. .pa Access Use Sharing Description R/W I/O DRW Exclusive, one reader/writer R I DRW Exclusive, one reader R 0 DRW Exclusive, one writer R/W 0 DW Shared, one writer, may readers R/W I/O DW Shared, one reader, many writers R I 㐞 ALL Shared, many readers R O ALL Shared, many writers R/W I/O ALL Shared, may readers/writers Table 1. Some File Access Options. In order to take advantage of the many options available, applications should ideally be implemented for a networking environment to avoid contention problems between users while maximising file availability. Access control and sharing control are on a per-file basis. With㐞!in a file users can also control the use of the contents of the file by use of 'block locking'. This permits any block of characters within a file to be locked, preventing access to other users while the lock is in effect. .pa Point 32 Overview 9. Network Utilities. Utilities will be supplied for assisting in configuring Point 32, for example generating address files, and offer and connect commands. Archive and re㐞!store utilities for use with the bank are also provided. .pa Point 32 Overview 10. Network Architecture. Point 32 implements a network architecture based on the ISO 7-layer model for, Open Systems Interconnection. Each layer uses the facilities made available by the nest lower layer to provide services to the next upper layer. Thus each layer is shielded from the details of how the lower layers implemen㐞!t these services. Figure 2 shows the arrangement pf the seven layers. Name Layer ----------------- Application 7 ----------------- Presentation 6 ----------------- Session 5 ----------------- Transport 4 ----------------- Network 3 ----------------- Data Link 2 ----------------- 㐞! Physical 1 ----------------- Figure 2. The ISO Model for Open Systems Interconnection. The layered approach allows any layer to be replaced without affecting other layers. For example, application software written for MS-NET will run on any implementation of MS- NET, irrespective of the implementation of the lower layers. However, note that the same implementation of all layers must be present in all machines within a single 㐞!network. 10.1 Physical and Data Link Layers. Layers 1 and 2, being the physical connections and the data link protocol, are supported by the Corvus' OmniNet chip set (located on the LAN board). The physical implementation has been discussed in section 4. The Data-link layer is responsible for accepting information from the Network layer and assembling it into a format suitable for transmission, and accepting received data and passing it up㐞! to the Network layer. The protocol used in Point 32 is Carrier-Sense Multiple- Access with Collision Avoidance (CSMA/CA). Briefly, this means that all stations and servers broadcast on the network, and each listens only for its own address. None can start a transmission while one is in progress (carrier-sensing). If two start a transmission at the same time, both halt and retry after a random period (collision avoidance). The protoc㐞!ol is responsible for checking the integrity of all messages which it transmits or receives. The transfer rate on the cable is 1 Megabit per second, with about 20% overhead for error detection and correction. 10.2 Network and Transport Layers. The network and transport layers of Point 32 have been written by ACT. The network layer in the OSI model is concerned with routeing through the network, and its significance in a CSMA/CA network is negl㐞!igible. The transport layer implements the services required by MS-NET using the OmniNet facilities. These services include virtual circuit establishment and management, and a datagram service: in short, these are means by which end-to-end communication is established, regardless of the lower layers. Part of the Transport layer's function is the management of transmission and reception buffers via the transport protocol credit packets. (A credit packet is㐞 ! sent to the other side when buffer space is available to receive it). Note that no standards have yet been defined for the Transport layer, and other vendors implement it other variations. Thus Point 32 will not be compatible with any given network even if it is based on OmniNet and MS-NET. However, ACT will supply Transport software for other vendors equipment. 10.3 Session and Presentation Layers. The Session and Presentation layers are implemented㐞" in MS- NET and MS-DOS. Together they provide the users' interface to the network, and manage the intra-network dialogues in an orderly manner. The Session layer provides the control, delimitation and synchronisation of data exchange, and helps manage file access control by performing the permission and password functions. The Presentation layer prepares the data for the application layer; this involves the transformation of information so that 㐞" the differences between systems on the network are eliminated. In effect, the Presentation layer hides the network from applications, so that applications may use local and remote files without special network operations. 㐞" .he MS-DOS Addendum .fo  A-#  MS-DOS Addendum  Informatio containe i thi documen i subjec t chang withou notic an doe no represen commitmen o th par o ACT. Al right reserved n us o disclosur withou writte consent. Copyrigh C Applie Compute Technique PL 1984 Published in the Publi㐞"shed in the U.K. by USA by ACT (UK) Ltd Apricot Inc. Shenstone House 3375 Scott Boulevard Dudley Road Suite 342 Halesowen Santa Clara West Midlands B63 3NT California 95051 .pa Contents Introduction 1 Pathname Extension for Networks 2 DOS Commands ASSIGN ATTRIB JOIN SHARE SUBST 3 CONFIG.SYS Statements BUFFER㐞"S COUNTRY DEVICE FCBS FILES LASTDRIVE 4 Disk Utilities FORMAT BACKUP and RESTORE .pa Introduction Thi bookle i a addendu t th Aprico Microsof Pack I describe th MS-DO Versio extension tha ar additiona t MS-DO Versio 2 Man o thes extension ar onl usefu i Poin 3 networ environmen operations bu the ma b use i stand-alon environment wher meaningful. 㐞"Th extension fal int four group a follows: Pathname extension. DO commands. CONFIG.SY file statements. Disk Utilities. .pa 1 Pathname Extension for Networks Directorie an pathname a use i MS-DO Versio ar full describe i Section 3. an 3. o th Microsof Pack I MS-DO Versio 3 pathname fo file an directorie ar extende t includ networ nam fo th serve tha th fil o director reside on Not tha thi pathna㐞"m extensio i onl meaningfu i Poin 3 networ environments an i currentl onl availabl i th networ comman US a describe i the Poin 3 documentation. Th networ nam fo th serve o whic th director o fil reside prepend th usua pathname an i precede b tw backslashes Thus director know a \account residin o serve havin th networ nam SERVER ha th pathname: \\server1\accounts Th US comman wil lin thi remot director 㐞"t loca virtua driv letter Fo example driv C ma b linke t th pat wit th command: use c: \\server1\accounts Al th MS-DO pathin command ca no b use o thi virtua drive (Not tha th director nam wil usuall b a alia name se th Poin 3 documentation for further details). 2 DOS Commands Chapter an o th Microsof Pac describ MS-DO commands Th followin comman description fo ASSIGN ATTRIB SHAR shoul b rea a a e㐞 "xtensio t Chapte 5 ASSIGN (Drive) Command Th ASSIG comman instruct DO t rout dis I/ request fo on driv int dis I/ request fo anothe drive Thi comman i usefu fo application tha wer designe t perfor thei dis operation specificall o drive an (thos application tha d no allo yo t specif drive) Th comman i particularl usefu i Poin 3 environments wher application ma mak us o networ dis resources eve i the 㐞#wer writte fo stand-alon environments. ASSIG i DO externa comman an ha th syntax: [d:][path] ASSIGN [X=Y[...]] The parameters are: [d:][path befor ASSIG specifie th driv an pat tha contain th ASSIG comman file. specifie th driv lette tha curren dis I/ request ar sent. specifie th driv lette tha yo wan dis I/ request t no b sent. Th firs driv lette i internall converte b DO t th secon driv lette Y 㐞# Yo d no hav t typ a colo afte th driv letter an Y. Typ ASSIG wit n parameter t rese al driv assignment s tha norma driv assignment resume. .pa B usin comman suc as:- A>assign a=c b=c Application ca b mad t us drive othe tha an B suc a networ har dis (c i thi case). Reassignmen o drive shoul onl b use whe necessar fo application tha requir pre-define driv assignments I shoul neve b use wit th 㐞#BACKU o PRIN command o whe runnin DO i norma operations becaus i ca hid th tru devic typ fro command an program tha requir actua driv information Als not tha FORMA an CHKDS ignor an driv reassignments. Th followin exampl assign al request fo driv t driv C A>assign a=c Thus i yo issu DI A DO display th director o driv C: T loo a th director o driv A yo wil hav t rese th assig b typin th comma㐞#n without parameters. Th followin exampl assign an reques fo driv o driv t driv C an an reques fo driv t drive A. A>assign a=c b=c c=a Th followin exampl reset an previou driv assignment s tha request fo driv g t driv A etc. A>assign .pa ATTRIB (Attribute) Command Thi comman allow yo t se o displa th read-onl attribut o file An fil ma b se t read-only but the command is most useful in networ㐞#k environments. Fo example file o networ server tha user wil onl nee t read suc a progra files shoul b se t rea onl a thi permit mor tha on use t acces the a time Syntax: [d:][path]ATTRIB[+/-R] [d:][path]filename[.ext] The parameters are as follows: [d:][path befor ATTRI specif th driv an pat tha contain th ATTRI comman file. set th rea attribut o th specifie fil t read-only. - remove th read-onl㐞# attribut o th specifie file. I n "" paramete i present th curren attribut o the file is displayed. [d:][path]filename[.ext specifie th fil yo wan t mar a read-only. Th followin exampl set th attribut o th fil name PAYROLL\FILE1.TX t read-only. A>attrib +r payroll\filel.txt Th followin exampl display th attribut o th fil FILE1.TXT a ther is n "R" parameter. A>attrib payroll\filel.txt The result is R A:㐞#PAYROLL\FILE1.TXT where the "R" shows the file is read only. .pa The JOIN (drives) command Join dis driv t specifi path. SYNTAX: joi COMMENTS I th pathnam doe no exist MS-DO trie t mak director wit tha pathname Th pat mus b empty Afte yo issu th Joi command th firs driv nam become invalid an i yo tr t us it MS-DO display th erro message "Invali d㐞#rive." Th Joi comman remove th distinctio tha physica drive ar separatel addressabl b driv letter Thi wa yo ca alway refe t al th directorie o specifi driv b on pathname Not tha fil size ar stil limite b th siz o th physica device o whic the reside. I th pat alread existe befor th Joi comman wa typed i wil no b useabl whil th joi i i effect. 㐞 #Yo ca on joi driv a th root Th followin comman wil work: join d: c:\memos Th followin comman wil NO work: join d: c:\memos\june T deassig splic ("unjoin") us堠 th followin format: join /d wher 㐞$ [][/d] COMMENTS Th Subs comman create o delete "virtua drive b associatin pathnam wit driv letter Th comman work onl wit loca drive an no wit networ drives Logically i i th opposit o th JOI command. Whe MS-DO see driv tha wa create wit th Subs command i replace th referenc wit th ne pathname. I yo type subst MS-DO display th name o th㐞$ "virtua drives i effect. Us th / switc t delet a associate driv o pathname. Example: Th command subs z b:\usr\fred\forms create virtua driv ڠ fo th pathnam "b:\usr\fred\forms. Now instea o typin th ful pathname yo ca ge t thi director b simpl typin z:. MESSAGES Incorrec numbe o parameters You specified too many or too few options in 㐞$the command. No enoug memory There is not enough memory for MS-DOS to run the command. .pa SHARE Command Th SHAR comman load th DO suppor fo fil sharin tha i require i th networ servers an i normall onl availabl t th Networ manage i Poin 3 system. SHAR i DO externa comman an ha th syntax: [d:][path] SHARE [/F:][/] where the parameters are: [d:][path befor SHAR specifie t㐞$h driv an pat tha contain th SHAR comman file. /F:share /f:7500 .pa 3 CONFIG.SYS Statements Th CONFIG.SY fil contain configuratio command fo MS-DO tha ar execute o boot-up Typically i contain command fo includ㐞$in loadabl devic driver e.g mouse.sys etc Th statement liste belo ar one tha ar include i MS-DO Versio 3 BUFFERS Thi statemen allow yo t se th numbe o dis buffer allocate i memor a start-up Thes buffer ar use t hol dat bein rea fro o writte t dis a par o cach system I general large numbe o buffer increase performance a ther i greate chanc o dis acces findin th require sector(s i memory However 㐞$thi mus b offse agains memor availability Th synta o th statemen is: buffers= wher wher 㐞% wher wher i th maximu numbe o file tha ca b opene a on time. LASTDRIVE Statement Th LASTDRIV statemen i th CONFIG.SY fil specifie th maximu numbe o drive tha ma b accessed The syntax of the statement is: lastdrive= wher <> i an alphabeti characte fro t Z an specifie th las alphabeti availabl a driv letter Th defaul valu i lastdri㐞 %ve=e givin fiv drives .pa 4 Disk Utilities Th followin dis utilitie ar provide wit you Aprico fo creatin an maintainin flopp an Winchester disks. FORMAT Utility Th FORMA utilit allow yo t forma disk o ban tape t accep MS-DO files I al cases excep whe usin th / switc (se below) an informatio o th dis o tap i erased Th sam utilit can be use fo formattin al type o medi o th Aprico rang o products i.㐞&e flopp disks Wincheste disk an ban tapes Onl th driv lette need t b specified th utilit determine wha typ o medi i is. A th ban i onl availabl t Poin 3 networ manager thi addendu doe no cove formattin o ban tape i full Refe t th Poin 3 Manager' Guide for a full description of using bank tapes. The syntax of the command is - FORMAT d:[Vol-id] [/switch]... Wher th dis o tap i th driv specifie b (d: i t b㐞& formatted. [Vol-id i presen, i writte a th volum nam o th dis o tap bein formatted Vol-i ma b u t eleven alphanumerics. Switches :- /C Initialis a alread formatte dis o tape Thi optio shoul onl b use i th dis o tap ha alread bee formatte fo MS- DOS. /Mn Specifie th medi tha i t b formatte i othe tha th default. /M0 - Single sided disk or 5 MB Wi㐞&nchester or 100 MB Bank tape /M1 - Double sided disk or 10 MB Winchester or 200 MB Bank tape /Q Star forma operatio an retur t MS-DO withou waitin fo completion Thi switc i fo Poin 3 Manager' us an shoul onl b use whe formattin ban tapes /S[d: Specifie tha th dis bein formatte i t b a MS-DO syste disk Th driv 㐞&letter i present specifie th driv tha th syste file ar copie from els the curren syste o th defaul driv i used Thi optio shoul no b use o ban tapes. /U Updat syste track bu d not forma th disk Sourc dis fo track ma b specifie a i th / switch Thi optio shoul no b use o ban tapes. Whe th utilit load i displays the message: Apricot Disk/Tape 㐞&Format VR n.n wher n. i th versio number Thi i followe b messag indicatin th typ o medi bein formatted Formatting Floppy Disks Whe formattin flopp disks i i advisabl t us th Vol-i optio t giv th dis name I usin singl side drive disk ca onl b formatte a singl sided I yo ar formattin o doubl side drive disk ma b formatte a singl o doubl sided doubl side i th default The switches /C, /M, /S and /U may 㐞&be used. Whe formattin floppy th followin message ar displayed: Formatting {Single} Sided Floppy Disk {Double} Confirm format Floppy press 'F' Pres "F t confir th operation o an othe ke t abort. The following message is then displayed. Insert DESTINATION disk in drive : and press RETURN Wher : and press RETURN Inser th sourc dis fo th syste track i th driv indicate b an pres RETURN Yo ar the prompte fo th destinatio dis i simila fashion: Insert DESTINATION disk in d㐞&rive : and press RETURN Th sam driv ma b use fo sourc an destinatio bu requirs on o mor dis swaps Se th write-protec ta o th sourc dis befor copyin syste track t avoi corruptin th dis i yo mak mistake. Not tha th / optio ca onl b use wit destinatio dis tha i alread ha th syste file o i tha ar t b updated Th replacemen file mus b th sam siz o smalle tha thos bein replaced an th BIO typ (RO o RA㐞 &M mus b th same. Whe th forma finishes th messag "Forma complete i displayed. .pa Examples T forma th dis i driv B (i dua dis o Winchester-base machine a singl side dis o doubl side drive givin i th nam "bill, us th command: A>FORMAT B:BILL /M0 T forma th flopp i driv A a syste dis o single drive machine, use the command: A>FORMAT A:SYSONE /S Not tha i thi cas sourc an destinatio disk 㐞' wil hav t b swappe i driv A: I th driv i double-sided th followin comman ma b use t create a single-sided system disk. A>FORMAT A:SYSONE /S /M0 Formatting Winchester disks T forma Winchester us th command an procedure a describe abov fo floppies Th switche /C /M /S an / ma b used Whe formattin Wincheste disks th followin message askin yo t confir th dis ar displayed: Formatting {5MB} Winchester Disk 㐞' {10MB} Confirm format Winchester press 'W' Confir b typin "W" o pres an othe ke t abando th format 10M disk ar formatte a 10M b default. Yo ar advise t mak complet backu o th Wincheste befor usin an forma comman o it. Examples T forma Wincheste A wit th nam "WINI" an cop th syste track fro th flopp tha th machin wa boote from us th command: A>FORMAT A:WINI /S T updat syste file㐞' o th Wincheste fro th flopp i driv B: withou removin an file fro th Winchester us th command: A>FORMAT A:WINI /UB: Format Error Messages Forma ma displa followin erro messages Furthe explanatio an correctiv actio i give wher appropriate Bad cluster in FAT or directory area. Meaning: Directory area corrupt. Conflicting switches specified. Meaning: Bad switches - Retype. Disks not for same machine type Meaning: System㐞' disks not the same type (/U). Error formatting disk. Meaning: Write error while formatting; Retry. Error reading system file. Meaning: Error reading source system files. Error writing system file. Meaning Erro writin targe syste files; file may be too large for /U. Internal error - buffers too small. Meaning: Buffers too small to copy system files. Invalid drive specified Meaning: Drive not local, or not present; retype. Invalid switch Mea㐞'ning Invali switc specifie fo th media retype. Invalid switch character Meaning: A switch character has been mis-typed. Insufficient memory for system copy Meaning: The /S or /U option requires more memory. Source disk not an MS-DOS system disk. Meaning: No system files; use another source disk. .pa System file not found. Meaning Corrup o missin syste track o sourc system disk. Switch not allowed with drive specified. Meaning: Illegal㐞' switch; retype. Write protect error. Targe dis i writ protected mov ta and retry. Wrong BIOS version. Meaning: Incompatible BIOS for FORMAT program. .pa cku an an Restor program provide wit you Aprico XI Thes program ar use fo makin securit copie o file o you Wincheste disk b copyin the ont floppies. CAUTION Th version o Backu an Re㐞'stor describe her ar no compatibl wit previou versions Backup mad wit previou version canno b restore wit thi version Unles yo wis t retai backup mad wit previou versions yo ar advise t dispos o al previou Backu an Restor softwar an documentation Backu copie o file ar ofte calle archiv files. Makin backup i thu calle archiving an th backu an restor utilitie togethe for a archiv syst㐞'em. I orde t successfull us th archiv utilities clea understandin o MicroSoft' tree-structure directorie i required Rea th relevan section o you Aprico MS-DO manual/MicroSof Pac i yo ar nee t chec o th working o pathname an directories. Backu an Restor ar als use t archiv file o Poin 3 networ Winchester locate a th servers You should refe t th Poin 3 documentatio i usin th archiv syste i thi environment. How t㐞 'he Archive Files are Made and Stored  Th Backu utilit create backu copie o MS-DO forma files Thes backu copie ca onl b rea b th Restor program whic wil re-creat som o al o th backe u file ont th Winchester Th tw utilitie ar: BACKUP.EXE and RESTORE.EXE Backu write th archive file ou t ( serie of flopp disk(s) File ar store o th floppie individually wit th sam filenam a th origina file However ne fil extension㐞( ma b generate b th utility Th fil extension ar usuall th sam a i th origina file excep whe file o th sam nam caus ne extensio t b generated File tha caus nam conflict (sam name differen directory ar give extension o typ ".@nn" wher n i generate b Backup Nam conflict wit director name ar resolve i th sam wa a fo fil names. (Archiv file d no themselve hav an director excep th root s tw file wit th 㐞(sam filenam bu fro differen path ar separate i thi way) Disk use fo archivin shoul no hav othe file o them Archive ma b spli acros floppies thu allowin th us o a man flopp disk a required Not tha individua file wil ofte b spli acros tw floppies. Th backu utilit doe no archiv hidde files thes mus b copie b othe methods Zero-lengt file ar backe up. Empt directorie ar onl backe u i whol tre o sub-tre i㐞(BLACK HOLE SOFTWARE The software contained on this disk is supplied on the understanding that ACT (UK) Limited or any other ACT company will not be responsible for the results of using it and will not offer any form of support on the use of it or the correction of any problems that may be encountered in using it. 㐞(MZh* "| z 0 &06 E 3!J!+@-03455z556p68w9;=J>>n?A㐞($$CÞRandom Number Seed (-32768 to 32767)$>d ]xEco#Ƥ~@zZrN vH Tʚ;  !!!"""####$$$%%%&&&&'''((())))***+++,,,,---...////0001112222333444555566677788*.*P|Yt&wz^Pc|㐞(u~r11t=~:?ԃ1CeむtG鵚 ʀeQҬ?wp>[3l_RM0={!;N;=-ib5~P$L~ye&X4#]I̿JÍN}k,٬NytZB<(sfioS;5#-1]h!I5| Ƅ}&l.F}k +}+''c}jr$I~L~^_B";5J }#~t'Xv%F*Ӯw-;uD1mA4-q7|tP;d<>b}JlA]E62w㐞(8HMľfK:|O\ 5$4RKB.aUPo ̼ Y$ /\[_6A_p caw+fCzՔVijl7mGG'peXQsOnwףp= #zL} Hz@PC$t >(kn@C:h* 51_c.1@v:k ^# bx-Àz&XƐn2xʴW ?h)͡SЅ@aQYԦo% 'N x9? 6!OgI#E@|o|p+L67EV߄vl: {Η@H½p PvP?<&Ok8и'ƫ7Cưe\{2~]30b/5`=!㐞( C)/{QFZ$+vﶓ+髤8UqfclN@< 'PKPEe35DNn"~h!II,k  j0 0 TeB׳]\);8zr1r1㐞 (<63'Hi1XCSP_ط.㐞)[PãXCSP_ط.\[PãXCSP_ط.[Pz//e'0000001 1"""M!@!6!)!BTi}~Q<!E"^otMs<|>36>/+R>?-?Q97H?e:>0'^<553A62  11H5 +}!">*6*y**"K100 %i3%/ 555"5 9899....(22e/r/-+ -+-+-+=F@I44;7P7]7q7k.k.#153<#$##p8@=@B@G@L@Q@V@[@`@e@j@㐞)o@T.^.......        B o7 d? l< i    \CQ8Y@V=OuRRmAA::9=>//5C5C5CSyntax erroRETURN without GOSUOut of DATIllegal function calOverfloOut of memor Subscript out of rang Division by zer Type mismatcOut of string spacString formula too compleNo RESUMRESUME without erro2FIELD overflo3Internal erro4Bad file numbe5File not foun6Bad file mod7File already ope9Device I/O Erro:File already㐞) exist=Disk ful>Input past en?Bad record numbe@Bad file namCToo many fileDDevice UnavailablFDisk Write ProtecGDisk not ReadHDisk Media ErroUnprintable erro.X[&SP--GˉCtK6SB3ۋӉ&SR,Z[ urq uCKK$+؋+ڀK;rKǓ>OOXY&QPY Q ǣ3AY)-+3H ^.V6X[SPyX[SPh 2345㐞)679:=>?@CFGHD& 2345679:=>?@CFGHD.MM&>u=>t62X[>u-$)%S6x S--STO >u8- 9 + tn- in line]XZUYj -U- at address]_ZU :-, --,ô&=t t ĮsG,:3ۭ t;s ;rFF t,Internal Error - No Line Numbek,)+M23 &Zw )! uڀ> tӀ> u  EX㐞) E ! u3 @ p ! '!x %  &>> tt J+Сr Љt Ӄ ;w9WST + h*[_3Xp 3P -+$м3Ҵ!'!)tuzݡ;(!>t"'! uN>Ŏ&-uޡŎЋ&P6Ŏݺ! Error in EXE file $ !U3PS ![ > bmt ~ + ~  P9rSl[^>3;s6S++ v+-t;wЋ~ +ϡ4r;w㐞) t0yW+Ž x33N_>>[S nb+Y +ñ t +  l  p !>v ]t)' ! td6p r ;sŎ&,v u~ ؇+H4& . QX+u3Ҵ! '!u !6t =tH 7F9w9w>4=G664t%5D+NW>G>4^N>5Ë6 >>>íu 7F ) E4  E]5πL|t tc tY:s*㐞)wGّ͵S| t3ۀrt<~) t֊ߊwt!uދ׋?t ?t psMuE\+׋s u vT tN uvEފ x t5qwrt st$ ǣƣyþ  4 tM t݋=2쁀pȀĀPӓX x ut~ˀɀSS X؃tXþB \ MD tC t2쀀*pĀPɀT$2΀]-2ɀπV ‹t[\;s3sNsþ+Ћs㐞)À?r3W= _ˀ?r!VWw_^y ˀ?r VWw&RS ڏZˉ&R Zˉ&RO i Mþ. H MD t:w t*܀8wّ͵PW2̀ tc| tыˋ3wtHr#|+ t֊͊ߊ2wt#Gu?t ^?t Xp$4L\ts uup*4L\ts3 uv|Ntyً3uvdNJ݊Ί xtJqwrtst$㐞 ) ǣ߿ƪyþD tM t2쁀p̀ĀP"tX x utlGaDM2 tb t쀀*pĀP2ɭ̀FG"WWW ‹tY[_j63;s\ u;w;R3 tP t tZ]蕒sOsO+‹ɊD E 3ۋ  ʋU tU3D t tX PD t U t3ɋ tU tыD t t 㐞*X P t&ʋ t&3ۋD tU tӋD tU t ʃU3E t&ڋD t&ڋD tU t ՋD&E t&&ŗZ^ KYBDSCRNLPT1&;;;E;w u!ؘ.t.&V/1u^P&dXPP&V1^t P&Pˉ&P V0t^<uY4^Xˉ&P&Pۉ&P҉&PS?t-_߰ItOtRtAu ,[X:QS˳,[Yˉ&PVPV_0u2 ^XSQRWڋw㐞* u_ZY[Ct K t wSW._[OOuûV6 u^V^V6 u^|V6 u^V6 u^V6 u^V/t^WSPWSPD. x2ؘ. tXP.X[_LSV6,u,Ä&,tك3S.و\D.T/&Sr QR3ɋZYVW򥥇ڃ?t UG_^[ˉ&QRVWp%S [_^ZYˋދ ts9QVWw;v;_^u;Y ҉u8t[6>tgXSW>tWXmSˀ>tD t ;r;sFFXSCu_PRS3B[ZX3þ˾˿˿ˉ6.>0)6.>0ˉ6.>06.>0ˏ2^&V&22&UVWPQRS2[ZYX_^]PVC㐞*u643t=t5H;r64+tH+^XÓ7FL64;v[빰<rS664=ttuNN@G7FPSVW6H=t#u󫓋;wu)@;t $+rF5>4_^[X during G.C;5}Internal Error - String Space Corrup t$>6t$VS666w\Ӌ^ú"$sG8QWH_YQVWA_^YS8tr[s]PÇ6GXPRC4+rCCCZXPQRVWQSʋ2[^wA㐞*_^ZYXPS_;r;w @ G[;uX[XRQ3BJYS_[ZË>>4@$+-E8>6<EE5M,QRS3Ɉ)3ҴF,[ZYÀ>)t )(~)(QRS3ɊŇ2< tI<u  tA:< u 3utu < r a>t :&uNtI->&W)<P-:&u2> tCX~66PDP t$3XPDPD tXPDP3ۀ|tK3ۀ|t K3ۀ>tK 㐞*&&6^P&>t&XV6s؇QsYˇQcYˇQ>ttQ{YQ?Y>tkYu#uD3ɉYˇeQPSW,v&++r$* 2O_[XVQNNY\uFF^W_W_É&QRV3ˋڀt 't'<t%6VPrX^ZYrmt682׉:<:<GԀ2:<b:9=;>É;˾㐞* t t2xs tN wS[=j<"t,N3ɬ:t A,tNـ,uNO :tA*N t3ۋӋO <&tNN w :vO 3QˋݸuV]^Y杸uI<%t,<#t(O t*dž}r y3ǂ yK^N :t&<t.3㐞*Ú/<-t<+uFNû wx3p‹ tO 3KPWUSRXXXXXЃr t),0r < wu Nì< t< t< tN vq:|3:+ ~ K0t .0󤾖+It.E+ yڴ->N uH 00;&r,^&VPx_^X x X^_&VW~o;&r2 u(^жK:v t R&&&R=⿺ 㐞+tyز-J 0À>N rʻt  tض+ڰ t-$ƂdP>N uo>\DɀtPZހԊYQ́twr t'RZZϿ+ϰ0AOÿŊ㗊܊ǕƊYQ́t wrt ׿ f+Tl\sTl\̓0-Gf3Ғ';r03d dr 00 00ÿ>Ë;s"++0<5r O<:rA1O0A*ԿQ&&&,&&T(T'&&&'&&<u|)t(Q㐞+RTa!ZYÀ<t(|)t3ۀ<t8\*u黀*\*x3uK߀<\'uQRSTL335[ZY3ۊ\2ÈT/D*Êd2Êd/SH[À<t|*tS3ۊ\)*\*L*@3[ À|)t[ur<uD)D*Ë;tCS[<t|)uP2XS3ۊ\)@3[D)< uD2< T2RQ>,u uQYV| ^">,uhT>,u[!!u#!u>,u,߀>,t,D<t <t<u`YZÃ|u |u|"V^u&' 3r<tB3 |'3㐞+D2붃l"sL$QRS[ZYèuB t|߉JDŽSt u23ۉZL3ˉ+;rʨt0sCVQ6>sY^)+3 uVQ6>sY^ $PQRSC;ut K\'D)D*\"D$t)[ZYXD'EW!^ uD)D* D):"A}t}u;tVWFG _^u}_㐞+G= u ?X u1쁊̀+&f GL yـv*̊]㐞+ π yX \X >_ t` 3 X  &X #tX u$s Q` YQ6666` ` Y빾3E t=T tC4 X Z ߚzv; yiw/:u)쑆&N y؀v*̊݀π yRX M޾X ZX>[ t!PRX tZX+X P R #tX u9ߠ$Hs QP YQ66P 㐞+P YW_SRP y3XXZ[W_SRPπ tSXZ[ˉ&PQD I&PQ>&PQV^. y ,VR yN> uGKD&PQ3 t1rڊݑ*͊r;t$π> tp+ y"xYXˁu t> tt x&PQD &PQu x ݀> ts} u֋D Lt L7$[˃?t:Vw4޷^Pt طX& uRSpڏZX$sSRP4tuJ3۸XZ[ ~PQRVW񭒋4 t?Jy㐞+;8$}K+ʓ+~'$u QVW_^Yu+_^YZXlg3Qʋӻ'0Yˉ&Q3 &Q+YmՉ&J|tRP+~;}YXZB[ $&R tA|QPˊŠnAXYZˉ&RՉ&ڃ?tSPS_[XZ$ |tR;~ }3Z$É^&3Ɉ&Z;wRYȀ.u&VuP<Xu|Հ>tP[]X6Microsoft BASIC Compiler Runtime Version 5.35 (C)Copyright Microsoft Corp. 1982,83 $Ü3ء&&㐞+&&&&3SR!Ztw C[Ã>uttQVWF_^YR>u t&X t+*̘ ur x](wLPSV3@ 6 t$D.u㐞 +<u t+ tBK : 5^[XP6X6PX$'@'.P$XtXV^ʋwVPX^˚4PQS+W3>OOv>_[YXN N  N N S>u46<t;N<,t u/FF6_N <tuË׋tS<3(ӓZt@ <A @ @ @ ։&Vt <t 6^=@qP k.66׾P վP 㐞, ־P $Sa׾P [k.P ϡ t x,PNsXHPMվP !662վP t#վP ־A־Ծ־־־[PAP SYX uPQPH:s* uPQ3*r y3RS2݆Ĵ3ݑ[Zv{ t x,PJzsXHP־ 36666־ t־ ؾ㐞,)ؾF  ,  Dؾ׾׾B־ [k.6666$׾ ־ ׾ S\]\\]\<݋P t23X P &־X 6É& t<t6(:psr6 t< t<<"u,u ""r>"t%< tN< u,tn|< t< u t,t t :t :tJXs<"t< u'Kr"< t<,t< uG.x 0r< t2<0@6- t t"u6u RTދZ<û6;t ƚM<<;*3&0&.2<&GטPN W&U ,<u(]_>N rw7vww>t6n2t8<,t&0?Redo from star9:3>*|2ty2 uWOverflooVWQ6.NN +&6.t Y_^3u*,&0.*㐞,4Ӛtڋ7w=X X IًV΀&c ًVΠ= $P zP 2̀>r>@rͻ = $0+7wwwGX X ؋R:р&r ؋RѠ> $P P ?π>r>@r"ϻ> $0x؋ ty$6Àr ZξrZsDP ~ξX ~P ^оξX fλH94㐞,/*%  N ׋6N .N <tJ<t+>A u%>@ uP@ Ӏ>O rOw^B >A u>@ uRа"ذ" < uFY,>O tӊĴ*̊-v2 hPӊXt u Pb*Xr:v V t3ì t3&PVt7<u5D Ƽ6F ^Xˉ& xP)D rءF GF Xayĉ&PRtZA B A2L M XˠM uSE[M L J u>N tT%0>N uDы+s׋ ~ s H tM 6㐞,H +X"A҉H M :L t +4IH J M Ë<\tC< Ͱ\2-t t +uǨu/ߊ&J |Ŀ |n<0uŠBNK *y2J y2@7<0u2 t*Ǣh NJM @t HM t%G*K v<vM @%2t ؘ &M t*u< tt$|u0u,0㐞 ,xJ Ix.t ~0 ~0t#PE+>N uHh y۴- 00īXt+F FG GG DG^G }GG43۸FP&j < s<sF .:tN.d^XƇ<X^ t;԰ 6԰1Kð\* tK<v<tP\X릈< tE U t< t t ˾<ð#XM ^tuÈ<sCӰӋ&j 㐞-MZT$ <l㐞-ݸ10!=} < !3P˾2H< t&G&>:$6> =!s%<t n !#S ! ! ,>:65>@.O;>:t 65>:<!.s  !?D" ,!=u@sBPȍ6D">D$< s7< t< u 5+< t&< u#Q5u5 Y5⻴@D+ʋ.!r7;|3<s>Y |/<} !>B6@ !E !L!>,!>.!} !6@>B !6<㐞->>y !60>:A!s<t  !뗴V>!s  !~65>:V>!s M !XL2!;33؋ וfa>;u * 8;PZրt"̀0*р>;t0|ʹ!''ì!@(#) WSTRIP VA2.1 (C) Apricot (UK) Ltd. 20th May 85 dIncorrect DOS version$Invalid drive specified $File not found $File name omitted. $ Disk write fail - disk full? - Run aborted.$Cannot create output file - Run aborted.$.㐞-BAK file cannot be erased - Check attributes.$Old file cannot be renamed - Check attributes.$.TMP file cannot be renamed - Check attributes.$ $bytes read....$bytes read,$bytes written. $.BAK.TMPZ>-Z>-Z>-Z>-Z> -Z>.Z>.Z>.Z>.Z>.Z>.Z>.Z>.Z> .Z>/Z>/Z>/Z>/Z>/Z>/Z>/Z>/Z> /Z>0Z>0Z>0Z>0Z>0Z>0Z>0Z>0㐞 0 iRELSPL ASM n yRELSPL OBJ n VSYSTEM3 DOC NM FONT EXE {[ KEYS EXE q 㐞1DOSCGROUPCODEgh `9@@(#) BASCOM DOS 3 Interface V3.1 6th January 86 (C) Apricot (UK) Ltd.U0!,.v ..>u.&v t>2=.Ѐ|$<t .>t[!r~3<t~].?.@Uv Hv $ʋдBv!vTv .&!r~ 3~] ..Uvv Hv $ʋЋv <3\.!r3<t~]Uv>!r3~].A.9.:.;Uv T5.&!r3㐞1~]Uv t>&v t4V>!r3~]Uv }v T5ٴC!r3v ~]U0!<|&^!~& |&}]V t<s.>tY! u^....ˎӋ......>.Ћ..]ITA_@dAl@yċ@ģAĬA@@@A$@,@0T@a㐞1iAoAŒ@Ś@Ţ@Ū@@A#A)_gAmAƱA "*0U s DOSCHATTRh?DOSCHDIRDOSCLOSEL DOSGET DOSKILLwDOSLOCKaDOSMKDIR"DOSNAMEDOSOPEN DOSPUTh DOSRENAMEDOSRMDIR DOSUNLOCKi9t㐞1 BLACK HOLE DISK NUMBER 3 ---------------------------------------------------------------------------- VERSION: 2.2 DATE: 6th January 1986 ---------------------------------------------------------------------------- DISK CONTENTS ------------- Filename size date Description DOS3BAS DOC 16896 23-05-85 9:43p Documentation for routines DOS3BAS OBJ 1549 5-09-85 2:38p Assembled routines DOS3BAS ASM 16768 5-09-85 2:㐞137p Source file for routines DOSEQU INC 5504 17-05-85 9:41a Include files for above DOSMACS INC 2688 17-05-85 9:23a " " " DEM BAS 2176 17-05-85 3:20p Basic program to show record locking DEM EXE 3405 9-09-85 2:40p compiled version of above LOCKTEST RND 1280 12-07-85 2:53a sample file for use with above LIBTEST ASM 7808 6-06-85 9:20p Library test program in assembler RELSPL ASM 3968 24-06-85 1:54p Release spool file from Com㐞1piled Basic RELSPL OBJ 598 24-06-85 1:55p Compiled version of above. SYSTEM3 DOC 53632 6-06-85 9:42a MS-DOS 3.x system call documentation. FONT EXE 3072 27-02-84 3:30p Version which runs across network KEYS EXE 3072 17-03-84 4:04p " " " POINT32 DOC 24832 24-01-85 12:17p Point 32 Overview DOSADD DOC 27648 16-07-85 9:91a Documentation of additional commands READ ME 325 5-02-84 10:36p BASRUN EXE 21376 7-08-84 㐞1 2:11p Compiled Basic run-time V5.36 DISKID 16-07-85 This file. WSTRIP EXE 18260 16-07-85 8:09a Program to convert WordStar files to straight text. Use of WSTRIP: If you do not want to print the documentation using WordStar, then you can convert the files to straight text using WSTRIP. E.g. WSTRIP POINT32.DOC would convert the Point 32 overview to straight text suitable for display on the screen, leaving the origi㐞1nal version as POINT32.BAK. do not want to print the documentation using WordStar, then you can convert the files to straight text using WSTRIP. E.g. WSTRIP POINT32.DOC would convert the Point 32 overview to straight text suitable for display on the screen, leaving the origi㐞 1 Code Segment ***** ;**************************************************************************** code segment Public 'Code' assume CS:Cgroup ; PathName db 64 dup (?) ;copy of pathname SubFunction db ? ;used to differentiate various options ;of similar functions DOSVersion db 0 ;0 if DOS 2.x, 1 if DOS 3.x ; The following line is included in order that the version ; number can be picked up by the Microsoft program WHAT.EXE. VersionText db '@(#) BASCOM DOS 3 Interface ' db 'V3.0 5㐞2th September 85 ' db '(C) Apricot (UK) Ltd.',0 page ; ; ; Open a data file on behalf of BASIC ; ; Use: ; CALL DOSOPEN ( MODE%, NAME$, ERRNUM%, HANDLE% ) ; ; where MODE% can be: 0 for read only ; 1 for write only ; 2 for read/write ; 3 for create & read/write ; 4 for create NEW & read/write ; 0-3 can have additive access modes: ; 00h "compatibility" mode ; 10h "deny read" ; 20h "deny write" ; 30h "deny read/write" ; 40h "deny nothing" ; NAME$ holds the p㐞2ath name of the file to open ; ERRNUM% is to hold any error number (0 if read OK) ; HANDLE% is the file handle returned for other routines. ; ; DOSOPEN PROC FAR ; ; call StackSwapIn ;change to our stack push BP mov AH,Get_Version int DOS_Function sub AL,2 mov CS:DOSVersion,AL mov BP,SP mov SI,12[BP] mov AX,[SI] ;get Open Mode mov CS:SubFunction,AL cmp CS:DOSVersion,0 jne DOS3Open DOS2Open: and SubFunction,07h ;If DOS 2.x, additive modes not allowed DOS3Open: mov 㐞2SI,10[BP] ;Get address of PathName string mov CX,[SI] ;get length of string mov SI,2[SI] ;Get address of actual PathName lea DI,CS:PathName push DS push ES push CS pop ES rep movsb ;move pathname from Basic to this seg. xor AL,AL stosb ;add Null to the end pop ES push CS pop DS mov AH,Open mov AL,CS:SubFunction ;Get open mode mov DL,AL and DL,07h ;throw away additive mode cmp DL,3 jl OpenModeOK ;J if read, write, read/write and AL,0F0h ;keep open additiv㐞2e modes mov AH,Create cmp DL,3 je OpenModeOK ;J if create file mode cmp CS:DOSVersion,0 je OpenModeOK ;J if DOS 2 (CreateNew not available) mov AH,CreateNewFile OpenModeOK: lea DX,CS:PathName ;point to pathname in this segment int DOS_Function ;OPEN the file pop DS jc OpenErr ;J if file not opened mov DI,6[BP] stosw ;put handle back in BASIC and... xor AX,AX OpenErr: cmp AL,1 ;Was function recognised? If not, je DOS2Open ;then we are on a local drive. call ErrSe㐞2t ;test for DOS 3 errors mov DI,8[BP] ;set error reply stosw pop BP call StackSwapOut ;Back to Basic's stack and... ret 8 ; ...Back to BASIC ; DOSOPEN ENDP page ; ; Read data on behalf of BASIC ; ; Use: ; CALL DOSGET ( DATA$, LENGTH%, RECORDNO%, ERRNUM%, HANDLE% ) ; ; where DATA$ is already long enough to hold the data ; LENGTH% is the number of bytes to read ; RECORDNO% is the number of the record to read ; ERRNUM% is to hold any error number (0 if read OK) ; HANDLE%㐞2 is the file handle returned from DOSOPEN ; DOSGET PROC FAR ; mov CS:SubFunction,Read jmp short DoTransfer ; DOSGET ENDP ; ; Write data on behalf of BASIC ; ; Use: ; CALL DOSPUT ( DATA$, LENGTH%, RECORDNO%, ERRNUM%, HANDLE% ) ; ; where DATA$ is holds the data to be written ; LENGTH% is the number of bytes to write ; RECORDNO% is the number of the record to write ; ERRNUM% is to hold any error number (0 if written OK) ; HANDLE% is the file handle returned from DOSOPEN ; DOS㐞2PUT PROC FAR ; mov CS:SubFunction,Write DoTransfer: call StackSwapIn ;change to our stack push BP mov BP,SP mov SI,10[BP] ;Get address of record number mov AX,[SI] ;get record number dec AX ;record 0 is byte 0 in file mov SI,12[BP] mul word ptr [SI] ;DX:AX is byte within file mov CX,DX mov DX,AX ;CX:DX is byte within file mov AH,LSeek mov AL,0 ;Move to absolute byte number... mov SI,6[BP] mov BX,[SI] ;Get handle of file int DOS_Function ;move to the relevant b㐞2yte in the file mov SI,14[BP] ;Point to string descriptor mov DX,2[SI] ;Get address of buffer mov SI,12[BP] mov CX,[SI] ;get length to write mov AH,CS:SubFunction int DOS_Function ;write to the file jc TranErr ;J if error mov DI,12[BP] stosw ;Update number of bytes read, since xor AX,AX ;we need to spot end-of-file. TranErr: call ErrSet mov DI,8[BP] ;set error reply stosw pop BP call StackSwapOut ;Back to Basic's stack and... ret 10 ; ...Back to BASIC ; DO㐞 2SPUT ENDP page ; ; Lock a record on behalf of BASIC ; ; Use: ; CALL DOSLOCK ( LENGTH%, RECORDNO%, ERRNUM%, HANDLE% ) ; ; where LENGTH% is the number of bytes to be locked ; RECORDNO% is the number of the record to lock ; ERRNUM% is to hold any error number (0 if locked OK) ; HANDLE% is the file handle returned from DOSOPEN ; DOSLOCK PROC FAR ; mov CS:SubFunction,0 jmp short DoLocking ; DOSLOCK ENDP ; ; Unlock a record on behalf of BASIC ; ; Use: ; CALL DOSUNLOCK ( LENGTH%,㐞3 RECORDNO%, ERRNUM%, HANDLE% ) ; ; where LENGTH% is the number of bytes to unlock ; RECORDNO% is the number of the record to unlock ; ERRNUM% is to hold any error number (0 if unlocked OK) ; HANDLE% is the file handle returned from DOSOPEN ; DOSUNLOCK PROC FAR ; mov CS:SubFunction,1 DoLocking: call StackSwapIn ;change to our stack push BP mov BP,SP cmp CS:DOSVersion,0 je LockNoErr mov SI,6[BP] mov BX,[SI] ;Get file handle mov SI,10[BP] ;Get address of record number m㐞3ov AX,[SI] ;get record number dec AX ;record 0 is byte 0 in file mov SI,12[BP] mul word ptr [SI] ;DX:AX is byte within file mov CX,DX mov DX,AX ;CX:DX is byte within file mov SI,12[BP] ;Get length of record mov DI,[SI] ;in DI xor SI,SI ;not more than 64K mov AH,LockOper mov AL,CS:SubFunction ;subfunction - Lock or unlock int DOS_Function jc LockErr LockNoErr: xor AX,AX LockErr: cmp AL,1 ;If function not supported, je LockNoErr ;treat as if no error occurred c㐞3all ErrSet ;check other errors mov DI,8[BP] ;set error reply stosw pop BP call StackSwapOut ;Back to Basic's stack and... ret 8 ; ...Back to BASIC ; DOSUNLOCK ENDP page ; ; Close a file on behalf of BASIC ; ; Use: ; CALL DOSCLOSE ( ERRNUM%, HANDLE% ) ; ; where ERRNUM% is to hold any error number (0 if closed OK) ; HANDLE% is the file handle returned from DOSOPEN ; DOSCLOSE PROC FAR ; call StackSwapIn ;change to our stack push BP mov BP,SP mov SI,6[BP] ;Get addr㐞3ess of handle mov BX,[SI] mov AH,Close int DOS_Function jc CloseErr ;J if error xor AX,AX CloseErr: call ErrSet mov DI,8[BP] ;set error reply stosw pop BP call StackSwapOut ;Back to Basic's stack and... ret 4 ; ...Back to BASIC ; DOSCLOSE ENDP page ; ; Erase a file on behalf of BASIC ; ; Use: ; CALL DOSKILL ( FILENAME$, ERRNUM% ) ; ; where FILENAME$ is the name of the file to be erased ; ERRNUM% is to hold any error number (0 if erased OK) ; DOSKILL PROC FAR ; 㐞3 mov CS:SubFunction,Unlink jmp Short KillAndSubDir ; DOSKILL ENDP ; ; Create a Subdirectory on behalf of BASIC ; ; Use: ; CALL DOSMKDIR ( PATHNAME$, ERRNUM% ) ; ; where PATHNAME$ is the name of the subdirectory to be created ; ERRNUM% is to hold any error number (0 if created OK) ; DOSMKDIR PROC FAR ; mov CS:SubFunction,MkDir jmp Short KillAndSubDir ; DOSMKDIR ENDP ; ; Erase a Subdirectory on behalf of BASIC ; ; Use: ; CALL DOSRMDIR ( PATHNAME$, ERRNUM% ) ; ; where PATHN㐞3AME$ is the name of the subdirectory to be removed ; ERRNUM% is to hold any error number (0 if removed OK) ; DOSRMDIR PROC FAR ; mov CS:SubFunction,RmDir jmp Short KillAndSubDir ; DOSRMDIR ENDP ; ; Change the current Subdirectory on behalf of BASIC ; ; Use: ; CALL DOSCHDIR ( PATHNAME$, ERRNUM% ) ; ; where PATHNAME$ is the name of the subdirectory to be created ; ERRNUM% is to hold any error number (0 if created OK) ; DOSCHDIR PROC FAR ; mov CS:SubFunction,ChDir ; ; KillAndSub㐞3Dir: call StackSwapIn ;change to our stack push BP mov BP,SP mov SI,8[BP] ;Get address of string descriptor mov CX,[SI] ;get length of string mov DX,2[SI] ;get address of string mov DI,DX add DI,CX push word ptr [DI] ;remember byte past string mov byte ptr [DI],0 ;add Null to the end mov AH,CS:SubFunction int DOS_Function jc KillErr ;J if error xor AX,AX KillErr: pop word ptr [DI] ;replace word following string call ErrSet mov DI,6[BP] ;set error reply stosw 㐞3 pop BP call StackSwapOut ;Back to Basic's stack and... ret 4 ; ...Back to BASIC ; DOSCHDIR ENDP page ; ; Rename a file on behalf of BASIC ; ; Use: ; CALL DOSRENAME ( OLDNAME$, NEWNAME$, ERRNUM% ) ; ; where OLDNAME$ is the original pathname ; NEWNAME$ is the new pathname (must be same drive!) ; ERRNUM% is to hold any error number (0 if renamed OK) ; DOSRENAME PROC FAR ; call StackSwapIn ;change to our stack push BP mov BP,SP mov SI,8[BP] ;Get address of newname descript㐞 3or mov CX,[SI] ;get length of newname string mov SI,2[SI] ;get address of string lea DI,CS:PathName ;Point to our working buffer push ES ;save Basic's Extra Seg push CS pop ES ;Point to our code segment rep movsb ;move the new name to our buffer mov byte ptr ES:[DI],0 ;add Null to the end mov SI,10[BP] ;Get pointer to oldname string mov CX,[SI] ;get length of oldname string mov SI,2[SI] ;get address of string mov DX,SI ;Want DX here for DOS Call. add SI,CX ;Point 㐞4to end of string push word ptr [SI] ;remember byte past string mov byte ptr [SI],0 ;add Null to the end mov AH,Rename lea DI,CS:PathName ;DS:DX is old name, ES:DI is new one int DOS_Function ;Do the renaming jc RenErr ;J if error xor AX,AX ;else set reply 0 RenErr: pop word ptr [SI] ;replace the bit of program we zeroised pop ES ;and Basic's Extra Segment call ErrSet ;Check any funny errors mov DI,6[BP] ;set error reply stosw pop BP call StackSwapOut ;Back to Basi㐞4c's stack and... ret 6 ; ...Back to BASIC ; DOSRENAME ENDP page ; ; Change the attributes of a file on behalf of BASIC ; ; Use: ; CALL DOSCHATTR ( FILENAME$, ATTRIB%, ERRNUM% ) ; ; where FILENAME$ is the name of the file to be adjusted ; ATTRIB% contains the attribute bits. If negative, ; then the call will return the current ; attributes without changing them. ; ERRNUM% is to hold any error number (0 if erased OK) ; DOSCHATTR PROC FAR ; call StackSwapIn ;change to our s㐞4tack push BP mov BP,SP mov SI,8[BP] mov CX,[SI] ;get attribute word mov AL,1 cmp CX,0 jge ChSet mov AL,0 ChSet: mov SI,10[BP] ;Get address of string descriptor mov BX,[SI] ;get length of string mov DX,2[SI] ;get address of string mov DI,DX add DI,BX push word ptr [DI] ;remember byte past string mov byte ptr [DI],0 ;add Null to the end mov BX,CX mov AH,ChMod int DOS_Function jc ChmodErr ;J if error xor AX,AX ChmodErr: pop word ptr [DI] ;replace word follo㐞4wing string mov SI,8[BP] ;set reply for enquiry mode mov Word ptr [SI],CX call ErrSet mov DI,6[BP] ;set error reply stosw pop BP call StackSwapOut ;Back to Basic's stack and... ret 6 ; ...Back to BASIC ; DOSCHATTR ENDP page ; ; Get the machine name on behalf of Basic ; ; Use: ; CALL DOSNAME ( MACHINE$ ) ; ; where MACHINE$ is at least 16 characters long ; ; DOSNAME PROC FAR call StackSwapIn ;change to our stack push BP mov AH,Get_Version int DOS_Function cmp AL㐞4,3 jl NoName mov BP,SP push DS push CS pop DS lea DX,CS:PathName mov AH,UserOper mov AL,0 ;GetMachineName int DOS_Function ;at DS:DX mov SI,DX mov DI,6[BP] ;Get address of Machine Name string mov CX,ES:[DI] ;get length of string cmp CX,16 jl LenOK ;J if not enough room mov CX,16 ;Max len of string LenOK: mov DI,ES:2[DI] ;get address of actual string rep movsb ;move string into Basic pop DS NoName: pop BP call StackSwapOut ;Back to Basic's stack and... 㐞4 ret 2 ; DOSNAME ENDP page ; ; The following routine is used to set any MS-DOS 3.x errors ; ErrSet: push SI or AX,AX ;any error already? je ErrSetEx ;j if not cmp AL,18 ;If it is an MS-DOS 3.x error, jae ErrSetEx ;then let the user deal with it. cmp CS:DOSVersion,0 je ErrSetEx ;skip if DOS 2.x mov SI,AX ;save possible error code mov AH,GetExtendedError push ES ;GetExtendedError corrupts ES int DOS_Function pop ES or AX,AX jnz ErrSetEx ;J if original error was㐞4 not right mov AX,SI ;put original err back ErrSetEx: pop SI ret page ; ; The following routines swap stacks, since Compiled Basic's ; stack is too small in certain circumstances to call DOS. ; StackSwapIn: mov BX,SS mov CS:RealSS,BX mov BX,SP mov CS:RealSP,BX mov CS:SaveES,ES mov CS:SaveDS,DS push CS pop ES ;point ES at our stack segment lea AX,LocalStack ;fix SP in the middle of the stack mov SI,SP mov DI,AX mov CX,20 rep movsw ;copy the stack to our stack m㐞4ov BX,CS mov SS,BX ;set our SS mov SP,AX ;set our SP mov AX,CS:SaveDS ;put other segments back mov DS,AX mov AX,CS:SaveES mov ES,AX ret ;continue processing StackSwapOut: mov CS:SaveES,ES mov CS:SaveDS,DS push CS pop DS ;point DS at our stack segment mov SI,SP ;DS:SI points to our stack mov AX,CS:RealSS mov ES,AX mov DI,CS:RealSP ;ES:DI points to real stack mov CX,20 rep movsw ;copy our stack to Basic's mov BX,CS:RealSP mov SS,AX ;Put Basic's stack bac㐞 4k in force mov SP,BX mov AX,CS:SaveDS mov DS,AX ;restore segments. mov AX,CS:SaveES mov ES,AX ret dw 30 dup (?) ;our stack LocalStack label word ;this is where SP will point. dw 22 dup (?) ;copy of Basic's stack. RealSP dw ? RealSS dw ? SaveDS dw ? SaveES dw ? ; code ends end mov CX,20 rep movsw ;copy our stack to Basic's mov BX,CS:RealSP mov SS,AX ;Put Basic's stack back in force mov SP,BX㐞5DOSCGROUPCODEgh`B@@(#) BASCOM DOS 3 Interface V3.0 5th September 85 (C) Apricot (UK) Ltd.U0!,.v ..>u.&v t>2=.Ѐ|$<t .>t[!r~3<t~].?.@Uv Hv $ʋдBv!vTv .&!r~ 3~] ..U.>t%vv Hv $ʋЋv <3\.!r3<t~]Uv>!r3~].A.9.:.;Uv T5.㐞5&!r3~]Uv t>&v t4V>!r3~]Uv }v T5ٴC!r3v ~]U0!<|&^!~& |&}]V t<s.>tY! u^Ì....ˎӋ......>.Ћ..KVAa@fAn@{č@ĥAĮJ@@ @J&@.@2:A㐞5^@ksJyJŜ@Ť@Ŭ@Ŵ@@J%-J3iqJwƉJƻA !+39 j DOSCHATTRr5DOSCHDIRDOSCLOSEB DOSGET DOSKILLmDOSLOCKcDOSMKDIRDOSNAMEDOSOPEN DOSPUTf DOSRENAME)DOSRMDIR  DOSUN㐞5LOCKk7t%S%S5 5v5%04X:%04X %s5 5%04X %04X5%s %04X :5 5%s=%04X 6%s Error6Writing %04LX bytes&6%s:%04X=@6 5%02XO6%04XX6%04X:%04X %02X %02X %04X:%04Xa6%s error %s drive %c61㐞5 MOV CX,Attribute INT 21h ; if no error occurred, then AX has the file handle ; and the name of the file has been appended to the ; directory string Description: CreateTemp generates a unique name and attempts to create a new file in the specified directory. If a file already exists in that directory, then another unique name is generated and the process is repeated. Prog㐞5rams that need temporary files must use this system call to generate them to prevent name conflicts in a multitask environment. Error return: AX = error_path_not_found The directory pointed to by DS:DX was not found. .pa Name: CreateNewFile - guarantee that a file is new Assembler usage: MOV AH,5Bh LDS DX,Name MOV CX,attributes INT 21h 㐞5 ; AX has error code or file handle Description: This function is identical to the Create system call of 2.0 with the exception that it will fail if the file exists. In a multitasking system, it is necessary to be able use files and their existence as semaphores. The CreateNewFile system call may be used as a test-and-set semaphore. Error return: AX = error_file_already_exists The specified fi㐞5le exists already regardless of the attributes given. .pa Name: Lock - prevent access of a range of a file Assembler usage: MOV AX,5C00h MOV BX,Handle MOV CX,OffsetHigh MOV DX,OffsetLow MOV SI,LengthHigh MOV DI,LengthLow INT 21h ; If carry is set then AX has the error code otherwise ; the region is locked㐞 5 for all other machine/process ; access. Description: Provide simpl mechanis fo excludin othe processe acces t region o th file Loc wil inhibi AL̠ acces read/write I anothe proces attempt t rea o writ i suc region thei syste cal wil ge a error_lock_violatio i th fil i ope i NE 3. mod (se OPEN) o a IN 24 erro i i i ope㐞6 i compatibilit mode. Wit version o DO startin wit 3.10 i progra attempt t rea regio o fil locke b anothe process a erro wil b returned bu th dat wil b place i th user' buffer Thi enable th applicatio t obtai reasonabl up-to-dat informatio fo enquir purposes Write t suc regio wil alway b failed. Th locke region ma b anywher㐞6 i th logica file Lockin beyon en o fil i no a error. I i expecte tha th tim i whic region ar locke wil b short indee i shoul b considere a erro i the ar locke fo mor tha 1 seconds. Dupin th handl wil duplicat acces t th locks Acces t th lock i no duplicate acros th EXE syste call. Closin fil wit lock stil i forc wil caus th 㐞6lock t b removed Version prio t 3.1 wil produce undefined results. Exitin wit fil ope an an havin issue lock o tha fil ha undefine results Program tha ma b aborte vi INԠ 2 o IN 2 shoul tra thes an releas th lock befor exiting Versio 3.1 an late wil releas al lock owne b progra whic exits. .pa Th prope metho fo usin lo㐞6ck i NO t rel o bein denie rea o writ access bu attemp t loc th regio desire an examinin th erro code. Error return: A error_invalid_handle The handle in BX was not a valid opened handle. = error_lock_violation The region (or a piece of the region) specified was previously locked either by the current process or by another process. 㐞6 = error_too_many_locks Th DO i alread keepin trac o it maximu number of locks. .pa Name: Unlock - release guarded access to a region of a file Assembler usage: MOV AX,5C01h MOV BX,Handle MOV CX,OffsetHigh MOV DX,OffsetLow MOV SI,LengthHigh MOV DI,LengthLow INT 2㐞61h ; If carry is set then AX has the error code otherwise ; the region is unlocked for all other machine/process ; access. Description: Unlock releases the lock issued in a previous Lock system call. The region specified must be exactly the same as the region specified in the previous lock. Closin fil wit lock stil i forc wil caus th lock t b removed Version o DO prio t 3.1 㐞6wil produc undefine results. Exiting with a file open and and having issued locks on that file has undefined results. Programs that may be aborted via INT 23 or INT 24 should trap these and release the locks before exiting. The proper method for using locks is NOT to rely on being denied read or write access, but attempt to lock the region desired and examining the error code. Error return: 㐞6 AX = error_invalid_handle The handle passed in BX was not open. = error_lock_violation The region specified was not identical to one that was locked by that process. .pa Name: GetMachineName - return the character identifier of the local machine Assembler usage: MOV AX,5E00h LDS DX,buffer INT 21h Description: 㐞 6 Return to the caller the text of the current machine name. The machine name is a 16 byte string padded with spaces and terminated will a NUL byte. Error return: None. .pa Name: PrinterSetup - specify initial string for printer files Assembler usage: MOV AX,5E02h LDS SI,buffer MOV CX,length ;Range 1 to 64 in V3.10. MOV BX,index ;Fr㐞7om GetAssignListEntry INT 21h ; if carry is set then AX contains the error code Description: The string specified will be prepended to all files destined for a particular printer. This is intended for printers that may share several users and each user has his own configuration for the printer. The index number in BX is the index number as used in GetAssignListEntry for the particular printer of i㐞7nterest. Error return: AX = error_invalid_function The network support is not present. = error_invalid_parameter Th lengt o th strin wa no i th correc range. .pa Name: GetAssignListEntry - return non-local network assignments Assembler usage: MOV AX,5F02h MOV BX,index ; zero based LDS SI,source 㐞7 LES DI,dest INT 21h ; If carry is set then AX has error code otherwise ; DS:SI points to local name (MAY be NUL), ES:DI points ; to remote name, CX has the stored user value (see ; define macro) and BL has the macro type (3 or 4). Description: Step through the network assignments and retrieve their text and values. The contents of this list may change between calls. The end-of-list is dete㐞7cted by the error_no_more_files return code. Error return: AX = error_invalid_function The network support is not present. = error_no_more_files The index passed in BX is greater than the number of network assignments. .pa Name: DefineMacro - perform name aliasing Assembler usage: MOV AX,5F03h MOV BL,type MOV CX,value 㐞7 LDS SI,source LES DI,dest INT 21h ; if the carry flag is set then AX contains the error ; code Description: I B̠ the th sourc specifie printer th destinatio specifie networ director an th C registe ha wor tha MSDOS/PCDO wil maintai fo th programmer Thi wor ma b retrieve throug th GetAssignLis syste call Al outpu destin㐞7e fo th specifie printe wil b buffere an sen t th remot printe spoole fo tha device. Th sourc strin mus b on o th pre-define redirectabl printe names Th destinatio strin mus poin t networ nam strin o th for "\\machine\path" Immediatel followin th networ strin i th asci passwor fo acces t th remot device nul (zer length㐞7 passwor i considere t b n password. I B̠ the th sourc eithe specifie driv lette an colo o i NU string Th destinatio specifie networ director an th C registe ha wor tha MSDOS/PCDO wil maintai fo th programmer Thi valu ma b retrieve throug th GetAssignLis syste call I th sourc wa driv letter th associatio i mad betwee th dr㐞7iv lette an th networ directory Al subsequen reference t th driv lette wil b translate t reference t th networ directory I th sourc i no driv letter i mus b a empt string Th syste wil attemp t gran acces t th destinatio wit th specifie password. Immediatel followin th networ director i th passwor fo acces t tha directory nul p㐞 7asswor (zer length indicate n password. .pa Error return: AX = error_invalid_function The network support is not present, the value in BX was not in the range 1:4, the source string was in the wrong format, the destination string was in the wrong format, the source drive was already spliced or assigned to the network, or the printer was already assigned to the network. 㐞8 = error_access_denied The network directory/password combination was not valid. This does NOT mean that the password itself was invalid. = error_not_enough_memory There is not enough memory for string substitutions. .pa Name: CancelMacro - unmake a previous assignment Assembler usage: MOV AX,5F04h LDS SI,buffer I㐞8NT 21h ; if carry set, then AX has error code Description: The assignments created by the DefineMacro are removed through this call. If the buffer points to a drive letter then a colon and that drive is associated with a network name, then that association is terminated and the drive is restored to its physical meaning. If the buffer points to one of the pre defined printer names and that dev㐞8ice has an association with a network device, then that association is terminated and the device is restored to its physical meaning. If the buffer points to a string which starts with two '\'s, The association between the local machine and the network directory is terminated. Error return: AX = error_invalid_function The buffer contained an unrecognised name or indicated 㐞8a network name when no network support is available. .pa PROGRAMME INFORMATION Presenc o Argv[0] I wa alway difficul t determin wher particula progra wa loade from I particular wit man subdirectorie an PATHs som program woul lik t b abl t loa overlay fro thes area too. I th environmen space ther i wor o zero tha terminate th se o environmen 㐞8strings Followin thi wor wil b th Initia argument passe t program I general thi wil contai wor coun an se o ASCI string tha correspon t th argument o th process Unde MS-DO 3. thi wil be: WOR o 1 BYT ASCI strin o th nam o th executabl progra a passe t th EXE syste call. Program ma the us thi informatio (alon wit 㐞8 versio check t determin wher th堠 executabl progra wa loade from. .pa Access to files across a Network Wher th fil bein accesse i o differen machin (i.e fil server) ther ar mino difference i th result obtaine whe attemptin t acces th files. Sinc ther ma b severa application accessin particula file progra calle SHAR i ru o th 㐞8server whic implement th file-sharin extention t MS-DOS. Th workstatio softwar (REDIR convert MS-DOӠ 1. call usin FCB t th equivalen Xenix-typ call using file handles. The results of these points are as follows: I th fil i opene usin FC calls the th fil i assume t b opene fo readin an writing an th fil i opene i compatability read/writ mod (㐞8i allowed) Th exceptio i whe th fil i marke i th director a read-only whe th fil i opene i compatability read-onl mode Thi enable program whic hav overlay loade usin DO 1. call t ru in multiple machines without problem. I th fil i opene usin Xenix-typ calls th fil i opene usin th exac mod requeste (i allowed) I i no possibl t ope fil m㐞 8arke a read-onl in a mode which allows writing. Som application whic us MS-DO 1. call ar no well-behave i tha the d no clos of file whic wer onl use fo reading bu instea jus re-us th FC  fo anothe file WordStar fo instance neve close it .OVҠ files Whe th fil i acros network i i no possibl fo th softwar t spo tha th fil i n longe㐞9 required an i remain ope unti eithe th applicatio i exited o ther ar n longe an fre FCB availabl fo openin ne file Whe thi poin i reached th softwar wil automaticall clos th FC whic wa leas recentl used Thi wil usuall b on o th file whic wa lef unclose b th application bu i problem occur i i possibl t adjus th syste t preven 㐞9this (see FCBS parameter in CONFIG.SYS, below). .PA CONFIG.SYS parameters BREAK Thi statemen allow yo t tur o o of th Control- checkin don b MS-DO a certai points I se on MS-DO wil chec whethe th use ha presse Control-à wheneve th DO i entere fo an reason I se off th chec i onl carrie ou whe th DO call is an access to the screen or keyboard. 㐞9Th synta o th statemen is:- BREAK= where is either ON or OFF. The default value is ON. BUFFERS Thi statemen allow yo t se th numbe o dis buffer allocate i memor a start-up Thes buffer ar use t hol dat bein rea fro o writte t dis wher th amoun o dat i no a exac multipl of the sector size. Th synta o th statemen is:- 㐞9 BUFFERS= wher  wher  wher  wher  wher  wher ;NZ>;NZ>;NZ>;NZ> ;NZ><NZ><NZ><NZ><NZ><NZ><NZ><NZ><NZ> <NZ>=NZ>=NZ>=NZ>=NZ>=NZ>=NZ>=NZ>=NZ> =NZ>>NZ>>NZ>>NZ>>NZ>>NZ>>NZ>>NZ>>NZ> >NZ>?NZ>?NZ>?NZ>?NZ>?NZ>?NZ>?NZ>?NZ> ?NZ>@NZ>@NZ>@NZ>@NZ>@NZ>@NZ>@NZ>@NZ> @NZ>ANZ>ANZ>ANZ>ANZ>ANZ>ANZ>ANZ>ANZ> ANZ>BNZ>BNZ>BNZ>BNZ>BNZ>BNZ>BNZ>BNZ> BNZ>CNZ>CNZ>CNZ>CNZ>CNZ>CNZ>CNZ>CNZ> CNZ>DNZ>DNZ>DNZ>DNZ>DNZ>DNZ>DNZ>DNZ> DNZ>ENZ>ENZ>ENZ>ENZ>ENZ>ENZ>ENZ>ENZ> EN㐞apricot SOFTWARE LIBRARY RELEASE COPY Date Issued: 06/01/86 BLACK HOLE DISK 3 VR2.2 Microsoft Networks Interface Routines Blackhole 3 Disk 1 of 1 1447