Well, this is something that you have to learn on-the-fly. Even if I
were to use DOS tools, there is no OS class for DOS! Besides, there
is plenty of documents online for your reference.
First thing first. For the most detailed (and longest) document of the
assembler itself, go to http://www.gnu.org/software/binutils/manual/gas-2.9.1/html_chapter/as_toc.html.
We will only use a fraction of the features, and a fraction of its
support for the x86 architecture. Nonetheless, this is the best
reference material as far as the tool is concerned.
Most Unix tools have online manuals. To access the online manuals,
use the man command. The following is a command to view
the manual of the ls command:
man ls
That's fairly painless, isn't it? In man, use `q' to quit.
The home, end, page-up and page-down keys do what they should. To
search for a pattern forward, use `/', followed by the pattern to
search for, then ENTER. To search for a pattern backward, use `?'
instead.
The following is a list of commonly used commands in Unix/Linux. You
can use man to find out more about these commands:
- vim: a visual editor, difficult to learn, but very
efficient once you get used to it. Visit http://www.vim.org
for more information.
- nano: another visual editor, less difficult to learn,
most beginners prefer nano to vim. Visit
http://www.nano-editor.org
for more information.
- ls: list the contents of a directory.
- cp: copy a file or directory to some place else.
- mv: move a file or directory to some place else. Als
renames files or directories.
- rm: be careful with this one, it deletes files or
even directories! Read
the manual first before trying anything daring.
- mkdir: make a new directory.
- man: the manual viewer. Yes, you can read the manual
of man using itself.
- as: our assembler. The manual does not include the
syntax definition, just the command line options.
- ld: our linker.
- make: a utility program to automatically execute programs
to create targets based on predefined dependencies.
- ps: lists processes.
- cat: concatenate files to an output. You can use it to
view contents of a text file. Does not scroll!
- less: a text file viewer that allows paging and
searching. man uses less as a frontend. If
you know how to use man, you already know how to use
less.
Copyright © 2009-04-16 by Tak Auyeung