17.07.2016 Views

COAET" • r

Apple-Orchard-v3n2-1982-May-Jun

Apple-Orchard-v3n2-1982-May-Jun

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

WILL THE REAL APPLE PASCAL PLEASE STAND UP?<br />

by Dr. Wo<br />

Once Upon a Time, there was only one Apple computer<br />

and only one implementation of Pascal for it. Indeed, many<br />

of you would probably agree with me that there was only<br />

one personal computer and one programming language in<br />

the world! (Note: Dr. Wo programs in Pascal. Which is a bit<br />

like saying that Carl Sagan watches stars. -PCW)<br />

Now, however, there are some new kids on the block.<br />

There is probably at least one other personal computer<br />

you'd love to hav~. But more important for Pascal pro·<br />

grammers, there are at least four different versions of Pascal<br />

running on two Apple computers: Apple Pascal 1.1 on the<br />

Apple II; Apple /// Pascal; Softech Microsystems' UCSD<br />

Pascal Version N.1, running on the Apple II and a passel of<br />

other computers, including the new kids, and Pascal MT , a<br />

CP /M based system covered in the March-April 1982 Apple<br />

Orchard.<br />

Will the Real YOU Please Stand Up?<br />

Now, what has this to do with you? Well, with personal<br />

computers looking more and more like appliances, in the<br />

sense that your Old Faithful Apple II may not be the only<br />

computer you'll ever own, the question is, how portable is<br />

your software? That's a valid question whether your soft·<br />

wai:e is purchased or home-grown.<br />

Of course, your need for portability should be determined<br />

by your objectives. What are you trying to develop for yourself?<br />

Are you writing programs for personal use, with little<br />

expectation of acquiring another machine on which they<br />

might run? Are you developing software tools and/or applications<br />

software for your own use or for sale on the open<br />

market? Do you want those tools and applications to work<br />

on as many machines as possible, or are they Applespecific?<br />

Are you investing a lot of your time on programs<br />

that you might like to run on another computer someday?<br />

And just how soon is "someday?"<br />

Let's Review<br />

We'll review three of these Pascals here and now, from<br />

two programming points of view. On the one hand, we'll<br />

look at them for developing tools for personal use, and on<br />

the other we'll look at them for developing applications<br />

programs and general purpose tools, hoping to run them<br />

on a number of machines.<br />

Most of the review is a comparison of Apple II Pascal and<br />

Softech' s Version N. The biggest differences, and the big·<br />

gest choices, are between these two. We note that there are<br />

differences between Apple II and Apple / // Pascals, and<br />

we'll note some of these as we go along.<br />

Apple II Pascal, Version 1.1<br />

This is the Apple Pascal 99 per cent of us know and love<br />

so well. Omitting some history, some additions, and some<br />

revisions, it is essentially the Pascal operating system developed<br />

by Prof. Ken Bowles at the University of California<br />

-San Diego (UCSD), to which Softech's Version N also<br />

corresponds. Apple Pascal is a delight to use, and has<br />

several features which aid software development and maintenance.<br />

Whatever I have learned about good (and bad!)<br />

programming, top-down design, modular program devel·<br />

opment, you name it, I have learned on my Apple using this<br />

system.<br />

There are additions to the UCSD standard Pascal system<br />

in the Apple implementation, the most outstanding of<br />

which is the inclusion of UNITs to aid in development of<br />

software libraries. They are the way to group proven, logically<br />

related data structures and procedures into a package,<br />

which can then be used in program after program. Even if<br />

you don't plan to use a set· of routines in more than one<br />

program, units are still powerfully useful. They are an aid to<br />

modular development, and can save you a lot of compilation<br />

time as you iteratively debug, improve, and refine a<br />

main program. Regrettably, it took me a while to realize their<br />

value.<br />

Four other features of the Apple operating system which I<br />

have found useful are the EXEC files, chaining, BIOS attachment<br />

utilities, and compiler options ·to· control the<br />

residency of units and program segments. With EXEC files<br />

we can drive the operating system and our programs from a<br />

script. And with the Attach utilities (available from the International<br />

Apple Core on a disk with booklet for $7.00) we can<br />

integrate all manner of peripherals into the operating sys·<br />

tern in a logical and consistent way.<br />

If you have some foreign (read "non-Apple") peripherals<br />

such as a Micro modem or auxilliary RAM card and have not<br />

investigated integrating them into your system using these<br />

attach BIOS programs, you're really missing a lot of fun<br />

-and probably using a lot of kludges to drive the peripheral.<br />

The attach programs are nice because they allow<br />

you to define an Assembly language driver for a peripheral<br />

and then access it from Pascal through the operating system's<br />

1-0 intrinsics. You can even pass parameters to the<br />

driver through the intrinsic "UNITSTATUS," meaning you<br />

can exercise complete control over your peripheral from<br />

May· June 1982 75

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!