Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!UTCVM.BITNET!MQUINN From: MQUINN@UTCVM.BITNET Newsgroups: comp.sys.apple2 Subject: Re: Re- HLLs vs. Assembly Message-ID: <9104162342.AA22453@apple.com> Date: 16 Apr 91 22:28:36 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 158 On Mon, 15 Apr 91 07:20:37 GMT said: > >Let me explain why I feel that starting with a HLL is vital: > >First there's the "hook": how to get people interested in computer science? >If there is nobody interested in computer science, there are no computer >science majors and the field on the whole greatly suffers. So it is vital >to get people interested in the field. I would imagine that most people that enroll in computer science are already interrested in coputers, although, you make a good point. >But most people who sign up for a computer course are only interested in >learning a little bit about the subject, and the more useful that is, the >better. I'm not so sure about this (but I don't ocmpletely disagree). In University level computer courses, they're set up for a full computer education (well, supposively, anway... it'd be full if they emphasized Assembly more) usually. Although, I'm sure that there are some places that offer courses that are only meant to introduce people to computers with no intention of going any further, but, to the best of my knowledge, most courses are intended for a full four year education, at least. It's those courses that should begin at the bit level. Although, a 'hook' as you put it, might not be a bad idea. They caould have several GSs lined up in the front of a classroom with some FTA demos running and then tell the students that they're going to show them how they can accomplish the same thing :), then, after everyone is ooing and awing over what computers can really do, they'll be hooked and the professor could get started on the bit level. (Getting more specific now...), The professor could teach Hexadecimal and the concept of memory and addresses, then, immediately, (probably in the first day), demonstrate what can be done with softswitches by turning on the graphics modes, clicking the speaker, making a tiny assembly routine that generates a siren sound (about 10 lines of assembly). Then, the professor might want to make an identical program, line per line, in BASIC and show how much faster assembly is than BASIC and show that assembly is great for some things and get them interrested in assembly. > Very few people will EVER need to program in Assembly(-er) Language >during their entire lives. HLL's, however, may prove invaluable in many >walks of life. This is true. Most people will probably never need to program in assembly, but KNOWING assembly will greatly improve their concept of just about everythin g having to do with computers. I'm not arguing that HLLs are bad, or that people should use Assembly rather than HLLs. I'm arguing that people should KNOW assembly and understand the bit level operations that go on in a computer. Just like, the more a mechanic understands how a car engine works, the better off he'll be (and his customers) than if he only knew how to operate the computers that tell him what's wrong with the car. > Therefore, the introductory courses MUST be useful in order >to attract people to the classes. I think assembly can be EXTREMELY attractive, if people would just teach it the right way (maybe something similar to what I mentioned about the FTA demos). >Second, Assmbly(-er) Languages are machine-specific, and give surprising >little understanding about machines in general. They ARE machine specific, I agree, but... give surprising little understanding about machines in general????? This, is, DEFINITELY not true! I learned assembly on an 8-bit Franklin (Apple ][+ compatible) early last decade. It DRAMATICALLY increased my understand of how machines (ALL MACHINES) work. I learned how I/O works (I had absolutely NO idea before, even though I was fluent in BASIC, on both the Apple II and on a TRS-80). I didn't understand how the computer knew what to do when I type CLS or HOME. I knew I didn't have a program running that was waiting for those commands, and yet, there was not even a program in memory (that I knew of). I couldn't understand how information was put and read from disk or tape. As soon as I got into assembly language, I imediately started to comprehend how all this works. Without knowledge of assembly language, I could do alot of stuff, but I was basically, lost as to what was really going on. When I understood assembly, I finally found a use for POKE and PEEK, and used them quite often. I wrote mini-machine language subroutines to increase the efficiency of my BASIC programs. I found the limitations of my computer AND understood them, which made it much less frustrating when programing and even increased my effectiveness in BASIC (even when I didn't use ML subs). >Sure, you'll learn about >registers and memory, but everything else is different. Would you advise >learning 6502 Assembly(-er), with two registers and an accumulator (and >correspondingly ugly code), a VAX 9000 with an amazing powerful instruction >set, or a RISC machine with its simple instructions, pipelines and zillions >of registers? I would DEFINITELY recomend learning 6502 assembly on an Apple II. It's quick and dirty and easy to get to the 'development' interface (call-151). You can play with softswitches without worrying about crashing the system and screwing something up and having to go through the reboot cycle, etc... You can start the mini-assembler, you can write to and read from memory locations, list the RAM, list the ROM and since the memory size is so small, it's very easy to comprehend the entire memory map. I wouldn't limit it to 6502 though. I'd get them started in that, because, it's by far, the easiest and fastest way to learn assembly, IMHO. I'd then move them to say, an XT, introduce them to the DEGUG command, then get them into a full featured assembler... then move them to say, a VAX 11/70 or quite possibally, an IBM mainframe. But after some quick and dirtly lessons on the Apple II, they'd understand assembly much better and learn it much faster on main frames. >The answer is that you can learn a lot from an Assembler Language, but not >enough, since it is all machine-specific, which in Computer Science is next >to useless. The fact that any ONE assembly language is machine specific means virtually nothing. The concepts are the same for all machines. -they all have RAM -RAM can be written to and read from -they all have ROM -ROM can be read from, looked at, but not changed. -they all have I/O -if any particular machine has more than one video mode, it has softswitches to switch between them. -if it can produce sound, the speaker must be clicked. Hardly any of this is machine specific. Sure, machine one may have a different address for a particlar softswitch or strobe or input registers or locations, than machine number two, but knowing HOW they work is much more important than exactly where they are. But, of course, if you're going to write a driver, it's necessary to know the specifics of that one machine. But that doesn't mean that learning and understand the low level operations behind the high level structures isn't helpful. > Instead, I feel that a Computer Architecture course should >be a mandatory element in a Computer Science program, and it is here >that the understanding of "what is a computer" be investigated. All the >rest, I feel, should remain at a higher level where algorithms and data >structures are the important considerations and not how to bum another >three instructions off of your assembler language program. I feel that that should be mandatory too, but it's very important to understand what is really going on AND how YOU can do it, behind the 'protective' user interface. There's nothing wrong with shielding a USER from knowing what's going on inside, but a PROGRAMMER should definitely know what's going on. It looks like we're moving into an era where there will be two types of 'programmers'. One type (the less educated one) will be more of a user than a progammer... much like my boss, who uses a shell or script psuedo language to get things done. She understands NOTHING of what's really going on. There won't be much difference between these users and Hypercard 'programmers'. Then, there will also be, educated programmers, who are REAL programmers. They will understand what's really going on. They'll be able to dip into a hex dump and fix something. They'll be the ones to save the 'psuedo programmers' butts when they get an unexpected glitch in a program and don't know what to do because they were taught that they'd never have any need for assembly language. They'll be the ones who'll be able to write a quick hack patch to something just to get it working until a more structured version can be completed. I could go on and on about the advantages of it, but I think I'll stop here. > =*()*()* Jeff *()*()*= >Internet: saintdor@vms.cis.pitt.edu ---------------------------------------- BITNET-- mquinn@utcvm <------------send files here pro-line-- mquinn@pro-gsplus.cts.com