출처 : Beginners Introduction to the Assembly Language of ATMEL-AVR-Microprocessors ,2004 by Gerhard Schmidt
어셈블러를 왜 배워야 하나?
-짧으며 분석 또는 버그잡기에 편하다.
-빠르다.
-어셈블러를 배우기 쉽다.
---어셈블러를 배우는 데 AT90Sxxxx만한 것 없다.
레지스터란 무엇인가? 8bit용량을 가진 특별한 기억장치이다.
Port란 무엇인가? AVR에서 Port들은 CPU로부터 내,외부 하드,소프트웨어 구성요소로의 일종의 논리기능을 담당하는 문(gate)이다.
Why learning Assembler?
Assembler or other languages, that is the question. Why should I learn another language, if I already
learned other programming languages? The best argument: while you live in France you are able to get
through by speaking english, but you will never feel at home then, and life remains complicated. You can
get through with this, but it is rather inappropriate. If things need a hurry, you should use the country's
language.
Short and easy
Assembler commands translate one by one to executed machine commands. The processor needs only to
execute what you want it to do and what is necessary to perform the task. No extra loops and unnecessary
features blow up the generated code. If your program storage is short and limited and you have to optimize
your program to fit into memory, assembler is choice 1. Shorter programs are easier to debug, every step
makes sense.
Fast and quick
Because only necessary code steps are executed, assembly programs are as fast as possible. The
duration of every step is known. Time critical applications, like time measurements without a hardware
timer, that should perform excellent, must be written in assembler. If you have more time and don't mind if
your chip remains 99% in a wait state type of operation, you can choose any language you want.
기계어는 배우기 쉽다.
It is not true that assmbly language is more complicated or not as easy to understand than other
languages. Learning assembly language for whatever hardware type brings you to understand the basic
concepts of any other assembly language dialect. Adding other dialects later is easy. The first assembly
code does not look very attractive, with every 100 additional lines programmed it looks better. Perfect
programs require some thousand lines of code of exercise, and optimization requires lots of work. As
some features are hardware-dependant optimal code requires some familiarity with the hardware concept
and the dialect. The first steps are hard in any language. After some weeks of programming you will laugh
if you go through your first code. Some assembler commands need some monthes of experience.
기계어 배우는 데 AT90Sxxxx만한 게 없다.
Assembler programs are a little bit silly: the chip executes anything you tell it to do, and does not ask you if
you are sure overwriting this and that. All protections must be programmed by you, the chip does anything
like it is told. No window warns you, unless you programmed it before.
Basic design errors are as complicated to debug like in any other computer language. But: testing
programs on ATMEL chips is very easy. If it does not do what you expect it to do, you can easily add some
diagnostic lines to the code, reprogram the chip and test it. Bye, bye to you EPROM programmers, to the
UV lamps used to erase your test program, to you pins that don't fit into the socket after having them
removed some douzend times.
Changes are now programmed fast, compiled in no time, and either simulated in the studio or checked incircuit.
No pin is removed, and no UV lamp gives up just in the moment when you had your excellent idea
about that bug.
-----------
What is a register?
Registers are special storages with 8 bits capacity and they look like this:
-----------
Ports in the AVR are gates from the central processing unit to internal and external hard- and software
components. The CPU communicates with these components, reads from them or writes to them, e.g. to
the timers or the parallel ports. The most used port is the flag register, where results of previous operations
are written to and branch conditions are read from.
...
부분 부분 발췌해서 우리말로 바꾼 것입니다.
좀만 더 해석해주세요..ㅎㅎ
헉! 싫어요 ㅎㄷㄷ
고민입니다. 머리가 아포요~~
ㅋㅋ 컴파일러를 믿지 못해서 ^^