home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / vrac / 175b917s.zip / RBBS-ASM.ZIP / RBBSDVW.ASM < prev    next >
Assembly Source File  |  1993-01-31  |  3KB  |  63 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. RBBSDVW  SEGMENT PUBLIC 'CODE'
  31.          ASSUME CS:RBBSDVW
  32.          PUBLIC RBBSDESQ
  33. ;
  34. RBBSDESQ  PROC   FAR           ;Far Call
  35.           PUBLIC RBBSDESQ
  36.           PUSH   BP            ;Save base pointer register
  37.           MOV    BP,SP         ;Setup to address off of base pointer
  38.           PUSH   BX            ;Save BX
  39.           PUSH   CX            ;Save CX
  40.           PUSH   DX            ;Save DX
  41.           MOV    CX,'DE'       ;Setup for call
  42.           MOV    DX,'SQ'
  43.           MOV    AX,2B01H
  44.           INT    21H           ;Issue DOS Interrupt 21
  45.           CMP    AL,0FFH       ;was call invalid?
  46.           JE     NO_DESQ       ;then no DESQview
  47.           MOV    AX,BX
  48.           JMP    DONEDV
  49. NO_DESQ:  SUB    AX,AX         ;set DESQview Version 0
  50. DONEDV:   MOV    DI,[BP+8]     ;Get address of AX%
  51.           MOV    [DI],AH       ;Put value of major DESQ version in AX%
  52.           MOV    DI,[BP+6]     ;Get address of BX%
  53.           MOV    [DI],AL       ;Put value of minor DESQ version in B%
  54.           POP    DX            ;Restore DX
  55.           POP    CX            ;Restore CX
  56.           POP    BX            ;Restore BX
  57.           POP    BP            ;Restore base pointer register
  58.           RET    4             ;Return and remove the 2 parameters from stack
  59. RBBSDESQ  ENDP
  60. RBBSDVW   ENDS
  61.           END
  62. 
  63.