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 / BDOS / DOSPLSOR.ARK / DOS-BIOS.MAC < prev    next >
Text File  |  1986-12-07  |  3KB  |  85 lines

  1. ;
  2. ; A standard CPM 2.2 Bios arrangement
  3. ; This linkage allows debugging DOS+ using pre-existing bios.
  4. ;
  5. ; The returned values from conout and home are optional.  The home
  6. ; value allows monitoring and controlling disk soft error operations.
  7. ; These optional values are returned by cbf BIOS/ROM on Kaypro 4 (83)
  8. ; which system DOES NOT disturb IX, IY, nor alternate registers.
  9. entry    boot;     0 boot            none        none
  10. entry    wboot;     1 wboot         "         "
  11. entry    const;     2 console status     "        A=0FFH  ready
  12. ;                             =0 not ready
  13. entry    conin;     3 console input      "        A=console char
  14. entry    conout;     4 console output    C=console char    X/Y screen pos
  15. entry    list;     5 list output        C=list char    none
  16. entry    punch;     6 punch output        C=punch char     "
  17. entry    reader;     7 reader input        none        A=reader char
  18. entry    home;     8 home disk         "        ^system table
  19. entry    seldsk;     9 select disk        C=drv # (0..15)    HL=^Disk table
  20. ;                    E : 1 bit (lsb)
  21. ;                    = 1 for re-access
  22. ;                    = 0 for 1st access
  23. ;                    (for disk sensing etc)
  24. entry    settrk;    10 select track        BC=track #    none
  25. entry    setsec;    11 select sector    BC=sector #     "
  26. entry    setdma;    12 set DMA address    BC=DMA address     "
  27. entry    read;    13 read 128 bytes    none        A = 0 no error
  28. ;                            A <> 0 error
  29. entry    write;    14 write 128 bytes;    C=0 write data    A = 0 no error
  30. ;                    C=1 wrt dir.    A <> 0 error
  31. ;                    C=2 wrt unalloc
  32. entry    listst;    15 list status        none        A = 0ffh ready
  33. ;                            A = 0 not ready
  34. entry    sectrn;    16 sector translate    BC = sect    HL = sector #
  35. ;                    DE = ^table
  36. ;                    (from select)
  37. ;
  38. ; Optional timer service routine, patchable address in DOS+ offset 16h
  39. ; Value is 040h (string address only) for cbf BIOS/ROM on Kaypro 4/83
  40. ; XX    time    BC =0 get pointer only    HL=pointer to time array
  41. ;        BC <> 0 allows hard-     HL+0^ date LSB days since
  42. ;         ware to be updated     HL+1^ date MSB (1=1978/1/1)
  43. ;         if a routine call.     HL+2^ hour (bcd)
  44. ;         ignored if timead     HL+3^ minute (bcd)
  45. ;         is purely an address.     HL+4^ seconds (bcd)
  46. ;         BC^ time to set. (no secs) 
  47. ;                    CARRY clear, NZ on exit.
  48. ;
  49. ; Optional entries, cbf bios/rom on Kaypro 4 (83)
  50. ;entry    punsta;    24 punch status        none        A = 0ffh ready
  51. ;                            A = 0 not ready
  52. ;entry    rdrsta;    25 reader status    none        A = 0ffh ready
  53. ;                            A = 0 not ready
  54. ;entry    gorom;    26 ROM executor @hl    a,b,c,d,e    a,f,d,e,h,l
  55. ;                    & hl = locn 3    (sees 4000h up)
  56. ;
  57.  
  58. boot    equ    $;         0 initialize
  59. wboot    equ    boot+3;         1 warm boot
  60. const    equ    wboot+3;     2 console status
  61. conin    equ    const+3;     3 console input
  62. conout    equ    conin+3;     4 console output
  63. list    equ    conout+3;     5 list output
  64. punch    equ    list+3;         6 punch output
  65. reader    equ    punch+3;     7 reader input
  66. home    equ    reader+3;     8 home disk
  67. seldsk    equ    home+3;         9 select disk
  68. settrk    equ    seldsk+3;    10 select track
  69. setsec    equ    settrk+3;    11 select sector
  70. setdma    equ    setsec+3;    12 set DMA address
  71. read    equ    setdma+3;    13 read 128 bytes
  72. write    equ    read+3;        14 write 128 bytes
  73. listst    equ    write+3;    15 list status
  74. sectrn    equ    listst+3;    16 sector translate
  75. ;    
  76. ; Optional entries used cbf Kaypro 4/83 bios
  77. punsta    equ    sectrn+24;    24 punch status
  78. rdrsta    equ    punsta+3;    25 reader status
  79. gorom    equ    rdrsta+3;    26 access Bank 0 ROM (hl^) routine
  80. ;                   passing a,b,c,d,e, hl=locn 3-4
  81. ;                   returning a,f,d,e,h,l
  82. ;                   (only memory from 04000h up is
  83. ;                    visible to the ROM procedures)
  84.     end
  85. G`