# File

<figure><img src="/files/j4sKTpyCnKdBXjGS3yqR" alt=""><figcaption></figcaption></figure>

The main types of files you will be dealing with are likely:

1. Patch Files - individual algorithms saved as .spcd.
2. Bank files - groups of 8 algorithms saved as .spbk

So, you have the standard new, open, save and save as functions for both of those.

You can add "information" to both patches and banks.  "Untitled" will be shown on the top line until you save the file.

<figure><img src="/files/EiMKuK3jNxSAKRoQBkZF" alt=""><figcaption></figcaption></figure>

**Open Hex** allows you to read the first program from a HEX file into a patch slot in SpinCAD.  It does not show anything in the display as there is nothing to edit.  If you wish to load something other than the first program in the HEX file, you will have to edit it to remove the lines prior to the program you wish loaded into the patch slot.

Next there are a couple functions which help transfer patches to the Spin IDE.

1. **Save as ASM** saves the current patch's ASM to a .spn file.  This is a one-way process as it is not possible to open .spn files in SpinCAD Designer.
2. **Copy ASM to Clipboard** copies the current patch's ASM to the clipboard.  Now you can paste it into the Spin IDE or a text editor.

Finally, we can export the entire bank, either to a HEX file for EEPROM programming, or to a Spin Project (1 .spj plus 8 .spn files).  Note that when you "Export to Spin Project", you have to have saved all of the patches using "Save Patch" first.  The same file name is then used for the generated .spn files as part of the project.

The code which implements these functions can be found below.

{% embed url="<https://github.com/HolyCityAudio/SpinCAD-Designer/blob/master/src/com/holycityaudio/SpinCAD/SpinCADFile.java>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://holy-city-audio.gitbook.io/spincad-designer/menus/file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
