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 / AMPRO / HDINFO.LBR / HDINFO.Z80 < prev   
Text File  |  2000-06-30  |  1KB  |  61 lines

  1. ;
  2. ; HDINFO --- types current AMPRO hard disk buffer addresses.
  3. ;            no fancy checking, just does the job.
  4. ;            assemble with ZAS, link with ZLINK.
  5. ;         uses SYSLIB routines BIOS,PSTR,PA2HC
  6. ;
  7. ;        Daniel Kelley
  8. ;        P.O. Box 90266
  9. ;        San Jose,CA 95109-3266
  10.  
  11. VERS    equ    05
  12. CR    equ    13
  13. LF    equ    10
  14. HDINFO    equ    17
  15.  
  16.     EXTRN    BIOS,PSTR,PA2HC
  17.  
  18. start    ld    hl,smsg
  19.     call    pstr
  20.     ld    a,hdinfo
  21.     call    bios        ; HL points to AMPRO secondary jump table
  22.     inc    hl        ; point to second jump ( hd$info)
  23.     inc    hl
  24.     inc    hl
  25.     ld    (newcall),hl
  26. newcall    equ    $+1        ; sure could use a CALL (HL) !
  27.  
  28.     call    0
  29.     ex    de,hl
  30.     ld    hl,cmsg        ; print current buffer storage
  31.     call    pstr
  32.     call    nxtptr
  33.     ld    hl,vmsg        ; ...vector
  34.     call    pstr
  35.     call    nxtptr
  36.     ld    hl,bmsg        ; ...byte/block
  37.     call    pstr
  38.     call    nxtptr
  39.     ld    hl,emsg
  40.     call    pstr
  41.     ret
  42. ;
  43. nxtptr    inc    de
  44.     ld    a,(de)        ; print word pointed to by DE
  45.     call    pa2hc        ; DE=DE+2
  46.     dec    de
  47.     ld    a,(de)
  48.     call    pa2hc
  49.     inc    de
  50.     inc    de
  51.     ret
  52.  
  53. smsg    DB    cr,lf,'HDINFO ver ',VERS/10+'0','.',VERS MOD 10 + '0'
  54.     DB    cr,lf,'Returns hard disk storage info for the AMPRO'
  55.     DB          ' Little Board.',0
  56. cmsg    DB    cr,lf,lf,'HD$CURRENT:    ',0
  57. vmsg    DB    cr,lf,   'HD$VECTORS:    ',0
  58. bmsg    DB    cr,lf,   'HD$BYTE$BLOCK: ',0
  59. emsg    DB    cr,lf,lf,0
  60.  
  61.     .end    start$CURRENT:    ',0