home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / PASNET.ZIP / PASNETA.ASM < prev    next >
Encoding:
Assembly Source File  |  1988-06-28  |  25.3 KB  |  1,741 lines

  1. Page 80,132
  2. ;*******************************************************
  3. ;*                               *
  4. ;* VERSION: 1.0                        *
  5. ;*                               *
  6. ;* MODULE NAME: PASNET.ASM    Language Interface     *
  7. ;*                               *
  8. ;* DESCRIPTION:  NetWare interface drivers           *                         *
  9. ;*                               *
  10. ;*        Borland Turbo Pascal interface           *
  11. ;*                               *
  12. ;* INPUTS:  Refer to individual procedures.           *
  13. ;*                               *
  14. ;*                               *
  15. ;* RETURNS (OUTPUTS)  Refer to individual procedures.  *
  16. ;*                               *
  17. ;*                               *
  18. ;*******************************************************
  19.  
  20. title    Turbo Pascal - NetWare Interface Module
  21.  
  22. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++
  23. ;+                               +
  24. ;+ For the following Turbo Pascal interface see        +
  25. ;+ the Borland Turbo Tutor manual and the           +
  26. ;+ Reference Manual                       +
  27. ;+                               +
  28. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++
  29.  
  30. cseg    segment byte public 'cseg'
  31.     assume    cs:cseg
  32.  
  33. public    xtndopn, setattr, eojstat, PRLH_Log, PRLH_Rel, PRLH_Clr, PRLF_Log
  34. public    PRLF_Rel, PRLF_Clr, PRLS_Lck, PRLS_Rel, PRLS_Clr, OpenSem, ExamSem
  35. public    WaitSem, SigSem, ClosSem, setlck, Bakouts, btrans, etrans, exclog
  36. public    exclcks, exculkf, exculks, excclrf, excclrs, reclog, reclck, reculk
  37. public    reculks, recclr, recclrs, eoj, sysout, volstat
  38. public    locdrv, wsid, errmode, bcsmode, ctlspl, splreq, pipreq, dpath, syslog
  39. public    fattr, updfcb, cpyfile, nettod, clsmode, drvmap, retshl, asclog
  40. public    asculkf, ascclrf, Get_PSN, Get_STA, SetServ, ModServ
  41.  
  42. ;--------------------------------
  43. ; Extended Open a File func(61) (3DH)
  44. ;
  45. ; var
  46. ;    Mode, Handle, RetCode : Integer;
  47. ;    Filename          : String[n];
  48. ;
  49. ; RetCode := xtndopn(Mode, Handle, Filename);
  50. ;
  51.  
  52. xtndopn proc    far
  53.     push    bp
  54.     mov    bp,sp
  55.     push    ds
  56.     lds    si,[bp+12]      ; put the mode in ax
  57.     mov    ax,[si]
  58.     mov    ah,03Dh         ; put the function in ah
  59.     lds    dx,[bp+4]       ;ptr to ASCIIZ string
  60.     inc    dx            ;add 1 to get to the beginning of the string
  61.     int    21h
  62.     jnc    noerr
  63.     jmp    quit
  64. noerr:
  65.     lds    di,[bp+8]       ;put the handle into the variable
  66.     mov    [di],ax          ;if there is no error and
  67.     xor    ax,ax             ;return a 0
  68. quit:
  69.     pop    ds
  70.     pop    bp
  71.     ret    14
  72. xtndopn endp
  73.  
  74.  
  75.  
  76.  
  77. ;--------------------------------
  78. ; Get or Set File Attributes(handle) func(67) (43H)
  79. ;
  80. ; var
  81. ;    Func, Attribute, ErrCode : Integer;
  82. ;    Filename         : String[n];
  83. ;
  84. ;ErrCode := setattr(Func, Attribute, Filename);
  85. ;
  86.  
  87. setattr proc    far
  88.     push    bp
  89.     mov    bp,sp
  90.     push    ds
  91.     lds    si,[bp+12]      ; put the subfunction in ax
  92.     mov    ax,[si]
  93.     mov    ah,043h         ; put the function in ah
  94.     lds    dx,[bp+4]       ;ptr to var desc block for ASCIIZ string
  95.     inc    dx            ;add 1 to get the address of the string
  96.     lds    si,[bp+8]       ;put the attribute to set in cx
  97.     mov    cx,[si]
  98.     int    21h
  99.     jnc    okay
  100.     mov    ah,00h
  101.     jmp    getout
  102. okay:
  103.     lds    di,[bp+8]       ;put the returned attributes in the
  104.     mov    [di],cx         ;variable if there is no error
  105.     xor    ax,ax            ;and return a 0
  106. getout:
  107.     pop    ds
  108.     pop    bp
  109.     ret    14
  110. setattr endp
  111.  
  112.  
  113.  
  114.  
  115. ;--------------------------------
  116. ; End of Job Flag Status func(187) (BBH)
  117. ;
  118. ; var
  119. ;    Flag : Integer;
  120. ;
  121. ;ErrCode := eojstat(Flag);
  122. ;
  123.  
  124. eojstat proc    far
  125.     push    bp
  126.     mov    bp,sp
  127.     push    ds
  128.     lds    si,[bp+4]   ; put the flag in ax
  129.     mov    ax,[si]
  130.     mov    ah,0BBh     ; put the function in ah
  131.     int    21h
  132.     mov    ah,0
  133.     lds    di,[bp+4]
  134.     mov    [di],ax
  135.     pop    ds
  136.     pop    bp
  137.     ret    6
  138. eojstat endp
  139.  
  140.  
  141.  
  142.  
  143. ;------------------------------------------------------------
  144. ;
  145. ; Physical Record Lock: Log Record   BCH
  146. ;
  147. ; var
  148. ;    ErrCode,FileHandle,HiByteOffset,LoByteOffset : Integer
  149. ;    HiLockLen,LoLockLen,Flags,TimeOut         : Integer
  150. ;
  151. ;ErrCode := PRLH_Log(FileHandle,HiByteOffset,LoByteOffset,HiLockLen,
  152. ;             LoLockLen,Flags,TimeOut);
  153. ;
  154.  
  155. PRLH_Log proc    far
  156.     push    bp
  157.     mov    bp,sp
  158.     push    ds
  159.     lds    si,[bp+28]        ;FileHandle
  160.     mov    bx,[si]
  161.     lds    si,[bp+24]        ;ByteOffset
  162.     mov    cx,[si]
  163.     lds    si,[bp+20]
  164.     mov    dx,[si]
  165.     lds    si,[bp+8]        ;AL = Log Flags
  166.     mov    ax,[si]
  167.     lds    si,[bp+16]        ;LockLen
  168.     mov    si,[si]
  169.     lds    di,[bp+12]
  170.     mov    di,[di]
  171.     lds    bp,[bp+4]        ;time out
  172.     mov    bp,[bp]
  173.     mov    ah,0BCH
  174.     int    21H
  175.     mov    ah,0            ;0 the high byte of the return
  176.     pop    ds
  177.     pop    bp
  178.     ret    30
  179.  
  180. PRLH_Log endp
  181.  
  182.  
  183.  
  184.  
  185.  
  186. ;-----------------------------------------
  187. ;
  188. ; Physical Record Lock: Release Rec  BDH
  189. ;
  190. ; var
  191. ;    FileHandle,HiByteOffset,LoByteOffset,ErrCode,
  192. ;       HiWordLen,LoWordLen : integer;
  193. ;
  194. ; ErrCode := PRLH_Rel(FileHandle,HiByteOffset,LoByteOffset,HiWordLen,
  195. ;                           LoWordLen:integer);
  196.  
  197.  
  198. PRLH_Rel proc    far
  199.     push    bp
  200.     mov    bp,sp
  201.     push    ds
  202.     lds    si,[bp+20]        ;FileHandle
  203.     mov    bx,[si]
  204.     lds    si,[bp+16]               ;HiByteOffset
  205.     mov    cx,[si]
  206.     lds    si,[bp+12]            ;LoByte
  207.     mov    dx,[si]
  208.      lds     si,[bp+8]             ;HiWordLen
  209.      mov     si,[si]
  210.      lds     di,[bp+4]             ;LoWordLen
  211.      mov     di,[di]
  212.     mov    ah,0BDH
  213.     int    21H
  214.     mov    ah,0
  215.     pop    ds
  216.     pop    bp
  217.     ret    22
  218. PRLH_Rel endp
  219.  
  220.  
  221.  
  222.  
  223.  
  224. ;------------------------------------------------
  225. ;
  226. ; Physical Record Lock: Release Clr  BEH
  227. ;
  228. ; var
  229. ;    FileHandle,HiByteOffset,LoByteOffset,ErrCode,
  230. ;    HiWordLen,LoWordLen : integer;
  231. ;  ErrCode := PRLH_Rel(FileHandle,HiByteOffset,LoByteOffset,HiWordLen,
  232. ;                           LoWordLen:integer);
  233. ;
  234.  
  235.  
  236. PRLH_Clr proc    far
  237.     push    bp
  238.     mov    bp,sp
  239.     push    ds
  240.     lds    si,[bp+20]        ;FileHandle
  241.     mov    bx,[si]
  242.     lds    si,[bp+16]               ;ByteOffset
  243.     mov    cx,[si]
  244.     lds    si,[bp+12]
  245.     mov    dx,[si]
  246.      lds     si,[bp+8]             ;HiWordLen
  247.      mov     si,[si]
  248.      lds     di,[bp+4]             ;LoWordLen
  249.      mov     di,[di]
  250.     mov    ah,0BEH
  251.     int    21H
  252.     mov    ah,0
  253.     pop    ds
  254.     pop    bp
  255.     ret    22
  256. PRLH_Clr endp
  257.  
  258.  
  259.  
  260.  
  261.  
  262. ;--------------------------------------------------
  263. ;
  264. ; Physical Record Lock: Log Rec FCB BFH
  265. ;
  266. ; var
  267. ;    ErrCode,fcb,HiByteOffset,LoByteOffset : Integer;
  268. ;    HiLockLen,LoLockLen,Flags,TimeOut     : Integer;
  269. ;
  270. ; ErrCode := PRLF_Log(fcb,HiByteOffset,LoByteOffset,HiLockLen,LoLockLen,Flags,TimeOut);
  271. ;
  272.  
  273.  
  274. PRLF_Log proc    far
  275.     push    bp
  276.     mov    bp,sp
  277.     push    ds
  278.     lds    si,[bp+28]              ;FCB
  279.     mov    dx,[si]
  280.     lds    si,[bp+24]              ;ByteOffset
  281.     mov    bx,[si]
  282.     lds    si,[bp+20]
  283.     mov    cx,[si]
  284.     lds    si,[bp+8]             ;AL = Log Flags
  285.     mov    ax,[si]
  286.     lds    si,[bp+12]              ;low lock length
  287.     mov    di,[si]
  288.     lds    si,[bp+16]              ;hi lock length
  289.     mov    si,[si]
  290.     mov    bp,[bp+4]             ;timeout value
  291.     mov    bp,[bp]
  292.     mov    ah,0BFH
  293.     int    21H
  294.     mov    ah,0
  295.     pop    ds
  296.     pop    bp
  297.     ret    28
  298. PRLF_Log endp
  299.  
  300.  
  301.  
  302.  
  303.  
  304. ;--------------------------------------------------
  305. ;
  306. ; Physical Record Lock: Rel Rec FCB C0H
  307. ;
  308. ; var
  309. ;    ErrCode,fcb,HiByteOffset,LoByteOffset : Integer;
  310. ;
  311. ; ErrCode := PRLF_Rel(fcb,HiByteOffset,LoByteOffset);
  312. ;
  313.  
  314.  
  315. PRLF_Rel proc    far
  316.     push    bp
  317.     mov    bp,sp
  318.     push    ds
  319.     lds    dx,[bp+12]              ;FCB
  320.     lds    si,[bp+8]             ;ByteOffset
  321.     mov    bx,[si]
  322.     lds    si,[bp+4]
  323.     mov    cx,[si]
  324.     mov    ah,0C0H
  325.     int    21H
  326.     mov    ah,0
  327.     pop    ds
  328.     pop    bp
  329.     ret    12
  330. PRLF_Rel endp
  331.  
  332.  
  333.  
  334.  
  335.  
  336. ;-----------------------------------------------
  337. ;
  338. ; Physical Record Lock: Clr Rec FCB C1H
  339. ;
  340. ; var
  341. ;    ErrCode,fcb,HiByteOffset,LoByteOffset : Integer;
  342. ;
  343. ; ErrCode := PRLF_clr(fcb,HiByteOffset,LoByteOffset);
  344. ;
  345.  
  346.  
  347. PRLF_Clr proc    far
  348.     push    bp
  349.     mov    bp,sp
  350.     push    ds
  351.     lds    dx,[bp+12]              ;FCB
  352.     lds    si,[bp+8]             ;ByteOffset
  353.     mov    bx,[si]
  354.     lds    si,[bp+4]
  355.     mov    cx,[si]
  356.     mov    ah,0C0H
  357.     int    21H
  358.     mov    ah,0
  359.     pop    ds
  360.     pop    bp
  361.     ret    12
  362. PRLF_Clr endp
  363.  
  364.  
  365.  
  366.  
  367.  
  368. ;---------------------------------------------
  369. ;
  370. ; Lock Record Set  C2H
  371. ;
  372. ; var
  373. ;    ErrCode, Flags, TimeOut : Integer;
  374. ;
  375. ; ErrCode := PRLS_Lck(Flags,TimeOut);
  376. ;
  377.  
  378.  
  379. PRLS_Lck proc    far
  380.     push    bp
  381.     mov    bp,sp
  382.     push    ds
  383.     lds    si,[bp+8]               ;AL = Lock flag bits
  384.     mov    ax,[si]
  385.     lds    si,[bp+4]               ;TimeOut Value
  386.     mov    bp,[si]
  387.     mov    ah,0C2h
  388.     int    21h
  389.     mov    ah,0
  390.     pop    ds
  391.     pop    bp
  392.     ret    10
  393. PRLS_Lck endp
  394.  
  395.  
  396.  
  397.  
  398.  
  399. ;----------------------------------------------
  400. ;
  401. ; Release Record Set  C3H
  402. ;
  403. ; var
  404. ;    ErrCode : Integer;
  405. ;
  406. ; ErrCode := PRLS_Rel;
  407. ;
  408.  
  409.  
  410. PRLS_Rel proc    far
  411.     mov    ah,0C3h
  412.     int    21h
  413.     mov    ah,0
  414.     ret
  415. PRLS_Rel endp
  416.  
  417.  
  418.  
  419.  
  420.  
  421. ;----------------------------------------------
  422. ;
  423. ; Clear Record Set  C4H
  424. ;
  425. ; var
  426. ;    ErrCode : Integer;
  427. ;
  428. ; errcode := PRLS_Clr;
  429. ;
  430.  
  431.  
  432. PRLS_Clr proc    far
  433.     mov    ah,0C4h
  434.     int    21h
  435.     mov    ah,0
  436.     ret
  437. PRLS_Clr endp
  438.  
  439.  
  440.  
  441.  
  442.  
  443. ;--------------------------------
  444. ; Semaphores func(197) (C5H) subfunction 00h
  445. ;
  446. ; var
  447. ;    RetCode,SemaValu,HiHandle,LoHandle,OpenCnt : Integer;
  448. ;    Sema4 : String[n];
  449. ;
  450. ; RetCode := OpenSem(Sema4,SemaValu,HiHandle,LoHandle,OpenCnt);
  451. ;
  452.  
  453.  
  454. OpenSem proc    far
  455.     push    bp
  456.     mov    bp,sp
  457.     push    ds
  458.     lds    dx,[bp+20]      ;ptr to Semaphore string
  459.     lds    si,[bp+16]      ;set semaphore value
  460.     mov    cx,[si]
  461.     mov    ax,0C500h        ;set the function
  462.     int    21h
  463.     mov    bh,00h
  464.     lds    di,[bp+4]      ;return the open count
  465.     mov    [di],bx
  466.     lds    di,[bp+8]      ;return low handle
  467.     mov    [di],cx
  468.     lds    di,[bp+12]      ;return high handle
  469.     mov    [di],dx
  470.     mov    ah,00h
  471.     pop    ds
  472.     pop    bp
  473.     ret    22
  474. OpenSem endp
  475.  
  476.  
  477.  
  478.  
  479.  
  480. ;--------------------------------
  481. ; Semaphores func(197) (C5H) subfunction 01h
  482. ;
  483. ; var
  484. ;    RetCode,HiHandle,LoHandle,SemaValu,OpenCnt : Integer;
  485. ;
  486. ; RetCode := ExamSem(HiHandle,LoHandle,SemaValu,OpenCnt);
  487. ;
  488.  
  489.  
  490. ExamSem proc    far
  491.     push    bp
  492.     mov    bp,sp
  493.     push    ds
  494.     lds    si,[bp+16]        ;hi handle
  495.     mov    dx,[si]
  496.     lds    si,[bp+12]        ;lo handle
  497.     mov    cx,[si]
  498.     mov    ax,0C501h        ;set function
  499.     int    21h
  500.     lds    di,[bp+8]               ;return semaphore value
  501.     mov    [di],cx
  502.     mov    dh,00h
  503.     lds    di,[bp+4]
  504.     mov    [di],dx              ;return open count
  505.     mov    ah,00h
  506.     pop    ds
  507.     pop    bp
  508.     ret    16
  509. ExamSem endp
  510.  
  511.  
  512.  
  513.  
  514.  
  515. ;--------------------------------
  516. ; Semaphores func(197) (C5H) subfunction 02h
  517. ;
  518. ; var
  519. ;    RetCode,HiHandle,LoHandle,TimeOut : Integer;
  520. ;
  521. ; RetCode := WaitSem(HiHandle,LoHandle,TimeOut);
  522. ;
  523.  
  524.  
  525. WaitSem proc    far
  526.     push    bp
  527.     mov    bp,sp
  528.     push    ds
  529.     lds    si,[bp+12]        ;hi handle
  530.     mov    dx,[si]
  531.     lds    si,[bp+8]               ;lo handle
  532.     mov    cx,[si]
  533.     lds    si,[bp+4]
  534.     mov    bp,[si]              ;set time out
  535.     mov    ax,0C502h        ;set function
  536.     int     21h
  537.     mov    ah,00h
  538.     pop    ds
  539.     pop    bp
  540.     ret    12
  541. WaitSem endp
  542.  
  543.  
  544.  
  545.  
  546.  
  547. ;--------------------------------
  548. ; Semaphores func(197) (C5H) subfunction 03h
  549. ;
  550. ; var
  551. ;    RetCode,HiHandle,LoHandle : Integer;
  552. ;
  553. ; RetCode := SigSem(HiHandle,LoHandle);
  554. ;
  555.  
  556.  
  557. SigSem    proc    far
  558.     push    bp
  559.     mov    bp,sp
  560.     push    ds
  561.     lds    si,[bp+8]               ;hi handle
  562.     mov    dx,[si]
  563.     lds    si,[bp+4]               ;lo handle
  564.     mov    cx,[si]
  565.     mov    ax,0C503h        ;set function
  566.     int    21h
  567.     mov    ah,00h
  568.     pop    ds
  569.     pop    bp
  570.     ret    8
  571. SigSem    endp
  572.  
  573.  
  574.  
  575.  
  576.  
  577. ;--------------------------------
  578. ; Semaphores func(197) (C5H) subfunction 04h
  579. ;
  580. ; var
  581. ;    RetCode,HiHandle,LoHandle : Integer;
  582. ;
  583. ; RetCode := ClosSem(HiHandle,LoHandle);
  584. ;
  585.  
  586.  
  587. ClosSem proc    far
  588.     push    bp
  589.     mov    bp,sp
  590.     push    ds
  591.     lds    si,[bp+8]               ;hi handle
  592.     mov    dx,[si]
  593.     lds    si,[bp+4]               ;lo handle
  594.     mov    cx,[si]
  595.     mov    ax,0C504h        ;set function
  596.     int    21h
  597.     mov    ah,00h
  598.     pop    ds
  599.     pop    bp
  600.     ret    8
  601. ClosSem endp
  602.  
  603.  
  604.  
  605.  
  606.  
  607. ;--------------------------------
  608. ; Get or Set Lock Mode func(198) (C6H)
  609. ;
  610. ; var
  611. ;    Mode,Func : Integer;
  612. ;
  613. ; Mode := setlck(Func);
  614. ;
  615.  
  616.  
  617. setlck    proc    far
  618.     push    bp
  619.     mov    bp,sp
  620.     push    ds
  621.     lds    si,[bp+4]
  622.     mov    ax,[si]               ;set the subfunction
  623.     mov    ah,0C6h         ;set  the function
  624.     int    21h
  625.     mov    ah,0
  626.     pop    ds
  627.     pop    bp
  628.     ret    4
  629. setlck endp
  630.  
  631.  
  632.  
  633.  
  634.  
  635. ;--------------------------------
  636. ; Transactional Backout func(199) (C7H)
  637. ;
  638. ; var
  639. ;    RetCode, Func : Integer;
  640. ;
  641. ; RetCode := BakOuts(Func);
  642. ;
  643.  
  644.  
  645. BakOuts proc    far
  646.     push    bp
  647.     mov    bp,sp
  648.     push    ds
  649.     lds    si,[bp+4]               ;set the subfunction
  650.     mov    ax,[si]
  651.     mov    ah,0C7h         ;set  the function
  652.     int    21h
  653.     mov    ah,0
  654.     pop    ds
  655.     pop    bp
  656.     ret    4
  657. BakOuts endp
  658.  
  659.  
  660.  
  661.  
  662.  
  663. ;--------------------------------
  664. ; Begin transaction  func(200) (C8H)
  665. ;
  666. ; var
  667. ;    RetCode,Mode : Integer;
  668. ;
  669. ; RetCode := btrans(Mode);
  670. ;
  671.  
  672.  
  673. btrans    proc    far
  674.     mov    ah,0C8h
  675.     call    far ptr arg1t
  676.     ret    4
  677. btrans    endp
  678.  
  679.  
  680.  
  681.  
  682.  
  683. ;--------------------------------
  684. ; End Transaction func(201) (C9H)
  685. ;
  686. ; var
  687. ;    RetCode : Integer;
  688. ;
  689. ; RetCode := etrans;
  690. ;
  691.  
  692.  
  693. etrans    proc    far
  694.     mov    ah,0C9H
  695.     int    021h
  696.     mov    ah,00h
  697.     ret
  698. etrans    endp
  699.  
  700.  
  701.  
  702.  
  703.  
  704. ;--------------------------------
  705. ; Exc.log File (202) (CA)
  706. ;
  707. ; var
  708. ;    RetCode, FcbAddr : Integer;
  709. ;
  710. ; RetCode := exclog(FcbAddr);
  711. ;
  712.  
  713. exclog    proc    far
  714.     mov    ah,0CAH
  715.     call    far ptr arg1f
  716.     ret    4
  717. exclog    endp
  718.  
  719.  
  720.  
  721.  
  722.  
  723. ;--------------------------------
  724. ; Exc Lock Set    func(203) (CBH)
  725. ;
  726. ; var
  727. ;    RetCode, Mode : Integer;
  728. ;
  729. ; RetCode := exclcks(Mode);
  730. ;
  731.  
  732.  
  733. exclcks proc    far
  734.     mov    ah,0CBH
  735.     call    far ptr arg1
  736.     ret    4
  737. exclcks endp
  738.  
  739.  
  740.  
  741.  
  742. ;--------------------------------
  743. ; Exclusive file unlock (204) (CC)
  744. ;
  745. ; var
  746. ;    RetCode, FcbAddr : Integer;
  747. ;
  748. ; RetCode := exculkf(FcbAddr);
  749. ;
  750.  
  751.  
  752. exculkf proc    far
  753.     mov    ah,0CCH
  754.     call    far ptr arg1f
  755.     ret    4
  756. exculkf endp
  757.  
  758.  
  759.  
  760.  
  761.  
  762. ;--------------------------------
  763. ; Exclusive Unlock Set (205)(CD)
  764. ;
  765. ; var
  766. ;    RetCode : Integer;
  767. ;
  768. ; RetCode := exculks;
  769. ;
  770.  
  771.  
  772. exculks proc    far
  773.     mov    ah,0CDH
  774.     int    21h
  775.     mov    ah,00h
  776.     ret
  777. exculks endp
  778.  
  779.  
  780.  
  781.     
  782.  
  783. ;--------------------------------
  784. ; Exc Clear file func(206) (CEH)
  785. ;
  786. ; var
  787. ;    RetCode, FcbAddr : Integer;
  788. ;
  789. ; RetCode := excclrf(FcbAddr);
  790. ;
  791.  
  792.  
  793. excclrf proc    far
  794.     mov    ah,0CEH
  795.     call    far ptr arg1f
  796.     ret    4
  797. excclrf endp
  798.  
  799.  
  800.  
  801.  
  802.  
  803. ;--------------------------------
  804. ; Exc Clear Set  func(207) (CFH)
  805. ;
  806. ; var
  807. ;    RetCode : Integer;
  808. ;
  809. ; RetCode := excclrs;
  810. ;
  811.  
  812.  
  813. excclrs proc    far
  814.     mov    ah,0CFH
  815.     int    21h
  816.     mov    ah,00h
  817.     ret
  818. excclrs endp
  819.  
  820.  
  821.  
  822.  
  823.  
  824. ;--------------------------------
  825. ; Log Record(s) func(208) (D0H)
  826. ;
  827. ; var
  828. ;    RetCode, Flag, Timeout : Integer ;
  829. ;    RecStr    : String[n];
  830. ;
  831. ; RetCode := reclog(RecStr,Flag,Timeout);
  832. ;
  833.  
  834.  
  835. reclog    proc    far
  836.      push     bp
  837.      mov     bp,sp
  838.      push     ds
  839.      lds     si,[bp+8]          ;load flags
  840.      mov     ax,[si]
  841.      lds     si,[bp+4]          ;get timeout
  842.      mov     si,[si]
  843.      lds     dx,[bp+12]         ;get ptr to string
  844.      mov     bp,si              ;move timeout to BP
  845.      mov     ah,0D0h
  846.      int     21h
  847.      mov     ah,0
  848.      pop     ds
  849.      pop     bp
  850.      ret     14
  851. reclog    endp
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858. ;--------------------------------
  859. ; Record Lock func(209) (D1H)
  860. ;
  861. ; var
  862. ;    RetCode, Mode : Integer;
  863. ;
  864. ; RetCode := reclck(Mode);
  865. ;
  866.  
  867.  
  868. reclck    proc    far
  869.      push     bp
  870.      mov     bp,sp
  871.      push     ds
  872.      lds     si,[bp+4]
  873.      mov     bp,[si]
  874.      mov     ah,0D1h
  875.      int     21h
  876.      mov     ah,0
  877.      pop     ds
  878.      pop     bp
  879.      ret     6
  880. reclck    endp
  881.  
  882.  
  883.  
  884.  
  885.  
  886. ;--------------------------------
  887. ; Record Unlock func(210) (D2H)
  888. ;
  889. ; var
  890. ;    RetCode   : Integer;
  891. ;    Semaphore : String[n];
  892. ;
  893. ; RetCode := reculk(Semaphore);
  894. ;
  895.  
  896.  
  897. reculk    proc    far
  898.     mov    ah,0D2H
  899.     call    far ptr arg1a
  900.     ret    4
  901. reculk    endp
  902.  
  903.  
  904.  
  905.  
  906.  
  907. ;--------------------------------
  908. ; Unlock Record Set func(211) (D3H)
  909. ;
  910. ; var
  911. ;    RetCode : Integer;
  912. ;
  913. ; RetCode := reculks;
  914. ;
  915.  
  916.  
  917. reculks proc    far
  918.     mov    ah,0D3H
  919.     int    21h
  920.     mov    ah,00h
  921.     ret
  922. reculks endp
  923.  
  924.  
  925.  
  926.  
  927.  
  928. ;--------------------------------
  929. ; Record Clear func(212) (D4H)
  930. ;
  931. ; var
  932. ;    RetCode   : Integer;
  933. ;    Semaphore : String[n];
  934. ;
  935. ; RetCode := recclr(Semaphore);
  936. ;
  937.  
  938.  
  939. recclr    proc    far
  940.     mov    ah,0D4H
  941.     call    far ptr arg1a
  942.     ret    4
  943. recclr    endp
  944.  
  945.  
  946.  
  947.  
  948.  
  949. ;--------------------------------
  950. ; Clear record set func(213) (D5H)
  951. ;
  952. ; var
  953. ;    RetCode : Integer;
  954. ;
  955. ; RetCode := recclrs;
  956. ;
  957.  
  958.  
  959. recclrs proc    far
  960.     mov    ah,0D5H
  961.     int    21h
  962.     mov    ah,00h
  963.     ret    4
  964. recclrs endp
  965.  
  966.  
  967.  
  968.  
  969.  
  970. ;--------------------------------
  971. ; End of Job  func(214) (D6H)
  972. ;
  973. ; var
  974. ;    RetCode : Integer;
  975. ;
  976. ; RetCode := eoj;
  977. ;
  978.  
  979. eoj    proc    far
  980.     mov    ah,0D6H
  981.     int    21h
  982.     mov    ah,00h
  983.     ret    4
  984. eoj    endp
  985.  
  986.  
  987.  
  988.  
  989.  
  990. ;--------------------------------
  991. ; Logout System  func(215) (D7H)
  992. ;
  993. ; var
  994. ;    RetCode : Integer;
  995. ;
  996. ; RetCode := sysout;
  997. ;
  998.  
  999.  
  1000. sysout    proc    far
  1001.     mov    ah,0D7H
  1002.     int    21h
  1003.     mov    ah,00h
  1004.     ret    4
  1005. sysout    endp
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011. ;--------------------------------
  1012. ; Vol Statistics func(218) (DAH)
  1013. ;
  1014. ; var
  1015. ;    RetCode,volume : Integer;
  1016. ;    reply  : String[n];
  1017. ;
  1018. ; RetCode := volstat(volume, reply);
  1019.  
  1020.  
  1021. volstat proc    far
  1022.     mov    ah,0DAh
  1023.     push    bp
  1024.     mov    bp,sp
  1025.     push    ds
  1026.     push    es
  1027.     lds    si,[bp+8]     ;addr for the volume number
  1028.     mov    dx,[si]       ;get the volume number
  1029.     les    di,[bp+4]     ;ptr to reply buffer
  1030.     inc    di          ;add 1 to get the address of the string
  1031.     int    21h
  1032.     mov    ah,00h
  1033.     pop    es
  1034.     pop    ds
  1035.     pop    bp
  1036.     ret    8
  1037. volstat endp
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043. ;--------------------------------
  1044. ; Local Disks  func(219) (DBH)
  1045. ;
  1046. ; var
  1047. ;    NumDisks : Integer;
  1048. ;
  1049. ; NumDisks := locdrv;
  1050. ;
  1051.  
  1052.  
  1053. locdrv    proc    far
  1054.     mov    ah,0DBH
  1055.     int    21h
  1056.     mov    ah,00h
  1057.     ret
  1058. locdrv endp
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064. ;--------------------------------
  1065. ; WorkStation ID func(220) (DCH)
  1066. ;
  1067. ; note: This routine returns the station number as an integer.
  1068. ;    It can also be returned in ASCII with this call.
  1069. ;
  1070. ; var
  1071. ;    StationNum : Integer;
  1072. ;
  1073. ; StationNum := wsid;
  1074. ;
  1075.  
  1076.  
  1077. wsid   proc    far
  1078.        mov     ah,0DCH
  1079.        int     21h
  1080.        mov     ah,00h
  1081.        ret
  1082. wsid   endp
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088. ;--------------------------------
  1089. ; Set Error mode func(221) (DDH)
  1090. ;
  1091. ; var
  1092. ;    mode : Integer;
  1093. ;
  1094. ; errmode(mode);
  1095. ;
  1096.  
  1097.  
  1098. errmode proc    far
  1099.     mov    ah,0DDH
  1100.     call    far ptr arg1
  1101.     ret    4
  1102. errmode endp
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108. ;--------------------------------
  1109. ; Broadcast Mode func(222) (DEH)
  1110. ;
  1111. ; var
  1112. ;    mode : Integer;
  1113. ;
  1114. ; bcsmode(mode);
  1115. ;
  1116.  
  1117. bcsmode proc    far
  1118.     mov    ah,0DEH
  1119.     call    far ptr arg1
  1120.     ret    4
  1121. bcsmode endp
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127. ;--------------------------------
  1128. ; Modify LST Device  func(223) (DFH)
  1129. ;
  1130. ; var
  1131. ;    RetCode, Mode : Integer;
  1132. ;
  1133. ; RetCode := ctlspl(Mode);
  1134. ;
  1135.  
  1136. ctlspl    proc    far
  1137.     mov    ah,0DFh
  1138.     call    far ptr arg1
  1139.     ret    4
  1140. ctlspl    endp
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146. ;--------------------------------
  1147. ; Spool Request func(224) (E0H)
  1148. ;
  1149. ; var
  1150. ;    ErrCode         : Integer;
  1151. ;    RequestBlock, Reply : String[n];
  1152. ;
  1153. ; ErrCode := splreq(RequestBlock, Reply);
  1154. ;
  1155.  
  1156. splreq    proc    far
  1157.     mov    ah,0E0h
  1158.     call    far ptr req_rep
  1159.     ret    8
  1160. splreq    endp
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166. ;--------------------------------
  1167. ; Pipe Request func(225) (E1H)
  1168. ;
  1169. ; var
  1170. ;    ErrCode         : Integer;
  1171. ;    RequestBlock, Reply : String[n];
  1172. ;
  1173. ; ErrCode := pipreq(RequestBlock, Reply);
  1174. ;
  1175.  
  1176. pipreq    proc    far
  1177.     mov    ah,0E1h
  1178.     call    far ptr req_rep
  1179.     ret    8
  1180. pipreq    endp
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186. ;--------------------------------
  1187. ; Directory Path func(226) (E2H)
  1188. ;
  1189. ; var
  1190. ;    ErrCode         : Integer;
  1191. ;    RequestBlock, Reply : String[n];
  1192. ;
  1193. ; ErrCode := dpath(RequestBlock, Reply);
  1194. ;
  1195.  
  1196. dpath    proc    far
  1197.     mov    ah,0E2h
  1198.     call    far ptr req_rep
  1199.     ret    8
  1200. dpath    endp
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206. ;--------------------------------
  1207. ; Login system func(227) (E3H)
  1208. ;
  1209. ; var
  1210. ;    ErrCode         : Integer;
  1211. ;    RequestBlock, Reply : String[n];
  1212. ;
  1213. ; ErrCode := syslog(RequestBlock, Reply);
  1214. ;
  1215.  
  1216. syslog    proc    far
  1217.     mov    ah,0E3h
  1218.     call    far ptr req_rep
  1219.     ret    8
  1220. syslog    endp
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226. ;--------------------------------
  1227. ; Set File Attribute func(228) (E4H)
  1228. ;
  1229. ; var
  1230. ;    RetCode, FcbAddr, Attribute : Integer;
  1231. ;
  1232. ; RetCode := fattr(FcbAddr, Attribute);
  1233. ;
  1234.  
  1235. fattr    proc    far
  1236.     push    bp
  1237.     mov    bp,sp
  1238.     push    ds
  1239.     lds    si,[bp+4]
  1240.     mov    cx,[si]  ;cx=attribute
  1241.     lds    dx,[bp+8];dx=address of fcb
  1242.     mov    ah,0E4h
  1243.     int    21h
  1244.     mov    ah,0
  1245.     pop    ds
  1246.     pop    bp
  1247.     ret
  1248. fattr    endp
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254. ;--------------------------------
  1255. ; Update file size func(229) (E5H)
  1256. ;
  1257. ; var
  1258. ;    ErrCode,FcbAddr : Integer;
  1259. ;
  1260. ; ErrCode := updfcb(FcbAddr);
  1261. ;
  1262.  
  1263. updfcb    proc    far
  1264.     mov    ah,0E5H
  1265.     call    far ptr arg1f
  1266.     ret    4
  1267. updfcb    endp
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273. ;--------------------------------
  1274. ; Copy File to File func(230) (E6H)
  1275. ;
  1276. ; var
  1277. ;    RetCode,FcbSource,FcbDest : Integer;
  1278. ;    CountLow, CountHigh      : Integer;
  1279. ;
  1280. ; RetCode := cpyfile(FcbSource, FcbDest, CountLow, CountHigh)
  1281. ;
  1282. ;
  1283.  
  1284. cpyfile proc    far
  1285.     mov    ah,0E6h
  1286.     push    bp
  1287.     mov    bp,sp
  1288.     push    ds
  1289.     push    es
  1290.     lds    si,[bp+4]           ;addr of the high byte cnt
  1291.     mov    dx,[si]             ;dx=high word of byte cnt
  1292.     lds    si,[bp+8]           ;addr low word of byte cnt
  1293.     mov    cx,[si]             ;cx=low 16 bits of count
  1294.     les    di,[bp+12]          ;address of dest fcb
  1295.     lds    si,[bp+16]          ;address of the source fcb
  1296.     int    21h
  1297.     mov    ah,0
  1298.     pop    es
  1299.     pop    ds
  1300.     pop    bp
  1301.     ret    16
  1302. cpyfile endp
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308. ;--------------------------------
  1309. ; get time / date string func(231) (E7H)
  1310. ;
  1311. ; var
  1312. ;    time : String[n];
  1313. ;
  1314. ; nettod(time);
  1315. ;
  1316. ; where time is a string of the form Y M D H M S
  1317. ;
  1318.  
  1319. nettod    proc    far
  1320.     mov    ah,0E7h
  1321.     call    far ptr arg1a
  1322.     ret    4
  1323. nettod    endp
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329. ;--------------------------------
  1330. ; Set Close mode func(232) (E8H)
  1331. ;
  1332. ; var
  1333. ;    mode : Integer;
  1334. ;
  1335. ; clsmode(mode);
  1336. ;
  1337.  
  1338. clsmode proc    far
  1339.     mov    ah,0E8H
  1340.     call    far ptr arg1wor
  1341.     ret    4
  1342. clsmode endp
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349. ;--------------------------------
  1350. ; Shell Base Status func(233) (E9H)
  1351. ;
  1352. ; var
  1353. ;    RetFlags, drive : Integer;
  1354. ;
  1355. ; RetFlags := drvmap(drive);
  1356. ;
  1357.  
  1358. drvmap    proc    far
  1359.     mov    ax,0E900h
  1360.     call    far ptr arg1
  1361.     ret    4
  1362. drvmap    endp
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369. ;--------------------------------
  1370. ; Return Shell Version func(234) (EAH)
  1371. ;
  1372. ; var
  1373. ;    RetCode, Mode : Integer;
  1374. ;    EnvirStr      : String[n];
  1375. ;
  1376. ; RetCode := retshl(EnvirStr, Mode);
  1377. ;
  1378.  
  1379. retshl    proc    far
  1380.     push    bp
  1381.     mov    bp,sp
  1382.     push    ds
  1383.     push    es
  1384.     les    di,[bp+8]     ;set es:di to point at the buffer
  1385.     inc    di          ;point di at the start of the data area
  1386.     lds    si,[bp+4]     ;put the mode into al
  1387.     mov    ax,[si]
  1388.     mov    ah,0EAh
  1389.     int    21h
  1390.     mov    ah,00h
  1391.      pop     es
  1392.      pop     ds
  1393.      pop     bp
  1394.     ret    8
  1395. retshl    endp
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401. ;--------------------------------
  1402. ; ascii log File (235) (EB)
  1403. ;
  1404. ; var
  1405. ;    RetCode, Flags, TimeOut : Integer;
  1406. ;    Asciiz            : String[n];
  1407. ;
  1408. ; RetCode := asclog(Flags, TimeOut, Asciiz);
  1409. ;
  1410.  
  1411. asclog    proc    far
  1412.     push    bp
  1413.     mov    bp,sp
  1414.     push    ds
  1415.     lds    si,[bp+12]
  1416.     mov    ax,[si]           ;flags into al
  1417.     lds    dx,[bp+4]         ;pointer to the asciiz string
  1418.     lds    si,[bp+8]
  1419.     mov    bp,[si]           ;time out into bp
  1420.     mov    ah,0EBH
  1421.     int    21h
  1422.     mov    ah,00h
  1423.      pop     ds
  1424.      pop     bp
  1425.     ret    12
  1426. asclog    endp
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432. ;--------------------------------
  1433. ; ASCIIZ file unlock (236) (EC)
  1434. ;
  1435. ; var
  1436. ;    RetCode : Integer;
  1437. ;    Asciiz    : String[n];
  1438. ;
  1439. ; RetCode := asculkf(Asciiz);
  1440. ;
  1441.  
  1442. asculkf proc    far
  1443.     mov    ah,0ECH
  1444.     call    far ptr arg1a
  1445.     ret    4
  1446. asculkf endp
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452. ;--------------------------------
  1453. ; ASCIIZ Clear file func(237) (EDH)
  1454. ;
  1455. ; var
  1456. ;    RetCode : Integer;
  1457. ;    Asciiz    : String[n];
  1458. ;
  1459. ; RetCode := ascclrf(Asciiz);
  1460. ;
  1461.  
  1462. ascclrf proc    far
  1463.     mov    ah,0EDH
  1464.     call    far ptr arg1a
  1465.     ret    4
  1466. ascclrf endp
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472. ;--------------------------------------------
  1473. ;
  1474. ; Get Physical Station Number  EEH
  1475. ;
  1476. ; var
  1477. ;    StationNo : Integer;
  1478. ;
  1479. ; StationNo := Get_PSN;
  1480. ;
  1481.  
  1482. Get_PSN proc    far
  1483.  
  1484.     mov    ah,0EEh
  1485.     int    21h
  1486.     mov    ah,0
  1487.     ret
  1488. Get_PSN endp
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494. ;-----------------------------------------------------
  1495. ;
  1496. ; Get Shell Table Addresses (239) EFH
  1497. ;
  1498. ; var
  1499. ;    Mode,Segment,Offset : Integer;
  1500. ;
  1501. ; Get_STA(Mode,Segment,Offset);
  1502. ;
  1503.  
  1504. Get_STA proc    far
  1505.     push    bp
  1506.     mov    bp,sp
  1507.     push    es
  1508.     push    ds
  1509.     mov    si,[bp+12]        ;get the mode
  1510.     mov    ax,[si]
  1511.     mov    ah,0EFh         ;set the function
  1512.     int    21h
  1513.     lds    di,[bp+8]        ;store the segment location
  1514.     mov    [di],es
  1515.     lds    di,[bp+4]        ;store the offset location
  1516.     mov    [di],si
  1517.     pop    ds
  1518.     pop    es
  1519.     pop    bp
  1520.     ret    12
  1521. Get_STA endp
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527. ;-----------------------------------------------
  1528. ;
  1529. ; Set Preferred File Server (240) F0H
  1530. ;
  1531. ; var
  1532. ;    RetServer, Mode, NewServ : Integer;
  1533. ;
  1534. ; RetServer := SetServ(Mode,NewServ);
  1535. ;
  1536.  
  1537. SetServ proc    far
  1538.     push    bp
  1539.     mov    bp,sp
  1540.     push    ds
  1541.     mov    si,[bp+8]        ;get the mode
  1542.     mov    ax,[si]
  1543.     mov    di,[bp+4]        ;set the preferred server number
  1544.     mov    dx,[di]
  1545.     mov    ah,0F0h         ;set the function
  1546.     int    21h
  1547.     mov    ah,0
  1548.     pop    ds
  1549.     pop    bp
  1550.     ret    6
  1551. SetServ endp
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557. ;-----------------------------------------------------------
  1558. ;
  1559. ; Attach/Detach To File Server (241) F1H
  1560. ;
  1561. ; var
  1562. ;    RetCode, Mode, NewServ : Integer;
  1563. ;
  1564. ; RetCode := ModServ(Mode,NewServ);
  1565. ;
  1566.  
  1567. ModServ proc    far
  1568.     push    bp
  1569.     mov    bp,sp
  1570.     push    ds
  1571.     lds    si,[bp+8]        ;get the mode
  1572.     mov    ax,[si]
  1573.     lds    di,[bp+4]        ;set the preferred server number
  1574.     mov    dx,[di]
  1575.     mov    ah,0F1h         ;set the function
  1576.     int    21h
  1577.     mov    ah,0
  1578.     pop    ds
  1579.     pop    bp
  1580.     ret    6
  1581. ModServ endp
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587. ;-------------------------------
  1588. ; Place a single integer argument into dx
  1589. ; with a return code
  1590.  
  1591. arg1    proc    far
  1592.     push    bp
  1593.     mov    bp,sp
  1594.     push    ds
  1595.     lds    si,[bp+6]
  1596.     mov    dx,[si]    ;dx gets the argument
  1597.     int    21h
  1598.     mov    ah,0       ;clear ah for al return code
  1599.     pop    ds
  1600.     pop    bp
  1601.     ret
  1602. arg1    endp
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608. ;--------------------------------
  1609. ; Place a single integer argument into bp
  1610. ; for use with time outs - with a return code
  1611.  
  1612. arg1t    proc    far
  1613.     push    bp
  1614.     mov    bp,sp
  1615.     push    ds
  1616.     lds    si,[bp+6]
  1617.     mov    bp,[si]    ;dx gets the argument
  1618.     int    21h
  1619.     mov    ah,0       ;clear ah for al return code
  1620.     pop    ds
  1621.     pop    bp
  1622.     ret
  1623. arg1t    endp
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630. ;--------------------------------
  1631. ; Process an fcb address in a
  1632. ; function call with a return code
  1633.  
  1634. arg1f    proc    far
  1635.     push    bp
  1636.     mov    bp,sp
  1637.     push    ds
  1638.     lds    dx,[bp+6]      ;dx gets the argument
  1639.     int    21h
  1640.     mov    ah,0           ;clear ah for al return code
  1641.     pop    ds
  1642.     pop    bp
  1643.     ret
  1644. arg1f    endp
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650. ;--------------------------------
  1651. ; Process a single string argument in a
  1652. ; function call with a return code
  1653.  
  1654. arg1a    proc    far
  1655.     push    bp
  1656.     mov    bp,sp
  1657.     push    ds
  1658.     lds    dx,[bp+6]     ;ptr to parameter string
  1659.     int    21h
  1660.     mov    ah,0          ;clear ah for al return code
  1661.     pop    ds
  1662.     pop    bp
  1663.     ret
  1664. arg1a    endp
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671. ;----------------------------
  1672. ; Perform a single integer argument
  1673. ; but without a return code
  1674.  
  1675. arg1wor proc    far
  1676.     push    bp
  1677.     mov    bp,sp
  1678.     push    ds
  1679.     lds    si,[bp+6]
  1680.     mov    dx,[si]       ;dx gets the arg (or ptr)
  1681.     int    21h
  1682.     pop    ds
  1683.     pop    bp
  1684.     ret
  1685. arg1wor endp
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692. ;----------------------------
  1693. ; Perform a single string argument
  1694. ; but without a return code
  1695.  
  1696. arg1awor proc    far
  1697.     push    bp
  1698.     mov    bp,sp
  1699.     push    ds
  1700.     lds    dx,[bp+6]
  1701.     inc    dx          ;add 1 to get the start of the string
  1702.     int    21h
  1703.     pop    ds
  1704.     pop    bp
  1705.     ret
  1706. arg1awor endp
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713. ;----------------------------
  1714. ; Handle a request$ and reply$ function
  1715. ; with error code
  1716.  
  1717. req_rep proc    far
  1718.     push    bp
  1719.     mov    bp,sp
  1720.     push    ds
  1721.     push    es
  1722.     lds    si,[bp+10]       ;ptr to req. string
  1723.     inc    si            ;add 1 to get the address of the string
  1724.     les    di,[bp+6]       ;ptr to var desc block for reply buf
  1725.     inc    di            ;add 1 to get the address of the string
  1726.     pushf                  ;save the direction flag
  1727.     int    21h
  1728.     popf
  1729.     mov    ah,0
  1730.     pop    es
  1731.     pop    ds
  1732.     pop    bp
  1733.     ret
  1734. req_rep endp
  1735.  
  1736.  
  1737.  
  1738. cseg    ends
  1739.     end
  1740.