💾 Archived View for spam.works › mirrors › textfiles › apple › ADC › adv.900515 captured on 2023-06-16 at 21:09:59.
-=-=-=-=-=-=-
America Online APPLE II DEVELOPMENT FORUM CONFERENCE LOG Tuesday, May 15, 1990 10:00 p.m. eastern time Topic: Beginners Night Special Guest: Ron Lichty (Co-author of the book "Programming the Apple IIGS in Assembly Language" Forum Leader: Dave Sugar (AFL Dyfet) AFL Dyfet Okay, everyone, good evening and welcome to the Apple II AFL Dyfet Development Conference (Excellant work, Parik!). Tonight is beginners AFL Dyfet night here. This is an opertunity for those new to programming to AFL Dyfet get expert advice. I would like to start tonights conference by turning over AFL Dyfet the floor briefly to Ron Lichty, Co-author of "Programming the Apple IIgs in AFL Dyfet Assembly Language", who has an announcement to make...Ga Ron... RonLichty Thanks, David. RonLichty As you know, Programming the Apple IIGS in Assembly Language has been RonLichty called "a must for would-be Apple IIGS programmers". RonLichty Using the APW or ORCA/M assembler, the reader develops, RonLichty in stages a Hello, World program -- from an 8-line program RonLichty that prints on the text screen to a full-blown desktop application with RonLichty menu bar, dialogs, icons, and multiple, sizeable, scrollable windows. RonLichty Plus it includes the reference section from our earlier book RonLichty that everyone likes so much. RonLichty And we've had a disk out in APW and ORCA/M assembly all along. RonLichty Cecil Fretwell announced here a few weeks ago RonLichty that he had converted Hello, World into C for both RonLichty APW and ORCA versions of C. RonLichty His disk contains a cross-reference file that line-numbers the entire final RonLichty C csource code and cross-references its functions and variables RonLichty in addition to providing source and compiles at all the points RonLichty the other disk does. RonLichty Now Ken Kashmarek, author of SoftSwitch, has translated Hello, World RonLichty for Merlin 16+ assembler. The result is two different versions of the RonLichty final program to compare. Ken converted the first version by hand, RonLichty line by line, from the book; he used the new Merlin supermacros, RonLichty which whorten the source file considerably, and added a couple inline macros RonLichty to make the programming easier, but left off the comment lines. RonLichty He created the second by running the Merlin 16+ Converter routine on the RonLichty original program listing, so it includes all comment lines, RonLichty but does not use the supermacros. RonLichty Anyway, all are available from me by mail. RonLichty If you can't find the book in a bookstore, it is too. RonLichty The book: $32; APW/ORCA/M disk $20; C disk $20; Merlin disk $10. RonLichty From Ron Lichty, P.O. Box 27262, San Francisco, CA 94127 RonLichty (U.S. funds only, and CA tax for CA residents please). RonLichty Also, there's an errata RonLichty of the two bugs, the error in the text, and the olne serious typo that RonLichty have been found in the book just by sending a self-addressed, stamped RonLichty envelope to the same address. RonLichty Whew. RonLichty ga RonLichty Oh, can I add RonLichty for those who don't know, that I've returned to engineering RonLichty from product marketing -- I'm working on the Apple IIGS Finder RonLichty at Apple these days. ga AFA Parik ()()()()()()()()()() *yipee*!!! A2GS Yay!! AFL Dyfet Thank you, Ron...that is a long brief intro :)...Go ahead Parik... AFA Parik real quickly; how did you determine the # of cycles in your 1st 65816 book ron? AFA Parik for each opcode that is. ga RonLichty Let me think back that far... A2GS He used a stopwatch naturally. :) RonLichty We had several sources, most of them wrong in at least some areas. RonLichty We had the data sheet from Western Design, RonLichty a set of by-addressing-mode cycle descriptions from Western Design, RonLichty a similar kind of look from insiders at Apple, RonLichty a reference card from GTE (different errors from the Western Design ones) RonLichty and I think at least one other source. AFA Parik ok. just checking if logic analyzer was used. thanks! ga (done) RonLichty We did not have any way, ourselves, to prove one thing or another, RonLichty if I remember correctly, RonLichty but just puzzled out all the data until it made sense. RonLichty ga AFL Dyfet Go ahead A2... A2GS Are the correct cycle timings available from WD? RonLichty I would use the ones from our book. RonLichty As far as I know, we got them all right. RonLichty ga RonLichty Thanks. AFA Parik what is the picture on your 1st book? the motherboard? RonLichty That's the mask of the chip itself. RonLichty I have one blown up to poster size. RonLichty It's really beautiful. RonLichty When Hayden RonLichty was publishing ORCA/M assembler, they did full-color RonLichty separations and printed the posters. ga AFL Dyfet Go ahead Scott... AFL Scott How do you like being back in Engineering? RonLichty It was really hard, at first. I had to get used to RonLichty not earning a living talking to people, both online and on the phone! RonLichty And the Finder code is, as you might imagine, a bit complex. RonLichty But I have always liked solving a good problem, so I'm happy. ga AFL Dyfet (an honest living, Engineering :)... Go ahead, Wind... AFL Dyfet While we're waiting on Windrider, Go ahead Floyd.... AFL Floyd Hi, Ron. I don't know if you are aware of it or not, but there are a few AFL Floyd Finder patches floating around that allow folders on the desktop and allow AFL Floyd the default quit dialog to be changed. I hope you and Jim and the other AFL Floyd Finder gurus consider changing the Finder to allow stuff like this. ga RonLichty I've seen several patches. But would like to see the ones RonLichty you've just listed--don't think I've seen those. Michael515 Are the patches in AUT Floyd? RonLichty We're always looking to our users for input on how we can improve RonLichty things. AFL Floyd Look in the "IIGS Utilities/Finder Patches" topic of the Utilties forum, AFL Floyd keyword AUT. (blatant plug) ;) AFL Floyd Oh, one more thing...put back "Remove" in the menu for quick deleting. ;) AFL Floyd ga RonLichty Thanks for the information on that. RonLichty What if "Remove" moved the file to the trash instead of deleting it? AFL Floyd That is even better, Ron! ga AFL Dyfet Go ahead, Windrider... Windrider5 I have been programming the IIgs using C for a couple of years Windrider5 Do you think it is worth it to learn assembly language? RonLichty Should you learn assembly? Well, RonLichty that really depends on what you want to get out of programming. RonLichty I like assembly because it lets me get right down into the processor RonLichty and listen to the gates open and close. AFA Gary J :) RonLichty When I write in assembly, I know exactly what's going on with the machine. RonLichty And my code is a lot shorter and a lot faster. RonLichty It takes longer to write than C, though given C's propensity RonLichty for null pointers and it's write-only nature, RonLichty I'm not sure assembly is a lot more dangerous than C to write in. RonLichty You can certainly do things like floating point a lot easier in C. Windrider5 write-only nature? RonLichty I personally didn't find learning assembly hard. RonLichty I do get annoyed by the addressing modes that show up only RonLichty with certain instructions. Coach101 Amen! RonLichty But the 65816 is a kludge built on the kludge of the 6502 :) RonLichty And I think there are a lot of us who find its quirks rather winning! AFL Dyfet On the other hand, it's more balanced than the 8086 instruction set :) RonLichty By C's write-only nature, I mean RonLichty that while C is easy to write because you type so few characters, Dave Lyons <-- doesn't find C particularly write-only RonLichty reading the code you wrote last week in C can be as hard as reading RonLichty assembly you wrote last week. Especially if you do what many RonLichty good programmers do and succumb to the clarion call of terseness RonLichty that C offers. I think it may be possible to write an entire program RonLichty in a single C statement. And all too many C programmers try to do it! RonLichty Let me add that I agree with you, David, that RonLichty I'd much rather have a 65xx processor than an 8086 family processor. RonLichty I've written code generators for compilers for both. RonLichty The 8086, with its banks built on 16-byte boundaries, is an ugly kludge RonLichty (as opposed to the 6502, which (I suspect entirely by chance) turned RonLichty out to be a nice kludge). A2GS Somewhat similar to the drawbacks on the 68000! RonLichty Also, have you ever tried to decipher the structure of RonLichty opcodes on the 8086? AFL Dyfet :) RonLichty They are based on two bits here and three bits there and AFL Dyfet Up to 7 byte sequences :) RonLichty prebytes and post bytes and... Yuck!!!!! RonLichty ga AFL Dyfet Okay, Go ahead Coach... Coach101 As to learning assembly, Coach101 Unless you are into writing device drivers or some other, rather internal, parts of the IIgs Coach101 environment, you can do everything from C (and with Orca-C, no little interface glue in assembler) Coach101 So, you will learn a lot about how machines really work by writing in assembler, but it is not Coach101 required in order to write most things for this system. As to "Write Only C"... Coach101 Ron, I think it is not the language but the programmer. The same terseness and lack of comments will Coach101 render an assembly program even more unreadable. My personal hatred is the race to see how much Coach101 code (as opposed to loop control) a C programmer can kram into a "for" statement.... On processors... Coach101 I think the 8086 was designed by a hardware "weenie" and the 68xxx (which I think is the best a AFL Dyfet And let's not forget while loops controlled by nested trinaries :)... Coach101 architecture available) by a software architect :) Coach101 Done.... ga RonLichty I'd have to agree with most of that RonLichty I was really comparing C with Pascal regarding it's RonLichty write-only nature. RonLichty I think of C as a language you can twist into a moebius strip or RonLichty maybe a Klein (sp?) bottle. RonLichty C can be as straight-forward as Pascal, but bad RonLichty programming practice often twists it otherwise. :)_ RonLichty I would also suggest RonLichty assembly as the language to use on the IIGS for animation RonLichty and in some situations for tight loops. RonLichty Code that has to run fast, so is optimized in the midst RonLichty of a C or Pascal program by translating that code RonLichty into assembly. RonLichty Most commercial programs RonLichty I know tend to be written in C or Pascal with RonLichty lots of drops into assembly when necessary RonLichty (though, of course, there are many commercial programs RonLichty written in assembly entirely on the II and IIGS). RonLichty We wrote the IIGS Sales Demo program in assembly RonLichty in part to optimize for speed and in part because that's all there was! ga AFL Dyfet One should consider that unix is written in C (for good or bad :)...A good C AFL Dyfet compiler will allow you to mix assembly code fairly easily when you need it, AFL Dyfet and can be used to write fairly easy to maintain code...(or can be abused :)... AFL Dyfet I believe Floyd had a comment...GA Floyd... AFL Floyd In reference to terseness, it is very helpful to make sure one's variable, AFL Floyd constants and function names are as descriptive as possible. Doing this in AFL Floyd my code almost makes it self-documenting.. I prefer C for a high-level AFL Floyd language, but my C code isn't very terse. It looks more like Pascal (which AFL Floyd used to be my favorite high-level language.) ga AFL Dyfet I prefer C because I find less road-blocks between me and what I am trying to AFL Dyfet do than in Pascal, where the compiler carefully controls what you can and AFL Dyfet cannot do...I often prefer to focus on trying to get the job done, and not on AFL Dyfet how the program should be made to look. AFL Dyfet Go ahead Floyd... AFL Floyd Even though I prefer C I think Pascal is the best first language to learn. ga AFL Dyfet I tend to agree, since Pascal does force the person to think and methodize what AFL Dyfet they are doing...Okay, I believe that SSSi has the next question....GA SSSi... SSSi Ron: hope we will see some resources attached to the Finder someday soon? As SSSi far as languages are concerned, I've used them all, but SSSi find that I am able to control the "vertical and horizontal" SSSi alot better in Assembly. Pascal is great for a beginning, but SSSi doesn't allow alot of the flexibility that I get from C. C is great too, SSSi but I spend alot of time in the debugger (my fault), and I find SSSi that what I see is what I get. I really do think that a programming SSSi language is a presonal kind of thing, something SSSi that each programmer has to try and decide for one's self. GA AFL Dyfet Go ahead Coach... Coach101 If one is programming for personal enjoyment, then the language is a personal choice.... Coach101 If one is programming for a living, assembly is just NOT a choice anymore. Find the high level Coach101 language you like best and use that with drops into assembler as needed for speed or system Coach101 interfacing. ga AFL Dyfet Okay, I believe that A2 has the next question...GA A2... A2GS Ron, I realize (of course) that you can't vomment on unreleased products, but.. AFL Floyd (Please, no vomiting!) ;) A2GS any possibility of getting a Mac FST in a future SYS. Disk? GA (1 more Q to A2GS follow, after) A2GS Ooops :) RonLichty You're absolutely right, A2. I cannot comment on unreleased products! ga AFL Dyfet Okay, Go ahead with 2nd question A2... AFA Gary J :) A2GS Any news on the '832? (your closer to WD then I am :) RonLichty No, I don't have any news on the '832. RonLichty Bill hasn't been keeping me apprised of his progress RonLichty ga A2GS one comment.... A2GS About languages, you knew it was coming... A2GS I think for pleasure use, any High level language that makes the programmer A2GS happy should be used, but on a professional side who is writing a program A2GS that the general public will have to use, he/she should use Assembly for A2GS quality reasons, or for know other reason then to offer the best speed] A2GS available to the program on the machine. A2GS GA A2GS know = no AFL Dyfet Okay, GA Dave... Dave Lyons On the other hand, if you choose a very *small* amount of the code to put in Dave Lyons assembly, leaving the rest in some high-level language, you can usually get all the speed Dave Lyons that the user is going to notice. Also, for applications Dave Lyons that spend most of their time inside toolbox calls anyway, it doesn't make that much different Dave Lyons what language the app was in. I don't have *strong* Dave Lyons preferences for any particular language...have written in Assembly, Pascal, and C, with a Dave Lyons preference for C over Pascal if I've got a good working implementation. Dave Lyons What *does* bug me is when I talk to Dave Lyons somebody who has written an application Dave Lyons in assembly & done something in a shabby way because Dave Lyons they didn't bother inventing a complex enough data structure, which would have been easier in Dave Lyons Pascal or C. (OTOH, I've seen people use fixed-sized arrays in high-level langauges, too, Dave Lyons for no good reason.) ga A2GS <---Not bothering to argue, his points make sense :) AFL Dyfet Thank you Dave...Okay, I believe the next question is from Doctor Why...GA. Doctor Why This is off the topic, but..... I have a cursor defined as a resource and would Doctor Why like to use it in an ORCA/Pascal program. The ? is how? AFL Dyfet Go ahead, Dave... Dave Lyons Make your resource "fixed", and call LoadResource to get it into memory. Dereference the handle Dave Lyons and feed it to SetCursor, with any necessary type-casting. For example, Dave Lyons CursorPtr myCursor; myCursor = (CursorPtr) (*LoadResource(rCursor,1L)); ... Dave Lyons SetCursor(myCursor); (course, you should check for an error on LoadResource) You may want to Dave Lyons mark the resource "preload" in addition to "fixed". ga Doctor Why Thanks, I'll give it a try. SSSi Yup! Also, make sure the current resource is your application or NDA! GA Dave Lyons (the current resource *app*, eh?) AFL Dyfet :) SSSi :) AFL Dyfet Okay, any further comments or questions for tonight? AFL Dyfet Okay, I would like to thank Ron Lichty for stopping by tonight... A2GS Thanx Ron! AFA Gary J Yes, thanks for stopping by, Ron. A2GS Ron, Any more books in the works?? RonLichty No. I'm still trying to recover from the last one. :) A2GS Are the tech note(s) for writing an FST available? A2GS yes/no/maybe? AFL Dyfet A2, there are no tech notes for writing FST's because Apple has reserved the AFL Dyfet sole right to itself for tampering with the OS... AFA Gary J Never, A2 Dave Lyons A2GS, your question is misleading by using the word "the" in front Dave Lyons of "tech notes for writing an FST", because there aren't any...the policy has been, and continues Dave Lyons to be, that Apple doesn't support 3rd-parties writing FSTs. There are some decent reasons Dave Lyons for this, that I won't repeat here unless somebody really wants them, given the current FST design. A2GS That what I thought :( AFL Dyfet To put it simply, FST's are DANGEROUS, and subject to failure on future OS AFL Dyfet releases... Dave Lyons Yes, definitely. AFL Dyfet They are not streight forward, and there is no clearly/cleanly defined AFL Dyfet interface for them in GS/OS... A2GS Well, if their written in the same form (design) as the already written FST's.. Dave Lyons Right, they *look* like the same kind of thing Device Drivers are, but they aren't. A2GS there shouldn't be any hazards, providing they are bugless. A2GS which is a BIG provision of course. Dave Lyons The catch is that Apple reserves the right to make changes in the way the OS works that *require* Dave Lyons changes to *all* FSTs. Dave Lyons It doesn't have to be a big change, either. A2GS I take it that the FST's do low-level work? AFL Dyfet Very Dave Lyons Yes, and fairly high-level work *too*. For many GS/OS calls, GS/OS does little more than pass Dave Lyons the call along to the appropriate FST. AFL Dyfet FST's call the undocumented and volitile internal GS/OS micro service call AFL Dyfet block as well for certain management operations. Dave Lyons True. (the "system service" vectors at 1FCxx) AFL Dyfet One option I would like to see in Finder is a preference to disable exploding AFL Dyfet windows... A2GS On a serious note, Ron, I would like to see a "Coomand Window" option in which A2GS you would be able to TYPE commands in for those which are not available or A2GS incapable of being reproduced on a totally mouse based system. A2GS Any possibility?? Dave Lyons What commands are incapable of being reproduced on a totally mouse-based system? A2GS Filename search for one. A2GS And about a million more which are avaible under UNIX (which I generally hate) A2GS but have never used. Coach101 How about a "trainable" Finder (like the documentaion said would work)? Dave Lyons (Find File does it without having a command window!) AFL Dyfet (And to disable visual window closing when launching an app...just shut it AFL Dyfet down, clear the screen, and bring it in)...:) Dave Lyons Dyfet, it already doesn't visibly erase the windows, *except* for clipboard and trash. A2GS What about "Delete block of files on Device which fall under certain conditions A2GS " Dave Lyons What about "select files based on name, mod-date, etc" and then do any allowed Dave Lyons operations on them, including dragging to the trash? Coach101 The things I want most in Finder are: Coach101 1) Be able to put Folders on the desktop AFL Dyfet Yes! Coach101 2) Allow Finder to create Finder.Data files on servers. I hate having the location a function Coach101 of what was last done a Mac! Coach101 I am not sure if this is there in IIgs FInder, but A2GS Dave, generally, a command window will allow practically limitless expansion Coach101 how about being able to copy a file from folder to folder (as opposed to *move*) A2GS instead of having to deal with mile-long pop-menus or PDM's. Dave Lyons I'm not talking about long menus--just one item that would give you a dialog letting you specify Dave Lyons properties of files, and then just *select* the files. That way you could build on the knowledge Dave Lyons the user already has--once they discovered Select Files..., they could use it with all the Dave Lyons things they already know how to do (like drag-to-trash). A2GS A little bit limiting...but basically is the same as my request...any comment A2GS Ron?? Dave Lyons Coach, I guess we're missing that feature (copy to another location on the same volume, without Dave Lyons using Duplicate & having to rename the copy later). On the Mac finder it's just option-drag. Dave Lyons Problems w/ my idea: does this mean you can have things selected in several windows at once? Can A2GS Don't quite follow coach's prob. could you explain it again? Dave Lyons you have things selected that aren't in open windows? A2GS Coach? Coach101 I know.... Ever forget your on a IIgs when you copied a file? RonLichty I'm listening. But not doing any promising, of course. :) Coach101 If you drag a file between folders on the same voluem, Finder deletes the file from the source Coach101 folder and places the file in the destination folder. That is a MOVE and not a COPY... Dave Lyons (Well, it just CHANGE_PATHs it.) AFL Dyfet I would suggest that if people have serious comments about improvements for the AFL Dyfet Finder, that we start a message topic for it... Coach101 On a Mac if you do the same thing but hold the OPTION key down, you get two copies of the file Coach101 One in the soruce folder and one in the destination folder.. OK? A2GS Oh... A2GS Ok. Dave Lyons ok A2GS A way of duplicating a file, in other words. Coach101 Dave, I know, but its easier to expalin as copy and delete :) A2GS Thanx for coming Ron and returning back to GS developing :) RonLichty please ABSOLUTELY feel free to email them to me.