# User exits

User exits allow direct references to assembler routines
known as modes. These are generally not needed for new applications
and are provided primarily for backwards compatibility and specialty
utilities that must access internal structures.

The `u*number*` syntax
is the standard way to call pre-defined user exits. The number is
a 4-digit hexadecimal number. Leading zeros can be omitted.

Users with assembly accounts can also enter their code via user exits.
The standard way to do this is with the `u$*mode.name*` syntax that jumps directly into the mode called mode.name. Every user exit call of this type requires
an ABS lookup.

The user can initially use the `u?*mode.name*` syntax and store the result in a FlashBASIC
variable. This does not execute the user exit, but returns a direct
pointer to its location. After this, the mode can be repeatedly called
by using that variables value as the conversion. This is much faster
than the `u?*mode.name*` syntax because
no further ABS lookups are needed. If the `u?*mode.name*` call returns a null, then the mode cannot be located.

A numeric user exit that is not found in the user exit table is
converted to a FlashBASIC call to a subroutine named u followed by the number (for example, u123). If
the system(0) function is executed at the beginning
of this subroutine, it returns a 1 for an iconv() call or a 0 for an oconv() call.

## Syntax

```
u number
u$ mode.name
u? mode.name
```
Warning: User exits are dangerous. Extreme caution
is advised when using them. They can cause the application to run
slower than if it was coded entirely in FlashBASIC.

## See also

- [iconv() function](https://d3codex.com/pickbasic-flashbasic/iconv-function/)
- [oconv() function](https://d3codex.com/pickbasic-flashbasic/oconv-function/)
- [PROC processor user exits](https://d3codex.com/proc/proc-processor-user-exits/)
- [system() function](https://d3codex.com/pickbasic-flashbasic/system-function/)
- [u005b user exit](https://d3codex.com/pickbasic-flashbasic/u005b-user-exit/)
- [u017e user exit](https://d3codex.com/pickbasic-flashbasic/u017e-user-exit/)
- [u8193 user exit](https://d3codex.com/proc/u8193-user-exit/)
- [AQL user exits](https://d3codex.com/access/aql-user-exits/)

---
Source: https://d3codex.com/definitions/user-exits/ - part of the D3Codex reference.
