America Online APPLE II DEVELOPMENT FORUM CONFERENCE LOG Tuesday, October 13, 1992 10:00 p.m. Eastern Time Topic: Assembly Language Programming Forum Leader: Gary Jacobson (AFL GaryJ) AFL GaryJ Welcome to the Apple II Development Forum! Tonight, our topic is.... AFL GaryJ Assembly Language programming! We're glad that you could all come and AFL GaryJ assemble with us tonight! AFL GaryJ We'll take any and all questions and comments regarding assembly language programming, AFL GaryJ 6502, 65c02, 65816, or whatever :) Developer1 well, i'm assembly illiterate. :D AFL GaryJ Well, have you ever considered learning assembly language, Developer? Developer1 Gary, I'm learning C so... maybe in the near future... Developer1 I just wish that T2 blanked in the background with designs :( AFL GaryJ I-C... Sheppy Once you've learned an esoteric language like C, assembly is a piece of cake! Sheppy :) AFL GaryJ Does anyone have a formal question or comment they'd like to start off with AFL GaryJ this evening? Developer1 really? good. it's just that all those three letter abreviations scare me :D AFC SteveB (Start with BRA and move on, Evan) AFL Marty I'm still trying to get a program that will slow the IIc+ down. So far AFL Marty nothing posted on the message board works. AFL Marty I'm about a half-second away from just plain giving up on it. AFL Marty (And no, I'm not going to buy a manual to write a <1K program) AFL GaryJ Hmmm... AFL GaryJ Having no access to a IIc+, I have never been able to test any of those AFL GaryJ examples. I'm not sure what the problem could be. AFL GaryJ I don't think that should be necessary in this particular case as well, Marty. AFL Marty Well, if anyone has any bright (or otherwise) ideas I'd appreciate hearing AFL Marty about them. Either post on the boards or send me EMail. AFL GaryJ Does *anyone* here have any experience with the IIc+ and speed? AFL GaryJ I can check with some other people I know, Marty, and see if I can come up with AFL GaryJ an answer for you. AFL Marty Thanks Gary. I appreciate it. AFL GaryJ Developer: It's the three-letter opcodes that make assembly so fun! Developer1 Gary: I'm looking forward to it :D AFL GaryJ There's not that many commands to get to know, actually. Once you understand AFL GaryJ the opcodes, and what the different addressing modes do, it's a piece of AFL GaryJ cake (yeah, right :) Sheppy Heck, I _still_ look a lot of them up in the manuals! :) AFL GaryJ Right, Sheppy. That's what the manuals are for! AFC DYAJim 3 letter opcodes are great! AFA Jay I like IBM opcodes better :) AFC SteveB (Better than the 2-7 letter opcodes of other machines :) AFA Jay those are cool :) AFA Jay 3, always, 3, so boring :) Sheppy Same here... I like those opcodes a lot. AFL Marty If you need one that doesn't exist you can just make up your own, Evan :) AFL GaryJ Good point, Marty :) AFL Marty If one were beginning to learn assembler, what would be a good program AFL Marty to begin with? AFL GaryJ Well, excellent question, Marty. My favorite recommendation these AFL GaryJ days is the Lichty and Eyes book. They provide simple examples, and AFL GaryJ work up to big things with them. AFL GaryJ In the old days, I would have recommended that people start with calling AFL GaryJ assembly subroutines from Applesoft. (An easy way to make little programs, and AFL GaryJ have satisfaction in doing something useful for Applesoft). AFL GaryJ You want an idea of something to program? (Is that what you are looking for?) Sheppy "Hello World" is popular. AFL Marty Well... something between Hello World and writing Finder, Sheppy :) AFL GaryJ I do think it helps to have something to start out with, when you're just getting AFL GaryJ started. What I mean is, if you have a base program that you've worked up to AFL GaryJ (such as Hello World), you have some understanding how it works, and can AFL GaryJ develop assembly skills by making little additions and modifications to AFL GaryJ the program. AFL Marty I see what you mean Gary. AFL Marty I think my problem is I'm looking for shortcuts when there aren't any. Sheppy That's the best way, yeah. Start with "Hello World" and add more to it until Sheppy it's a useful program. You learn a lot and have fun doing it, and often wind Sheppy up with a good program. AFC DYAJim Yes, that's an excellent idea! AFC DYAJim I did an AWFUL lot of that too! AFC DYAJim I took the hello world program from apple and modified the heck out of it! Sheppy I wrote my own "Hello world" and went from there... :) AFL GaryJ Marty, why don't you re-write Rastan? :) AFL GaryJ (We'd all like to figure that one out :) AFL Marty Funny you should mention that. :) AFL GaryJ Funny? Why, is that on your list of things to do? :) AFL Marty You mean it's not a good project for a beginner? :D AFL GaryJ Well, I will say this. Having a goal in mind, something to work toward that you'd LIKE AFL GaryJ to program (like Rastan, even!) is a good way to develop skills and motivate you AFL GaryJ to learn certain aspects of assembly. AFL Marty Thanks for the advice, Gary. AFL Marty I do have about a dozen or so ideas. AFC DYAJim I have to learn C so I can get a job programming something after T2.. AFC DYAJim but C isn't going as fast as ASM did :) AFA Jay You need a warped mind for C }:> Sheppy Yeah, C is pretty scary stuff. I've done it for a few years and still don't Sheppy always get pointers in the right places. :( M Wolfgram Warped mind, Jay? AFA Jay :) Sheppy Assembly knocks the socks off C. :) AFC DYAJim Assembly kicks butt, except when you need to program other platforms :) Sheppy Yeah, well... there's that. :( M Wolfgram Yeah, but it's a lot easier to do structure indirection from a handle pointer in C :) Developer1 what can you type when in GSBug to get out of a crash? :D AFA Jay OA-Ctrl-Reset :) AFL GaryJ CTRL-OA-RESET AFC SteveB Open Apple-Control-Reset AFL GaryJ :) AFC SteveB GMTAx2 :) AFA Jay HA :) Sheppy Hit the power switch. AFL GaryJ When a crash happens, there's not much you can do to recover. The idea of AFL GaryJ GSBug is if you are the author of the program, GSBug should give you some AFL GaryJ idea of what happened, and how to fix it. It's not so that you can recover, that is unless AFL GaryJ you put the break in the program to begin with :) AFA Jay If you wrote the program and you know what's going on...you have a slight AFA Jay chance...otherwise, forget it :) AFL GaryJ Right, Jay. Developer1 i know. but my MAC (ACK) friend uses his debugger to recover from crashes.. Developer1 strange. Developer1 so I figured there's a chance. AFC SteveB ReturnToShell() AFC SteveB ^ GS has no nice command... :( GNO Jawaid I can recover from GSBug crashes under GNO :-) GNO Jawaid (Though I got lambasted thoroughly for suggesting it.) AFL GaryJ It depends on what caused the crash. But generally, if it's a program glich, then AFL GaryJ you wouldn't WANT to recover, as you have no idea what memory has been AFL GaryJ trashed, and even if your operating system is intact (you wouldn't want AFL GaryJ to try to write to a disk in a situation like that :) AFC SteveB (Example of not being good to recover: I was writing a program AFC SteveB to write a little logo to the SHR screen...I accidentally AFC SteveB typed sta >$E1C000 instead of >$E12000... things got pretty AFC SteveB nasty when that code got a exicutin' :) Developer1 well. since everyone here is psycho about assembly, what should I start with Developer1 besides ORCA/M... Developer1 Books? AFL GaryJ It's not so much that everyone is psycho about assembly, but that *is* the topic AFL GaryJ this evening :) (I suppose there are a lot of psycho assembly people AFL GaryJ here anyway :) Developer1 i know :) AFL GaryJ Let's see.... AFL Marty Isn't Mike Westerfield working on a Learn to Program Assembler book? AFL GaryJ I already sorta recommended the book that I like.... that's the AFL GaryJ "Programming the Apple IIGS in Assembly Language" book, by AFL GaryJ Ron Lichty and David Eyes. AFL GaryJ That's a pretty good book that takes you on a tutorial approach through Developer1 cool. ok. Developer1 so long as it's elementary. AFL GaryJ APW (Apple Programmer Workshop), which is really the same as ORCA/M with AFL GaryJ a few macro differences. Spottysoft Marty... Mike is planning one... I'm still waiting for the notice on the C... Spottysoft ...course. :o AFL Marty Yeah, I thought I heard him mention it once or twice. AFL GaryJ Marty, what approach did you use to learn assembly? Did you have any AFL GaryJ previous background in assembly at all when you attacked the IIGS? AFL GaryJ (Assembly) AFL GaryJ (Actually, Marty only *attacks* Macintoshes. He approaches IIGS :) AFL Marty I can't really say that I feel confident about assembly. I know more than AFL Marty some folks but not as much as others... AFL Marty enough to get me in trouble I guess. AFL Marty I did study some assembly while in college... AFL Marty on a PDP 8 AFL Marty but that was about a million years ago. Spottysoft <-- learned on a PDP11!!! AFC DYAJim your CDAs are cool enough Marty! AFL GaryJ It's hard for me to know how basic the Lichty and Eyes book is. I already knew 6502 assembly AFL GaryJ well when I read that book, and I thought it was perfect in my case. But, I think AFL GaryJ someone with no background in 6502 might have to spend more time studying the AFL GaryJ opcodes more, and addressing mode theory. AFL Marty I don't really feel confident though. I can follow someone else's code AFL Marty but I have a tough time coming up with my own from scratch. Sheppy If you can find back issues of Nibble, Scott Zimmerman's column was really Sheppy good for learning 65C02 assembly. 65816 is just a step further along. Sheppy (Just remembered it -- my Nibbles are in a heap on the floor :) Cletus H Evan we'll learn toegether Developer1 good idea. Sheppy (I learned from those) :) AFL Marty I have the Lichty and Eyes book AFL Marty (Programming the 65816, right?) AFL GaryJ There are two Lichty and Eyes books, actually. I forgot about that. AFL GaryJ I might be confusing people if I don't specify. I was talking about the AFL GaryJ "Programming the Apple IIGS" book. Not the Programming the 65816 book. AFL Marty I guess I don't have it then. AFL Marty I have one from Compute magazine called Apple IIGS Machine Language AFL Marty for BEginners. AFL GaryJ "Programming the Apple IIGS" book. Not the Programming the 65816 book. AFA Jay I have a strange book I found..... AFA Jay called "Elementary Assembly Langauge for the Apple IIgs and the 65816" AFL Marty Who's it written by Jay? AFA Jay William B. Sanders... AFA Jay looks like it uses Merlin though. Sheppy I have the other IIGS Compute book, Marty -- "Mastering the Apple IIGS Sheppy Toolbox." Good book. AFL GaryJ (But the Programming the 65816 book is good too. Just not specific to the IIGS) AFL Marty Yeah.. I have the Toolbox one too Sheppy. AFA Jay Is it possible to do a Finder Extension solely in C? :) Dave Lyons Finder Extension in C-- Dave Lyons Yes, it should be perfectly possible. Coulda sworn there is an APW C sample on the CD, actually. AFA Jay I don't have a CD or a player, sorry :) Dave Lyons The Programmers Reference for System 6.0 shows a Request Proc header in C, Dave Lyons which is the hard part. The other trick is to be an Init, but you can do that in ORCA/C, can't you? AFA Jay Ummm, I think you can, somehow. AFA Jay oh yeah, #pragma rtl :) Dave Lyons (Just have to install your request proc at init time, and the rest of the work is all inside the Dave Lyons request procedure.) AFC DYAJim Dave - how goes 6.0.1? (no pressure at all - just curious :) lots of work AFC DYAJim left or what? Dave Lyons 6.0.1--There's always lots of "little" bugs...it's going reasonably well (could be better, could Dave Lyons be worse. :-) Cletus H Well It's going that's all that counts