home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug097.arc / CPMCALLS.MAC < prev    next >
Text File  |  1979-12-31  |  1KB  |  75 lines

  1. ; standard CP/M system call equates
  2. ; for use WITHIN the BIOS
  3. ;
  4. sysres    equ    0
  5. coninp    equ    1
  6. conout    equ    2
  7. reainp    equ    3
  8. punout    equ    4
  9. lisout    equ    5
  10. dircon    equ    6
  11. getiob    equ    7
  12. setiob    equ    8
  13. pristr    equ    9
  14. reabuf    equ    10
  15. getsta    equ    11
  16. retver    equ    12
  17. resdis    equ    13
  18. seldis    equ    14
  19. opefil    equ    15
  20. clofil    equ    16
  21. seafir    equ    17
  22. seanex    equ    18
  23. delfil    equ    19
  24. reaseq    equ    20
  25. wriseq    equ    21
  26. makfil    equ    22
  27. renfil    equ    23
  28. retlog    equ    24
  29. retcur    equ    25
  30. setdma    equ    26
  31. getall    equ    27
  32. wripro    equ    28
  33. getrov    equ    29
  34. setfil    equ    30
  35. getdpb    equ    31
  36. usecod    equ    32
  37. rearan    equ    33
  38. wriran    equ    34
  39. comfil    equ    35
  40. setran    equ    36
  41. resdri    equ    37
  42. wriraz    equ    40
  43. ;
  44. ; this macro makes system calls easier to use
  45. syscall    macro    func
  46.     ld    c,func
  47.     call    bdos_func
  48.     endm
  49. ;
  50. ; this macro prints the string parameter
  51. say    macro    mess
  52.     local    tstart
  53.     ld    de,tstart
  54.     syscall    pristr
  55.     dseg
  56. tstart:    defm    mess,'$'
  57.     cseg
  58.     endm
  59. ;
  60. ; this macro prints a message without killing any registers
  61. ; but only when we are testing
  62. debug    macro    mess1
  63.     if    testing
  64.     push    af
  65.     push    bc
  66.     push    de
  67.     push    hl
  68.     say    <mess1,0DH,0AH>
  69.     pop    hl
  70.     pop    de
  71.     pop    bc
  72.     pop    af
  73.     endif
  74.     endm
  75.