Compare commits

...

89 Commits

Author SHA1 Message Date
Nathan D Riggs
3577df3db7
Update README.md 2022-08-02 11:19:14 -04:00
Nathan D Riggs
125e9d0f67
Update README.md 2022-06-15 22:35:04 -04:00
Nathan D Riggs
26869199a1
Update README.md 2022-06-15 22:33:20 -04:00
Nathan D Riggs
14160cfb3e
Update README.md 2021-06-15 21:35:24 -04:00
Nathan D Riggs
7c98435eaa Updated Disks 1-4
- Fixed Bressenham algorithm on STDIO disk
- updated internal documentation
- added signed math routines
- added if/then macros to REQUIRED
2021-06-15 21:33:08 -04:00
Nathan D Riggs
3f1dbca0ad Merge branch 'master' of https://github.com/nathanriggs/AppleIIAsm-Collection 2021-06-06 21:51:01 -04:00
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
Nathan D Riggs
06cba46b2b
Update README.md 2021-06-06 17:09:52 -04:00
Nathan D Riggs
0eb5845a99
Update README.md 2021-06-05 21:46:25 -04:00
Nathan D Riggs
b147ce8ca3
Update README.md 2021-06-05 21:46:08 -04:00
Nathan D Riggs
747aeeb812 updated source files 2021-06-05 21:40:51 -04:00
Nathan D Riggs
b12e67bd4f Merge branch 'master' of https://github.com/nathanriggs/AppleIIAsm-Collection 2021-06-05 21:31:40 -04:00
Nathan D Riggs
9c7f3cc39b v6.0.1: updated required collection
- removed unnecessary subroutines and macros
- renamed zero page locations for less confusing access
- have *not* updated the documentation to reflect this
2021-06-05 21:31:35 -04:00
Nathan D Riggs
3d6c15c75d
Update README.md 2021-06-03 23:19:00 -04:00
Nathan D Riggs
18b2b5df62 Create AppleIIAsmLib_0.6.0.zip
Added archive of version 0.6.0
2021-06-03 23:13:15 -04:00
Nathan D Riggs
8a50f3ff50 Added Extracted Source Code
Additionally, reorganized disks
2021-06-03 22:58:21 -04:00
Nathan D Riggs
df76400758 Disk #10: The Internal Speaker
Added macros and subroutines to Disk 10, as well as updated the documentation appropriately.
2021-06-03 22:30:54 -04:00
Nathan D Riggs
c968f205fc Update 0.0 Title_to_TOC.md 2021-06-01 17:36:25 -04:00
Nathan D Riggs
64dff10dea Added HiRes Collection Documentation 2021-06-01 17:26:57 -04:00
Nathan D Riggs
00ed4c7146 preliminary update
This is a preliminary update to all disks in the library, along with documentation up to the hires collection. This is simply to make sure the library is backed up; the complete rewrite of the library will be coming after the speaker routines are finished along with the rest of the documentation.
2021-05-31 18:27:42 -04:00
nathanriggs
9f8c6c88f5 reupdate
fixed incorrect directory sync
2020-10-01 17:50:51 -04:00
nathanriggs
3c0cd46cf1 misc 2020-10-01 17:24:42 -04:00
Nathan D Riggs
4cb84d606a
Update 5.0 Quick_Reference_TOC.md 2020-01-19 16:03:09 -05:00
Nathan D Riggs
60e0148b4a
Update 5.0 Quick_Reference_TOC.md
fixed links
2020-01-19 16:02:05 -05:00
Nathan D Riggs
bb7c971006
Update 0.0 Title to TOC.md
fixed links
2020-01-19 15:59:54 -05:00
Nathan D Riggs
6d984b6f60
Update README.md 2020-01-19 15:58:23 -05:00
Nathan D Riggs
fa169a2d73
Update README.md 2020-01-19 15:49:37 -05:00
Nathan D Riggs
e5b526d4f1
Create README.md 2020-01-19 15:48:38 -05:00
Nathan D Riggs
f2866b4bdb
Update README.md 2020-01-19 15:44:53 -05:00
nathanriggs
4554eaf2ae MASSIVE: Documentation and Disk 1: REQUIRED
- added cycle and byte count comments
- additionally added status flag clobbering comments
- wrote beginning of final documentation form in markdown for disk 1: REQUIRED
- consolidated macros and subroutines on disk 1
- created alias macros for 65C02, 8080, and Z80 architectures
- entirely rewrote and expanded documentation for disk 1
- rewrote disk 1 demo file to use fewer bytes by using comments instead of _PRN statements
- implemented a software architeture that will span across all libraries in the collection
- added .ASM extension to text sources to help with file attribution on contemporary systems
- slightly modified the naming convention for EXEC files
- fixed minor errors
2020-01-19 15:31:10 -05:00
nathanriggs
5df0d19f48 misc 2019-12-27 12:55:01 -06:00
nathanriggs
aa78270a53 Update d01_required.dsk 2019-12-17 20:11:08 -05:00
nathanriggs
3d30eda66d some renaming 2019-12-17 19:48:43 -05:00
Nathan D Riggs
95ff0023fd
Update README.md 2019-12-17 19:45:18 -05:00
Nathan D Riggs
f167e3a63f
Update README.md 2019-12-17 19:21:26 -05:00
Nathan D Riggs
fdf5d0e41c
Update README.md 2019-12-17 19:20:13 -05:00
Nathan D Riggs
c4f4480254
Update README.md 2019-12-17 19:18:17 -05:00
Nathan D Riggs
61b6de1c28
Update README.md 2019-12-17 19:17:53 -05:00
Nathan D Riggs
d6f39add32
Create README.md 2019-12-17 19:12:49 -05:00
Nathan D Riggs
8ed1048b0b
Create README.md 2019-12-17 19:10:29 -05:00
Nathan D Riggs
2367fa66d5
Create README.md 2019-12-17 19:07:56 -05:00
Nathan D Riggs
0d191b628c
Update 0_3_Table_of_Contents_GH.md 2019-12-17 19:02:05 -05:00
Nathan D Riggs
f926e53d13
Update 0_3_Table_of_Contents_GH.md 2019-12-17 18:58:55 -05:00
nathanriggs
35947c956f Merge branch 'master' of https://github.com/nathanriggs/AppleIIAsmLib 2019-12-17 18:56:46 -05:00
nathanriggs
2143c334ab Housekeeping
Sorry for the cimmit spamming, renaming files
2019-12-17 18:56:36 -05:00
Nathan D Riggs
375ee5d678
Update README.md 2019-12-17 17:41:23 -05:00
Nathan D Riggs
a56c640f3c
Update README.md 2019-12-17 17:39:35 -05:00
Nathan D Riggs
cc089d3230
Update README.md 2019-12-17 17:38:53 -05:00
nathanriggs
354bfc1aaf housekeeping 2019-12-17 17:35:58 -05:00
Nathan D Riggs
26e2125229
Update README.md 2019-12-17 17:35:15 -05:00
nathanriggs
198b09da4a housekeeping 2019-12-17 17:34:06 -05:00
Nathan D Riggs
2149fb878a
Update README.md 2019-12-17 17:31:56 -05:00
Nathan D Riggs
bf7251b70b
Update README.md 2019-12-17 17:29:14 -05:00
nathanriggs
9b12b6fd9b HOUSEKEEPING
- getting ready for major changes for 0.6.0.
- be sure to download the 0.5.0 release to ensure proper functionality, as these rountines will not work together in the SRC or BIN folder during the transition
- Beginning to significantly alter documentation
2019-12-17 17:19:24 -05:00
Nathan D Riggs
e5b97fb95b
Update .gitattributes 2019-12-17 13:56:36 -05:00
Nathan D Riggs
1a17e5e553
Create .gitattributes 2019-12-17 13:49:56 -05:00
Nathan D Riggs
6b36c79820 i don't know 2019-12-14 01:30:56 -05:00
Nathan D Riggs
28f326da87 creating madoko version of documentation 2019-11-15 15:57:30 -05:00
nathanriggs
2f1c4e9a36 Merge branch 'master' of https://github.com/nathanriggs/AppleIIAsmLib 2019-11-02 04:27:50 -04:00
nathanriggs
d2c4fd2812 Updates 0.5.1
Added lores subroutines and macros, as well as most of the documentation for it. You will not find documentation for the library yet in the quick reference area.

At this point, it is likely that I will be going back to revisit older disks in order to do more optimization, make some strategic file name changes, and add extra subroutines/macros to each library. More content will be added to the documentation as well in order to accomodate multiple audiences.

After that, we will be moving to version 0.6.0, at which point the speaker library and the hires library will be added.
2019-11-02 04:27:42 -04:00
Nathan D Riggs
e098d42f8c
Update README.md 2019-09-27 17:07:43 -04:00
nathanriggs
9f35f32f67 Revision 0.5.0
- massive overhaul of architecture
- first round of optimizations
- first draft of the technical manual for the entire library
- reorganization of directory structure
2019-09-27 16:57:34 -04:00
Nathan D Riggs
34b6a34753
Update README.md 2019-05-04 15:48:33 -04:00
Nathan D Riggs
c08904a15c
Update README.md 2019-05-03 00:46:54 -04:00
Nathan D Riggs
7ee2ce658d
Update README.md 2019-05-02 22:48:45 -04:00
Nathan D Riggs
41a1bc5c8a
Update README.md 2019-05-01 23:41:19 -04:00
Nathan D Riggs
e9741dddcc
Update README.md 2019-05-01 23:34:50 -04:00
Nathan D Riggs
f1c490babe
Update README.md 2019-05-01 22:03:57 -04:00
Nathan D Riggs
70b79ee7fb
Update README.md 2019-05-01 20:51:13 -04:00
Nathan D Riggs
73c09ba072
Update README.md 2019-05-01 20:36:35 -04:00
Nathan D Riggs
c0207db5fb
Update README.md 2019-05-01 16:45:17 -04:00
Nathan D Riggs
8bff03156d
Update README.md 2019-05-01 13:52:24 -04:00
Nathan D Riggs
f24b2731de
Update README.md 2019-05-01 13:07:35 -04:00
Nathan D Riggs
2db052405d
Update README.md 2019-05-01 13:01:50 -04:00
Nathan D Riggs
29a2f6a12e
Update README.md 2019-05-01 13:01:05 -04:00
Nathan D Riggs
4a2d79427f
Update README.md 2019-05-01 12:44:13 -04:00
Nathan D Riggs
41951b5a96
Update README.md
added more resources
2019-05-01 10:03:31 -04:00
Nathan D Riggs
afdb2aaa5c
Update README.md 2019-04-30 21:01:00 -04:00
Nathan D Riggs
0e3aa735da
Update README.md 2019-04-30 20:56:46 -04:00
Nathan D Riggs
fbffdc0977
Update README.md 2019-04-30 20:55:04 -04:00
Nathan D Riggs
fdb28556bc
Update README.md 2019-04-30 20:49:29 -04:00
Nathan D Riggs
ae0daa47d5
Update README.md 2019-04-30 20:35:12 -04:00
Nathan D Riggs
aa4c87c89a
Update README.md 2019-04-30 20:34:14 -04:00
Nathan D Riggs
48f1753048
Update README.md 2019-04-30 20:22:29 -04:00
Nathan D Riggs
225d69615c
Update README.md 2019-04-30 20:21:26 -04:00
Nathan D Riggs
999be76d61
Update README.md 2019-04-30 20:14:19 -04:00
nathanriggs
1440783a46 Merge branch 'master' of https://github.com/nathanriggs/AppleIIAsmLib 2019-04-26 18:49:23 -04:00
nathanriggs
c8cac53c5e Rev 0.4 updates
Massive updates that changes the way most subroutines are handled. Major bugfixes, various utilities added, started higher-level libraries.
2019-04-26 18:49:10 -04:00
Nathan D Riggs
182cab7822
Update README.md 2019-04-07 15:32:53 -04:00
561 changed files with 55385 additions and 73002 deletions

5
.gitattributes vendored Normal file
View File

@ -0,0 +1,5 @@
# Example of a `.gitattributes` file which reclassifies `.rb` files as Java:
T.* linguist-language=Assembly
# Replace any whitespace in the language name with hyphens:
#*.glyphs linguist-language=OpenStep-Property-List

648
README.md
View File

@ -1,622 +1,76 @@
# AppleIIAsmLib
A general purpose ASM libriary for the Apple II. Assembled in Merlin 8 Pro.
A general purpose ASM libriary for the Apple II. Assembled in Merlin 8 Pro. While this source is currently in constant flux, save for "stable" releases, [you may find the project's current technical documentation, v0.6.1 here](https://github.com/nathanriggs/AppleIIAsm-Collection/tree/master/documentation/AppleIIAsm%20Library%20Collection%20Technical%20Manual/0.6.1).
---
## ATTENTION
This documentation currently reflects version 0.3.1 only.
Since this is in flux, you may also find [the previous documentation,v0.5.0, here](https://github.com/nathanriggs/AppleIIAsm-Collection/blob/master/documentation/AppleIIAsm%20Library%20Collection%20Technical%20Manual/0.5.0/AppleIIAsm%20Manual%20v0.5.0.pdf). Note that this documentation is in .pdf format.
# Updates
__02-aug-2022__
I am currently in the process of redesigning how the entire library works, so updates on this won't be piecemeal again until that is finished; if not, the library as a whole would not work together until the updates are finished. A lot of the documentation is changing, and I'm additionally rewriting and optimizing a lot of code. Of particular note is that the next version of the library will not force you to use the RETURN memory location for passing back data from subroutines, and switching every case of passing addresses via the registers to hold high bytes in .A instead of .X (to keep in line with standard practice of the day).
---
## Table of Contents
* [Introduction](#introduction)
* [FAQ](#faq)
* ~~The MERLIN Assembler: Quirks and Caveats~~
* ~~How to use this Documentation~~
* ~~How to Use the Library~~
* [Disk Overviews](#disk-overviews)
* [Disk 1: STDIO](#disk-1-stdio)
* [Disk 2: COMMON](#disk-2-common-required)
* [Disk 3: ARRAYS](#disk-3-arrays)
* [Disk 4: MATH](#disk-4-math)
* [Disk 5: STRINGS](#disk-5-strings)
* [Disk 6: FILEIO](#disk-6-fileio)
* ~~[Disk 7: CONVERSION]~~
* ~~[Disk 8: LORES]~~
* ~~[Disk 9: SOUND]~~
* ~~[Disk 10: 80COL]~~
* ~~[Disk 11: HIRES]~~
* ~~[Disk 12: DBLLORES]~~
* ~~[Disk 13: DBLHIRES]~~
* ~~[Disk 14: OTHERIO]~~
* [Disk 15: UTILITIES]
* [Disk 16: INTEGRATED DEMOS]
* [Disk 20: MINIFIED ROUTINES DISK A]
* [Future Disks](#future-disks)
* [Macro Subroutine Calls and Clobbers](#macro-subroutine-calls-and-clobbers)
* [Macro Usage Cheat Sheet](#macro-usage-cheat-sheet)
* ~~Detailed Descriptions: Macros~~
* ~~Detailed Descriptions: Subroutines~~
I don't have a 100% clear finish date, but the updates are substantial so don't expect anything within a couple of months. In the meantime, if you would like to contribute, please fork this instead of contributing here until the update is done.
---
## Introduction
__15-jun-2022__
This is a general purpose library in 6502 Assembly for the Apple II. I am learning both Git and Assembly for the first time as I create, update and maintain this, so expect some mishaps: wasted CPU cycles, weird documentation, accidental catastrophes, and so on. I am using Merlin 8 Pro (DOS 3.3) for this project, but this should be fairly easy to convert to other assemblers as well as other 6502-based systems.
Wow! It's been a year since any updates. Life happened. But I am currently working on v0.7.0 of the library. This will be incompatible with all past versions, but if you only used macros, and didn't call the subroutines yourself, the changes should be minimal. You should expect the first round of changes to update by the end of the month, which will mostly consist of rewritten required routines. Then, we'll resume the running TODO lists.
Ultimately, my aim is to create a large enough collection of routines to address any domain of development for the Apple II family in Assembly. I'll do my best to acknowledge when a routine is inspired by (or mostly copied from) another source, and will exclude them from the Apache License 2.0 when necessary; I hope to replace anything of this sort with original work as I learn. If you find your own source here, but would rather it not be here, please reach out to me and I'll remove it immediately.
__05-jun-2021__
---
## FAQ
_TODO FOR NEXT REVISION (v0.6.1)_
* [Why 6502/the Apple II? Wouldn't something newer be more...relevant?](#the-reason-for-6502-assembly)
* [Okay, but why a native Assembler, Merlin 8 Pro, instead of something like CC65?](#the-reason-for-native-assembly)
* [Why is ______ such a mess?](#the-reason-for-some-messiness)
* [Which versions of the Apple II is this compatible with?](#compatible-apple-2-systems)
* [What should I use these for?](#what-these-libraries-are-for)
* [What if I have a better solution/algorithm/subroutine?](#i-have-an-improvement)
- <s>add page flipping to stdio, which requires adding to each subroutine</s>
- fix 8-bit bresenham in <s>stdio and</s> lores
- <s>reorganize mac files on stdio</s>
- <s>delete pct,gcf,lcm in math collection</s>
- <s>add modulus subroutines/macros to math</s>
- add/fix memory catalog subroutine/macro in DOS
- change dos fmfil, etc. to be subroutines to decrease bytes
- fix 16bit bresenham in hires
- add bresenham circle routine to hires
- add rect, frect routines to hires
- <s>add signed macros to math collection</s>
- <s>add floating point examples to math collection, if room exists</s>
- revise all documentation to reflect changes (also previous changes)
---
## Answers
__05-JUN-2021__
### The Reason for 6502 Assembly
- Updated all required collection macros and subroutines on every disk
- Revised all subroutines and macros to fit with new zero page names
6502 Assembly is probably one of the most important and influential assembly language variants to have ever existed. Part of this is due to great timing: the 6502 CPU managed to become a processor cheap enough for the burgeoning minicomputer/home computer scene in the late 1970s and early 1980s while still providing a lot of elegance and power necessary for almost two decades of dominance. I have several personal reasons for deciding on 6502 assembly as a means to learn assembly in general:
__03-JUN-2021__
* There's a certain nostalgia factor in play, admittedly. I grew up typing BASIC and assembly programs from books and magazines into my Apple ][ computer at the age of 10 or so, and while I learned how BASIC worked pretty quickly through this process, Assembly was almost indecipherable for me at that age. Fast forward to 30 years later, and I'm the same kid entering in code found in books and magazines--or better yet, found in pdfs--but now I have the requisite knowledge to understand the assembly listings.
- Updated all disks as part of a small reorganization of the REQUIRED library collection
- Added High Resolution Graphics Disk
- Added Apple II Internal Speaker Disk
- Rewrote all documentation in markdown
* 6502 had a limited number of commands, making it ideal to learn just how low-level code works. I started out wanting to do this in order to better read low-level code for my own work in technical communication, and even something as simple as a "MUL" command carries with it a ton of unseen work behind it. To be a little more blunt: although most Assembly variants are closely related to the CPU architecture, 6502 stands out as only executing 1-4 machine code operations per command, making it ideal for sussing out exactly what is happening when, say, you multiply two integer values. Of course I could have just went into RISC systems, but the nostalgia factor probably weighed in heavily here.
__19-JAN-2020__
* The Apple ][ and its various incarnations constitute one of the most important developments in computing still today. While most of us are familiar with Apple today--even begrudgingly--it is hard to adequately describe the impact the Apple ][ had on the world, and on people personally, without somehow not doing it justice. It was monumental because it was simultaneously 1) cheap due to Wozniak's brilliant designs, and 2) approachable enough for a ten year-old to not have any problems getting used to, with many thanks to Steve Jobs. We are used to the latter now: anyone who has seen an infant interact with a smart phone knows how intuitive these things can be; but we've left a lot of the brilliant engineering behind. This isn't to say, of course, that the engineering behind a modern Mac isn't brilliant--it surely is!--it's simply that said brilliance isn't easily accessible to the end user, and it tends to make machines more expensive rather than less expensive.
- **Really** Finished all goals previously made on 17-DEC-2019, and then some
- Began reworking Disk 2: STDIO to conform to new software architecture and documentation
- next version will be 0.6.1, but no package will be created due to incompatibilities between libraries. From this point onward, releases will only be made if the entire collection is inter-compatible. The second digit will increase, and the third digit reset, in order to reflect compatible versus incomplatible current versions at this point. Later down the road, this version system will simply reflect major versus minor changes.
- updated base README.md to point toward documentation
* For a long time, I considered learning Assembly via ARM systems like the Raspberry Pi. The issue with newer products, however, is that Assembly is used for only niche projects, for the most part: low-level drivers, systems programming, and the like. Even then, C can usually be substituted for Assembly. Paradoxically then, at least for my purposes, learning 6502 Assembly actually has more use-value than learning modern variants, as I don't intend to become anything close to an expert on any particular architecture. I simply want to know _how things work_, and 6502 presents the best possibility to do so!
__17-DEC-2019__
### The Reason for Native Assembly
- Currently working on version 0.6.0, which includes:
- an updated architecture
- deliberate use of markdown for documentation
- with the eventual goal of translating it to Madoko, a markdown variant that allows for more visual control on a printend page
- Still transforming entire disk system to adhere to a singular software architecture.
- Added Alias macros for 8080 and z80 instruction sets.
- Major changes to Disk 1, including merger of REQUIRED and COMMON libraries
I have been aware of projects like CC65 for some time now, and in no way do I suggest using a native assembler over these, especially if you plan on doing cross-platform development. After I finish a decent version of these libraries, in fact, I plan on moving straight to CC65 for ease of portability in my "retro" projects. For me, there are simple reasons for choosing a native compiler, and these reasons won't be important for everyone:
* Given my research specialties, I need to know what it was like for the programmer "on the ground," and there is no way to understand this other than to do things the way that programmer did. I *will* use emulators from time to time for the sake of convenience, but I generally try to stay at the same execution speed that developers of the time experienced.
* Again, there's the nostalgia factor. I delight in remembering strange magical numbers like $300,-151, and so on while still remembering what they are for. There's a simple pleasure in knowing that what I learned at the age of ten, without even understanding it, has become useful now. You can't say that about much more you learn at that age.
* I own at least one variant of the hardware that Merlin 8 Pro runs on: an Apple //c. This makes it possible to check whether something works in emulation versus whether it works on real hardware fairly easy.
* There is a VAST network of Apple ][ enthusiasts still today--a community that has existed much longer than most of the same kind. If you haven't already, I would highly suggest reading the book _Sophistication and Simplicity_ by Dr. Steven Weyhrich, which chronicles the history of the Apple ][ and its fanbase. This, too, makes it fairly simple to test work on real hardware I do not own: it takes a quick facebook post, and someone will invariably be kind enough to test it for me.
* Apple ][ forever! 'nuff said.
### The Reason for some Messiness
As I said in the introduction, I am literally learning Assembly as I create this library, so it's inevitable that code will not always be optimal. I've been iterating over each disk as I update, adding and deleting where I see fit, and optimizing after having learned more every time. Still, the reason for this project has nothing to do with absolute efficiency, and I opt for readability over efficiency when I see fit. In part, this is because I want to keep it helpful for others who are learning 6502 Assembly, but moreso it's because I myself am still something of a beginner with the language. Having used high-level languages for most of my life, there's been a bit of a jump to get here, and old habits die hard!
### Compatible Apple 2 Systems
So far, I have been able to test these libraries on the actual hardware of an Apple //c alone. I have used emulators to test for other versions of the Apple ][, but I can make no guarantees yet concerning operability. For the most part, however, I am confident that these will also work on an Apple IIe and IIGS, as I have avoided anything I know to be particular to the //c. I suspect that these will also work well on an Apple II+, but there may be problems on the original version of the Apple ][. I have, of course, also avoided the use of the 65c02 opcode additions.
### What These Libraries Are For
Ultimately, this is a __general purpose library__, and should function well for most purposes. The caveat to this might be fast-paced video games, as those usually require special optimizations for that game and that game alone. Still, the code can be optimized after-the-fact for any special projects, and I do plan on having graphics routines that are much faster than the standard ones provided by Applesoft. I'll be heavily leaning on what I'm learning from [Andy McFadden's FDRAW routines](https://github.com/fadden/fdraw) for this at first, which means those libraries should be suitable still for most games.
### I Have an Improvement
That's great! Create a branch, I guess, and I'll merge if it makes sense! It should be noted that I'm also still figuring out git and GitHub as I go along here, which means I barely know what that even means, logistically.
---
## Disk Overviews
Each disk contains a single Macro (.mac) file, one or more subroutine files related to the overarching theme of the disk, and a "minified" version of the mac and subroutine files that the entire library relies upon. Additionally, each library has a correlating .hooks file for declaring variables used in that library's operations, as well as individual copies of each subroutine for compiling custom libraries for any given project and a demo program. There are also "minified" versions of each subroutine that have no comments as well.
In the following descriptions, we'll be listing the .mac contents that are relevant to the theme of the disk only, as many of the macros are calls to single subroutines and it would be redundant to list those as well. A table in section XXX lists the calls each macro makes to each subroutine, and the required.mac macros and required.lib subroutines are listed in Disk 2 only.
### Disk 1: STDIO
This disk is dedicated to Standard Input/Output operations, and a couple non-standard ones. Note that this is for 40-column mode only in order to keep compatibility with earlier hardware, and focuses on screen output alone in order to help with execution speed. However, most of these subroutines will work in 80col mode, with the exception of those that use DMA. Additionally, this focuses on input from the most-used peripherals: the keyboard and game paddles. Libraries for 80-column mode, as well as input and output from and to other devices, will be added later on.
* stdio.mac
* [`CURB`](#macro-curb): Move Cursor Backward by [n] spaces
* [`CURD`](#macro-curd): Move Cursor Down by [n] spaces
* [`CURF`](#macro-curf): Move Cursor Forward by [n] spaces
* [`CURU`](#macro-curu): Move Cursor Up by [n] spaces
* [`INP`](#macro-inp): String Input Macro
* [`PBX`](#macro-pbx): Read State of Paddle Button [x]
* [`PCR`](#macro-pcr): Print Carraige Return
* [`PDL`](#macro-pdl): Read Current Paddle State
* [`PRN`](#macro-prn): Flexible (screen) Printing routine
* [`RCPOS`](#macro-rcpos): Read Cursor Position
* [`SCPOS`](#macro-scpos): Set Cursor position at [x],[y]
* [`SETCX`](#macro-setcx): Set Cursor Horizontal Position
* [`SETCY`](#macro-setcy): Set Cursor Vertical Position
* [`TFILL`](#macro-tfill): Text Fill square [x1],[x2],[y1],[y2] with Character [n]
* [`THLIN`](#macro-thlin): Text Horizontal Line Fill with Character [n]
* [`TPUT`](#macro-tput): Direct memory text plotting routine
* [`TVLIN`](#macro-tvlin): Text Vertical Line Fill with Character [n]
### Disk 2: COMMON / REQUIRED
This disk is dedicated to common and useful subroutines that don't necessarily fit neatly into another category worth dedicating an entire disk to, as well as the fully commented code for the required libraries and macros that exist on every disk in minified form.
* common.mac
* `BEEP`: Beep for a given number of cycles.
* `DELAY`: Delay for the given number of Milliseconds.
* `MFILL`: Fill a block of memory with the passed value.
* `MMOVE`: Move a block of memory to another block of memory.
* `ZLOAD`: Retrieve previously save zero page values from a given address and restore them to the zero page.
* `ZSAVE`: Save the zero page memory locations not used by applesoft, dos, etc. to another memory location.
* `MSWAP`: Swap a memory range at one address with another.
* required.mac
* `_DUMP`: Dump the contents of a block of memory. This displays hex values only, and is primarily useful for debugging.
* `_ERR`: Error handling routine. Generally only called from routine libraries.
* `_GRET`: Get Return. Transfer the contents of the [RETURN] register to another memory location.
* `_ISLIT`: Is Literal. Tests a parameter to see if it is a literal value or an address.
* `_ISSTR`: Is String. Tests a parameter to see if it is a literal string.
* `_PRNT`: A standard print routine that mirrors that found in STDIO. This, too, is used mostly for debugging.
* `_SPAR`: Set Parameter. Transfer the contents of one memory location or a literal to the [PARAM] register.
* `_WAIT`: A simple routine that waits for a keypress. Again, useful for debugging.
* `_RDMP`: Registry Dump without halting execution.
### Disk 3: Arrays
This disk contains libraries and subroutines related to the management of one-dimensional and two-dimensional arrays. Since these arrays use a singly byte for indexing, they are referred to as 8-bit arrays, even though you could technically use 64k of memory by increasing element lengths or simply having a 2D array of 256x256. Support for 16-bit indexing will be added in the future.
* arrays.mac
* `DIM81`: Create a 1D array at a given address with a given element size and number of elements.
* `DIM82`: Create a 2D array at a given address with a given element size and number of elements in each dimension.
* `GET81`: Get the element at the given index in a 1D array.
* `GET82`: Get the element at the given index in a 2D array.
* `PUT81`: Put a value (literal or memory address) into a 1D array at the given index.
* `PUT82`: Put a value into a 2D array at the given index.
### Disk 4: Math
This disk hold routines related to standard mathematical calculations for signed and unsigned integer math as well as macros that use Applesoft's floating-point routines. Note that this only includes some rather basic math functions; more complicated problems should be addressed by the main program using the libraries.
* math.mac
* `ADD16`: Add two 16-bit integers, signed or unsigned, and return a 16-bit result.
* `CMP16`: Compare two 16-bit values, signed or unsigned, and set flags appropriately.
* `DIV8`: Divide one unsigned 8-bit integer by another and return 8-bit result.
* `DIV16`: Divide one 16-bit value by another, signed or unsigned, and return a 16-bit result.
* `MUL8`: Multiply two unsigned 8-bit numbers and return 16-bit product.
* `MUL16`: Multiply two 16-bit integers, signed or unsigned, and return 24-bit product(see long description for some caveats)
* `REM16`: Divide one 16-bit integer by another, signed or unsigned, and return the 16-bit remainder.
* `RND8`: Generate a pseudo-random 8-bit number between 0 and 255.
* `RND16`: Generate a pseudo-random 16-bit number between 0 and 65025.
* `RNDB`: Generate an 8-bit pseudo-random integer between a given min and max value.
* `RNDW`: Generate a 16-bit pseudo-random integer between a given min and max value.
* `SUB16`: Subtract one 16-bit integer, signed or unsigned, from another and return a 16-bit result.
* ~~FPADD: Floating-point addition using Applesoft's floating-point routines.~~ (not working yet)~~
* ~~FPMUL: Floating-point multiplication.~~
* ~~FPSUB: Floating-point subtraction.~~
* ~~FPDIV: Floating-point division.~~
* ~~FPPWR: Floating-point exponent.~~
* ~~FPSQR: Floating-point square-root.~~
* ~~FPEXP: Floating-point power of e.~~
* ~~FPLOG: Floating-point logarithm.~~
* ~~FPSIN: Floating-point sine.~~
* ~~FPCOS: Floating-point cosine.~~
* ~~FPTAN: Floating-point tangent.~~
* ~~FPATN: Floating-point atangent.~~
* ~~FPABS: Floating-point absolute value.~~
* ~~FPINT: floating point integer value.~~
* ~~FPFLT: integer to Floating-point.~~
* ~~FPSGN: Floating-point sign determination.~~
* ~~FPCMP: Floating-point compare.~~
* ~~FPD10: Floating-point divide by ten.~~
* ~~FPM10: Floating-point multiply by ten.~~
### Disk 5: Strings
This disk holds routines and macros related to string and substring manipulation. In the future, certain tasks like "TONUM" and "TOSTR" may be relegated to their own disk for data type conversion routines.
* strings.mac
* `SCAT`: String Concatenate. Concatenate two independent strings and return a new string.
* `SCMP`: String Compare. Compare two strings and set flags accordingly.
* `SCOP`: Substring Copy. Returns the substring of another string at the given index and length.
* `SDEL`: Substring Delete. Deletes a given substring from another string and returns new string.
* `SINS`: Substring Insert. Inserts a substring into another string at the given index.
* `SPOS`: Substring Position. Find the position of a substring in another string and return the index.
* `SPRN`: String Print. This is a printing macro for the string data format. May be transferred to STDIO.
* `TONUM`: String to Number. Converts a string of number-characters to its integer equivalent and return a 16-bit result.
* `TOSTR`: Number to String. Converts a given 16-bit integer, signed or unsigned, to its string character equivalent.
### Disk 6: FileIO
This disk is dedicated to routines and macros that involve file manipulation and low-level disk access.
* fileio.mac
* `BLOAD`: Binary load a file from the disk into the given memory location.
* `BSAVE`: Binary save a file from the given memory location to the given binary file.
* `CMD`: Execute a DOS command.
* `DBUFF`: Set RWTS Buffer Address.
* `DRIVE`: Set RWTS Drive.
* `DRWTS`: Call the RWTS routine for direct low-level access to the disk.
* `FINP`: File Input. Read a line from a text file.
* `FPRN`: File Print. Print a line to a text file.
* `SECT`: Set RWTS sector.
* `SETDR`: Set RWTS to the read command.
* `SETDW`: Set RWTS to the write command.
* `SLOT`: Set the RWTS slot.
* `TMODE`: Ready system for text-file mode. This is necessary for reading and writing text files.
* ~~FCOPY: Copy a source file to a destination file~~ (not implemented yet)~~
* ~~FDEL: Delete a file from the disk~~ (not implemented yet)~~
---
## Future Disks
The following disks are in pre-production/planning, and will be part of future versions of the library. I am currently focusing on the six core disks to make sure everything works seamlessly and functions the same across different subroutine calls, which is taking time to sort out. Once production of each of these disks begins, I'll be moving them from this section to the actual disks section.
~~Disk 7: Conversion~~
* ~~convert.mac: Library for converting between different data types.~~
* ~~`HX2CHR`: Hex value to character notation.~~
* ~~`TOSTR`: Integer value to character equivalent.~~
* ~~`TONUM`: Character string number to hexcode equivalent.~~
* ~~`HX2DEC`: Hexadecimal value to decimal value string.~~
* ~~`HX2BIN`: Hexademial value to binary string.~~
* ~~`BIN2HX`: binary string to hex value.~~
* ~~`DEC2HX`: decimal string to hex value. Not much different than `TONUM`~~
* ~~`HR2LR`: Hi-resolution to low-resolution conversion.~~
* ~~`LR2HR`: Low-resolution to high-resolution conversion.~~
* ~~`LS2STR`: a string that ends in #$00 coverted to the string data type (length byte first, then string)~~
~~Disk 8: LoRes~~
* ~~lores.mac: Library for fast(er) graphics in low resolution mode.~~
* ~~`LHLIN`: Low resolution horizontal line.~~
* ~~`LVLIN`: Low resolution vertical line.~~
* ~~`LLINE`: Low resolution line from x1,y1 to x2,y2.~~
* ~~`LCIRC`: Low resolution circle at position x,y with a radius of r.~~
* ~~`LSQR`: Low resolution square at position x,y with a width of w.~~
* ~~`LBLIT`: Low resolution sprite blitting macro.~~
* ~~`LCOLR`: Change low resolution color.~~
* ~~`LGET`: Get color of low-resolution screen at x,y.~~
* ~~`LPUT`: plot a low resolution block at x,y on the screen.~~
* ~~`LCHAR`: plot a text character on the low resolution screen at x,y.~~
* ~~`LPRN`: plot a string of characters on the low resolution screen at x,y.~~
* ~~`LINV`: Invert colors on the low resolution screen.~~
~~Disk 9: Sound~~
* ~~sound.mac: Music and sound effects library for the internal speaker (not add-on cards like Mockingboard). Note that this is not really for "real-time" music generation while doing something else, as that would involve counting the cycles in loops that a library would not necessarily have access to. In the future, I may try to create a library that does this, but it would still be pretty limited and the main execution would have to follow a very rigid format. I may also create a library that takes advantage of the Mockingboard.~~
* ~~`STONE`: Play a tone at the specified megahertz for a specified duration of milliseconds.~~
* ~~`SNOTE`: Play a specified musical note at the specified octave for a specified duration in milliseconds.~~
* ~~`SWAIT`: See the `DELAY` Macro, as this is simply a slightly modified version for music timing.~~
* ~~`SDRUM`: Send a sharp sound to the speaker that emulates the nois of a bass drum.~~
* ~~`SHATC`: Send a short click that emulates a closed hi hat.~~
* ~~`SHATO`: Send a long bout of noise to emulate an open hi hat.~~
* ~~`SSTAT`: Send static to the speaker for a specified number of milliseconds.~~
* ~~`SARPG`: Send a series of Arpeggio notes to the speaker to emulate multiple notes at once or chords.~~
* ~~`SASC`: Play a series of tones between a low and high mhz, ascending at a given rate.~~
* ~~`SDESC`: Play a series of tones between a high and low mhz, descending at a given rate.~~
* ~~`SENV`: Rudimentary envelope for notes achieved by manipulating octave frequencies.~~
* ~~`SQKEY`: Set the keypress to signal the library to halt playing a note.~~
* ~~`SPLOD`: a sound effect resembling an explosion sound. Customizeable via parameters.~~
* ~~`SPLAY`: play a sequence of given notes found at a given memory address. Follows same sequence as `SNOTE` parameters, ending with #00.~~
* ~~`SALRM`: play an alarm sound.~~
* ~~`SLAZE`: play a lazer sound at a specific frequency.~~
~~Disk 10: 80Col~~
* ~~stdio80.mac: stdio library for 80-column output. Most of these will be identical to the routines on the stdio disk.~~
* ~~`80CB`: Move Cursor Backward by [n] spaces~~
* ~~`80CD`: Move Cursor Down by [n] spaces~~
* ~~`80CF`: Move Cursor Forward by [n] spaces~~
* ~~`80CU`: Move Cursor Up by [n] spaces~~
* ~~`80INP`: String Input Macro~~
* ~~`80PBX`: Read State of Paddle Button [x]~~
* ~~`80PCR`: Print Carraige Return~~
* ~~`80PDL`: Read Current Paddle State~~
* ~~`80PRN`: Flexible (screen) Printing routine~~
* ~~`80RCP`: Read Cursor Position~~
* ~~`80SCP`: Set Cursor position at [x],[y]~~
* ~~`80SCX`: Set Cursor Horizontal Position~~
* ~~`80SCY`: Set Cursor Vertical Position~~
* ~~`80TFIL`: Text Fill square [x1],[x2],[y1],[y2] with Character [n]~~
* ~~`80THLN`: Text Horizontal Line Fill with Character [n]~~
* ~~`80TVLN`: Text Vertical Line Fill with Character [n]~~
* ~~80to40.mac: a simple set of macros that calls the 80-column macros when 40-column macros are invoked. Obviously, the 40-column stdio.mac cannot be used simultaneously.~~
~~Disk 11: HiRes~~
* ~~hires.mac: Library for fast(er) graphics in high resolution mode.~~
* ~~`HHLIN`: High resolution horizontal line.~~
* ~~`HVLIN`: High resolution vertical line.~~
* ~~`HLINE`: High resolution line from x1,y1 to x2,y2.~~
* ~~`HCIRC`: High resolution circle at position x,y with a radius of r.~~
* ~~`HSQR`: High resolution square at position x,y with a width of w.~~
* ~~`HBLIT`: High resolution sprite blitting macro.~~
* ~~`HCOLR`: Change High resolution color.~~
* ~~`HGET`: Get color of high-resolution screen at x,y.~~
* ~~`HPUT`: plot a high resolution block at x,y on the screen.~~
* ~~`HCHAR`: plot a text character on the high resolution screen at x,y.~~
* ~~`HPRN`: plot a string of characters on the high resolution screen at x,y.~~
~~Disk 12: DblLoRes~~
* ~~dlres.mac: library for double low resolution graphics. Only available on IIe (with 80col card), //c, and IIgs.~~
* ~~`DLHLN`: Double Low resolution horizontal line.~~
* ~~`DLVLN`: Double Low resolution vertical line.~~
* ~~`DLLNE`: Double Low resolution line from x1,y1 to x2,y2.~~
* ~~`DLCRC`: Double Low resolution circle at position x,y with a radius of r.~~
* ~~`DLSQR`: Double Low resolution square at position x,y with a width of w.~~
* ~~`DLBLT`: Double Low resolution sprite blitting macro.~~
* ~~`DLCLR`: Change Double low resolution color.~~
* ~~`DLGET`: Get color of Double low-resolution screen at x,y.~~
* ~~`DLPUT`: plot a Double low resolution block at x,y on the screen.~~
* ~~`DLCHR`: plot a text character on the Double low resolution screen at x,y.~~
* ~~`DLPRN`: plot a string of characters on the Double resolution screen at x,y.~~
~~Disk 13: DblHiRes~~
* ~~dhres.mac: library for double high resolution graphics. Note that this is only available on the IIe (with 80col card), //c, and IIgs.~~
* ~~`DHHLN`: Double high resolution horizontal line.~~
* ~~`DHVLN`: Double high resolution vertical line.~~
* ~~`DHLNE`: Double high resolution line from x1,y1 to x2,y2.~~
* ~~`DHCRC`: Double high resolution circle at position x,y with a radius of r.~~
* ~~`DHSQR`: Double high resolution square at position x,y with a width of w.~~
* ~~`DHBLT`: Double high resolution sprite blitting macro.~~
* ~~`DHCLR`: Change Double high resolution color.~~
* ~~`DHGET`: Get color of Double high-resolution screen at x,y.~~
* ~~`DHPUT`: plot a Double high resolution block at x,y on the screen.~~
* ~~`DHCHR`: plot a text character on the Double high resolution screen at x,y.~~
* ~~`DHPRN`: plot a string of characters on the Double high resolution screen at x,y.~~
~~Disk 14: OtherIO~~
* ~~library for interfacing with a printer.~~
* ~~`PINIT`: Printer Detect and Initialize.~~
* ~~`PPRNC`: Print a single Character on the Printer.~~
* ~~`PPRNL`: Print a line of text on the printer.~~
* ~~`PPUT`: Print a single dot on the printer.~~
* ~~`PLBLK`: Print a block of low-res graphics at a given memory location to the printer.~~
* ~~`PHBLK`: Print a block of high resolution graphics at a given memory location on the printer.~~
* ~~library for sending and receiving data over the serial port~~
* ~~`SSEND`: Serial send bit/byte.~~
* ~~`SRECV`: Serial Receive bit/byte.~~
* ~~`SLSTN`: Listen to serial and wait for data for continuing.~~
~~Disk 15: Sort~~
* ~~BSORT: Bubble Sort~~
* ~~ISORT: Insertion Sort~~
* ~~MSORT: Merge Sort~~
* ~~QSORT: Quick Sort~~
* ~~SSORT: Selection Sort~~
~~Disk 16: Search~~
* ~~BSRCH: Binary Search~~
~~Disk 17: Lists_Trees~~
~~Disk 18: Utilities~~
* ~~builder.bas: A utility that automatically builds custom libraries by copying routines from the appropriate disks, commented or minified.~~
* makeexec.bas
* minify.bas
* ~~BUILDER~~
* ~~MAKEEXEC~~
* ~~MINIFY~~
Disk 19: Integrated_Demos
* disk(s) with demos that show more complicated usage of the libraries, integrating them as each demo needs.
* MAKEMAZE: A fairly simple maze creation demo. Can only create square mazes.
* ~~READFILE~~
* ~~SKIDOWN~~
* ~~GAMEOFLIFE~~
Disk 20: MiniDisk A
A disk with minified versions of the source files of disks 1-7. This is primarily used by the library-building utility.
---
## Macro Subroutine Calls and Clobbers
The following table shows which subroutines each Macro calls, along with the resulting registers, flags, and memory locations clobbered. This is up to date for version 0.3.0. Note that by "clobbered" here, I don't mean that the register or memory location has trash in it; it's just been altered in some way. For list of what useful imformation is passed after a Macro is executed, see [the cheat sheet](#macro-usage-cheat-sheet).
If a memory alteration is indicated by a [PASS], it means that the memory area that was passed to the macro was altered.
MACRO | SUBROUTINES CALLED | FLAGS ALTERED | REGS ALTERED | MEM ALTERED
------ | -------------------------- |:-------------:|:------------:| -----------
_DUMP | __DUMP | | |
_ERR | __ERR | | |
_GRET | __GETRET | | |
_ISLIT | None | | |
_ISSTR | None | | |
_PRNT | __P | | |
_RDUMP | __RDMP | | |
_SPAR | __SETPARM | | |
_WAIT | __W | | |
ADD16 | ADDIT16 | | |
AMODE | None | | |
BEEP | None (BELL) | | |
BLOAD | BINLOAD | | |
BSAVE | BINSAVE | | |
CMD | DOSCMD | | |
CMP16 | COMP16 | | |
CURB | CURSBAK | | |
CURD | CURSDN | | |
CURF | CURSFOR | | |
CURU | CURSUP | | |
DBUFF | None | | |
DELAY | DELAYMS | | |
DIM81 | ADIM81 | | |
DIM82 | ADIM82 | | |
DIV8 | DIVD8 | | |
DIV16 | SDIV16,UDIV16 | | |
DRIVE | None | | |
DRWTS | DISKOP | | |
FINP | FINPUT | | |
FPRN | FPRINT,FPSTR | | |
GET81 | AGET81 | | |
GET82 | AGET82 | | |
GKEY | None (GETKEY) | | |
INP | SINPUT | | |
MFILL | MEMFILL | | |
MMOVE | MEMMOVE | | |
MSWAP | MEMSWAP | | |
MUL8 | MULT8 | | |
MUL16 | MULT16 | | |
PBX | GPBX | | |
PCR | None (COUT1) | | |
PDL | None (PREAD) | | |
PRN | XPRINT,DPRINT | | |
PUT81 | APUT81 | | |
PUT82 | APUT82 | | |
RCPOS | None (GBASCALC) | | |
REM16 | SREMD16,UREMD16 | | |
RND16 | RAND16 | | |
RNDB | RANDB | | |
SCAT | STRCAT | | |
SCMP | STRCMP | | |
SCPOS | None (VTAB) | | |
SCPY | SUBCOPY | | |
SDEL | SUBDEL | | |
SECT | None | | |
SETCX | None (VTAB) | | |
SETCY | None (VTAB) | | |
SETDR | None | | |
SETDW | None | | |
SINS | SUBINS | | |
SLOT | None | | |
SPOS | SUBPOS | | |
SPRN | PRNSTR | | |
SUB16 | SUBT16 | | |
TFILL | TFILLA | | |
THLIN | THLINE | | |
TPUT | TXTPUT | | |
TONUM | STR2NUM | | |
TOSTR | NUM2STR | | |
TRACK | None | | |
TVLIN | TVLINE | | |
ZLOAD | ZMLOAD | | |
ZSAVE | ZMSAVE | | |
---
## Macro Usage Cheat Sheet
Once Macros are mostly finished in how they are called, you can find how to use them here. New versions, of course, always run the risk of changing something integral; This cheat sheet will be updated accordingly.
MACRO | USAGE | RETURNS
------ | ------------------------------------------------------------------- | -----------------------------------
_DUMP | ```_DUMP [memory address];[# of bytes to dump]``` | Nothing; dump to screen
_ERR | ```_ERR [calling rout];[err msg];[dump msg];[dump loc];[dmplen]``` | prints various error messages and information
_GRET | ```_GRET [dest memory address]``` | [return] stored in specified address
_ISLIT | ```_ISLIT [data]``` | inserts executable code at pointer
_ISSTR | ```_ISSTR [data]``` | inserts executable code at pointer
_PRNT | ```_PRNT [string or address]``` | prints provided literal string
_RDUMP | ```_RDUMP``` | nothing; outputs registry values
_SPAR | ```_SPAR [src address];[length]``` | moves data at address to [param]
_WAIT | ```_WAIT``` | Nothing; wait for keypress.
ADD16 | ```ADD16 [word 1];[word 2] ``` | .Y = lobyte of sum
. | . | .X = hibyte of sum
. | . | [RETURN] = sum
. | . | [RETLEN] = length of sum (2 bytes)
BEEP | ```BEEP [number of beep calls]``` | Nothing; just speaker output
BLOAD | ```BLOAD [dos command parameters]``` | Nothing; just disk input
BSAVE | ```BSAVE [dos command parameters]``` | Nothing; just disk output
CMD | ```CMD [dos command with parameters]``` | Nothing, save for changes done by command
CMP16 | ```CMP16 [word 1];[word 2]``` | See full description for flag changes.
CURB | ```CURB [spaces to move back]``` | Nothing
CURD | ```CURD [spaces to move down]``` | Nothing
CURF | ```CURF [spaces to move forward]``` | Nothing
CURU | ```CURU [spaces to move up]``` | Nothing
DBUFF | ```DBUFF [buffer address]``` | Nothing
DELAY | ```DELAY [number of milliseconds to delay]``` | Nothing; just execution delay
DIM81 | ```DIM81 [array address];[# of elements];[element byte length]``` | [RETURN] = total array size in bytes
. | . | [RETLEN] = length of [RETURN] val
DIM82 | ```DIM82 [array addr];[# of cols];[# of rows];[elem byte length]``` | [RETURN] = total array size in bytes
. | . | [RETLEN] = length of [RETURN] val
DIV8 | ```DIV8 [dividend byte];[divisor byte]``` | .A = quotient (byte)
. | | .X = remainder (byte)
. | . | [RETURN] = quotient
. | . | [RETLEN] = quotient length (1 byte)
DIV16 | ```DIV16 [dividend word];[divisor word]``` | .Y = lobyte of quotient
. | . | .X = hibyte of quotient
. | . | [RETURN] = quotient
. | . | [RETLEN] = quotient length (2 bytes)
DRIVE | ```DRIVE [drive number]``` | Nothing
DRWTS | ```DRWTS``` | Nothing
FINP | ```FINP [adress to store string]``` | Nothing
FPRN | ```FPRN [literal string or address of string]``` | Nothing
GET81 | ```GET81 [array address];[element index]``` | .Y = lobyte of element addr
. | . | .X = hibyte of element addr
. | . | [RETURN] = value stored in element
. | . | [RETLEN] = length of return value
GET82 | ```GET82 [array addr];[column index];[row index]``` | .Y = lobyte of element addr
. | . | .X = hibyte of element addr
. | . | [RETURN] = value stored in element
. | . | [RETLEN] = length of return value
GKEY | ```GKEY``` | .A = key pressed
INP | ```INP``` | [RETURN] = string entered by user
. | . | [RETLEN] = string length (same as first byte of [RETURN], +1)
. | . | .X, .Y = length of string
MFILL | ```MFILL [address start];[length in bytes];[fill value]``` | Nothing useful
MMOVE | ```MMOVE [src addr];[dest addr];[length in bytes]``` | Nothing useful
MSWAP | ```MSWAP [first address];[second address];[length]``` | Nothing
MUL8 | ```MUL8 [multiplicand byte];[multiplier byte]``` | .Y = lobyte of product (word)
. | . | .X = hibyte of product (word)
. | . | [RETURN] = quotient
. | . | [RETLEN] = quotient length (2 bytes)
MUL16 | ```MUL16 [multiplicand word];[multiplier word]``` | .Y = lobyte of product
. | . | .X = hibyte of product
. | . | [RETURN] = product (24-bit; see desc)
. | . | [RETLEN] = product length (3 bytes)
PBX | ```PBX [button to read; PB0,PB1,PB2,PB3]``` | .A = 1 if button pressed, else 0
PCR | ```PCR``` | Nothing
PDL | ```PDL [paddle to read]``` | .Y = paddle state value, 0..256
PRN | ```PRN [literal string or address]``` | .Y = length of string, if literal
PUT81 | ```PUT81 [src addr or literal][array addr];[element index]``` | .Y = lobyte of element addr
. | . | .X = hibyte of element addr
. | . | .A = length of element in bytes
PUT82 | ```PUT82 [src addr or lit];[array addr];[col index];[row index]``` | .Y = lobyte of element addr
. | . | .X = hibyte of element addr
. | . | .A = length of element in bytes
RCPOS | ```RCPOS [col];[row]``` | .A = character at that position
REM16 | ```REM16 [dividend word];[divisor word]``` | .Y = lobyte of remainder
. | . | .X = hibyte of remainder
RNDB | ```RNDB [low boundary byte];[high boundary byte]``` | .A = pseudorandom number between
. | . | [RETURN] = pseudorandom number between
. | . | [RETLEN] = length of number (1 byte)
SCAT | ```SCAT [first string, lit or addr];[2nd string]``` | .A = 1 if overflow err, else 0
. | . | .X = lenth of concatenated string
. | . | [RETURN] = concatenated string
. | . | [RETLEN] = concatenated length
. | . | first string is replaced with concatenated!
SCMP | ```SCMP [first string, lit or addr];[2nd string]``` | See full description for flag changes.
. | . | .Y = String 2 length
. | . | .X = String 1 Length
SCPOS | ```SCPOS [col];[row]``` | Nothing
SCPY | ```SCPY [source string];[index];[length];[max length]``` | .CARRY will be 0 if no errors; else, 1
. | | [RETURN] = copied substring
. | . | [RETLEN] = return string length
SDEL | ```SDEL [string];[index];[length]``` | .CARRY will be 0 if no errors; else, 1
. | . | passed string will be altered!
SECT | ```SECT [sector number]``` | Nothing
SETCX | ```SETCX [col]``` | Nothing
SETCY | ```SETCY [row]``` | Nothing
SETDR | ```SETDR``` | Nothing
SETDW | ```SETDW``` | Nothing
SINS | ```SINS [parent string];[index];[max length];[substring to ins]``` | .CARRY = 0 if no errors; else, 1
. | . | passed parent string will be altered!
SLOT | ```SLOT [slot number]``` | Nothing
SPOS | ```SPOS [parent string];[substring]``` | .A = index of substring if found; 0 if not
. | . | [RETURN] = index of substring found; 0 if not
. | . | [RETLEN] = byte length of [RETURN] (1)
SPRN | ```SPRN [string address]``` | .A = string length
SUB16 | ```SUB16 [minuend word];[subtrahend word]``` | .Y = lobyte of result
. | | .X = hibyte of result
. | . | [RETURN] = result
. | . | [RETLEN] = result length (2 bytes)
TFILL | ```TFILL [col start];[row start];[col end];[row end];[fill char]``` | Nothing Useful
THLIN | ```THLIN [col start];[col end];[row];[fill char]``` | Nothing Useful
TMODE | ```TMODE``` | Nothing
TONUM | ```TONUM [string to convert to number, addr or literal]``` | [RETURN] = number equivalent of string
. | . | [RETLEN] = byte length of number (2)
TPUT | ```TPUT [xpos];[ypos];[fill character]``` | Nothing
TRACK | ```TRACK [track number]``` | Nothing
TOSTR | ```TOSTR [number to convert to string]``` | [RETURN] = string equivalent of number
. | . | [RETLEN] = length of string returned (not yet)
TVLIN | ```TVLIN [row start];[row end];[column];[fill char]``` | Nothing Useful
ZLOAD | ```ZLOAD [address where backup is stored]``` | Nothing
ZSAVE | ```ZSAVE [address to backup at]``` | Nothing
---
__27-SEP-2019__
- As of version 0.5.0, updates will occur on a disk-by-disk basis (as well as appropriate changes to the documentation).
- version 0.5.0 pretty much breaks any prior work that used the library. While future updates won't be so extreme, now that a stable system is in place, this is to be expected in any update prior to an official version 1.0.
- The main documentation has been moved to a .docx and pdf file, rather than here, due to the length of the document. In the future, this file will be changed to a more open format, as well as converted into a hard-copy friendly design.
## Documentation
- You can find documentation to the current version being revised, 0.6.0, [in the documentation section](https://github.com/nathanriggs/AppleIIAsmLib/blob/master/documentation/0.6.0/0_3_Table_of_Contents_GH.md)
- You can find documentation for the current stable version, 0.5.0, [also in the appropriate documentation section](https://github.com/nathanriggs/AppleIIAsmLib/blob/master/documentation/0.5.0/)

View File

@ -1 +0,0 @@
theme: jekyll-theme-hacker

View File

@ -1,6 +0,0 @@
# frozen_string_literal: true
source "https://rubygems.org"
gem "github-pages", group: :jekyll_plugins
# gem "rails"

View File

@ -1,248 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.10)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.17.13)
ruby-enum (~> 0.5)
concurrent-ruby (1.1.4)
dnsruby (1.61.2)
addressable (~> 2.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
ethon (0.11.0)
ffi (>= 1.3.0)
eventmachine (1.2.7-x64-mingw32)
execjs (2.7.0)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
ffi (1.10.0-x64-mingw32)
forwardable-extended (2.6.0)
gemoji (3.0.0)
github-pages (193)
activesupport (= 4.2.10)
github-pages-health-check (= 1.8.1)
jekyll (= 3.7.4)
jekyll-avatar (= 0.6.0)
jekyll-coffeescript (= 1.1.1)
jekyll-commonmark-ghpages (= 0.1.5)
jekyll-default-layout (= 0.1.4)
jekyll-feed (= 0.11.0)
jekyll-gist (= 1.5.0)
jekyll-github-metadata (= 2.9.4)
jekyll-mentions (= 1.4.1)
jekyll-optional-front-matter (= 0.3.0)
jekyll-paginate (= 1.1.0)
jekyll-readme-index (= 0.2.0)
jekyll-redirect-from (= 0.14.0)
jekyll-relative-links (= 0.5.3)
jekyll-remote-theme (= 0.3.1)
jekyll-sass-converter (= 1.5.2)
jekyll-seo-tag (= 2.5.0)
jekyll-sitemap (= 1.2.0)
jekyll-swiss (= 0.4.0)
jekyll-theme-architect (= 0.1.1)
jekyll-theme-cayman (= 0.1.1)
jekyll-theme-dinky (= 0.1.1)
jekyll-theme-hacker (= 0.1.1)
jekyll-theme-leap-day (= 0.1.1)
jekyll-theme-merlot (= 0.1.1)
jekyll-theme-midnight (= 0.1.1)
jekyll-theme-minimal (= 0.1.1)
jekyll-theme-modernist (= 0.1.1)
jekyll-theme-primer (= 0.5.3)
jekyll-theme-slate (= 0.1.1)
jekyll-theme-tactile (= 0.1.1)
jekyll-theme-time-machine (= 0.1.1)
jekyll-titles-from-headings (= 0.5.1)
jemoji (= 0.10.1)
kramdown (= 1.17.0)
liquid (= 4.0.0)
listen (= 3.1.5)
mercenary (~> 0.3)
minima (= 2.5.0)
nokogiri (>= 1.8.2, < 2.0)
rouge (= 2.2.1)
terminal-table (~> 1.4)
github-pages-health-check (1.8.1)
addressable (~> 2.3)
dnsruby (~> 1.60)
octokit (~> 4.0)
public_suffix (~> 2.0)
typhoeus (~> 1.3)
html-pipeline (2.10.0)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.7.4)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-avatar (0.6.0)
jekyll (~> 3.0)
jekyll-coffeescript (1.1.1)
coffee-script (~> 2.2)
coffee-script-source (~> 1.11.1)
jekyll-commonmark (1.2.0)
commonmarker (~> 0.14)
jekyll (>= 3.0, < 4.0)
jekyll-commonmark-ghpages (0.1.5)
commonmarker (~> 0.17.6)
jekyll-commonmark (~> 1)
rouge (~> 2)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
jekyll-feed (0.11.0)
jekyll (~> 3.3)
jekyll-gist (1.5.0)
octokit (~> 4.2)
jekyll-github-metadata (2.9.4)
jekyll (~> 3.1)
octokit (~> 4.0, != 4.4.0)
jekyll-mentions (1.4.1)
html-pipeline (~> 2.3)
jekyll (~> 3.0)
jekyll-optional-front-matter (0.3.0)
jekyll (~> 3.0)
jekyll-paginate (1.1.0)
jekyll-readme-index (0.2.0)
jekyll (~> 3.0)
jekyll-redirect-from (0.14.0)
jekyll (~> 3.3)
jekyll-relative-links (0.5.3)
jekyll (~> 3.3)
jekyll-remote-theme (0.3.1)
jekyll (~> 3.5)
rubyzip (>= 1.2.1, < 3.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.5.0)
jekyll (~> 3.3)
jekyll-sitemap (1.2.0)
jekyll (~> 3.3)
jekyll-swiss (0.4.0)
jekyll-theme-architect (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-cayman (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-dinky (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-hacker (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-leap-day (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-merlot (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-midnight (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-minimal (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-modernist (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-primer (0.5.3)
jekyll (~> 3.5)
jekyll-github-metadata (~> 2.9)
jekyll-seo-tag (~> 2.0)
jekyll-theme-slate (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-tactile (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-time-machine (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-titles-from-headings (0.5.1)
jekyll (~> 3.3)
jekyll-watch (2.1.2)
listen (~> 3.0)
jemoji (0.10.1)
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (~> 3.0)
kramdown (1.17.0)
liquid (4.0.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
mini_portile2 (2.4.0)
minima (2.5.0)
jekyll (~> 3.5)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.11.3)
multipart-post (2.0.0)
nokogiri (1.10.0-x64-mingw32)
mini_portile2 (~> 2.4.0)
octokit (4.13.0)
sawyer (~> 0.8.0, >= 0.5.3)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (2.0.5)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
rouge (2.2.1)
ruby-enum (0.7.2)
i18n
ruby_dep (1.5.0)
rubyzip (1.2.2)
safe_yaml (1.0.4)
sass (3.7.3)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
typhoeus (1.3.1)
ethon (>= 0.9.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
unicode-display_width (1.4.1)
PLATFORMS
x64-mingw32
DEPENDENCIES
github-pages
BUNDLED WITH
2.0.1

View File

@ -1,7 +0,0 @@
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
# gem "rails"

View File

@ -1,6 +0,0 @@
- name: Home
link: /
- name: About
link: /about.html
- name: Blog
link: /blog.html

View File

@ -1,7 +0,0 @@
---
layout: default
---
<h1>{{ page.title }}</h1>
<p>{{ page.date | date_to_string }} - {{ page.author }}</p>
{{ content }}

View File

@ -1,5 +0,0 @@
---
layout: post
author: nathan
---
As you might imagine, I'm trying to figure out Jekyll. Once I do, I'll start blogging about changes to and struggles with the AppleIIAsmLib. Thanks for watching!

View File

@ -1,14 +0,0 @@
---
layout: default
title: Blog
---
<h1>Latest Posts</h1>
<ul>
{% for post in site.posts %}
<li>
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2>
<p>{{ post.excerpt }}</p>
</li>
{% endfor %}
</ul>

View File

View File

View File

3
bin/README.md Normal file
View File

@ -0,0 +1,3 @@
You will find the current disks being worked on here. Commits to these files, unfortunately, may spam the documentation.
Note that the core part of the collection is numbered, while there rest has yet to be decided on or incorporated.

BIN
bin/XXX_d11_col80.dsk Normal file

Binary file not shown.

BIN
bin/XXX_d12_dblores.dsk Normal file

Binary file not shown.

BIN
bin/XXX_d13_dbhires.dsk Normal file

Binary file not shown.

BIN
bin/XXX_d14_ProDOS.dsk Normal file

Binary file not shown.

Binary file not shown.

BIN
bin/XXX_d16_misc.dsk Normal file

Binary file not shown.

BIN
bin/XXX_d17_iigs_gui.po Normal file

Binary file not shown.

Binary file not shown.

BIN
bin/XXX_d19_iigs_sound.po Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/XXX_d24_utilities_1.dsk Normal file

Binary file not shown.

BIN
bin/d01_required.dsk Normal file

Binary file not shown.

BIN
bin/d02_stdio.dsk Normal file

Binary file not shown.

BIN
bin/d03_arrays.dsk Normal file

Binary file not shown.

BIN
bin/d04_math.dsk Normal file

Binary file not shown.

BIN
bin/d05_strings.dsk Normal file

Binary file not shown.

BIN
bin/d06_DOS.dsk Normal file

Binary file not shown.

BIN
bin/d08_lores.dsk Normal file

Binary file not shown.

BIN
bin/d09_hires.dsk Normal file

Binary file not shown.

BIN
bin/d10_speaker.dsk Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/d20_copydisk_A.dsk Normal file

Binary file not shown.

Binary file not shown.

BIN
bin/d21_copydisk_B.dsk Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
bin/d7_convert.dsk Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

View File

@ -0,0 +1,97 @@
# AppleIIAsm Technical Manual v0.6.0
---
Written and edited by Nathan Riggs (so far), 2021.
---
---
### License
Copyright 2020 Nathan Riggs
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
(http://www.apache.org/licenses/LICENSE-2.0)
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and
limitations under the License.
---
---
## Table of Contents
1. [License](#license)
2. [Preface](1.0%20Preface.md)
3. [Introduction](2.0%20Introduction.md)
4. [Package Overiew](3.0%20Package_Overview.md)
5. [Software Architecture](4.0%20Software_Architecture.md)
6. [Macro/Subroutine Quick References](5.0%20Quick_Reference_TOC.md)
7. - [Quick Reference Introduction](5.0%20Quick_Reference_TOC.md)
- [Disk 1 -- REQUIRED Macros](6.0%20Quick_Reference_D1_MAC.REQUIRED.md)
- [Disk 2 -- STDIO Macros](7.0%20Quick_Reference_D2_MAC.STDIO.md)
- [Disk 3 -- ARRAYS Macros](8.0%20Quick_Reference_D3_MAC.ARRAYS.md)
- [Disk 4 -- MATH Macros](9.0%20quick_reference_d4_mac.math.md)
- [Disk 5 -- STRING Macros](10.0%20quick_reference_d5_mac.strings.md)
- [Disk 6 -- DOS Macros](11.0%20quick_reference_d6_mac.dos.md)
- [Disk 7 -- CONVERT Macros](12.0%20quick_reference_d7_mac.convert.md)
- [Disk 8 -- LORES Macros](13.0%20quick_reference_d8_mac.lores.md)
- [Disk 9 -- HIRES Macros](14.0%20quick_reference_d9_mac.hires.md)
- [Disk 10 -- SPEAKER Macros](15.0%20quick_reference_d10_mac.speaker.md)
7. Detailed References and Source Code Listings
- [Disk 1: Required Library and Aliases](30.0%20Detailed_Reference_D1_REQUIRED.md)
- [Disk 2: STDIO Macros and Subroutines](31.0%20Detailed_Reference_D2_STDIO.md)
- [Disk 3: Array Macros and Subroutines](32.0%20Detailed_Reference_D3_Arrays.md)
- [Disk 4: Basic Math Macros and Subroutines](33.0%20Detailed_Reference_D4_MATH.md)
- [Disk 5: String Manipulation Macros and Subroutines](34.0%20Detailed_Reference_D5_STRINGS.md)
- [Disk 6: Apple DOS Macros and Subroutines](35.0%20Detailed_Reference_D6_DOS.md)
- [Disk 7: Data Type Conversion Macros and Subroutines](36.0%20Detailed_Reference_D7_CONVERT.md)
- [Disk 8: Low Resolution Macros and Subroutines](37.0%20Detailed_Reference_D8_LORES.md)
- [Disk 9: High Resolution Macros and Subroutines](38.0%20Detailed_Reference_D9_HIRES.md)
- [Disk 10: Internal Macros and Subroutines](39.0%20Detailed_Reference_D10_SPEAKER.md)
8. Appendices
- Supplemental Texts
- Further Reference
- Optimizations
- Typical Assembly Optimizations
- Architecture Clobbering Optimizations

View File

@ -0,0 +1,32 @@
## Preface
This is the first complete reference manual for the _AppleIIAsm_ macro and subroutine library. Currently, this library is in the alpha stages of development: not all disks (collections) are complete, there may be some bugs here and there, and major workflow decisions might still be in flux. However, this version, 0.7.0, represents a major step forward in functionality, optimization and standardization, and at least for what is complete--the first eleven disks, the technical manual, AppleChop introduction as well as some demos--the collection can be reasonably considered to be stable. That does not, of course, mean that there are any guarantees.
I started this project as research into how the Apple II works as a platform for another book I am writing, and eventually became interested in the cohesive technical documentation (or sometimes lack thereof) that was available to beginning coders in the heyday of the Apple II as well as those looking to learn Apple II (6502) Assembly today. Having no prior experience with Assembly language, I began coding these libraries as part of my own learning process while trying to write subroutines that provided much of the functionality afforded by Applesoft BASIC. Eventually, this became a beast of its own, and what youre reading here is (part) of the result.
As the library collections grow and morph, so will this document. If nothing else, I hope that the collection and its accompanying documentation helps hobbyists, researchers, and otherwise self-hating hopeless nerds learn and accomplish what they want or need---at least as much as it has helped, and harmed, me.
Nathan Riggs
---
[Return to Table of Contents](0.0%20Title_to_TOC)
[Next: Introduction](2.0%20Introduction.md)

View File

@ -0,0 +1,40 @@
# Disk 5: Strings and Substrings
The Strings Collection of the AppleIIAsm Library is dedicated to macros used for handling strings and substrings. In particular, this refers to the default type of string: those with a preceding length-byte. If these macros need to be used on another type of string, such as a null-terminated string, then the `STRPC` macro should be used on the string first to convert it to a preceding length-byte type.
The strings collection can be divided further into two categories: those that deal with whole strings and those that deal with substrings exclusively. This is currently reflected in the fact that the macros are held in separate files and use different demos.
---
### MAC.STRINGS.ASM
| MACRO | DEPENDENCY | PARAMETERS | ACTION | DESTROYS | CYCLES | BYTES |
| ------- | ------------------ | ----------------------------------------- | -------------------- | -------- | ------ | ----- |
| `SCMP` | `SUB.STRCOMP.ASM` | ]1 = First string<br />]2 = Second string | Compare strings | NZCV | 110+ | 67 |
| `SCAT` | `SUB.STRCAT.ASM` | ]1 = First string<br />]2 = Second string | Concatenate strings | NZCV | 170+ | 113 |
| `STRIM` | `SUB.STRIM.ASM` | ]1 = String<br />]2 = Token | Trim string | NZCV | 123+ | 80 |
| `STRUP` | `SUB.STRUPPER.ASM` | ]1 = String | Convert to uppercase | NZCV | 114+ | 64 |
| `SLO` | `SUB.STRLOWER.ASM` | ]1 = String | Convert to lowercase | NZCV | 113+ | 64 |
| `SREV` | `SUB.STRREV.ASM` | ]1 = String | Reverse a string | NZCV | 70+ | 41 |
| `SCAP` | `SUB.STRCAP.ASM` | ]1 = String | Capitalize sentences | NZCV | 192+ | 117 |
### MAC.SUBSTRINGS.ASM
| MACRO | DEPENDENCY | PARAMETERS | ACTION | DESTROYS | CYCLES | BYTES |
| ------ | -------------------- | ------------------------------------------------------ | --------------------------- | -------- | ------ | ----- |
| `SPOS` | `SUB.SUBPOS.ASM` | ]1 = String<br />]2 = Substring | Get substring position | NZCV | 205+ | 136 |
| `SCPY` | `SUB.SUBCOPY.ASM` | ]1 = Source string<br />]2 = Index<br />]3 = Length | Copy substring | NZCV | 95+ | 71 |
| `SDEL` | `SUB.SUBDEL.ASM` | ]1 = Source string<br />]2 = Index<br />]3 = Length | Delete substring | NZCV | 135+ | 79 |
| `SINS` | `SUB.SUBINS.ASM` | ]1 = Source string<br />]2 = Substring<br />]3 = Index | Insert substring | NZCV | 177+ | 111 |
| `STOK` | `SUB.SUBTOK.ASM` | ]1 = String<br />]2 = Token<br />]3 = Token number | Find tokenized substring | NZCV | 182+ | 118 |
| `SCNT` | `SUB.SUBCHARCNT.ASM` | ]1 = String<br />]2 = Character | Count character occurrences | NZCV | 88+ | 57 |

View File

@ -0,0 +1,59 @@
# Disk 6: Apple DOS
The DOS Collection of the AppleIIAsm Library consists of macros and subroutines dedicated to interfacing with Apple DOS, providing an abstraction layer for the programmer on top of the lower level routines used by DOS such as the file manager and RWTS. All of the basic functions of DOS are available for use, save for specific macros dedicated solely to reading and writing text files. The reasoning for this is that 1) unless you are interfacing with a BASIC program or another system, text files are largely unnecessary (binary files work better), and 2) text file manipulation often requires creating a system of your own since there is no simple default way to read the end of a file. The macros and routines that do exist can be used to create your own custom system for reading and writing text files.
Of all the collections in the library, the DOS collection is perhaps the most convoluted and has the largest overhead due to the more complex nature of its functionality. There are many subroutines and macros that are meant to be used only by the collection itself, though the enterprising programmer may of course utilize them. These are described in the detailed listings.
---
### MAC.DOSREQ.ASM
| MACRO | DEPENDENCY | PARAMETERS | ACTION | DESTROYS | CYCLES | BYTES |
| ------- | ------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -------- | ------ | ----- |
| `FMFIL` | HEAD.DOS.ASM | ]1 = Command <br/>]2 = Slot<br />]3 = Drive<br />]4 = Volume<br />]5 = Record | Fill most common parameters of the File Manager. | NZCV | 603 | 303 |
| `FMNAM` | HEAD.DOS.ASM | ]1 = String Address | Copy a string to the file name parameter in the File Parameter List. | NZCV | 117 | 70 |
| `FRWB` | HEAD.DOS.ASM | ]1 = Read/Write flag <br />]2 = Command<br />]3 = Slot<br />]4 = Drive<br />]5 = Volume<br />]6 = Record<br />]7 = Byte Offset<br />]8 = Write Byte | Read or write a byte from or to a file. Use `FRWRTB` and `FRDB` instead of this, both of which call this macro. | NZCV | 779 | 404 |
| `FWRTB` | HEAD.DOS.ASM | ]1 = Slot<br />]2 = Drive<br />]3 = Volume<br />]4 = Record<br />]5 = Byte Offset<br />]6 = Write Byte | Write a byte to a file. | NZCV | 665 | 337 |
| `FRDB` | HEAD.DOS.ASM | ]1 = Slot<br />]2 = Drive<br />]3 = Volume<br />]4 = Record<br />]5 = Byte Offset<br />]6 = Write Byte (always 0) | Read a byte from a file. | NZCV | 700 | 357 |
| `FRWR` | HEAD.DOS.ASM | ]1 = Read/Write flag<br />]2 = Command<br />]3 = Slot<br />]4 = Drive<br />]5 = Volume<br />]6 = Record<br />]7 = Byte Offset<br />]8 = Range Address<br />]TEMP = Range Length | Read or write a range of bytes in a file. Use `FRDR` or `FWRTR` instead of this macro directly. | NZCV | 846 | 451 |
| `FRDR` | HEAD.DOS.ASM | ]1 = Slot<br />]2 = Drive<br />]3 = Volume<br />]4 = Record<br />]5 = Byte Offset<br />]6 = Range Address<br />]7 = Range Length | Read a range of bytes from a file. | NZCV | 697 | 361 |
| `FWRTR` | HEAD.DOS.ASM | ]1 = Slot<br />]2 = Drive<br />]3 = Volume<br />]4 = Record<br />]5 = Byte Offset<br />]6 = Range Address<br />]7 = Range Length | Write a range of bytes to a file. | NZCV | 940 | 509 |
| `sRWTS` | HEAD.DOS.ASM | ]1 = Slot<br />]2 = Drive<br />]3 = Volume <br />]4 = Track<br />]5 = Sector<br />]6 = Buffer<br />]7 = Command | Set the most common RWTS parameters. | NZCV | 228 | 141 |
| `GRWTS` | HEAD.DOS.ASM | none | Execute the RWTS routine. | NZCV | 19 | 11 |
### MAC.DOSFM.ASM
| MACRO | DEPENDENCY | PARAMETERS | ACTION | DESTROYS | CYCLES | BYTES |
| ------- | -------------- | ------------------------------------------------------------ | ----------------- | -------- | ------ | ----- |
| `FCAT` | HEAD.DOS.ASM | ]1 = Slot <br />]2 = Drive | Catalog. | NZCV | 657 | 348 |
| `FULCK` | HEAD.DOS.ASM | ]1 = Filename address<br />]2 = Slot<br />]3 = Drive | File unlock. | NZCV | 629 | 353 |
| `FLOCK` | HEAD.DOS.ASM | ]1 = Filename address<br />]2 = Slot<br />]3 = Drive | File lock. | NZCV | 172 | 116 |
| `FDEL` | HEAD.DOS.ASM | ]1 = Filename address<br />]2 = Slot<br />]3 = Drive | File delete. | NZCV | 791 | 412 |
| `FVFY` | HEAD.DOS.ASM | ]1 = Filename address<br />]2 = Slot<br />]3 = Drive | File verify. | NZCV | 791 | 411 |
| `FCLOS` | HEAD.DOS.ASM | ]1 = Filename address<br />]2 = Slot<br />]3 = Drive | File close. | NZCV | 797 | 415 |
| `FRENM` | HEAD.DOS.ASM | ]1 = Filename address<br />]2 = New filename address<br />]3 = Slot<br />]4 = Drive | File rename. | NZCV | 927 | 578 |
| `FOPEN` | HEAD.DOS.ASM | ]1 = Filename address<br />]2 = Slot<br />]3 = Drive<br />]4 = Volume<br />]5 = Record | File open. | NZCV | 828 | 433 |
| `BLOAD` | SUB.FBLOAD.ASM | ]1 = Filename address<br />]2 = Load address<br />]3 = Slot<br />]4 = Drive<br />]5 = Volume | Load binary file. | NZCV | 3768 | 2735 |
| `BSAVE` | SUB.FBSAVE.ASM | ]1 = Filename address<br />]2 = Load address<br />]3 = Range length<br />]4 = Slot<br />]5 = Drive<br />]6 = Volume | Save binary file. | NZCV | 5300 | 2758 |
### MAC.DOSMORE.ASM
| MACRO | DEPENDENCY | PARAMETERS | ACTION | DESTROYS | CYCLES | BYTES |
| ------- | ---------- | ---------- | -------------------------------------------- | -------- | ------ | ----- |
| `DVER` | none | none | Get DOS version. | NZCV | 28 | 18 |
| `DOSIN` | none | none | Check if DOS is loaded. | NZCV | 17 | 12 |
| `ABAS` | none | none | Check if Applesoft is loaded. | NZCV | 40 | 29 |
| `IBEX` | none | none | Check if Integer Basic program is running. | NZCV | 17 | 12 |
| `ABEX` | none | none | Check if Applesoft Basic program is running. | NZCV | 26 | 18 |

View File

@ -0,0 +1,36 @@
# Disk #7: Conversion
The Conversion Collection contains macros and subroutines for converting between different data types. This currently includes macros for converting a:
- numeric value to an integer string
- integer string to a numeric value
- numeric value to a hexadecimal string
- hexadecimal string to a numeric value
- numeric value to a binary string
- binary string to a numeric value
In future revisions, other conversions will include:
- string type conversions (preceding length byte, null-terminated, etc.)
- string to array
- array to string
Note that some of these subroutines are redundant due to the fact that some conversions are already available in the ROM. However, for the sake of understanding how these conversions work, they are provided here if for nothing more than illustration.
---
| MACRO | DEPENDENCY | PARAMETERS | ACTION | DESTROYS | CYCLES | BYTES |
| ------- | ------------------ | -------------------------------- | ------------------------------------------- | -------- | ------ | ----- |
| `I2STR` | SUB.HEX2INTASC.ASM | ]1 = Value to convert or address | Convert numeric value to integer string | NZCV | 290 | 172 |
| `STR2I` | SUB.INTASC2HEX.ASM | ]1 = String address | Convert integer string to numeric value | NZCV | 415 | 196 |
| `H2STR` | SUB.HEX2HEXASC.ASM | ]1 = Value to convert or address | Convert numeric value to hexadecimal string | NZCV | 97 | 59 |
| `STR2H` | SUB.HEXASC2HEX.ASM | ]1 = String address | Convert hexadecimal string to numeric value | NZCV | 116 | 71 |
| `B2STR` | SUB.HEX2BINASC.ASM | ]1 = Value to convert or address | Convert numeric value to binary string | NZCV | 262 | 167 |
| `STR2B` | SUB.BINASC2HEX.ASM | ]1 = String address | Convert binary string to numeric value | NZCV | 501 | 331 |

View File

@ -0,0 +1,38 @@
# Disk #8: Low Resolution Graphics
The LoRes collection contains macros and subroutines for creating and displaying low resolution graphics on the Apple II. This includes macros to:
- plot low resolution pixels
- set the working low resolution page and the viewing low resolution page
- set the low resolution mode: full screen or mixed
- plot horizontal, vertical and diagonal lines
- plot a low resolution circle
- get a low resolution pixel's color value
- print a low resolution character to the screen
---
| MACRO | DEPENDENCY | PARAMETERS | ACTION | DESTROYS | CYCLES | BYTES |
| --------- | ---------- | ------------------------------------------------------------ | ------------------------------------------------- | -------- | ------ | ----- |
| `LWORKPG` | none | ]1 = page number | set the working page | NZCV | 27+ | 20 |
| `LVIEWPG` | none | ]page number | set the viewing page | NZCV | 21+ | 16 |
| `LRGF` | none | none | set full page mode | NZCV | 12+ | 9 |
| `LRGP` | none | none | set mixed page mode (partial) | NZCV | 12+ | 9 |
| `LFCLR` | `LRGFCLR` | ]1 = color code | fill screen with specified color (full screen) | NZCV | 139+ | 92 |
| `LPCLR` | `LRGPCLR` | ]1 = color code | fill screen with specified color (partial) | NZCV | 125+ | 86 |
| `LPLOT` | `LRPLOT` | ]1 = X coordinate<br />]2 = Y coordinate<br />]3 = color code | plot a low resolution pixel to the working page | NZCV | 148+ | 107 |
| `LLINE` | `LRBLINE` | ]1 = X origin<br />]2 = X destination<br />]3 = Y-origin<br />]4 = Y destination<br />]5 = color | plot an arbitrary line | NZCV | 441+ | 297 |
| `LCIRC` | `LRCIRCLE` | ]1 = Center x position<br />]2 = Center y position<br />]3 = Circle radius<br />]4 = Color | plot a circle to low resolution page | NZCV | 2437+ | 520 |
| `LVLIN` | `LRVLINE` | ]1 = Y origin<br />]2 = Y destination<br />]3 = X coordinate<br />]4 = color | plot a vertical line to the low resolution page | NZCV | 250+ | 164 |
| `LHLIN` | `LRHLINE` | ]1 = X origin<br />]2 = X destination<br />]3 = Y coordinate<br />]4 = color | plot a horizontal line to low resolution page | NZCV | 246+ | 161 |
| `LRGET` | `LRGETPIX` | ]1 = X coordinate<br />]2 = Y coordinate | get color value of low resolution pixel | NZCV | 110+ | 71 |
| `LCHAR` | `LRCHAR` | ]1 = X coordinate<br />]2 = Y coordinate<br />]3 = address of 3-byte character<br />]4 = color | plot a large character to the low resolution page | NZCV | 441+ | 439 |

View File

@ -0,0 +1,35 @@
# Disk #9: High Resolution Graphics
The HiRes collection contains macros and subroutines for plotting and displaying high resolution graphics. This includes macros to:
- Flip between HiRes pages, both as working pages and viewing pages
- Plot a single HiRes pixel
- Fill the HiRes page with a given color
- Plot horizontal, vertical and diagonal lines
- Plot text characters to the HiRes screen, individually or as a string
- Plot entire bytes to the HiRes screen, easily allowing for the plotting of tiles
---
| MACRO | DEPENDENCY | PARAMETERS | ACTION | DESTROYS | CYCLES | BYTES |
| --------- | ---------- | ------------------------------------------------------------ | -------------------------------------------------- | -------- | ------ | ----- |
| `HBSET` | none | ]1 = X position<br />]2 = Y position<br />]3 = color | Set a byte on the HiRes page | NZCV | 54 | 37 |
| `HBGET` | none | ]1 = X position<br />]2 = Y position | Get a byte value from the HiRes page | NZCV | 49 | 30 |
| `HVIEWPG` | none | ]1 = Page number | Set the viewing HiRes page | NZCV | 19 | 14 |
| `HWORKPG` | none | ]1 = Page number | Set the working HiRes page | NZCV | 27 | 20 |
| `HPLOT` | `HRPLOT` | ]1 = X position<br />]2 = Y position<br />]3 = Color | Plot a single pixel to the HiRes page | NZCV | 348+ | 14 |
| `HCLR` | `HCLEAR` | ]1 = Color | Fill the HiRes page with the specified color | NZCV | 96+ | 5 |
| `HLIN` | `HRHLINE` | ]1 = X origin<br />]2 = X destination<br />]3 = Y position<br />]4 = Color | Plot a horizontal line to the HiRes page | NZCV | 494+ | 34 |
| `VLIN` | `HRVLINE` | ]1 = Y origin<br />]2 = Y destination<br />]3 = X position<br />]4 = Color | Plot a vertical line to the HiRes page | NZCV | 449+ | 30 |
| `LINE` | `HRBLINE` | ]1 = X origin<br />]2 = Y origin<br />]3 = X Destination<br />]4 = Y destination<br />]5 = Color | Plot a diagonal line to the HiRes page | NZCV | 825+ | 42 |
| `HCHAR` | | ]1 = X position<br />]2 = Y position<br />]3 = byte to print | Plot a text character to the HiRes page | NZCV | 432+ | 296 |
| `HSTR` | | ]1 = X position<br />]2 = Y position<br />]3 = String address<br />]4 = Offset value | Plot a string of text characters to the HiRes page | NZCV | 767+ | 37 |

View File

@ -0,0 +1,22 @@
# Disk #10: The Internal Speaker
The Speaker collection contains macros and subroutines for outputting sound on the Apple II internal speaker. Currently, this is limited to square wave notes and song playing, as well as as few standard sound effects. Ideally, future updates will include a subroutine using duty-cycling that is capable of producing elemental "instruments" for a variety of timbres.
| MACRO | DEPENDENCY | PARAMETERS | ACTION | DESTROYS | CYCLES | BYTES |
| ------- | -------------------- | ---------- | --------------------------------------- | -------- | ------ | ----- |
| `STMPO` | `SETTEMPO` | | Set the tempo | NZCV | 240 | 6 |
| `PNOTE` | `PLAYNOTE` `REDTONE` | | Play note in song | NZCV | 172+ | 3 |
| `SSONG` | none | | Set song sequence | NZCV | 48 | 36 |
| `NEXTN` | none | | Advance to next note in song | NZCV | 24 | 17 |
| `PREVN` | none | | Move to previous note in song | NZCV | 28 | 17 |
| `RSTRT` | none | | Restart song index | NZCV | 16 | 12 |
| `FFWRD` | none | | Fast forward a number of notes in song | NZCV | 27 | 19 |
| `REWND` | none | | Rewind a number of notes in song | NZCV | 35 | 25 |
| `PTONE` | `REDTONE` | | Play a non-song tone | NZCV | 220+ | 18 |
| `PFREQ` | `REDTONE` | | Play a non-song frequency | NZCV | 214+ | 15 |
| `PSONG` | `PNOTE` `NEXTN` | | Play an entire song sequence | NZCV | 226+ | 42 |
| `SFX` | `SOUNDFX` | | Play a sound effect from the collection | NZCV | 1962 | 18 |

View File

@ -0,0 +1,89 @@
## Introduction
The AppleIIAsm Library is an array of subroutines and macros for the Apple II line of computers, aimed at providing a stable set of assembly routines for most common tasks. Additionally, this library is meant to ease the transition between programming in Applesoft BASIC and 6502 Assembly by not only providing the basic data structures and functions found in higher-level languages but also by providing a set a macros--currently dubbed AppleChop--that simulates the design and workflow of BASIC. A companion booklet to this library, *From Applesoft to AppleChop to Assembly,* provides a framework for making that transition.
These subroutines and macros are written for the Merlin 8 Pro assembler, which should run on any Apple II with 64k of memory (programs assembled with Merlin 8 Pro will run on machines with less than 64k, however). Since we are using 6502 Assembly here, it should not be too difficult to port the subroutines to other assemblers and even other systems like the Commodore 64, Nintendo Entertainment System, BBC Micro, and more. For a guide on using the Merlin Pro 8 Assembler, see the other companion booklet, *The New Merlin Pro 8 Quick Start User Guide*.
It should be noted that the core libraries in this collection---those on disks one to eleven---should be compatible with every iteration of the Apple II family, from the original Apple II in 1977 to the Apple IIGS in 1986. Disks beyond that core collection are considered bonus disks, and are dedicated to either creating libraries for specialized hardware (such as much of the IIGS, or the Mockingboard) or are there to serve as more complicated and integrated demos for the user to peruse.
**Who is this manual for?**
The primary audience for this manual is someone who is already familiar with 6502 Assembly or is at least trying to learn it; that is, novices. Like all manuals, this is primarily a reference: beyond this introduction and early sections of Part I, this manual is not meant to be read straight through. Feel free to flip back and forth as you wish!
**Who is this manual NOT for?**
This manual is definitely not for someone completely unexposed to Assembly language, but nor is it really aimed at 6502 experts. The collection itself can be used by beginner and expert alike, but whereas this manual would likely confuse the absolute beginner, an expert interested in optimizing their work (and these subroutines) will not find much help here. For those well-versed in 6502 Assembly, this collection might better serve as a prototyping system that then gets torn apart and optimized; for those barely versed in 6502 Assembly, this library, and especially the AppleChop collection, will best serve to ease the transition between a standard knowledge of BASIC and the quirks of Assembly language (commenting is excessive in the libraries for this very reason). Both extremes may find this collection useful, but for wildly different reasons.
As someone who spends a *lot* of time thinking about, writing about, and teaching different facets of technical writing (in its broadest sense), I can confirm the following: there are thousands of books written about the 6502 architecture and Assembly programming. I can also confirm that these books---as well as most websites---tend to approach the subject from a "writerly" position rather than a reader-centered one; that is, written for engineers and computer scientists who have already spent a lot of time and money understanding the theory, learning the jargon, and training themselves to be able to do things by muscle memory. That's great for established engineers, mathematicians, computer scientists and the like, as well as those who can afford to dedicate years of their lives (and again, gobs of $$$) to obtain a degree that qualifies them as entry level in the field. It is not so great, however, for beginners, hobbyists, or those trying to study it from a non-engineering theoretical perspective. That is, at least, part of the gap I am hoping to fill; after all, this book is part of my research for writing another book aimed at a non-technical audience.
That said, I myself would have failed quite readily without at least a few key texts and websites, and it would be remiss to not list them here. And if you're committed to learning this, know that there is no good replacement to sitting down, typing out a listing from a book, assembling it and then trying to figure out what the hell you just did---or what you did wrong! There is no doing without learning, and there is no learning without doing. At risk of pontificating, I believe many of us have forgotten this mantra, and the internet has not helped matters.
**Why Merlin Pro 8? Why not something...modern?**
Understanding how coding for a specific platform and a specific era works is not merely a matter of knowledge, but a matter of practice. Much of the way development happens, in computer software or not, is predicated on the apparatus in place that allows for it. Changing that apparatus, whether it be adding modern components like multiple open files, faster assembly, easier access and legibility and so on changes your understanding of how everything worked (and works). Especially with an ancient (and largely obsolete) language like 6502 assembly, few people are learning it to accomplish a practical task. Instead, we are approaching the topic more like an archaeologist or historical reenactor: going through the same motions to understand the topic cohesively. This is explained more thoroughly in the Preface.
That said, there is nothing inherently wrong with using modern tools--it just does not fit the goals for writing this library. Brutal Deluxe software has rewritten a more modern version of Merlin 16, and the CC65 compiler/assembler makes contemporary 6502 development far more efficient and less frustrating overall. If Merlin 8 Pro feels too dated--and to many, it will feel hopelessly so--by all means use these modern software packages. Just be aware that some substantial effort may be involved in rewriting the code here for different assemblers. If you must, I would suggest using an Apple II emulator like _AppleWin_ with a high speed setting for compile time---though be careful if so, as it is easy to miss error interruptions.
**Further Resources**
While beginners are welcome to use this library, and it is partially aimed at those who are trying to learn 6502 Assembly on the Apple II, a cohesive and thorough guide to 6502 programming is beyond the scope of this manual. For a better understanding of the hardware, programming, and culture surrounding the Apple II, I would suggest consulting the following sources.
__*6502 Programming Books*__
- Roger Wagner, Chris Torrence. [*Assembly Lines: The Complete Book*](https://www.amazon.com/Assembly-Lines-Complete-Roger-Wagner/dp/1312089407/). May 10, 2017. <https://www.amazon.com/Assembly-Lines-Complete-Roger-Wagner/dp/1312089407/>
- Lance A. Leventhal, Winthrop Saville. *6502 Assembly Language Subroutines*. 1982.
- Don Lancaster. *Assembly Cookbook for the Apple II, IIe*. 1984, 2011.
- Mark Andrews. _Apple Roots: Assembly Language Programming for the Apple IIe and IIc_. 1986.
- CW Finley, Jr., Roy E. Meyers. *Assembly Language for the Applesoft Programmer*. 1984.
- Randy Hyde. *Using 6502 Assembly Language*. 1981.
- Glen Bredon. *Merlin Pro Instruction Manual*. 1984.
- JS Anderson. *Microprocessor Technology*. 1994. (also covers z80 architecture)
__*6502 Programming Websites*__
- [CodeBase64](http://codebase64.org/doku.php). <http://codebase64.org/doku.php>
- [6502.org](http://www.6502.org/). <http://www.6502.org/>
- [Easy6502](http://skilldrick.github.io/easy6502/). <http://skilldrick.github.io/easy6502/>
__*Apple II Books*__
- Bill Martens, Brian Wiser, William F. Luebbert, Phil Daley. [*What's Where in the Apple, Enhanced Edition: A Complete Guide to the Apple \]\[ Computer*.](https://www.amazon.com/gp/product/136517364X/) October 11, 2016. <https://www.amazon.com/gp/product/136517364X/>
- David Flannigan. [*The New Apple II Users' Guide*](https://www.amazon.com/gp/product/0615639879/). June 6, 2012. https://www.amazon.com/gp/product/0615639879/
- David L. Craddock. [*Break Out: How the Apple II Launched the PC Gaming Revolution*](https://www.amazon.com/gp/product/0764353225/). September 28, 2017. https://www.amazon.com/gp/product/0764353225/
- Steven Weyhrich. [*Sophistication ;&amp; Simplicity: The Life and Times of the Apple II Computer*](https://www.amazon.com/gp/product/0986832278/). December 1, 2013. https://www.amazon.com/gp/product/0986832278/
- Ken Williams, Bob Kernagham, Lisa Kernagham. [*Apple II Computer Graphics*](https://www.amazon.com/gp/product/B01FIXG7ZK/). November 3, 1983. <https://www.amazon.com/gp/product/B01FIXG7ZK/>
- Lon Poole. [*Apple II Users' Guide*.](https://www.amazon.com/gp/product/0931988462/). 1981. <https://www.amazon.com/gp/product/0931988462/>
- Jeffrey Stanton. *Apple Graphics and Arcade Game Design*. 1982.
- Apple. *Apple Monitors Peeled*. 1981.
- Apple. _Apple II/IIe/IIc/IIgs Technical Reference Manual._
*__Apple II Websites__*
- [Apple II Text Files](http://textfiles.com/apple/.windex.html). <http://textfiles.com/apple/.windex.html>
- [Apple II Programming](http://apple2.org.za/gswv/a2zine/faqs/csa2pfaq.html). <http://apple2.org.za/gswv/a2zine/faqs/csa2pfaq.html>
- [The Asimov Software Archive](https://ftp.apple.asimov.net/). <https://ftp.apple.asimov.net/>
- [Apple II Online](https://apple2online.com/index.php). <https://apple2online.com/index.php>
- [Juiced.GS: A Quarterly Apple II Journal](https://juiced.gs/). <https://juiced.gs/>
_**Related GitHub Projects**_
A number of folk are doing work on 6502 or the Apple II on GitHub. While I cannot possibly list each and every one (that's what the search function is for!), these are projects I have found particularly useful, informative, entertaining, or inspiring.
- [Prince of Persia Apple II Source Code](https://github.com/fabiensanglard/Prince-of-Persia-Apple-II), by Jordan Mechner. <https://github.com/fabiensanglard/Prince-of-Persia-Apple-II>
- [WeeGUI, a small gui for the Apple II](https://github.com/blondie7575/WeeGUI). <https://github.com/blondie7575/WeeGUI>
- [Two-lines or less Applesoft programs](https://github.com/thelbane/Apple-II-Programs) --- a lot can be accomplished! <https://github.com/thelbane/Apple-II-Programs>
- [Doss33FSProgs](https://github.com/deater/dos33fsprogs), programs for manipulating the DOS 3.3 filesystem. <https://github.com/deater/dos33fsprogs>
- [ADTPro](https://github.com/ADTPro/adtpro), a requirement for anyone working with real Apple II hardware today. <https://github.com/ADTPro/adtpro>
- [CC65](https://github.com/cc65), a modern cross-compiling C compiler and assembler for 6502 systems. <https://github.com/cc65>
- [PLASMA: The Proto-Language Assembler for All](https://github.com/dschmenk/PLASMA) --- this was originally written for the Apple II alone, but has recently expanded to other systems. <https://github.com/dschmenk/PLASMA>
---
[Return to Table of Contents](0.0%20Title_to_TOC)
[Next: Package Overiew](3.0%20Package_Overview.md)

View File

@ -0,0 +1,50 @@
## Package Overview
The **AppleIIAsm** package library consists of 25 disks that contain thematically related subroutines, demos and utilities, as well as extra disks that hold minified versions of every subroutine for convenience. The contents of each disk and collection are covered in Part II: Detailed Descriptions and Listings. The disks are ordered as follows:
- **Disk 0** BOOT (for setting up own environment)
### CORE COLLECTIONS
- **Disk 1** REQUIRED (Required and Common Libraries)
- **Disk 2** STDIO (Standard Input and Output Library)
- **Disk 3** ARRAYS (Array Library)
- **Disk 4** MATH (Math Library)
- **Disk 5** STRINGS (String Library)
- **Disk 6** DOSFILE (DOS 3.3 File Input and Output Library)
- **Disk 7** CONVERT (Data Type Conversion Library)
- **Disk 8** LORES (Low Resolution Graphics Library)
- **Disk 9** SPEAKER (Mono Speaker Library)
- **Disk 10** HIRES (High Resolution Graphics Library)
- **Disk 11** DETECT (Hardware Detection Library)
- **Disk 12** APPLECHOP (AppleChop High-Level Library)
### DEMOS AND UTILITIES
- **Disk 13** MINIDISKA (Minified Libraries Disk A)
- **Disk 14** MINIDISKB (Minified Libraries Disk B)
- **Disk 15** UTILS (Utilities Disk)
- **Disk 16** DEMOSA (Demo Disk A)
- **Disk 17** DEMOSB (Demo Disk B)
### MACHINE-SPECIFIC LIBRARIES
- **Disk 18** 80COL (80-Column Text Library)
- **Disk 19** MOCKINGBOARD (Mockingboard Sound Card Library)
- **Disk 20** DBLLORES (Double Low Resolution Graphics Library)
- **Disk 21** DBLHIRES (Double High Resolution Graphics Lib)
- **Disk 22** MISC (Miscellaneous subroutine library)
- **Disk 23** IIGS GS/OS 6.04 Library (3.5" diskette)
- **Disk 24** IIGSAUDIO (IIGS AUDIO library) (3.5" diskette)
- **Disk 25** IIGSGRAPHICS (IIGS Additional Graphics Mode Libraries) (3.5" diskette)
---
[Return to Table of Contents](0.0%20Title_to_TOC)
[Software Architecture](4.0%20Software_Architecture.md)

Some files were not shown because too many files have changed in this diff Show More