⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 program.html

📁 关于ARM汇编的非常好的教程
💻 HTML
字号:
<!doctype html public "-//W3C//DTD HTML 3.2//EN"><html><head><title>On being a programmer</title></head><!--  /software/program.html             --><!--                                     --><!--  (C) Copyright 2000 Richard Murray  --><!--  Designed by Richard Murray         --><!--  rmurray@heyrick.co.uk              --><!--                                     --><body bgcolor="#f0f0f0" text="#000000" link="#0022dd" vlink="#002288"><table border = "0" width="100%">  <tr>    <td bgcolor = "#f0f0f0" align=center>      <h1>On being a programmer</h1>    </td>  </tr></table><hr size = 3>Sometimes, people ask me &quot;<i>why program?</i>&quot;.<br>I have been known to post short programs to techie newsgroups, with full explanations of what isgoing on. Now, I don't claim to be the best programmer, nor do I claim to be representative ofprogrammers around the globe, but I do encourage people to learn to program. I'm enthusiasticabout it, and I hope I can teach others at least enough to get going on their own.<p>I'm a self-taught programmer. Possibly the worst kind of all, I lack the rigid discipline. I donot think I'd program for a living - I do it more as a hobby. This is personal choice. You see,if it were up to me, I'd be a movie critic. Get to watch lots of movies (good and endearinglyterrible) and write my comments. Probably because I'm lazy. But enough of the history.<p>People, when they see me going on about this utility or that (I try to always make 'useful'programs for my examples) usually either say they appreciate it, or they ask why I do it.<p>&nbsp;<p><ol>  <li> <b>Programming is a useful tool</b><br>       I have often used an application and had a complaint with it. I do not expect perfection,       but - to pick on Argo's Voyager - claiming nearly half a megabyte on a 4Mb machine just       for the front-end/dialler is unacceptable.<br>       You may feel that coding your own is beyond you. I didn't, and hence the QuickVoy project       was born.<br>       Not all examples have to be that glamorous. You might just want a utility to perform       some function that you are unlikely to find a program for. Take, for example, the APCS       example in my <a href="index.html">assembler programming area</a>. I had a need for a       utility to fudge all my MODE 21 screengrabs to be MODE 28. And there were around 300       images. Would I pay for a little program to do that? Would I even find such a thing?       <br>&nbsp;<br>  <li> <b>Programming could make you money</b><br>       Yeah, I know I've been doing it for a decade and made a total of about fifteen quid. Don't       do the maths. Don't even go there...<br>       Most of my software is released for free. I, myself, don't do it to get rich. If I wanted       that, I'd sell out and code for the Windows platform.<br>       But, look at Bill Gates. Whatever your personal feelings for the man and the mess he has       made of computer science, you gotta admit that to go from nothing to staggeringly wealthy       isn't bad. I doubt you will achieve similar. I doubt I ever will. But you could go from       nothing to riches. All you need is the right idea and the conviction to pull it off. The       current 'bandwagon' is for Internet services. Maybe, if you can see beyond that and       predict tomorrow's fad, you can be right up there.<br>       Pok&eacute;mon started as a computer game. Just a bit of software. Now it has all sorts       of spin-offs ranging from cartoons to toys to more software. And it is the 'in' fad at       the moment. Somebody, somewhere, is getting rich.       <br>&nbsp;<br>  <li> <b>Maybe you're a control freak?</b><br>       A computer is a mathematical device. You fancy taking this and that and multiplying it by       something else? Knock up a little program and watch it work. Knock up a more complex       program where the mathematical results are displayed on the screen and you're on your way       to creating a mandelbrot.<br>       Tell your computer to write a random value in the Abort vector, then cause an abort       exception and watch the machine lock solid. Or step through memory writing junk across it       and see how many applications survive.<br>       The computer will do <i>exactly</i> what you tell it to do. Nothing more, nothing less.       <br>&nbsp;<br>  <li> <b>It's educational</b><br>       That excuse is usually seen on the Internet as a disclaimer for the irresponsible       publication of bomb-making recipes.<br>       But sometimes the excuse is true.<br>       Programming IS educational. It makes you think.<br>       Try linking two machines via their serial ports, and knocking up a simple little filing       system whereby they can access each other's harddiscs. What kind of protocols will you       use? How do you differentiate between 'this is a control message, tell me what files are       here' and 'this is just a block of data'. You could use the &amp;01 byte for control       messages, and the &amp;02 byte for data. But you cannot scan through for either of those,       as they might appear within the data being sent. How do you handle that? Can you block       you data, or do you send it as a stream. If you block your data, is the system able to       handle other requests between blocks? For example, while one file is being transferred,       can you wander the filesystem to look for the next file? Or set up a 'chat' between the       machines. What happens if you want to seperate the machines physically. You now need       modems, and you now need error control. Will both ends be able to dial and receive, or       will it work on a server/client model?<br>       All we wanted to do was link two machines for file sharing. A sort of a cross between a       network and a bulletin board.<br>       Look at the questions raised in just a minute of thought.<br>       There are many more opportunities. A common one for students doing degrees in computing       is to write an operating system. I would dearly love to understand the concept of OS       design well enough to write my own. No matter how crap it is, there is something rather       amazing in knowing that YOU did it. I plan to go a stage further and construct my own       computer. Maybe an ARM250, with basic I/O. The computer that Rick built...?<br>       On a much smaller scale, you could always do a Mike Cook and hook up some esoteric piece       of hardware to your computer, and see if you can make some use of it. Maybe a cheapo ISA       ethernet card?       <br>&nbsp;<br>  <li> <b>It is art</b><br>       To many experienced programmers, coding is an art form. Whether it be writing perfect       code, or optimising a program to benefit from the lesser known eccentricities of a       particular operating system. Even, God forbid, black art code is an artform. This is not       'good' code as would be taught by a teacher, but rather it is perfectly functional code       that requires a deeper knowledge of things. Take the following two examples:<br>       <code>&nbsp;&nbsp;DEFPROCread_string(pointer%)<br>       &nbsp;&nbsp;&nbsp;&nbsp;LOCAL out$<br>       &nbsp;&nbsp;&nbsp;&nbsp;SYS &quot;OS_IntOn&quot; pointer% TO out$<br>       &nbsp;&nbsp;=out$</code><br>       and:<br>       <code>&nbsp;&nbsp;BIC R0, R0, R0, ASR#31&nbsp;&nbsp; ; IF R0 &lt; 0 THEN R0 = 0</code><br>       The first example converts a pointer to a string to a string. The second example provides       a zero cut-off, so anything less than zero is zero.<br>       I'll leave it to you to figure out how.       <br>&nbsp;<br>       I cannot really say any more on this subject. My personal concept of code 'art' is either       beautifully laid out code (not something that is all compressed onto as few lines as       possible); or black art code that twists the hardware/OS/compiler into spitting out       functional reliable code, only you need to think and learn in order to figure out exactly       what is happening. People maintaining such code will be only too happy to recode an entire       project than deal with the sort of mind that makes heavy use of C's comma operator within       loops; thus their idea of code artistry will be different.<br>       No problem. I, personally, loathe abstract geometric splats on a canvas that are said to       represent deep perspectives on society and life in general. I like my paintings to be of       real things. I like paintings that look real, such as the famous sheep on a winter morning       (Farquaharson). Others will drool over sand castles and concrete insides of houses. It is       a personal and highly subjective thing. But you <i>can</i> create beautiful code...       <br>&nbsp;<br>  <li> <b>It is spiritual</b><br>       Coding in assembler, particularly when working on something low level such as a device       driver, can be a deeply spiritual experience. (you may cue the men in white coats now).<br>       With that kind of code, you are no longer dealing with abstract illusions such as the       Desktop, or sprites, or a letter to your girl (or boy, as is your sex/preference).<br>       Now, we are dealing with binary values. Sixteen registers, one serving a dedicated       purpose, which can each hold a 32 bit value. Those values can be added, subtracted,       multiplied, or logically munged by operations such as OR and AND. There is no concept of       sticking one string on the end of another. The colour blue is just a fantasy given a       binary pattern. There is nothing except data. Pure data. And you can do nothing except       load the data, store it, mathematically alter it, and perform mathematical equivalence       tests upon it. From those incredibly simple building blocks, we can create the illusion       of a Desktop. On that desktop we can imagine a publishing thing. A piece of software that       will let you write anything, in any style imaginable. And into your writing, you can       insert pictures. And of that writing, you can copy it to a buffer where it will be       directed to another processor running another program. And from that second processor, it       will eventually attain physical form. As a little motorised lump whizzes from one side of       a piece of paper to the other, little squirts of ink will be shot out under the control of       this second processor. Totally independant to your processor. And totally unaware of what       is happening - it is all a mathematical maze to the processor. There is no ink, no head,       no paper, no feed rollers. Just a sequence of comparisons and data movements that       eventually combine to turn your imagination into a physical document.<br>       Well I'll be damned.</ol><p>&nbsp<p>Don't be put off when I make frequent references to mathematics. The ARM can add and subtract.It can even multiply, but it cannot divide. It is integer maths (3.5 x 3.5 = 6, as .5 cannot beexpressed in integers) and boolean algebra. Everything else is either passed to a floating pointmathematics co-processor, or faked with lots of complicated programming.<p>&nbsp;<p>So, pick whichever reason(s) from the above that sounds the most plausible. Programming ischallenging, fun, not too good for your social life. The same could be said of a few bottles ofVodka, however programming is certainly likely to make your electronic life easier afterwards.That cannot be said of Vodka.<p>&nbsp;<p>&nbsp;<p><hr size = 3><a href = "index.html">Return to assembler area index</a><hr size = 3><address>Copyright &copy; 2000 Richard Murray</address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -