AppleIIAsm-Collection/documentation/AppleIIAsm Library Collection Technical Manual/0.6.1/8.0 Quick_Reference_D3_MAC.ARRAYS.md
Nathan D Riggs c28c9d87da Disk 1: REQUIRED disk and documentation
Cleaned up disk one documentation, both inline and in the manual
2021-06-06 21:50:54 -04:00

80 lines
4.7 KiB
Markdown

## Disk 3 Macros: The Array Collection
Disk 3: ARRAYS contains four macro files that have the same kinds of macros for different kinds of arrays; that is, each macro file is dedicated to an array of 8-bits or 16-bits and one or two dimensions, and contains the functionality to initialize an array, get data from it and put data into it. The are as follows:
- [MAC.ARR8B1D.ASM](#mac.arr8b1d.asm)
- This packages contains `DIM`, `GET` and `PUT` macros for eight-bit, one-dimensional arrays.
- [MAC.ARR8B2D.ASM](#mac.arr8b2d.asm)
- This packages contains `DIM`, `GET` and `PUT` macros for eight-bit, two-dimensional arrays.
- [MAC.ARR16B1D.ASM](#mac.arr16b1d.asm)
- This packages contains `DIM`, `GET` and `PUT` macros for sixteen-bit, one-dimensional arrays.
- [MAC.ARR16B2S.ASM](#mac.arr16b2d.asm)
- This packages contains `DIM`, `GET` and `PUT` macros for sixteen-bit, two-dimensional arrays.
### MAC.ARR8B1D.ASM
| MACRO | DEPENDENCY | PARAMETERS | ACTION | DESTROYS | CYCLES | BYTES |
| ------- | ---------- | ------------------------------------------------------------ | ------------------------------------------------- | -------- | ------ | ----- |
| `DIM81` | `ADIM81` | ]1 = Array addr <br>]2 = # of elements <br>]3 = element size <br>]4 = fill value | Initialize a 1D, 8-bit array | NZCV | 234+ | 146 |
| `GET81` | `AGET81` | ]1 = Array addr <br>]2 = Element Index | Get a value from an element in a 1D, 8-bit array. | NZCV | 193+ | 125 |
| `PUT81` | `APUT81` | ]1 = Source addr <br>]2 = Array addr <br>]3 = Element Index | Put a value into an element in a 1D, 8-bit array. | NZCV | 216+ | 131 |
---
### MAC.ARR8B2D.ASM
| MACRO | DEPENDENCY | PARAMETERS | ACTION | DESTROYS | CYCLES | BYTES |
| ------- | ---------- | ------------------------------------------------------------ | ------------------------------------------------- | -------- | ------ | ----- |
| `DIM82` | `ADIM82` | ]1 = Array addr <br>]2 = 1st dimension length <br>]3 = 2nd dimension length <br>]4 = fill value | Initialize a 2D, 8-bit array | NZCV | 355+ | 228 |
| `GET82` | `AGET82` | ]1 = Array addr <br>]2 = 1st Dimension Index <br>]3 = 2nd Dimension Index | Get a value from an element in a 2D, 8-bit array. | NZCV | 340+ | 255 |
| `PUT82` | `APUT82` | ]1 = Source addr <br>]2 = Destination addr <br>]3 = 1st Dimension Index <br>4] = 2nd Dimension Index | Put a value into an element in a 2D, 8-bit array. | NZCV | 352+ | 223 |
---
### MAC.ARR16B1D.ASM
| MACRO | DEPENDENCY | PARAMETERS | ACTION | DESTROYS | CYCLES | BYTES |
| -------- | ---------- | ------------------------------------------------------------ | -------------------------------------------------- | -------- | ------ | ----- |
| `DIM161` | `ADIM161` | ]1 = Array Addr <br>]2 = # of elements <br>]3 = Element length <br>]4 = Fill Value | Initialize a 1D, 16-bit array | NZCV | 271+ | 165 |
| `GET161` | `AGET161` | ]1 = Array addr <br>]2 = Element Index | Get a value from an element in a 1D, 16-bit array. | NZCV | 223+ | 130 |
| `PUT161` | `APUT161` | ]1 = Source addr <br>]2 = Array addr <br>]3 = Element index | Put a value into an element in a 1D, 16-bit array. | NZCV | 238+ | 148 |
----
### MAC.ARR16B2D.ASM
| MACRO | DEPENDENCY | PARAMETERS | ACTION | DESTROYS | CYCLES | BYTES |
| -------- | ---------- | ------------------------------------------------------------ | -------------------------------------------------- | -------- | ------ | ----- |
| `DIM162` | `ADIM162` | ]1 = Array Address<br />]2 = First Dimension Element Count<br />]3 = Second Dimension Element Count<br />]4 = Byte size of Elements<br />]5 = Default Fill Value | Initialize a 2D, 16-bit array | NZCV | 464+ | 373 |
| `GET162` | `AGET162` | ]1 = Array Address<br />]2 = First Dimension Element Address<br />]3 = Second Dimension Element Address | Get a value from an element in a 2D, 16-bit array. | NZCV | 436+ | 263 |
| `PUT162` | `APUT162` | ]1 = Source Address<br />]2 = Destination Array Address<br />]3 = First Dimension Element Address<br />]4 = Second Dimension Element Address | Put a value into an element in a 2D, 16-bit array. | NZCV | 352+ | 223 |
---
[Return to Table of Contents](0.0%20Title_to_TOC)