.. index:: Unicode;UTF-8

Source files and file extensions
================================

Common to all text source files are that they are expected to be in
UTF-8, which is backwards compatible with the ASCII character set. For
non-ASCII characters, UTF-8 uses multibyte sequences with the
highest bit set (which is unused in ASCII). Thus, it is possible to
type a character such as Σ or μ [#UTF]_ which are not present in
ASCII. See :ref:`sec-unicode` for available special characters.

Unfortunately the HP-41 character set uses some very special
characters, known as the hangman characters that is not available in
UTF-8. If you want to use such characters, you will need to resort to
using numeric constants or hex escape sequences, as they cannot be
typed.

.. rubric:: Footnotes
.. [#UTF] When such character is used in a character or string
          literal, it will be translated to the corresponding HP-41
          character, or LCD character depending on the
          context. Unicode characters can also be used in back
          quoted symbols.

.. index:: file;extensions

File extensions
---------------

The following table lists file extensions used with the tools.

.. index:: list files, file extensions

.. table:: File extensions
 :widths: 1 3
 :column-dividers: none single none
 :column-alignment: right left

 +----------------+--------------------------+
 |Extension       |Purpose                   |
 +================+==========================+
 | ``.s``         | Assembler source         |
 +----------------+--------------------------+
 | ``.o``         | Object file              |
 +----------------+--------------------------+
 | ``.a``         | Library (collection of   |
 |                | object files)            |
 +----------------+--------------------------+
 |``.lst``        |List file                 |
 +----------------+--------------------------+
 |``.scm``        |Linker rules file         |
 +----------------+--------------------------+
 | ``.moddesc``   | Module description (XML) |
 +----------------+--------------------------+
 | ``.modexport`` | Module exports (XML)     |
 +----------------+--------------------------+
 | ``.mod``       | HP-41 module format      |
 |                | (binary output), packed  |
 |                | 10-bit word              |
 |                | representation           |
 +----------------+--------------------------+
 | ``.mod2``      | HP-41 module format      |
 |                | (binary output), 16-bit  |
 |                | words representation for |
 |                | NEWT                     |
 +----------------+--------------------------+
 | ``.elf``       | HP-41 ELF output         |
 |                | (binary output)          |
 +----------------+--------------------------+
 | ``.rom``       | Module page as raw data  |
 |                | (16-bit words)           |
 +----------------+--------------------------+
 | ``.raw``       | RPN binary images (raw   |
 |                | bytes)                   |
 +----------------+--------------------------+
 |``.rpn``        |RPN source program        |
 +----------------+--------------------------+
