~ ~ ====================================================================== ~ LONGLOADER INSTRUCTIONS SONIX for the Apple IIgs ~ ====================================================================== ~ ~ Longloader is a powerful utility that lets you load literally any file ~ from disk to any memory bank in your IIgs& move any piece of data from ~ X any memory location to another& and save any piece of data from any ~ memory location to disk--and all from Applesoft Basic or the keyboard ~ (immediate mode). There is no need to enter the monitor in the usual& ~ "formal" way& and the ability to access all memory via Applesoft means ~ there are no "off limits" memory areas to your own Basic programs. ~ ~ The load part of Longloader is especially effective& since you don't ~ have to be concerned about the type of file you want to load (such as ~ having to BLOAD a binary file....and how to load a word processor ~ file). When Longloader loads a file& it makes a copy of all the ~ file's attributes (type& size& dates& times& etc.) in memory for your ~ programming reference and use. These data are in memory bank 0& and ~ you can refer to them by PEEK-ing the locations shown below. ~ ~ ~ 771 ($0303) - Access Bits 778 ($030A) - Last Mod. Date ~ ~ 772 ($0304) - Filetype 780 ($030C) - Last Mod. Time ~ ~ 773 ($0305) - Aux. Filetype 782 ($030E) - Creation Date ~ ~ 775 ($0307) - Storage Type 784 ($0310) - Creation Time ~ ~ 776 ($0308) - Blocks Used ~ ~ X ~ ~ LONGLOADER ACCESS ~ ----------------- ~ To use Longloader& BRUN the binary file "Longloader" in the way most ~ convenient to you. This can be from the keyboard (immediate mode)& ~ from an Applesoft Basic program& or from a program launcher of some ~ sort. Please note& though& that you should BRUN Longloader only once ~ per "application session". When it's BRUN& Longloader makes space ~ for itself between the Basic Interpreter and its buffers& so each suc- ~ cessive BRUN allocates another space& moving HIMEM down and down. ~ (Quality Software's book "Beneath Apple ProDOS" gives a good explana- ~ tion of this.) This could prove to be undesirable for many reasons... ~ please take our advice% don't do it! ~ ~ If you're using Longloader and our program ICONIX.GS (which is a ~ binary file on the "ICONIX for the Apple IIgs" disk) at the same ~ time& you should BRUN ICONIX.GS first& then BRUN Longloader. ~ ~ ~ LOADING FILES ~ ------------- ~ To load a file from disk to memory& use this statement syntax% ~ ~ SG$ = "LD&/VOLUME/SUBDIRECTORY/FILENAME&A$123ABC&" % CALL 38960 ~ ~ X where A$123ABC is the complete memory address you wish to load to. ~ ~ ~ ~ So What Software F-1 1-JUN-88 ~ ~ ~ ~ ~ ====================================================================== ~ LONGLOADER INSTRUCTIONS SONIX for the Apple IIgs ~ ====================================================================== ~ ~ Note that the address has 6 alphanumeric characters...in hexadecimal ~ format. The first 2 specify the memory bank ($00 - $FF& depending on ~ X how much memory your IIgs has)& and the last 4 specify the address ~ within the selected bank ($0000 - $FFFF). ~ ~ Be sure to enclose the entire statement following the SG$= portion in ~ quotes& and please note the comma at the end of the statement& just ~ before the final quote mark. You can usually get by without it& but ~ the comma delimits the contents of the "SG$" string and guarantees ~ that Longloader will recognize the end of the string regardless of ~ where the "SG$" variable exists in memory. ~ ~ ~ SAVING FILES ~ ------------ ~ To save a file--or to save a piece of data as a file--from a memory ~ location& use this statement syntax% ~ ~ SG$ = "SA&06(see note& below)&/VOLUME/SUBDIRECTORY/FILENAME& ~ A$123ABC&L$12AB&" % CALL 38960 ~ ~ where the address and length entries are in hexadecimal format and ~ denote the memory location you desire to be the saved file's begin- ~ ning and the length of the file& respectively. Don't forget the ~ trailing comma& please. ~ ~ The filetype should& in general& be the same as the filetype of the ~ X data originally loaded into memory. In the statement example above& ~ we've used "06"& the filetype for a binary file. Longloader is quite ~ flexible about the type of file it creates when saving& however. You ~ can easily convert a word processor document (say& an AppleWorks docu- ~ ment& filetype $1A) to a binary file (filetype $06) or a text file ~ (filetype $04). Exercise some judgment in specifying filetype& ~ though; you can really mess up a disk by "creating" files whose con- ~ tents don't match their filetype! ~ ~ Here's a list of some of the filetypes recognized by ProDOS; you can ~ find a complete list in Quality Software's book "Beneath Apple ~ ProDOS". ~ ~ ~ $00% (No type) $0F% DIR - Subdirectory ~ $01% (Damaged) $1A% AWP - AppleWorks W-P file ~ $04% TXT - Text $FC% BAS - Applesoft program ~ $06% BIN - Binary $FF% SYS - ProDOS system file ~ ~ ~ ~ ~ ~ ~ ~ ~ X ~ ~ ~ ~ So What Software F-2 1-JUN-88 ~ ~ ~ ~ ~ ====================================================================== ~ LONGLOADER INSTRUCTIONS SONIX for the Apple IIgs ~ ====================================================================== ~ ~ TRANSFERRING MEMORY CONTENTS ~ ---------------------------- ~ X To move a piece of data from one memory location to another& use this ~ statement syntax% ~ ~ SG$ = "XF&123ABC&>&456DEF&L&12AB&" % CALL 38960 ~ ~ where 123ABC is the starting location to transfer FROM (bank and ~ memory address)& 456DEF is the starting location to transfer TO ~ (bank and memory address)& and 12AB is the length of the memory ~ segment to be transferred. (Trailing comma here& too.) ~ ~ Please note that the two addresses and the length are to be expressed ~ in hexadecimal format& WITHOUT the traditional "$". ("$" ARE used in ~ Longloader's Load and Save statements& but not in the transfer state- ~ ment--for some rather arcane reasons that needn't be divulged here.) ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ X ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ X ~ ~ ~ ~ So What Software F-3 1-JUN-88 ~ ~ ~ ~ENDFILE