in black and white
Main menu
Home About us Share a book
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics

Linux for dummies - Klimas M.

Klimas M. Linux for dummies - Wiley publishing , 2002. - 169 p.
Download (direct link): linuxfordummies2002.pdf
Previous << 1 .. .. 104107 108 109 110 111 112 < 113 > 114 115 116 117

Mnemonics for some common 80x86 processor instructions:
Name Syntax Comment
NOP NOP No operation (do nothing).
MOV mov destination, source Move (copy, set)data.
Exchange the values.
Compare the two operands.
Push onto stack.(Place the value on stack and increment the
XCHG XCHG operand1,operand2 CMP CMP operand1,operand2 PUSH PUSH source stack pointer).
Push flags.
Part 7: Learning with Linux
Linux Newbie Guide by Stan, Peter and Marie Klimas
PUSHA PUSHA Push all general-purpose registers.
POP POP destination Pop from stack(take the value from stack, and decrement the
stack pointer). Pop is reverse to push.
POPF POPF POPA POPA INC INC operand DEC DEC operand ADD ADD Dest,Source ADC ADC Dest,Source SUB SUB Dest,Source INT INT number CALL CALL subroutine RET RET
Pop flags.
Pop all general-purpose registers.
Increment (increase by l).
Decrement (decrease by l).
Add with carry.
Execute an interrupt.
Call a subroutine.
Return from this (current, innermost) subroutine.
JMP JMP destination Jump (start executing code starting
JE JE destination Jump if equal.
JNE JNE destination Jump if not equal.
JZ JZ destination Jump if zero.
JNZ JNZ destination Jump if not zero.
JP JP destination Jump if parity (parity is even).
JNP JNP destination Jump if no parity (parity is odd).
JPE JPE destination Jump if parity even.
JPO JPO desitination Jump if parity odd.
JCXZ JCXZ destination Jump if CX zero.
JECXZ JECXZ destination Jump if ECX zero.
An implementation of "Scheme" programming language. Scheme is a modern dialect of the LISP language (the one that has been promising the artificial intelligence for the last 40 years).
Silly examples for the guile interpreter. guile (+ 1 1)
(define a 2)
(/ a 3)
(= a 7)
(display "hello\n")
(system "ls")
The first command runs the guile interpreter. The next four commands do addition, definition, division, and comparison using the so-called Polish notation (operator in front of the operants). See the section on reverse Polish notation on this page. The last command exits the guile interpreter.
GNU FORTRAN. An on-line manual is available at: If you are really into FORTRAN, you might also want to check: to find a FORTRAN compiler that suits your particular needs under Linux.
Silly example of a fortran code. It prints squares and cubes of numbers from 1 to 20:
PRINT 200, "X", "Xa2", "Xa3"
DO X=1, 20
PRINT 100, X, X**2, X**3 END DO
100 FORMAT (I20, I20, I20)
200 FORMAT (A20, A20, A20)
To compile this file, I run the fortran compiler with the option that recognizes the "free-form" source code (I don't like the fixed-code source):
g77 -ffree-form try_fortran.f
and now I can run the resulting executable (which has the default name is a.out):
Part l: Learning with Linux
Linux Newbie Guide by Stan, Peter and Marie Klimas 01/08/2003
Scripting language for "programmed dialog". See man expect. kylix
This is a brand-new (Feb.2001) commercial offering from Borland (aka Inprise). In short, it is a Linux port of the famous object-oriented Pascal ("Delphi"). kylix is unlikely to be on your Linux distribution CD, you must pay for it, but if you want the best rapid application development (RAD) platform with a code portablity between Linux, MS Windows and the Web, large number of pre-built components, etc., kylix is likely the best. In my opinion, Delphi is significanly better than MS Visual Basic.
The Java language compiler and interpreter. Under Linux, both javac and java are actually scripts which call kaffe with appropriate options (try cat /usr/bin/java).
A trivial example for a java "standalone" program. I use my favourite text editor, e.g. kate (in X terminal) to type in the following java code:
/* Comments are marked like in C++
* A java class to display "Hello World"
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World."); // Print "Hello World." followed by a newline
I save this into a file named Now, I can compile it using: javac
This creates a file called HelloWorldApp.class which contains the "bytecode" (semi-compiled code which requires an interpreter to run). I can run it on the command line using: java HelloWorldApp
For an example on how to embed a simple java applet into an html web page, have a look at from which my java "standalone" program was borrowed.
Run the "make" utility to build (compile, link, etc) a project described in the Makefile found in the current directory.
make is used to bring a system "up to date", whenever a change in one file requires an action elsewhere. make is "intelligent" in that it will not make changes unless the change is required, as determined by the file modification date/time. Normally used for buiding software packages (compiling, linking ...), make is also used for other tasks, e.g., system administration. Makefile looks as follows:
Previous << 1 .. .. 104107 108 109 110 111 112 < 113 > 114 115 116 117