Blog Archive
-
▼
2009
(14)
-
▼
March
(8)
- How to Install GCC (c/c++) Compiler in Ubuntu Linux
- Install More Than 4Gb Memory in 32 bit Ubuntu - Ho...
- Microchip PIC18 Family Video Tutorial
- Scrolling LCD Display in CCS C
- How to Access Linux Partition from Windows : Linu...
- CCS C Tutorial : Basic Data Types of CCS C
- How to Make Password Protected Encrypted Text F...
- How to set PORTA as Digital I/O Port in PIC16F877A
-
▼
March
(8)
Followers
Powered by Blogger.
NASM : My First Program
Some years ago, Assembly Language was very popular. I used TASM , MASM and Microsoft Debug on that time. I think Debug one of the very powerful tools for cracking.
I just figure out, is there any Assembly Language in Linux?
Because, usually Assembly Language use DOS and BIOS Interrupt Services.
I finally found a good application, named NASM (Net wide Assembler). I have tried the sample codes from http://leto.net/writing/nasm.php.
NASM doesn’t have a text editor, so you can use your familiar text editor then save the file with .asm file extension.
There are few main differences to be considered when you use assembly language in Linux:
* In DOS mostly you use interrupt int 21h, int 10h and int 16h. In Linux, everything is handled by kernel with int 80h.
*Linux is a 32-bit protected mode operating system, so have to use extended 32-bit registers, such as EAX, EBX, ECX and so on. In 16-bit register, you still use AX, BX,CX etc …. registers.
*In 32-bit programming, you don’t have to think about segments at all because it runs in the flat memory model.
*I think no body write DOS assembly anymore. Hey… it’s 16 bit.
How I can get Nasm?
NASM is listed in Ubuntu Repository, so just download it using apt.
vishnu@vishnu-desktop:~$ sudo apt-get install nasm
Write your first Linux Assembly Language Application
Here I will Show you a step by step example for Displaying "hello World"
Step 1. Type the code
You can use, vim, vi, gedit etc. The extension must be .asm.
vishnu@vishnu-desktop:~$ sudo vim hello.asm
section .data
hello: db ‘Hello world!’,10
helloLen: equ $-hello
section .text
global _start
_start:
mov eax,4
mov ebx,1
mov ecx,hello
mov edx,helloLen
int 80h
mov eax,1
mov ebx,0
int 80h
save the file.
Actually, I’m new myself in Assembly Programming in Linux. I took the codes above from the NASM website. I just wanna show you that we can do Assembly Programming in Linux. If you want to know deeper you can go
to this link: ……………………..
Step 2. Compile .asm (source code) to .o (object)
vishnu@vishnu-desktop:~$ nasm -f elf hello.asm
Step 3. Link the object file to produce an executable file.
vishnu@vishnu-desktop:~$ ld -s -o hello hello.o
Now, you have 3 files, hello.asm (your source code), hello.o (your object file) and hello (your program).
Step 4. Ready to run
You can run your program by typing:
vishnu@vishnu-desktop:~$ ./hello
Hello world!
Congratulations! You have just written your first assembly program in Linux.
If you want to know more details about nasm and ld, you can see the manual.
vishnu@vishnu-desktop:~$ man ld
vishnu@vishnu-desktop:~$ man nasm
I just figure out, is there any Assembly Language in Linux?
Because, usually Assembly Language use DOS and BIOS Interrupt Services.
I finally found a good application, named NASM (Net wide Assembler). I have tried the sample codes from http://leto.net/writing/nasm.php.
NASM doesn’t have a text editor, so you can use your familiar text editor then save the file with .asm file extension.
There are few main differences to be considered when you use assembly language in Linux:
* In DOS mostly you use interrupt int 21h, int 10h and int 16h. In Linux, everything is handled by kernel with int 80h.
*Linux is a 32-bit protected mode operating system, so have to use extended 32-bit registers, such as EAX, EBX, ECX and so on. In 16-bit register, you still use AX, BX,CX etc …. registers.
*In 32-bit programming, you don’t have to think about segments at all because it runs in the flat memory model.
*I think no body write DOS assembly anymore. Hey… it’s 16 bit.
How I can get Nasm?
NASM is listed in Ubuntu Repository, so just download it using apt.
vishnu@vishnu-desktop:~$ sudo apt-get install nasm
Write your first Linux Assembly Language Application
Here I will Show you a step by step example for Displaying "hello World"
Step 1. Type the code
You can use, vim, vi, gedit etc. The extension must be .asm.
vishnu@vishnu-desktop:~$ sudo vim hello.asm
section .data
hello: db ‘Hello world!’,10
helloLen: equ $-hello
section .text
global _start
_start:
mov eax,4
mov ebx,1
mov ecx,hello
mov edx,helloLen
int 80h
mov eax,1
mov ebx,0
int 80h
save the file.
Actually, I’m new myself in Assembly Programming in Linux. I took the codes above from the NASM website. I just wanna show you that we can do Assembly Programming in Linux. If you want to know deeper you can go
to this link: ……………………..
Step 2. Compile .asm (source code) to .o (object)
vishnu@vishnu-desktop:~$ nasm -f elf hello.asm
Step 3. Link the object file to produce an executable file.
vishnu@vishnu-desktop:~$ ld -s -o hello hello.o
Now, you have 3 files, hello.asm (your source code), hello.o (your object file) and hello (your program).
Step 4. Ready to run
You can run your program by typing:
vishnu@vishnu-desktop:~$ ./hello
Hello world!
Congratulations! You have just written your first assembly program in Linux.
If you want to know more details about nasm and ld, you can see the manual.
vishnu@vishnu-desktop:~$ man ld
vishnu@vishnu-desktop:~$ man nasm
Tuesday, December 23, 2008
Firefox Secret Pages and Hacks
- about: (Main page, You can see a logo)
- about:credits (This page shows the details of people contributing in the FireFox )
- about:license (The FireFox browser license)
- about:buildconfig (Details of build platform and tools used and details)
- about:config (FireFox settings that you can tweak, Use this very carefully )
- about:mozilla (A Firefox easter egg! )
- about:robots (A funny comment about robots!)
- About kitchensink (funny picture!! through online )
Friday, December 19, 2008
Cinelerra : Video Editing Tool for Ubuntu Linux

Cinelerra is the most advanced non-linear video editor and compositor for Linux. It is developed by Adam William. Cinelerra does primarily 3 things: capturing, compositing, and editing audio and video with sample level accuracy. It's a movie studio in a box. If you want the same kind of editing suite that the big bosses use, on an efficient Linux operating system, it's time for Cinelerra.
see more screen shots here
See Maual Here
How to install cinelerra in ubuntu 8.10
deb http://akirad.cinelerra.org akirad-intrepid main Installation notes:
- For your convenience you can install a package for detecting your version of Ubuntu, installing akirad repository and keeping it updated.
Just double click on the link http://akirad.cinelerra.org/pool/addakirad.deb and install it with GDebi Package Installer.
or
Alternatively, use one of the following terminal commands:echo deb http://akirad.cinelerra.org akirad-intrepid main | sudo tee /etc/apt/sources.list.d/akirad.list && wget -q http://akirad.cinelerra.org/dists/akirad.key -O- | sudo apt-key add - && sudo apt-get update4 packages are available in the akirad repository: Install it using synaptic package manager
cinelerra (all computers)- Ubuntu Intrepid uses Pulse Audio as Sound driver. Since it comes with a PulseAudio ESD compatibility layer, Cinelerra can be set to work with PulseAudio. Simply open Cinelerra and go to Settings->Preferences->Playback->Audio Driver. Select ESound and set the following parameters:
cinelerra-gl (best on computer with opengl2.0 shader)
cinelerra-smp (best on multiprocessors computer, it allows also opengl2.0 shader)
cinelerra-swtc (extra Shape Wipe Transitions)
If You have Sound Problem use the following or read this
Server:
Port: 7007
Here you can see installation details for all linux distros including old ubuntu
Thursday, December 18, 2008
Stardict, Open Source Free Dictionary for Ubuntu Linux
$ sudo apt-get install stardict
Stardict is a dictionary, thesaurus, translator !!!
We can use more that one dictionary database, for example: Merrian Webster Dictionary, Longman Dictionary, etc. You can download the dictionary files from http://stardict.sourceforge.net/Dictionaries_dictd-www.dict.org.php
The dictionary files should go here: /usr/share/stardict/dic
Steps to add New Dictionary (example uses logman dictionary)
download stardict-longman-2.4.2.tar.bz2 files
$ sudo cp stardict-longman-2.4.2.tar.bz2 /usr/share/stardict/dic $ sudo tar -xjvf stardict-longman-2.4.2.tar.bz2
You can re arrange the search order of your dictionaries
It can be used for testing pronunciation, After installation it will be available on Applications-->Accessories
Stardict is a dictionary, thesaurus, translator !!!
We can use more that one dictionary database, for example: Merrian Webster Dictionary, Longman Dictionary, etc. You can download the dictionary files from http://stardict.sourceforge.net/Dictionaries_dictd-www.dict.org.php
The dictionary files should go here: /usr/share/stardict/dic
Steps to add New Dictionary (example uses logman dictionary)
download stardict-longman-2.4.2.tar.bz2 files
$ sudo cp stardict-longman-2.4.2.tar.bz2 /usr/share/stardict/dic $ sudo tar -xjvf stardict-longman-2.4.2.tar.bz2
You can re arrange the search order of your dictionariesIt can be used for testing pronunciation, After installation it will be available on Applications-->Accessories
Wednesday, December 17, 2008
Hackett and Bankwell - Learn Ubuntu wih Comic Book
New comic book Hacket and Bankwell book geared at introducing GNU/Linux — specifically Ubuntu GNU/Linux — to new users. At about 30 pages long, the first issue is an easy read, and doesn’t get too bogged down by technical details, political ruminations, or an over-abundance of geekiness. A couple panels are dense with historical information, but it doesn’t detract from the pace of the simple story too much.
Labels:
ubuntu
|
0
comments
Internet Explorer the back door of Hackers

If you've never tried Firefox, Safari, Opera Google Chrome or other Internet Explorer alternatives, now might be a good time. Microsoft's flagship browser, the default choice on countless Windows machines, currently has a serious security flaw that affects all versions of the browser running on any version of Windows. The vulnerability allows hackers to gain access to any sensitive data on your PC.
While Internet Explorer may not be the most secure of browsers, at least Microsoft is fast when it comes to patching vulnerabilities. The company is getting ready to push out an emergency update for the very serious flaw.
See liks http://blog.wired.com/business/2008/12/ie-fans-beware.html
http://blog.wired.com/business/2008/12/microsoft-to-ru.html
Subscribe to:
Posts (Atom)
About Me
- jumalikorek
