In this post we will learn how to assemble and link a simple "Hello World" application written in x86-64 assembly for the Linux operating system. If you have experience with Intel IA-32 assembly and you want to quickly get adjusted to the x86-64 world then this post is for you. If you're trying to learn the assembly language from scratch then I'm afraid this post is not for you. There are many great resources online on 32-bit assembly. One of my favourite documents is Paul Carter's PC Assembly Language, which I highly recommend if you're moving your first steps into the assembly language. If you then decide to come back to this post, you should be able to read it with no problems, since the tools that I will employ here are the same used in Carter's book.
Wednesday, August 10, 2016
Saturday, June 25, 2016
Recently I managed to find the time to update a couple of new packages from my Personal Package Archive (PPA) on Launchpad. For those of you who don't know where to find it, click here. If you want to automatically get updates as they come out, you can install it on your Ubuntu by simply issuing
$ sudo apt-get update
from your terminal. In brief, the changes involved Sopcast Player Plus, a fork of SopCast Player by Jason Scheunemann, and gtumbler, the application I have developed in the Summer 2012 as part of the first edition of the Ubuntu App Showdown. So let me now give you the details of what has changed with this new releases.
Tuesday, January 21, 2014
Until a few days ago, all my mobile phones were capable of hosting an ordinary SIM card in their belly. And since I'm talking about 5 years old technology residing in my pocket, it was the time for a change and get some new hardware. As I didn't really follow the recent developments of telephony (5 years are, indeed, a long time span if you compare it with the way shorter characteristic time in Moore's law), I came to know that my future Android mobile will only be able to swallow MicroSIM cards.
So how can I put a SIM card into my new masterpiece of technology right away? After consulting Mr Google for a few advices, two possible solutions popped out: either your phone company will be happy to replace your SIM with an MicroSIM (or a NanoSIM. Yes, there are NanoSIM as well if you, like me, didn't even know about the existence of MicroSIM), or ... wait for it ... you can make your own MicroSIM out of your old SIM!
Tuesday, December 25, 2012
I've got an almost 7 years old Logitech MX1000 wireless laser mouse. After a few years from the purchase I started experiencing a rather annoying issue: every now and then a single click was followed by a quick misfired second double click. So it became hard to accomplish simple tasks like moving or resizing a window with this mouse. Now I have decided that I had enough and I started looking for a solution. Googling around it turns out that this is a very common problem among Logitech mouse users, e.g. [1, 2]. As you can read from those posts, you have basically two roads: either your mouse is still covered by the warranty period and therefore you can ask for a replacement, or you fix it by yourself (of course you can always choose to throw your Logitech mouse away and go for a replacement, but I won't discuss this option here :P)
Saturday, July 21, 2012
I am delighted to announce the first stable release of gtumbler (formerly gistiller), a new graphical PDF manager completely written in Python. It is distributed under the terms of the GNU GPL v3 license (the pyPDF python modules shipped with the app are distributed under a modified version of the BSD license). If you want to give it a try you can get it directly from my PPA "The Nest of Heliopolis" hosted by Launchpad. If you are using Ubuntu 12.04 Precise Pangolin, you can add my PPA to your APT sources list by simply typing
sudo apt-add-repository ppa:phoenix1987/ppa
sudo apt-get update
Then you can install gtumbler with the command
sudo apt-get install gtumbler
or directly from the Software Center.
The major features of gtumbler are:
Here is a screenshot of the application in action
Tuesday, November 29, 2011
I have a pretty old HP Pavilion dv1000 laptop with a Intel Pentium M Processor 740 at 1.7 GHz. I have always used Ubuntu along with the pre-installed version of Windows on that machine, but as new releases became more resource-hungry, I started to experience an unacceptable slowdown. Of course you can use a lighter window manager, such as Xcfe, but since I'm too affectionate to GNOME 2 I decided to make a new start with Debian. I then downloaded the latest 6.0.3 stable release and burnt it on a CD-RW (the other option is to boot the installer from the net, since it seems that you can't boot anything from removable USB media).
The installation process of my new OS went just fine, but in order to download updated packages from the internet I had to use my cable connection, since the Intel wifi adapter needed proprietary firmware that wasn't shipped with the first Debian CD. So I configured my ethernet card, and this turned out to be a source of problems, maybe the one you are experiencing now if you are reading this little guide. During the installation I had configured my ethernet to a static IP address, and everything went fine, Debian booted beautifully, fast and clean.
The first thing I did then was to install the Intel wifi adapter firmware in order to make my wifi card work properly. I have then enabled the non-free part of the official Debian repositories in my sources.list file and executed the following command
# apt-get update && apt-get install firmware-ipw2x00 wireless-tools
Then I have restarted the networking service and Network Manager with
# /etc/init.d/networking restart
# /etc/init.d/network-manager restart
At this point I configured my wireless connection with the graphical frontend to Network Manager (accessible through the icon in the notification area, usually near the clock on the top-right corner of the desktop) and...surprise! The association with the access point went just fine, but I couldn't ping my router nor any other machine on the local network. Weird, uh?
It turned out that this issue was related to the previous network configuration, the one carried out during the OS installation process, since in that case the installer wasn't supposed to use Network Manager to manage the connection. The solution is then pretty simple, I just had to edit my /etc/network/interfaces to look like the following minimal example
iface lo inet loopback
and after rebooting my wifi adapter started working like a charm again.
As a final remark I'd like to inform you that with Intel Wifi ipw2200 adapters you might need to use the firmware version 3.0 for the WEP security encryption. So the best thing to do is probably to move to a more secure encryption protocol, like WPA or WPA2.
Sunday, June 26, 2011
Referencer is a GNOME application especially designed for scientists, for it organizes any type of documents BiBTeX can handle, and ultimately allows you to export the whole collection into a single BiBTeX file (see this article @ Wikipedia and the project homepage for more details). Among the capabilities of Referencer there is the possibility of adding references from ID like the DOI code or the arXiv identifier. One feature that is still lacking is that of adding documents from web urls, although you can create an empty reference with only the field "url" filled. Since I'm currently working on my thesis for my Master's degree in Theoretical Physics, I need a plugin that instructs Referencer how to fetch books metadata from a web page containing the description of books. One of such sites is the fabled Google Books and in what follows I'm going to explain why I've chosen this particular site. If you search a book on Google Books, go on its details page (if you're in the preview page, just click on "About this book" on the left) and scroll down to the bottom of the page. There you'll find three buttons that will allow you export the bibliographic metadata in three different format. Fortunately one of such formats is BiBTeX, and Referencer is able to fill a document metadata from a bibtex file. I then wrote a plugin that allows to fetch this bibtex file from Google Books by pasting the address of the book into Referencer.
How to install the plugin:
- download the plugin file gbooks.py from here;
- put gbooks.py into directory ~/.referencer/plugin (you might need to create this folder);
- run Referencer and enable gbooks if not already enabled.
How to use this plugin:
- run Referencer and go to menu entry Documents->Add reference with ID...
- select Web URL from the dropdown menu
- paste the Google Books url in the text field and press OK
Sunday, January 16, 2011
|The main window of pyGtkPlot.|
Monday, January 3, 2011
I was surprised by the lack of a way to read from a stream without blocking in Python, and this is the main reason why I'm writing this post. Some years ago I had the urge to open a two-way channel of communication between the program I was writing and an external command-line program (actually a GUI). I had solved this problem in mainly two different ways in C and C++ on Unix, by using pseudo-terminals in one case, and duplicated file descriptors in the other. Here we are going to create an object which inherits from a preexisting class which is provided by one of the modules for Python.