NEC CP/M-86 System Reference Manual page 31

Advanced personal computer
Table of Contents

Advertisement

Command (CMD) File Generation
• The maximum memory size (X value) is generally used when additional free
memory may be needed for such purposes as
1/0
buffers or symbol tables.
If the data area size is fixed, the X parameter need not be included. In this
case, the X value is assumed to be the same as the M value. The value
XFFFF allocates the largest memory region available but if it is used, the
transient program must know that a three-byte length field is produced in
the base page for this group where the high order byte may be non-zero.
Programs converted directly from CP/M-SO, or programs that use a two-
byte pointer to address buffers, should restrict this value to XFFF or less,
producing a maximum allocation length of OFFFOH bytes.
For example, the following GENCMD command line transforms the file X.HS6
into the file X.CMD with the proper header record.
gencmd x code[a40] data[m30,xfff]
In this case, the code group is forced to paragraph address 40H or, equivalently,
byte address 400H. The data group requires a minimum of300H bytes, but can use
up to OFFFOH bytes, if available.
As another example, assume a file Y .H86 exists on Drive B and consists of Intel hex
records with no interspersed segment information. The command
gencmd b:y data[b30,m20] extra[b50] stack[m40] xl[m40]
produces the file Y.CMD on Drive B by selecting records beginning at address
OOOOH for the code segment, and records beginning at address 300H for the data
segment. The extra segment is filled from records beginning at 500H, while the stack
and auxiliary segment #1 are uninitialized areas requiring a minimum of 400H bytes
each. In this example, the data area requires a minimum of200H bytes. Note again
that the B value need not be included if the Digital Research ASM-86 assembler is
used.
3-5

Advertisement

Table of Contents
loading

Table of Contents