home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / 22rsx / rsx12.ark.2 / BDOS.DEF next >
Encoding:
Text File  |  1985-11-18  |  3.0 KB  |  94 lines

  1. ; Definition of CPM 2.2.  "set" vars can be modified if needed.
  2. ;
  3. ; BDOS Functions:
  4. @SYS    equ    0;    reinitialize
  5. @KEY    equ    1;    input console char, echo
  6. @CON    equ    2;    output console char
  7. @RDR    equ    3;    input RDR char.
  8. @PUN    equ    4;    output PUN char
  9. @LST    equ    5;    output LST char
  10. @DIO    equ    6;    Direct console i/o & status
  11. @RIO    equ    7;    Get IO byte (2.2). Rdr status (3.0)
  12. @SIO    equ    8;    Set IO byte (2.2). Pun status (3.0)
  13. @MSG    equ    9;    String to console
  14. @INP    equ    10;    Input string from console
  15. @RDY    equ    11;    Console input ready
  16. @VER    equ    12;    CPM version
  17. @LOG    equ    13;    Reset disk system (^C)
  18. @DSK    equ    14;    Select drive
  19. @OPN    equ    15;    Open file
  20. @CLS    equ    16;    Close file
  21. @DIR    equ    17;    Search 1st Dir. entry
  22. @NXT    equ    18;    Search next Dir. entry
  23. @DEL    equ    19;    Delete file
  24. @FRD    equ    20;    File read (sequential)
  25. @FWR    equ    21;    File write (sequential)
  26. @MAK    equ    22;    Make file
  27. @REN    equ    23;    Rename file
  28. @LGV    equ    24;    Log-in vector
  29. @CUR    equ    25;    Get current disk
  30. @DMA    equ    26;    Set DMA address
  31. @ALO    equ    27;    Get disk allocation vector
  32. @WPT    equ    28;    Write protect drive
  33. @GRO    equ    29;    Get read/only vector (drives)
  34. @CHG    equ    30;    Change file attributes
  35. @GPM    equ    31;    Get disk parameter table pointer
  36. @USR    equ    32;    Get/set current user
  37. @RRD    equ    33;    Random record read
  38. @RWR    equ    34;    Random record write
  39. @SIZ    equ    35;    Get file size
  40. @REC    equ    36;    Set random record to current sequential
  41. @RDV    equ    37;    Reset (selected) drive(s)
  42. ;            38 and 39 are MPM functions
  43. @WRZ    equ    40;    Random write w/zero fill
  44. ;
  45. ; some CPM 3.0 functions, for reference.  Match function if
  46. ; possible when a 2.2 RSX is created.
  47. ; 41 thru 50 are used
  48. @CHN    equ    47;    Chain to command line in (dmaadr)
  49. @OVL    equ    59;    Load overlay
  50. ;@RSX    equ    60;    Call RSX.  Different usage than here
  51. ; 98 thru 112 are used.  115 is CPM86 GSX graphics.
  52. @PFN    equ    152;    parse filename
  53. ;
  54. ; System equates:
  55. CPMBASE    set    0
  56. boot    set    CPMBASE
  57. iobyte    set    boot+3
  58. drvusr    set    boot+4
  59. bdos    set    boot+5
  60. tfcb    set    boot+5CH
  61. tfcb1    set    tfcb
  62. tfcb2    set    tfcb+16
  63. tbuff    set    boot+80H
  64. TPA    set    boot+100H
  65. fcblen    equ    36;        Length of input FCB, incl. random rcd
  66. ;
  67. ; Known CPM 2.2 definitions, for validation. Modify for other systems
  68. BDOSARG    set    0011h;        Entry point jumps to this, relative
  69. ;                to the first page of BDOS proper
  70. BDOSLGH    set    0eh;        BDOS is this many 256 byte pages long
  71. CCPLGH    set    0800h;        CCP is this long. If this is not 800h
  72. ;                then the standard versions of RELOCCP
  73. ;                (.SYS & .OVR) must be revised.
  74. ;
  75. ; nvects is larger than the CPM 2.2 standard to allow for:
  76. ;   1. CPM 3 bios system
  77. ;   2. Other systems with extended bios calls and/or use
  78. ;      e.g. Kaypro has a key table, which some applications
  79. ;      alter (via the pointer at 1).  If the space is not
  80. ;      reserved system crashes will result.
  81. nvects    set    29;        Number of BIOS vectors
  82. n22vec    set    16;        Number of CPM 2.2 vectors
  83. ;
  84. ; Some control chars.
  85. CTRL    equ    ' '-1;        CTRL CHAR MASK
  86. CTRLC    equ    CTRL AND 'C'
  87. BEL    equ    CTRL AND 'G'
  88. BS    equ    CTRL AND 'H'
  89. TAB    equ    CTRL AND 'I'
  90. LF    equ    CTRL AND 'J'
  91. FF    equ    CTRL AND 'L'
  92. CR    equ    CTRL AND 'M'
  93. eof    equ    CTRL AND 'Z'
  94. vZ