flexmem - FLEX Memory Map
DESCRIPTION
The following is a description of those memory locations within the DOS
portion of FLEX which contain information of interest to the programmer.
The user is cautioned against utilization for his own purposes any
locations documented as being either "reserved" or "system scratch", as
this action may cause destruction of data.
FLEX GLOBAL SYSTEM MEMORY MAP
Address Range | Usage |
0000-BFFF | User RAM |
C000-DFFF | Disk Operating System |
C07F | System Stack |
C100-C6FF | Utility command space (UCS) |
CD00 | FLEX cold start entry address |
CD03 | FLEX warm start entry address |
FLEX FMS VARIABLE SYSTEM MEMORY MAP
- $D409-$D40A FCB Base Pointer
-
These locations contain the address of the
FCB
List Pointer bytes of the first
FCB in the chain of open files. The address in these locations is managed by
FMS
and the programmer should not store any values in these locations. A user
program may, however, want to chain through the FCBs of the open files for
some reason, and the address stored in these locations is the proper starting
point. Remember that the address is that of the FCB List Pointer locations
in the FCB, not the first word of the FCB. A value of zero in these locations
indicates that there are no open files.
- $D40B-$D40C Current FCB Address
-
These locations contain the address of the last FCB processed by the File
Management System. The address is that of the first word of the FCB.
- $D435 Verify Flag
-
A non-zero value in this location indicates that FMS will check each sector
written for errors immediately after writing it. A zero value indicates that
no error checking on writes is to be performed. The default value is
"non-zero". Flexemu does not support this feature.
FLEX DOS VARIABLE SYSTEM MEMORY MAP
- Line Buffer $C080-$C0FF (LINBUF)
-
The line buffer is a 128 byte area into which characters typed at the keyboard
are placed by the routine
INBUFF
. All characters entered from the keyboard are
placed in this buffer with the exception of control characters. Characters
which have been deleted by entering the backspace character do not appear in
the buffer, nor does the backspace character itself appear. The carriage
return signaling the end of the keyboard input is, however, put in the buffer.
This buffer is also used to hold the
STARTUP file during a cold start (boot)
operation.
- TTYSET Backspace Character $CC00 (TTYBS)
-
This is the character which the routine
INBUFF
will interpret as the
Backspace character. It is user definable through the
TTYSET DOS Utility.
Default = $08, a Ctrl-H (ASCII BS).
- TTYSET Delete $CC01 (TTYDEL)
-
This is the character which the routine
INBUFF
will interpret as the line
cancel or Delete character. It is user definable through the
TTYSET DOS Utility.
Default = $18, Ctrl-X (ASCII CAN).
- TTYSET End of Line Character $CC02 (TTYEOL)
-
This is the character DOS recognizes as the multiple command per line
separator. It is user definable through the
TTYSET DOS Utility.
Default=$3A,
a colon (:).
- TTYSET Depth Count $CC03 (TTYDPT)
-
This byte determines how many lines DOS will print on a page before Pausing
or issuing Ejects. It may be set by the user with the
TTYSET DOS Utility
command.
Default=0.
- TTYSET Width Count $CC04 (TTYWDT)
-
This byte tells DOS how many characters to output on each line. If zero,
there is no limit to the number output. This count may be set by the user
using
TTYSET DOS Utility.
Default=0.
- TTYSET Null Count $CC05 (TTYNUL)
-
This byte informs DOS if the number of null or pad characters to be
output after each carriage return, line feed pair. This count maybe
set using TTYSET DOS Utility.
Default=4.
- TTYSET Tab Character $CC06 (TTYTAB)
-
This byte defines a tab character which may be used by other
programs, such as the Editor. DOS itself does not make use of the
Tab character. Default=0, no tab character defined.
- TTYSET Backspace Echo Character $CC07 (TTYBSE)
-
This is the character the routine
INBUFF
will echo upon the receipt
of a backspace character. If the backspace echo character is set
to a $08, and the backspace character is also a $08, FLEX will
output a space ($20) prior to the outputting of the backspace echo
character. Default=0.
- TTYSET Eject Count $CC08 (TTYEJ)
-
The Eject Count instructs DOS as to the number of blank lines to be
output after each page. (A page is a set of lines equal in number
to the Depth count). If this byte is zero, no Eject lines are
output. Default=0.
- TTYSET Pause Control $CC09 (TTYPAU)
-
The Pause byte instructs DOS what action to take after each page is
output. A zero value indicates that the pause feature is enabled;
a non-zero value, pause is disabled. Default=$FF, pause disabled.
- TTYSET Escape Character $CC0A (TTYESC)
-
The Escape character causes DOS to pause after an output line.
Default=$1B, ASCII ESC.
TTYSET DOS Utility.
- System Drive Number $CC0B (SYSDRV)
-
This is the number of the disk drive from which commands are
loaded. If this byte is $FF, both drives 0 and 1 will be searched.
Default= drive #0.
- Working Drive Number $CC0C (WRKDRV)
-
This is the number of the default disk drive referenced for
non-command files. If this byte is $FF, both drives 0 and 1 will
be searched. Default= drive #0.
- System Scratch $CC0D
- System Date Registers $CC0E - $CC10 (SYSDAT)
-
These three bytes are used to store the system date. It is stored
in binary form with the month in the first byte, followed by the
day, then the year. The year byte contains only the tens and ones
digits.
- Last Terminator $CC11 (TTYTRM)
-
This location contains the most recent non-alphanumeric character encountered
in processing the line buffer. See
NXTCH
and
CLASS
for details.
- User Command Table Address $CC12-$CC13 (COMTBL)
-
The programmer may store into these locations the address of a command table
of his own construction. See the section called
"User-Written commands" for
details. Default=0000, no user command table is defined.
- Line Buffer Pointer $CC14-$CC15 (LINBFP)
-
These locations contain the address of the next character in the Line Buffer
to be precessed. See
INBUFF,
NXTCH,
GETFIL,
GETCHR and
DOCMND
for instances of its use.
- Escape Return Register $CC16-$CC17 (ESCRET)
-
These locations contain the address to which to jump if a RETURN is typed
while output has been stopped by an Escape Character. See
TTYSET utility
for information on Escape processing. See
PCRLF
for details.
- Current Character $CC18 (LINCHR)
-
This location contains the most recent character taken from the Line Buffer
by the
NXTCH
routine. See
NXTCH
for details.
- Previous Character $CC19 (LINPCH)
-
This location contains the previous character taken from the Line Buffer
by the
NXTCH
routine. See
NXTCH
for details.
- Current Line Number $CC1A (LINENR)
-
This location contains a count of the number of lines currently on the page.
This value is compared to the Line Count value to determine if a full page
has been printed.
- Loader Address Offset $CC1B-$CC1C (LODOFS)
-
These locations contain the 16-bit bias to be added to the load address of a
routine being loaded from the disk. See
System Routine LOAD
for details. These locations are also used as scratch by some system
routines.
- Transfer Flag $CC1D (TFRFLG)
-
After a program has been loaded from the disk (see
System Routine LOAD
), this
location is non-zero if a transfer address was found during the loading
process. This location is also used as scratch by some system routines.
- Transfer Address $CC1E-$CC1F (TFRADR)
-
If the Transfer Flag was set non-zero by a load from the disk (see
System Routine LOAD
), these locations contain the last transfer address encountered.
If the Transfer Flag was set zero by the disk load, the content of these
locations is indeterminate.
- Error Type $CC20 (FMSERR)
-
This location contains the error number returned by several of the File
Management System functions. See
FLEX Error Messages
for an interpretation of the
error numbers.
- Special I/O Flag $CC21 (IOFLG)
-
If this byte is non-zero, the
PUTCHR
routine will ignore the
TTYSET
Width
feature and also ignore the Escape Character. The routine
RSTRIO
clears
this byte. Default=0.
- Output Switch $CC22 (OUTSWT)
-
If zero, output performed by the
PUTCHR
routine is through the routine
OUTCH
. If non-zero, the routine
OUTCH2
is used. See
OUTCH
and
OUTCH2
for details.
- Input Switch $CC23 (INSWT)
-
If zero, input performed by
is through the routine INCH. If it is
GETCHR
non-zero, the routine
INCH2
is used. See
INCH
and
INCH2
for detail.
- File Output Address $CC24-$CC25 (FOPADR)
-
These bytes contain the address of the File Control Block being used for
file output. If the bytes are zero, no file output is performed. See
PUTCHR
for details. These locations are reset by
RSTRIO
.
- File Input Address $CC26-$CC27 (FIPADR)
-
These bytes contain the address of the File Control Block being used for
file input. If the bytes are zero, no file input is performed. The routine
RSTRIO
clears these bytes. See
GETCHR
for details.
- Command Flag $CC28 (COMFLG)
-
This location is non-zero if DOS was called from a user program via the
DOCMND
entry point. See
DOCMND
for details.
- Current Output Column $CC29 (OUTCOL)
-
This location contains a count of the number of characters currently in the
line being output to the terminal. This is compared to the
TTYSET Width Count
to determine when to start a new line. The output of a control character
resets this count to zero.
- System Scratch $CC2A (SCRATC)
- Memory End $CC2B-$CC2C (MEMEND)
-
These two bytes contain the end of user memory. This location is set during
system boot and may be read by programs requiring this information.
- Error Name Vector $CC2D-$CC2E (ERRVEC)
-
If these bytes are zero, the
routine RPTERR
will use the file ERRORS.SYS as
the error file. If they are non-zero, they are assumed to be the address of
an ASCII string of characters (in directory format) of the name of the file
to be used as the error file. See
RPTERR
for details.
- File Input Echo Flag $CC2F (INECHO)
-
If this byte is non-zero (default) and input is being done through a file,
the character input will be echoed to the output channel. If this byte is
zero, the character retrieved will not be echoed.
- System Scratch $CC30-CC4D
- System Constants $CC4E-CCBF
- Printer Initialize $CCC0-$CCD7 (PRTINI)
-
This area is reserved for the overlay of the system printer initialization
subroutines.
- Printer Ready Check $CCD8-$CCE7 (PRTCHK)
-
This area is reserved for the overlay of the system "check for printer ready"
subroutine.
- Printer Output $CCE4-$CCF7 (PRTOUT)
-
This area is reserved for the overlay of the system printer output character
routine. See Printer Routine descriptions for details.
SEE ALSO
Documents on the behalf of the FLEX User Group
Other Documents
Related Links