# Foundation Library Sample Demo

## Location

`$TwlSystem/build/demos/fnd`

## Compilation

Move to the `$TwlSystem/build/demos/fnd` directory and run:

> `% make`

Compiling begins, and the SRL executable file and the NEF or TEF files with the binary information are generated in:

> `$TwlSystem/build/demos/fnd/(sample_name)/bin/(platform)/(target)/`

For example:

> `$TwlSystem/build/demos/fnd/archive/bin/ARM9-TS.HYB/Release/`

The executable file of the release version for the NITRO/TWL hybrid of the `archive` demo is generated in the path described above.

## Execution

Move to `$TwlSystem/build/demos/fnd/(sample_name)/bin/(platform)/(target)/`. Depending on the type of the built ROM, one of the following methods is used for execution.

### For NITRO ROMs

When using the Ensata emulator:

- Execute the NEF and SRL files with `ensata`.

When using IS-NITRO-DEBUGGER:

- Load and execute an NLF file with IS-NITRO-DEBUGGER.
- Execute an SRL file with IS-NITRO-DEBUGGER.
- Execute an SRL file with IS-NITRO-DEBUGGER using the `loadrun.exe` tool from a command line.

When using IS-TWL-DEBUGGER:

- Load and execute an NLF file with IS-TWL-DEBUGGER.
- Execute an SRL file with IS-TWL-DEBUGGER.
- Execute an SRL file with IS-TWL-DEBUGGER using the `loadrun.TWL.exe` tool from a command line.

### For TWL/NITRO Hybrid ROMs

When using IS-NITRO-DEBUGGER:

- Execute an SRL file with IS-NITRO-DEBUGGER.
- Execute an SRL file with IS-NITRO-DEBUGGER using the `loadrun.exe` tool from a command line.

When using IS-TWL-DEBUGGER:

- Load and execute a TLF file with IS-TWL-DEBUGGER.
- Execute an SRL file with IS-TWL-DEBUGGER.
- Execute an SRL file with IS-TWL-DEBUGGER using the `loadrun.TWL.exe` tool from a command line.

### For TWL Limited ROMs

When using IS-TWL-DEBUGGER:

- Load and execute a TLF file with IS-TWL-DEBUGGER.
- Execute an SRL file with IS-TWL-DEBUGGER.
- Execute an SRL file with IS-TWL-DEBUGGER using the `loadrun.TWL.exe` tool from a command line.

## Description

`archive` | Reads in the BG data from the archive and displays it on the screen.
`archive2` | Reads in the BG data from the compressed archive and displays it on the screen.
`heap` | Shows simple uses for expanded, frame, and unit heaps. Nothing will be displayed on the screen, but the heap status will be displayed in the debug output.

## Operating Environment

Normal operation for all of the samples using IS-TWL-DEBUGGER, IS-NITRO-EMULATOR, and Ensata has been confirmed.

## See Also

Fnd Function List

## Revision History

2008/06/20 Updated compile method and execution method for TWL.
2005/01/21 Deleted the description of IS-NITRO-EMULATOR in Execution, deleted the description of TEG in Operating Environment, and changed TS to IS-NITRO-EMULATOR. 2004/08/02 Initial version.

CONFIDENTIAL