💾 Archived View for mirrors.apple2.org.za › archive › apple.cabi.net › System › GSOS.P8.Anatomy › -P… captured on 2024-02-05 at 14:48:58.

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

I've been a fan of ProDOS since Apple first released the 8-bit version in early 1984.
(This version is now called ProDOS 8, and it works on all Apple II models; the 16-bit
version, GS/OS, works on the Apple IIgs only.) Now, almost five years later, having
written two major ProDOS 8 applications and several GS/OS and ProDOS 8 disk
utilities, I'm satisfied that I fully understand how these operating systems work, so it's
time to share my knowledge with you.

Some of the more interesting topics I cover in this book are

z How the ProDOS file system organizes files on disks
z How to use GS/OS and ProDOS 8 commands to perform disk operations
z How the BASIC.SYSTEM (Applesoft) interpreter works in a ProDOS 8
environment

z How to write and install your own BASIC.SYSTEM disk commands
z How to write GS/OS and ProDOS 8 system programs
z How to communicate with a SmartPort disk controller
z How GS/OS and ProDOS 8 manage interrupts from I/O devices
z How to write and install ProDOS 8 disk and clock drivers
z How to communicate with character devices like the keyboard and the video
screen using the GS/OS Console Driver

This book is intended as a reference for intermediate to advanced programmers since
I presume you are reasonably familiar with Applesoft BASIC and 6502/65816 assem-
bly language. Even if you're not, you should find the descriptions of how GS/OS and
ProDOS 8 handle files and manage peripheral devices useful and revealing.

I've included several programming examples throughout the book to highlight
important concepts and to help make the concepts easier to understand. One of these
programs is for reading or writing any data block on a disk so that you can easily
explore the internal structures of directories and files; another creates a high-speed
ProDOS 8 RAMdisk using an area of the Apple II's main memory for block storage;
and there are many more. The ProDOS 8 6502 assembly language programs were
developed using the Merlin 8/16 assembler (from Roger Wagner Publishing); for the
GS/OS 65816 assembly-language programs, I used the assembler in the Apple IIgs

vii

Programmer's Workshop (from the Apple Programmer's and Developer's Association).
I review some of the unique features of these assemblers in Appendix I; read this
appendix if you are using a different assembler and want to convert the source listings.

Several specialized topics I refer to in this book are not explained in great detail
because they really have little to do with ProDOS 8 or GS/OS itself. For more
information on these topics, refer to my earlier books, Exploring the Apple IIgs (which
explains how to use IIgs tool sets), Inside the Apple IIe, and Inside the Apple IIc. The
first book is published by Addison-Wesley and the last two by Brady/Prentice Hall
Press. See Appendix III for a bibliography of other useful reference material.

Be aware that this book is not a tutorial on how to use the standard Applesoft disk
commands that the ProDOS 8 BASIC.SYSTEM interpreter provides. Nor does it
describe ProDOS 16 (an early version of GS/OS) in any detail. If you require books on
these topics, I suggest you read Apple's own BASIC Programming With ProDOS
(Addison-Wesley, 1985) and Apple IIgs ProDOS 16 Reference (Addison-Wesley, 1987).
Instead, I concentrate on the GS/OS and ProDOS 8 commands that are accessible
from assembly-language programs only.

Finally, there is no need to manually enter the programs listed in the book. Instead,
you can order a disk directly from me that contains these programs (in both source and
object code formats) as well as some additional bonus utility programs (described in
Appendix IV). For ordering information, see the last page of the book.



My thanks to Matt Deatherage of the Apple II Developer Technical Support group at
Apple Computer, Inc. for his invaluable comments on the technical content of this
book prior to publication. Matt helped keep me honest and accurate, two traits one
needs to write a useful reference book for software developers.

Thanks in advance to Carole Alden, Steve Stansel, Linda O'Brien, and Abby
Genuth of Addison-Wesley who did a superb job in developing, marketing, and selling
my last book, Exploring the Apple IIgs. I know you'll do just as good a job again.

Gary B. Little

Belmont, California, U.S.A.
September 1988

viii