home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / ZCPR33 / A-R / DOSVER02.LBR / DOSVER02.Z80 < prev   
Text File  |  2000-06-30  |  1KB  |  45 lines

  1. ;
  2. ; DOSVER - a quick program which displays the version number of the
  3. ; currently-running ZRDOS.  The original DOSVER did not display the
  4. ; version number correctly in Z-System implementations such as the DT42
  5. ; "hyperspace" system (which was v2.0).
  6. ;
  7. ; Released by: D. McCord, 25 June 1987
  8. ;
  9.  
  10. vers            equ    02    ; version of this program
  11. dos            equ    5    ; dos entry point
  12. return$zrdos$ver    equ    48    ; dos function #
  13.  
  14.     extrn    pafdc,print        ; SYSLIB functions
  15.  
  16. start:
  17.     ld    c,return$zrdos$ver
  18.     call    dos            ; get dos ver #
  19.     ld    a,l
  20.     or    h            ; is it 0?
  21.     jr    z,not$zrdos
  22.     ex    de,hl            ; save version #
  23.     call    print
  24.     db    'ZRDOS version ',0
  25.     ld    a,e
  26.     and    0f0h            ; strip low nybble
  27.     rrc    a            ; move to proper position
  28.     rrc    a
  29.     rrc    a
  30.     rrc    a
  31.     call    pafdc            ; print first digit
  32.     call    print
  33.     db    '.',0            ; period
  34.     ld    a,e
  35.     and    0fh            ; strip high nybble
  36.     call    pafdc            ; print second digit
  37.     call    print
  38.     db    ' is currently running',0
  39.     ret                ; exit program
  40.  
  41. not$zrdos:
  42.     call    print
  43.     db    'ZRDOS is not currently running',0
  44.     ret                ; exit program
  45.