Text preview for : Lisa_Workshop_Supplement_Ver_1.0_1986.pdf part of apple Lisa Workshop Supplement Ver 1.0 1986 apple lisa workshop_3.0 Lisa_Workshop_Supplement_Ver_1.0_1986.pdf



Back to : Lisa_Workshop_Supplement_ | Home

APPLE
PROGRAMMER'S
AND DEVELOPER'S
ASSOCIATION


290 SW 43rd. Street
Renton, WA 98055
206-251-6548




Lisa Workshop
Supplement
Version 1.0
APDA# KMSLWI
About the Lisa Workshop Supplement


Contents: Section:

About the Lisa Workshop Supplement o
Putting Together A Macintosh Application 1
Workshop 3.9 Update 2
Writeln Window 3
Equate and Glue Files for the Lisa Workshop 4
PPostEvent, NGetTrapAddress and NSetTrapAddress 5
Yanked Text 6
Resource File Builder 7




Disks in the Lisa Workshop Supplement
The Lisa Workshop Supplement contains the following three disks:

Lisa Workshop 1 Lisa Workshop 3.0 formatted disk; can be used with any version of the Lisa
Workshop from version 3.0 on. Contains equate files needed when using
the Lisa Workshop to create Macintosh applications.

Lisa Workshop 2 Lisa Workshop 3.0 formatted disk; can be used with any version of the Lisa
Workshop from verison 3.0 on. Contains object files needed when using
the Lisa Workshop to create Macintosh applications.

Lisa Workshop 3 Lisa Workshop 3.0 formatted disk; can be used with any veri son of the Lisa
Workshop from version 3.0 on. Contains interface files needed when using
the Lisa Workshop to create Macintosh applications. Also contains the
Resource File Builder, described in Section 7 of this document.

Lisa Update 1,2 Lisa Workshop 3.0 formatted disks; can be used with any version of the
Lisa Workshop from version 3.0 on. Contain the necessary files to update
the Lisa Workshop from version 3.0 to version 3.9. Includes new versions
of the Workshop Shell, the linker, the editor, the assemble, RMaker, and
MacCom.

Please note: The files included here are meant to replace all of the previous versions that were
sent out in previous Software Supplements. Please do no use your older versions; use these
newer copies.




About the Lisa Workshop Supplement
Lisa Workshop Supplement . Page 0-1
Contents of the Lisa Workshop Supplement Disks:

Contents of Lisa Workshop 1:

TLAsm/ATalkEqu.text
TLAsm/Fixmath.text
TLAsm/FSEqu.text
TLAsm/FSPrivate.text
TLAsm/Graf3DEqu.text
TLAsm/HardwareEqu.text
TLAsm/PackMacs.text
TLAsm/PREqu.text
TLAsm/Private.text
TLAsm/QuickEqu.text
TLAsm/SANEMacs.text
TLAsm/SCSIEqu.text
TLAsm/SonyEqu.text
TLAsm/SysEqu.text
TLAsm/SysErr.text
TLAsm/TimeEqu.text
TLAsm/ToolEqu.text
TLAsm/Traps.text

Contents of Lisa Workshop 2:

ATalk/ABPackage.obj
ATalk/ABPackage.Rsrc
ATalk/ABPackageR.text
obj/ABPasCalls.obj
obj/ABPaslntf.obj
obj/AppleTalk.obj
obj/FixMath.obj
obj/FixMathAsm.obj
obj/Graf3D.obj
obj/Graf3DAsm.obj
obj/MacPrint.obj
obj/MemTypes.obj
obj/OSlntf.obj
obj/OSTraps.obj
obj/Packlntf.obj
obj/PackTraps.obj
obj/Paslnit.obj
obj/PasLib.obj
obj/PasLibAsm.obj
obj/PasLiblntf.obj
obj/PrintCalls.obj
obj/QuickDraw.obj
obj/ResEd.obj
obj/RTLib.obj
obj/SANELib.obj
obj/SANELibAsm.obj
obj/SCSllntf.obj
obj/SCSITraps.obj
obj/Toollntf.obj
About the Lisa Workshop Supplement
Lisa Workshop Supplement Page 0-2
obj/ToolTraps.obj
obj/WritelnWindow.obj
serial/Async/Mac.obj
serial/Async/MacXL.obj
serial/AsyncR.text

Contents of Lisa Workshop 3:
intrfc/AppleTalk.text
intrfc/FixMath.text
intrfc/Graf3D.text
intrfc/MacPrint.text
intrfc/MemTypes.text
intrfc/OSlntf.text
intrfc/Packlntf.text
intrfc/PasLiblntf.text
intrfc/QuickDraw.text
intrfc/ResEd.text
intrfc/SANELib.text
intrfc/SCSlIntf.text
intrfc/Toollntf.text
intrfc/WritelnWindow.text
RFB.obj
RFB/exec.text
SOURCE/RFB.TEXT




About the Lisa Workshop Supplement
Lisa Workshop Supplement Page 0-3
Documents in the Lisa Workshop Supplement:
Putting Together A Macintosh Application describes the steps for creating an application
using the Lisa Workshop.

The Lisa Workshop Update tells how to update your verison 3.0 Lisa Workshop to version
3.9. If you have version 2.0, you must update to version 3.0 before you can use this update.

The Writeln Window is a debugging aid that you can use in your Lisa Workshop Pascal
programs to help in development of applications.

The document Equate and Glue Files for the Lisa Workshop explains the object and text
files used for development under the Lisa Workshop. .

PPostEvent, NGetTrapAddress and NSetTrapAddress detail new Trap call which have
been added.

The printout Yanked Text lists equates which have been removed from public and private include
files. The list can be searched for routines, equates, or other structures which your program may
have referenced in the past, but are no longer resolved due to their removal from the include files.

The Resource File Builder is a utility that aids in application development where lots of
resources are used. It can save time by preventing recompilation of RMaker files at each build.




About the Lisa Workshop Supplement
Lisa Workshop Supplement . Page 0-4
MACINTOSH USER EDUCATION


,Putting Together a Macintosh Application /PUTTING/TOGETHER


Modification History: First Draft (ROM 2.45) Caroline Rose 6/9/83
Second Draft (ROM 4.4) Caroline Rose 7/14/83
Third Draft (ROM 7) Caroline Rose 1/13/84
Fourth Draft Caroline Rose 4/9/84
Fifth Draft Caroline Rose 7/10/84
Sixth Draft Caroline Rose 5/5/85


ABSTRACT

This manual discusses the fundamentals of preparing, compiling or
assembling, and linking a Macintosh application program on the Lisa
Workshop development system.


Summary of significant changes and additions since last draft:

-This manual now documents Lisa Workshop version 3.0 and the May.1985
Macintosh Software Supplement. Some of the information may not apply
to Workshop version 2.0.

-Changes have been made to the interface files and the files you link
with or include in your assembly-language source.

-The sections describing the Macintosh utility programs RMover and Set
File have been removed. These programs have been superseded by other
tools in the Macintosh Software Supplement.



CONTENTS

3 About This Manual
3 Conventions
4 Getting Started
6 The Source File
7 The Resource Compiler Input File
13 Defining Your Own Resource Types
14 The Exec File
19 Dividing Your Application Into Segments
20 Notes for Assembly-Language Programmers
23 Summary of Putting Together an Application

Copyright (c) 1985 Apple Computer, Inc. All rights reserved.



ABOUT THIS MANUAL

This manual discusses the fundamentals of preparing, compiling or




Putting Together A Macintosh Application
Lisa Workshop Supplement Page 1-1
assembling, and linking a Macintosh application program on the Lisa
Workshop development system. It assumes the following:

-You know how to write a Macintosh application in Pascal or assembly
language. Details on this maybe found in Inside Macintosh.

-You're familiar with the Macintosh Finder, which is described in
Macintosh, the owner's guide.

You need to have a Lisa 2/5 or 2/10 with at least 1 megabyte of memory, a
Workshop development system (version 2.0 or greater), and the Macintosh
Software Supplement.

Note: This manual applies to version 3.0 of the Workshop and the May 1985
Software Supplement.

After explaining some conventions it uses, the manual begins by
presenting the first steps you should take once your Lisa has been. set up
for Macintosh application development under the Workshop. It then
discusses each of the three files you'll create to develop your
application: the source file, the Resource Compiler input file, and an
exec file.

The next section discusses how to divide an application into segments.
This is followed by important information for programmers who want to
write all or part of an application in assembly language.

Finally, there's a summary of the steps to take to put together a
Macintosh application.

Note: This manual presents a recommended scenario, not by any means the
only possible one. Details, such as what you name your files, may
vary.




Conventions

Sometimes this manual shows you what to do in a two-column table, the
first one labeled "Prompt" and the second "Response". The first column
shows what appears on the Lisa to "prompt" you; it might be a request
for a file name, or just the Workshop command line. This column will not
show all the output you'll get from a program, only the line that prompts
you. (There may have been a lot of output before that line.) The second
column shows what you type as a response. The following notation is
used:


Notation Meaning

Press the RETURN key.
[ ] Explanatory comments are enclosed in [ ];
you don't type them.

A space preceding is not to be typed. It's there only for
readability.

[ ] in the "Prompt" column actually appear in the prompt; they




Putting 'Together A Macintosh Application
Lisa Workshop Supplement Page 1-2
enclose defaults.

Except where indicated otherwise, you may type letters in any combination
of uppercase and lowercase, regardless of how they're shown in this
manual.



GETTING STARTED

Once your Lisa has been set up for Macintosh application
development, it's a good idea to orient yourself,,~to the
files installed on it. You can use the List c~and in the File
Manager to list all the file names. Certain subsets of related files
begin with the same few letters followed by a slash; some typical naming
conventions are as follows:


Beginning
of file name Description

Intrfc/ Text files containing the Pascal interfaces
TlAsm/ Text files to include when using assembly language
Obj/ Object files
Work/ Your current working files
Back/ Backup copies of your working files
Example/ Examples provided by Macintosh Technical Support

Note: This manual assumes that your files observe the above
naming conventions.

You'll write your application to a Macintosh system disk, which means a
Macintosh disk that contains the system files needed for running an.
application. The necessary system files are on the Mac Build disk
that you received as part of the Macintosh Software Supplement. Use that
disk only to create other system disks. Here"s how:

1. Insert the Mac Build disk into the Macintosh and open it.

2. Copy the System Folder to a new Macintosh disk; the exact method you use
depends on whether you have an external drive. See the Macintosh owner's
guide for more information.

Note: One of the files in the System Folder, Imagewriter, is needed only if
you're going to print to an Imagewriter printer; to save space, you
might not want to copy it if you don't need it.

If you also need or want any of the files on the MacStuff disks included
in the Macintosh Software Supplement, copy them as well.

As described in detail in the following sections, you'll create a source
file, Resource Compiler input file, and exec file for your application,
insert your Macintosh system disk into the Lisa, and run the exec file.
The exec file will compile the source file, link the resulting object
file with other required object files, run the Resource Compiler to
create the application's resource file, and run a program called MacCom
to write the application to the Macintosh disk. When MacCom is donef..it
will eject the disk; to tryout your application, you'll insert the




Putting Together A Macintosh Application
Lisa Workshop Supplement Page 1-3
ejected disk into the Macintosh and just open the application's icon.



THE SOURCE FILE

Your working files will of course include the source file for your
application. Suppose, for example, that you have an application named
Samp. The source file would be Work/Samp.Text and would have the
structure shown below.

Note: "Samp" is used as the application name in all examples in this
manual. You don't have to use the exact name 6f your application;
anyabbreviation will do.

PROGRAM Samp;

Samp -- A sample application. written in Pascal
by Macintosh User Education 5/1/85

List the following in the order shown.

USES {$U Obj/MemTypes MemTypes,
{$U Obj/QuickDraw QuickDraw,
{$U Obj/OSIntf OSIntf,
{$U Obj/ToolIntf ToolIntf,
{$U Obj/MacPrint MacPrint, OPTIONAL
{$U Obj/SANELib SANELib, OPTIONAL
{$U Obj/PackIntf PackIntf; OPTIONAL

Your LABEL, CONST, TYPE, and VAR declarations will be here.

Your application's procedures and functions will be here. ]

BEGIN

[ The main program will be here. ]

END.


Each line in the USES clause specifies first a file name and then a unit
name (which happen to be the same in all cases here). The file contains
the compiled Pascal interface for that unit; the corresponding text file
name begins with "Intrfcl" rather than "Obj/". The Pascal interface
includes the declarations of all the routines in the unit. It also
contains any data types, predefined constants, and, in the case of
QuickDraw, Pascal global variables.


File name Interface it contains

Intrfc/MemTypes.Text Basic Memory Manager data types
Intrfc/QuickDraw.Text QuickDraw
Intrfc/OSIntf.Text Operating System
Intrfc/ToolIntf.Text Toolbox, except QuickDraw
Intrfc/MacPrint.Text Printing Manager
Intrfc/SANELib.Text Floating-Point Arithmetic and




Putting Together A Macintosh Application
Lisa Workshop Supplement Page 1-4
Transcendental Functions Packages
Intrfc/PackIntf.Text Other packages

You only have to include the files for the units your application uses.
It doesn't do any harm to include them all, but it will take somewhat
longer for your program to compile. If you're using any units of your
own, just add their Pascal interface files at the end of the USES clause.

You can divide the code of an application into