home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / BBS_UTIL / BM0406_A.ZIP / BMASM.ZIP / RBBSDVW.ASM < prev    next >
Assembly Source File  |  1993-10-02  |  6KB  |  107 lines

  1. ;
  2. ;--------------------------------------------------------------------;
  3. ;ROUTINE: RBBSDESQ            AUTHOR:  R. Molinelli                  ;
  4. ;                                      P.O. Box 961                  ;
  5. ;                                      Levittown, NY  11756          ;
  6. ;                                                                    ;
  7. ;DATE:  January 30, 1993      VERSION: 1.0                           ;
  8. ;                                                                    ;
  9. ;FUNCTION: This routine supports calls from MICROSOFT PDS BASIC      ;
  10. ;          Version 7.x or Microsoft Quick BASIC Version 4.5          ;
  11. ;          compilers to DOS interrupt 21 to find the version of      ;
  12. ;          DESQview that RBBS-PC is being run under.                 ;
  13. ;                                                                    ;
  14. ;            CALL RBBSDESQ (AX%,BX%)                                 ;
  15. ;                                                                    ;
  16. ;          where AX% and BX% are 16-bit binary data items (i.e.      ;
  17. ;          integer variables) and should be as follows:              ;
  18. ;                                                                    ;
  19. ; Offset   Variable    Description of Variable                       ;
  20. ;                                                                    ;
  21. ; BP+8        AX% = major version number of DESQview that RBBS-PC is ;
  22. ;                   running under.  (Zero if not present)            ;
  23. ;                                                                    ;
  24. ; BP+6        BX% = minor version number of DESQview that RBBS-PC is ;
  25. ;                   running under.                                   ;
  26. ;                                                                    ;
  27. ;         AX% and BX% will return zero if DESQview not present       ;
  28. ;                                                                    ;
  29. ;====================================================================;
  30. ; ROUTINE: CKSHARE            AUTHOR:  R. Molinelli                  ;
  31. ;                                      P.O. Box 261                  ;
  32. ;                                      Levittown, NY  11756-0913     ;
  33. ;                                                                    ;
  34. ; DATE: October 2, 1993       VERSION 1.0                            ;
  35. ;                                                                    ;
  36. ; FUNCTION:  Checks to see if DOS's Share is loaded.                 ;
  37. ;                                                                    ;
  38. ;            CALL CKSHARE (AX%)                                      ;
  39. ;                                                                    ;
  40. ;  where AX% is a 16 bit binary data item (i.e. integer variable)    ;
  41. ;  and should be as follows:                                         ;
  42. ;                                                                    ;
  43. ; Offset   Variable    Description of Variable                       ;
  44. ;                                                                    ;
  45. ; BP+6        AX% = indicates if share is loaded.  Zero indicates    ;
  46. ;                   share NOT loaded.                                ;
  47. ;                                                                    ;
  48. ;--------------------------------------------------------------------;
  49. RBBSDVW  SEGMENT PUBLIC 'CODE'
  50.          ASSUME CS:RBBSDVW
  51.          PUBLIC RBBSDESQ
  52. ;
  53. RBBSDESQ  PROC   FAR           ;Far Call
  54.           PUBLIC RBBSDESQ
  55.           PUSH   BP            ;Save base pointer register
  56.           MOV    BP,SP         ;Setup to address off of base pointer
  57.           PUSH   BX            ;Save BX
  58.           PUSH   CX            ;Save CX
  59.           PUSH   DX            ;Save DX
  60.           MOV    CX,'DE'       ;Setup for call
  61.           MOV    DX,'SQ'
  62.           MOV    AX,2B01H
  63.           INT    21H           ;Issue DOS Interrupt 21
  64.           CMP    AL,0FFH       ;was call invalid?
  65.           JE     NO_DESQ       ;then no DESQview
  66.           MOV    AX,BX
  67.           JMP    DONEDV
  68. NO_DESQ:  SUB    AX,AX         ;set DESQview Version 0
  69. DONEDV:   MOV    DI,[BP+8]     ;Get address of AX%
  70.           MOV    [DI],AH       ;Put value of major DESQ version in AX%
  71.           MOV    DI,[BP+6]     ;Get address of BX%
  72.           MOV    [DI],AL       ;Put value of minor DESQ version in B%
  73.           POP    DX            ;Restore DX
  74.           POP    CX            ;Restore CX
  75.           POP    BX            ;Restore BX
  76.           POP    BP            ;Restore base pointer register
  77.           RET    4             ;Return and remove the 2 parameters from stack
  78. RBBSDESQ  ENDP
  79. ;
  80.          PUBLIC CKSHARE
  81. ;
  82. CKSHARE   PROC   FAR           ;Far Call
  83.           PUBLIC CKSHARE
  84.           PUSH   BP            ;Save base pointer register
  85.           MOV    BP,SP         ;Setup to address off of base pointer
  86.           PUSH   AX            ;Save AX
  87.           PUSH   BX            ;Save BX
  88.           PUSH   CX            ;Save CX
  89.           PUSH   DX            ;Save DX
  90.           MOV    AX,1000H      ;Setup for call
  91.           INT    2FH           ;Issue DOS Interrupt 2F
  92.           CMP    AL,0FFH
  93.           JE     DONECK        ;SHARE detected
  94.           SUB    AX,AX         ;NO SHARE
  95. DONECK:   MOV    DI,[BP+6]     ;Get address of BX%
  96.           MOV    [DI],AL       ;Put AL in B%
  97.           POP    DX            ;Restore DX
  98.           POP    CX            ;Restore CX
  99.           POP    BX            ;Restore BX
  100.           POP    AX            ;Restore AX
  101.           POP    BP            ;Restore base pointer register
  102.           RET    2             ;Return and remove the parameter from stack
  103. CKSHARE   ENDP
  104. RBBSDVW   ENDS
  105.           END
  106. 
  107.