home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / DRI-archive / roche / CCGFCU.WS4 < prev    next >
Internet Message Format  |  2009-12-11  |  25KB

  1. From: "Arobase, Salle multimΘdia" <arobase1.rochef...@wanadoo.fr>
  2. Newsgroups: comp.os.cpm
  3. Subject: CP/M-86 Compatibility Guide For CP/M-80 Users
  4. Date: Fri, 24 Jan 2003 13:01:08 +0100
  5. Organization: Wanadoo, l'internet avec France Telecom
  6. Lines: 526
  7. Message-ID: <b0ra0c$3rm$1@news-reader12.wanadoo.fr>
  8. References: <b0r8tu$4th$1@news-reader10.wanadoo.fr>
  9. NNTP-Posting-Host: apoitiers-106-2-1-152.abo.wanadoo.fr
  10. X-Trace: news-reader12.wanadoo.fr 1043409740 3958 193.253.213.152 (24 Jan 2003 12:02:20 GMT)
  11. X-Complaints-To: abuse@wanadoo.fr
  12. NNTP-Posting-Date: 24 Jan 2003 12:02:20 GMT
  13. X-Priority: 3
  14. X-MSMail-Priority: Normal
  15. X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
  16. X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
  17.  
  18. CCGFCU.WS4
  19. ----------
  20.  
  21. CP/M-86 Compatibility Guide For CP/M-80 Users   (= CCGFCU...)
  22.  
  23. Copyright (c) 1980 Digital Research
  24. Pacific Grove, California
  25.  
  26. (Revision of 10/21/80)  (= 21 October 1980)
  27.  
  28. (Retyped by Emmanuel ROCHE.)
  29.  
  30.  
  31. CP/M-86  is  a single-user operating system for the  Intel  8086
  32. microprocessor.  Since  the  Intel  8088  CPU  is   functionally
  33. equivalent  to the 8086, CP/M-86 is suitable for use  with  both
  34. processors.  The  design philosophy of CP/M-86 follows  that  of
  35. CP/M  for  the  8080,  8085,  and  Z-80  microprocessors,   with
  36. additional facilities to account for the increased address space
  37. of  the  8086 family. The new features  also  allow  application
  38. programs  to  easily  upgrade  to  the  MP/M-86  and   CP/NET-86
  39. environment, where multi-programming and computer networking  is
  40. supported.  This document assumes basic familiarity with the  8-
  41. bit  CP/M  software  product,  and  specifically  describes  the
  42. differences and extensions found in CP/M-86.
  43.  
  44.  
  45. 1.  CP/M-86 Operational Differences
  46. -----------------------------------
  47.  
  48. CP/M-86   maintains  file  compatibility  with   previous   CP/M
  49. versions,  and provides a familiar environment for the  operator
  50. and  programmer.  Utility programs, such as ED, PIP,  STAT,  and
  51. SYSGEN  operate in the same manner as their 8-bit  counterparts,
  52. while ASM and DDT provide the basic tools for assembly  language
  53. development using the 8086 microprocessor.
  54.  
  55. Under  CP/M-86,  multiple programs are loaded in  "stack  order"
  56. into  memory  for  execution.  Programs  themselves  can   cause
  57. additional programs to be loaded for subsequent execution. Thus,
  58. for  example,  the background DESPOOLing utility  can  first  be
  59. loaded,  followed by execution of DDT. DDT may, in turn, load  a
  60. test  program for a debugging session, and transfer  control  to
  61. the test program between breakpoints. In general, CP/M-86  keeps
  62. account  of  the order in which programs are  loaded  and,  upon
  63. encountering  the  program abort key  (Control-C),  discontinues
  64. execution  of the most recent program activated at  the  console
  65. command  level.  Thus,  in the above case, a  Control-C  at  the
  66. command level first discards DDT and the test program, while the
  67. second  Control-C  aborts  DESPOOL. At  this  point,  subsequent
  68. Control-C  characters are ignored, since there are no  executing
  69. programs activated at the console level.
  70.  
  71.  
  72. 2.  Memory Organization
  73. -----------------------
  74.  
  75. The  8086 memory addresses range from 00000H to  0FFFFFH,  where
  76. each  memory location holds an 8-bit value, resulting in  a  one
  77. megabyte address space. The following terms are used  throughout
  78. this document when 8086 memory organization is discussed:
  79.  
  80.         Nibble          4-bit half-byte
  81.         Byte            8-bit value
  82.         Word            16-bit value
  83.         Double Word     32-bit value
  84.         Paragraph       16 contiguous bytes
  85.         Segment         Up to 64K contiguous bytes
  86.         Offset          16-bit displacement in a segment
  87.         Group           one or more segments
  88.  
  89. Word  values  are  standard Intel format, with  low  order  byte
  90. stored first in memory. Double words consist of two word  values
  91. in standard format, and often represent an offset followed by  a
  92. paragraph  address. All paragraph addresses are on even  16-byte
  93. boundaries,  and  thus a paragraph address has an  assumed  low-
  94. order nibble value of 0, in order that the address can be stored
  95. in  a word location. The paragraph address 0000H,  for  example,
  96. represents   the  actual  memory  location  00000H,  while   the
  97. paragraph address 0001H becomes the memory location 00010H.
  98.  
  99. CP/M-86 itself consists of the Console Command Processor  (CCP),
  100. the   Basic  Disk  Operating  System  (BDOS),  and   the   user-
  101. configurable  Basic  I/O System (BIOS). All three  portions  are
  102. resident, and are not available as data space after a program is
  103. loaded. CP/M-86 memory consists of a sequence of (possibly) non-
  104. contiguous  areas,  which are addressed by a  memory  management
  105. scheme  within CP/M-86. Up to eight non-contiguous memory  areas
  106. can  be  defined  within the BIOS, in  order  to  provide  basic
  107. allocation  information.  When non-contiguous memory  areas  are
  108. mapped in this manner, the base memory addresses must be on  16-
  109. byte  paragraph  boundaries.  Normally,  however,  8086   memory
  110. consists of contiguous RAM beginning at location zero, and  thus
  111. only one memory area is defined within the BIOS.
  112.  
  113. The  Boot  Loader resides on the first two  system  tracks.  For
  114. future  expansion,  however, the CP/M-86 system itself  is  read
  115. from the CPM.SYS file stored on the system disk. Thus, the  Boot
  116. Loader  contains  a simple version of the  CP/M-86  BDOS,  which
  117. allows  the  CPM.SYS  file to be opened and  read  into  memory,
  118. similar  to  the operation of MP/M. The actual load  address  is
  119. determined  when the Boot Loader is configured. CP/M-86  is  not
  120. normally  operated  in the area from location  0  through  3FFH,
  121. since this area is often used for interrupt vector  information.
  122. For  standardization,  it is suggested that  CP/M-86  be  loaded
  123. beginning  at  location 400H. In any case, the BIOS  memory  map
  124. specifically  excludes the interrupt vector area and the  memory
  125. area  in  which  CP/M-86  resides, so  that  this  area  is  not
  126. available for allocation to user or system programs.
  127.  
  128.  
  129. 3.  Memory Models
  130. -----------------
  131.  
  132. CP/M-86  loads programs into the Transient Program  Area  (TPA),
  133. using  three  different  memory models  corresponding  to  three
  134. popular memory segmentation techniques. The three models are:
  135.  
  136.         8080 Model
  137.         Small Model
  138.         Compact Model
  139.  
  140. The  8080 Model supports programs which are directly  translated
  141. from  the 8-bit CP/M environment, where code and data areas  are
  142. intermixed. The Small Model is similar to that defined by Intel,
  143. where code and data spaces are separated into two segments of up
  144. to  64K  bytes  each. The Small Model is  suitable  for  use  by
  145. translated  8-bit  programs  where  code  and  data  are  easily
  146. separated. The Compact Model allows execution of programs  which
  147. perform  their  own segment management, allowing  programs  with
  148. code  and data segments which reach the addressing  capacity  of
  149. the host memory configuration. The three models differ primarily
  150. in  the  manner in which the segment registers  are  initialized
  151. upon program loading.
  152.  
  153. In  all  three models, the DS register addresses a  "base  page"
  154. area,  similar  to 8-bit CP/M where various default  values  are
  155. stored.  The base page extends from offset 0000H through  offset
  156. 00FFH  from  the DS register, and contains  the  following  pre-
  157. defined areas:
  158.  
  159.                     +-----+-----+-----+
  160.         DS + 0000H: | LC0 | LC1 | LC2 |
  161.                     +-----+-----+-----+
  162.         DS + 0003H: | BC0 | BC1 | M80 |
  163.                     +-----+-----+-----+
  164.         DS + 0006H: | LD0 | LD1 | LD2 |
  165.                     +-----+-----+-----+
  166.         DS + 0009H: | BD0 | BD1 | xxx |
  167.                     +-----+-----+-----+
  168.         DS + 000CH: | LE0 | LE1 | LE2 |
  169.                     +-----+-----+-----+
  170.         DS + 000FH: | BE0 | BE1 | xxx |
  171.                     +-----+-----+-----+
  172.         DS + 0012H: | LS0 | LS1 | LS2 |
  173.                     +-----+-----+-----+
  174.         DS + 0015H: | BS0 | BS1 | xxx |
  175.                     +-----+-----+-----+
  176.         DS + 0018H: | LX0 | LX1 | LX2 |
  177.                     +-----+-----+-----+
  178.         DS + 001BH: | BX0 | BX1 | xxx |
  179.                     +-----+-----+-----+
  180.         DS + 001EH: | LX0 | LX1 | LX2 |
  181.                     +-----+-----+-----+
  182.         DS + 0021H: | BX0 | BX1 | xxx |
  183.                     +-----+-----+-----+
  184.         DS + 0024H: | LX0 | LX1 | LX2 |
  185.                     +-----+-----+-----+
  186.         DS + 0027H: | BX0 | BX1 | xxx |
  187.                     +-----+-----+-----+
  188.         DS + 002AH: | LX0 | LX1 | LX2 |
  189.                     +-----+-----+-----+
  190.         DS + 002DH: | BX0 | BX1 | xxx |
  191.                     +-----+-----+-----+
  192.         DS + 0030H:         Not
  193.           ...            Currently
  194.         DS + 005BH:         Used
  195.                     +-----------------+
  196.         DS + 005CH: |   Default FCB   |
  197.                     +-----------------+
  198.         DS + 0080H: |  Default Buffer |
  199.                     +-----------------+
  200.         DS + 0100H: | Begin User Data |
  201.                     +-----------------+
  202.  
  203. where each byte is indexed by 0, 1, and 2, corresponding to  the
  204. standard Intel storage convention of low, middle, and high-order
  205. (most significant) byte, and "xxx" marks unused bytes. LC is the
  206. last  code  group  location  (24-bits), while  BC  is  the  base
  207. paragraph  address  of  the code group (16-bits).  In  the  8080
  208. Model, the low order bytes of the LC (LC0 and LC1) never  exceed
  209. 0FFFFH, and the high order byte (LC2) is always zero. It  should
  210. be  noted  that bytes LD0 and LD1 appear in  the  same  relative
  211. positions  of  the base page in both 8-bit  CP/M-80  and  16-bit
  212. CP/M-86, thus easing the program translation task.
  213.  
  214. LD  and BD provide the last position and paragraph base  of  the
  215. data  group. Note that the last position is one byte  less  than
  216. the  group  length.  The M80 byte is equal to 1  when  the  8080
  217. Memory  Model  is  in  use. LE and BE  provide  the  length  and
  218. paragraph  base of the (optional) extra group, while LS  and  BS
  219. give  the  (optional)  stack group length and  base.  The  bytes
  220. marked  LX  and  BX  correspond to  a  set  of  four  (optional)
  221. independent  groups,  which may be required for  programs  which
  222. execute  using the Compact Model. The initial values  for  these
  223. descriptors  are  derived from the header record in  the  memory
  224. image file, described below.
  225.  
  226.  
  227. 4.  Memory Image File Format
  228. ----------------------------
  229.  
  230. Similar  to 8-bit CP/M, CP/M-86 loads and executes memory  image
  231. files,  with  the  file type "CMD"  corresponding  to  "command"
  232. files.  The command file results from the GENCMD program,  which
  233. accepts  either  Intel  L-modules, or  Intel  8086  "hex"  files
  234. produced using Intel translators or the Digital Research  ASM-86
  235. assembler. A CMD file begins with a header record created by the
  236. GENCMD  program. The header record is a total of 128 bytes,  and
  237. begins with a sequence of one or more group descriptors of  nine
  238. bytes each, with zero fill to the end of the record. The  format
  239. of each descriptor is shown below.
  240.  
  241.           8-bit   16-bit     16-bit     16-bit     16-bit
  242.         +------+----------+----------+----------+----------+
  243.         |G-Form| G-Length |  A-Base  |  G-Min   |  G-Max   |
  244.         +------+----------+----------+----------+----------+
  245.  
  246. where G-Form describes the group form, or has the value zero  if
  247. no  more descriptors follow. If G-Form is non-zero, then the  8-
  248. bit value is decomposed into two fields:
  249.  
  250.                G-Form:
  251.            4-bit    4-bit
  252.         +---------+--------+
  253.         | x x x x | G-Type |
  254.         +---------+--------+
  255.  
  256.         G-Type  Group Type
  257.         ------  ----------
  258.           1     Program Code Group
  259.           2     Independent Data Group
  260.           3     Independent Extra Group
  261.           4     Independent Stack Group
  262.           5     Independent Auxiliary Group #1
  263.           6     Independent Auxiliary Group #2
  264.           7     Independent Auxiliary Group #3
  265.           8     Independent Auxiliary Group #4
  266.          9-14   Unused, but Reserved
  267.           15    Escape Code for Additional Types
  268.  
  269. All  remaining  values  in the group  descriptor  are  given  in
  270. increments of 16-bytes. That is, each value is the high order 16
  271. bits  of  the 20-bit base or length, with an assumed  low  order
  272. nibble  of  zero.  Thus,  allocation  requests  are  always   in
  273. "paragraph"  increments. G-Length gives the actual size  of  the
  274. group.  Given a G-length of 0080H, for example, the size of  the
  275. group is 00800H = 2048 bytes. A-Base defines the base  paragraph
  276. address  for  a  non-relocatable group.  The  group  is  assumed
  277. relocatable  if  A-Base  is 0000H. G-Min and  G-Max  define  the
  278. minimum  and maximum size of the memory area to allocate to  the
  279. group.  Normally,  the value of G-Length, G-Min, and  G-Max  are
  280. identical  for  a group containing object code, but  may  differ
  281. when the group designates a data area. A program which  performs
  282. I/O  processing, for example, may contain a data area  used  for
  283. buffers where the size of the allocated area may vary, depending
  284. upon available storage.
  285.  
  286. The  particular  memory  model used by a  transient  program  is
  287. determined  implicitly by the group descriptors. The 8080  Model
  288. occurs when only a code group is included, since no  independent
  289. data  group  is  named.  The  Small  Model  is  implied  by  the
  290. occurrence  of a code group and a data group, but no  additional
  291. group descriptors. Otherwise, the Compact Model is implied.
  292.  
  293.  
  294. 5.  Program Initialization
  295. --------------------------
  296.  
  297. Following  program  load, the CCP transfers control  through  an
  298. 8086  Far  Call. The Stack Segment register (SS) is set  to  the
  299. base paragraph address of CP/M-86, while the Stack Pointer  (SP)
  300. references  the current base of the CCP stack. Similar to  8-bit
  301. CP/M,  the  transient program must save these  registers  before
  302. switching to a local stack if return to the CCP is  anticipated.
  303. In this case, the transient program must reinstate the SS and SP
  304. registers,  and execute an 8086 Far Return.  Alternatively,  the
  305. program  may  return control to CP/M-86 through a  call  to  the
  306. BDOS,  using  function code 0, as described below.  The  initial
  307. values of the remaining segment registers upon program load  are
  308. determined by the memory model.
  309.  
  310. When  the  8080 Model is used, the Code Segment  register  (CS),
  311. Data Segment register (DS), and Extra Segment register (ES)  are
  312. set  to the base of the transient program area. The  Instruction
  313. Pointer (IP) is initialized to 0100H. The reserved locations and
  314. initial values for maximum memory size, default FCB, and default
  315. buffer in the base page are in the same relative position as  8-
  316. bit  CP/M.  In particular, the base page is a part of  both  the
  317. code and data space, with the size of memory provided at address
  318. DS+0006H.
  319.  
  320. In  the case of the Small Model, the CS register is set  to  the
  321. base  of  the  code  area, while the DS  and  ES  registers  are
  322. initialized  to  the base paragraph address of  the  data  area.
  323. Again,  the base page addressed by DS and ES correspond  closely
  324. to 8-bit CP/M, in order to simplify translation to CP/M-86. Note
  325. that  the only essential difference between the 8080  Model  and
  326. the Small Model is that code and data must be separate, which is
  327. often  the case with well-structured 8-bit programs.  The  Small
  328. Model  has  the advantage that the code and data  space  is  not
  329. limited to a total of 64K bytes.
  330.  
  331. Finally,  in the case of the Compact Model, the CS, DS,  and  ES
  332. registers are initialized to the base paragraph addresses of the
  333. code,   data,  and  extra  groups,  respectively.  It   is   the
  334. responsibility  of the transient program to manage  the  various
  335. segment  registers from the base page values filled-in when  the
  336. program is loaded by the CCP if any group exceeds 64K bytes,  or
  337. if auxiliary groups are included.
  338.  
  339.  
  340. 6.  BDOS Function Calls
  341. -----------------------
  342.  
  343. Programmatic interface to CP/M-86 corresponds to 8-bit CP/M with
  344. only  a  few  exceptions, thus allowing  simple  translation  of
  345. existing 8-bit programs to the 8086 environment.
  346.  
  347. The  BDOS  is entered using 8086 interrupt 224,  which  overlaps
  348. that  of Intel's RMX-86 monitor. Register values upon  entry  to
  349. the BDOS are given below:
  350.  
  351.         Function Code   CX
  352.         Byte Parameter  DL
  353.         Word Parameter  DX
  354.  
  355. Addresses  passed  to the BIOS are offset from the  DS  register
  356. which  is positioned at the base of the CP/M-86 data area.  Note
  357. that  the total code and data space required by the  CCP,  BDOS,
  358. and  BIOS is considerably less than 64K, and thus CS and DS  are
  359. placed at the first address of the region occupied by CP/M.
  360.  
  361. Register  content  is not preserved through BDOS  calls.  Values
  362. resulting  from  BDOS  calls  are  returned  in  the   following
  363. registers:
  364.  
  365.         Byte Value              AL
  366.         Word Value              AX and BX
  367.         Double Word Offset      BX
  368.         Segment Address         ES
  369.  
  370. A  number of additional function codes are provided in  CP/M-86.
  371. Note  also that function code (0) has a single  parameter  value
  372. under CP/M-86.
  373.  
  374.         (0) System Reset (Warm Start)
  375.         Restores CP/M-86 to the reset state, with a standard CCP
  376.         prompt.  The parameter value in the DL register has  two
  377.         possible values: if DL = 00H, then the currently  active
  378.         program   is  terminated  (equivalent   to   Control-C).
  379.         Otherwise,  DL  must be 01H, in which case  the  program
  380.         remains  in  memory,  and the  memory  allocation  state
  381.         remains  unchanged. (If DL is neither 00H or 01H, it  is
  382.         currently treated as if it were 00H.)
  383.  
  384.         (50) Direct BIOS Call
  385.         Transfers control through the BDOS to the BIOS, with the
  386.         DX  addressing  a five-byte memory area  containing  the
  387.         BIOS call parameters:
  388.  
  389.                   8-bit    16-bit       16-bit
  390.                 +------+------------+------------+
  391.                 | Func | Value (CX) | Value (DX) |
  392.                 +------+------------+------------+
  393.  
  394.         where  Func  is the BIOS function  number,  starting  at
  395.         zero,  and  Value  (CX) and Value (DX)  are  the  16-bit
  396.         values which would normally be passed directly in the CX
  397.         and  DX  registers  with the BIOS call. The  CX  and  DX
  398.         values  are  loaded into the 8086 registers  before  the
  399.         BIOS call is initiated.
  400.  
  401.         (51) Set DMA Segment Base
  402.         Sets the base register for subsequent DMA transfers. The
  403.         word  parameter  gives  the  paragraph  address  of  the
  404.         referenced  segment.  Note that,  upon  initial  program
  405.         loading, the default segment base is set to DS, and  the
  406.         DMA offset is set to 0080H, which provides access to the
  407.         base page.
  408.  
  409.         (52) Get DMA Base
  410.         Returns  the  double  word value  corresponding  to  the
  411.         current DMA segment base and offset.
  412.  
  413. Several  of  the codes given below reference  a  Memory  Control
  414. Block  (MCB), defined in the transient program, which takes  the
  415. form:
  416.  
  417.                 16-bit     16-bit    8-bit
  418.              +----------+----------+-------+
  419.         MCB: |  M-Base  | M-Length | M-Ext |
  420.              +----------+----------+-------+
  421.  
  422. where  M-Base  and M-Length are either input  or  output  values
  423. expressed  in 16-byte paragraph units, and M-Ext is  a  returned
  424. byte  value, as defined with each function below. Note  that  an
  425. error condition is normally flagged with a 0FFH returned  value,
  426. in order to match the file error conventions of CP/M.
  427.  
  428.         (53) Get Max Mem
  429.         Allocate  the  largest contiguous area of  memory.  Upon
  430.         entry, DX addresses a MCB which will be filled-in by the
  431.         BDOS. If successful, M-Base is set to the base paragraph
  432.         address  of  the  allocated area, and  M-Length  is  the
  433.         paragraph  length  of the allocation. AL has  the  value
  434.         0FFH  upon  return  if  the  requested  memory  is   not
  435.         available, and 00H if the request was successful.  M-Ext
  436.         is   set  to  1  if  there  is  additional  memory   for
  437.         allocation, and 0 if no additional memory is available.
  438.  
  439.         (54) Get Abs Max
  440.         Allocate  the  largest  contiguous memory  area  at  the
  441.         absolute  address given by M-Base. Returned  values  are
  442.         the same as those of function (53).
  443.  
  444.         (55) Get Mem
  445.         Allocate a memory area according to the MCB addressed by
  446.         DX.  In  this  case,  the  allocation  request  size  is
  447.         obtained from M-Length on input. The resulting values of
  448.         the MCB fields are identical to function (53).
  449.  
  450.         (56) Get Abs Mem
  451.         Allocate memory at the absolute address given by M-Base,
  452.         for  the length given by M-Length. The resulting  values
  453.         are identical to function (53).
  454.  
  455.         (57) Free Mem
  456.         Release  the memory area of length M-Length at  location
  457.         M-Base given in the MCB addressed by DX.
  458.  
  459.         (58) Free All
  460.         Release all memory in the CP/M-86 environment  (normally
  461.         used only by the CCP upon initialization).
  462.  
  463.         (59) Program Load
  464.         Load  the  program  in the file  described  by  the  FCB
  465.         addressed  by DX. AX has the value 0000H if the  program
  466.         load was unsuccessful. Otherwise, AX and BX both contain
  467.         the paragraph address of the base page belonging to  the
  468.         loaded program. Note that, upon program load at the  CCP
  469.         level,  the default paragraph address is initialized  to
  470.         the base page of the loaded program, and the default DMA
  471.         address  is initialized to offset 0080H. Note,  however,
  472.         that this is a function of the CCP, and thus a  function
  473.         59 does not initialize these registers. In this case, it
  474.         is  the  responsibility of the  program  which  executes
  475.         function 59 to first execute function 51 to set the  DMA
  476.         base, and then initialize the DS register before passing
  477.         control to the loaded program.
  478.  
  479. In addition to these functions, two specific differences between
  480. 8-bit CP/M and CP/M-86 exist. First, the IOBYTE function is only
  481. accessible  through  the BDOS, as described in  the  8-bit  CP/M
  482. documentation.  Second,  Direct  BIOS calls  are  provided  only
  483. through the BDOS.
  484.  
  485.  
  486. 7.  BIOS Interface
  487. ------------------
  488.  
  489. The  interface to the CP/M-86 BIOS is identical to  8-bit  CP/M,
  490. with  the addition of four jump vector elements. The  BIOS  jump
  491. vector  consists of a sequence of 3-byte 8086 Near Jumps to  the
  492. individual  subroutines.  The additional BIOS entry  points  are
  493. listed  below,  and  immediately  follow  the  SECTRAN   (Sector
  494. Translate) entry point defined in 8-bit CP/M version 2:
  495.  
  496.         JMP     SETDMAB         ; Set DMA Base segment address
  497.         JMP     GETSEGT         ; Return address of SEGment Table
  498.         JMP     GETIOB          ; Get I/O Byte
  499.         JMP     SETIOB          ; Set I/O Byte
  500.  
  501. Entry points receive their first parameter in CX, and (optional)
  502. second parameter in DX. Values are returned as described in  the
  503. BDOS interface, above.
  504.  
  505. SETDMAB  (Set  DMA  Base) sets the base  paragraph  address  for
  506. subsequent DMA operations.
  507.  
  508. The  GETSEGT  returns  the offset to  the  BIOS-resident  Memory
  509. Region Table (MRT). The Memory Region Table has the form:
  510.  
  511.                8-bit
  512.              +-------+
  513.         MRT: | R-Cnt |
  514.              +---------------+---------------+
  515.           0: |     R-Base    |    R-Length   |
  516.              +---------------+---------------+
  517.           1: |     R-Base    |    R-Length   |
  518.              +---------------+---------------+
  519.                             ...
  520.              +---------------+---------------+
  521.           n: |     R-Base    |    R-Length   |
  522.              +---------------+---------------+
  523.                    16-bit         16-bit
  524.  
  525. where R-Cnt is the number of memory region descriptors (equal to
  526. n+1  in the above diagram), while R-Base and R-Length  give  the
  527. paragraph base and length of each physically contiguous area  of
  528. memory,  not including the interrupt vector addresses  (0-3FFH),
  529. or  the area of memory where CP/M-86 resides. If all  memory  is
  530. physically  contiguous, R-Cnt = 1 and n = 0. In this  case,  the
  531. single region descriptor normally addresses the first  paragraph
  532. beyond  the  last BIOS address, with an  R-Length  which  allows
  533. access to the highest paragraph address in the region.
  534.  
  535. The GETIOB and SETIOB entry points return and change the IOBYTE,
  536. as defined in 8-bit CP/M. The IOBYTE value itself is  maintained
  537. in the BIOS.
  538.  
  539.  
  540. EOF
  541.