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 / CPM3 / BDS-BIOS.CSM < prev    next >
Text File  |  2000-06-30  |  1KB  |  46 lines

  1. ;
  2. ;    (c) 1984 Kevin W. Rudd
  3. ;    All Commercial Rights Reserved
  4. ;    This set of routines is presented into the public
  5. ;    domain for any non-commercial use provided this
  6. ;    message is included.
  7. ;
  8. ;    cpm plus (vers 3.0) versions of BDS-C bios and biosh functions
  9. ;
  10.  
  11.     INCLUDE "bds.lib"
  12.  
  13.     FUNCTION    bios
  14.     call    arghak    
  15.     push    b
  16.     lda    arg1    ;get function number (1-85)
  17.     sta    bios3x+0    ;store in FUNC byte
  18.     lhld    arg2    ;get value to be put in BCREG
  19.     shld    bios3x+2    ;store it in BCREG word
  20.     mvi    c,50    ;cpm3 bdos call for dir bios call
  21.     lxi    d,bios3x    ;get addr of block
  22.     call    bdos    ;execute it
  23.     pop    b    ;restore b register
  24.     ret        ;and return to caller
  25.     ENDFUNC
  26.  
  27.     FUNCTION    biosh
  28.     call    arghak    
  29.     push    b
  30.     lda    arg1    ;get function number (1-85)
  31.     sta    bios3x+0    ;store in FUNC byte
  32.     lda    arg2    ;get value to be put in AREG
  33.     sta    bios3x+1    ;store in BCREG word
  34.     lhld    arg3    ;get value to be put in BCREG
  35.     shld    bios3x+2    ;store it in BCREG word
  36.     lhld    arg4    ;get value to be put in DEREG
  37.     shld    bios3x+4    ;store it in DEREG word
  38.     lhld    arg5    ;get value to be put in HLREG 
  39.     shld    bios3x+6    ;store it in HLREG word
  40.     mvi    c,50    ;cpm3 bdos call for dir bios call
  41.     lxi    d,bios3x    ;get addr of block
  42.     call    bdos    ;execute it
  43.     pop    b    ;all done. Leave return value in HL
  44.     ret        ;and return to caller
  45.     ENDFUNC
  46.