Friday, January 23, 2009
cupid ???
Whenever I try to send a mail which contains cpuid, outlook automatically changes it to cupid :D Luckily , I corrected it all the times (or at least I hope so :))
PS: Luckily blogger didn't have that auto-correct feature :)
Tuesday, January 6, 2009
Gadgets!
Changing CNAME record
Childhood nightmares!!
Tuesday, December 30, 2008
Why do we have to help the poor?
When I used to think that helping the poor is charity, I attended a seminar given by a social activist. Since then my attitude towards helping the poor has changed radically. Here is the reasoning he gave in that discussion (Although the example is of my own creation, I have copied the main logic from his argument)
Let’s assume A and B are two new-born kids. As you can guess, I start my argument saying that A is born in a rich family and B is born in a poor family. Both A and B grow up enjoying their childhood. But the difference is one is provided education and the other isn’t so lucky. So by the time they grow up, compared to B, A has more realistic chance of ending up in some decent job. I know that there can be some arguments that if B was determined to study, nothing can stop him from that. Let’s be more realistic – B isn’t mature to know all that. Or at least not every B can be so mature in their childhood. So at this stage when B is finding it hard to make a decent living, let us try to understand what might be going on in B’s mind.
Both me and A were similar when we were born. But now he is having a far better life than me. Why is it so? It is because A was lucky to be born in a rich family or- if B thinks more radically – this capitalistic society’s laws gave an undue advantage to A over me. According to B, it is logical to think that the current system is unfair and so he doesn’t have to abide by those laws which are unfair to him. And so he starts breaking those laws which may cause problems to people like A who want to abide by the law. From B’s point of view, all that he is thinking and doing is correct and so he wants to revolt against established laws – after all you cannot expect every B to be a Mahatma, it is more likely that B can think on the lines of someone like Bhagat Singh who believes in forcefully doing what he wants instead of peaceful means and cause a lot of loss to all those involved (all As and Bs).
We all can guess what will be the end result of above situation. If you want such situation you don’t have to help the poor. Else, if you want a peaceful society, help the poor and don’t let them think that they are on the disadvantaged side of this Capitalistic society.
Hello world bootloader!
Hopefully this small program can give you a kick-start w.r.t bootloaders.
Following steps assume that you have access to linux/freebsd (and one USB or floppy)
Step 1: Save the code given below in a file, boot.asm
Step 2: Install “nasm” (assembler)
Step 3: Run the command "nasm -f bin boot.asm -o boot.bin"
Step 4: Connect your USB
Step 5: If it mounts automatically, unmount it
Step 6: Run the command "dd if=boot.bin bs=512 of=/dev/sdb" (Replace sdb with the name of the USB device which your system has assigned, in my case it was sdb)
Step 7: boot with your USB and you should now be able to see that your computer hangs after printing “A”
Note 1: BITS, ORG, times, $, $ are nasm specific
----------------------------------------------------------------------------
[BITS 16] ; bootloader need to start in 16-bit mode
[ORG 0x7C00] ; The BIOS loads the boot sector into memory location 0x7C00
mov ah, 0Eh ; We want to print a single character
mov al, 'A' ; character to be printed
mov bh, 00h ; page 0
mov bl, 00h ; color of the text printed on console
int 10h ; invokes the video interrupt handler
halt:
jmp halt ; Halt the program
times 510-($-$) db 0 ; Fill the rest of the files with zeros
dw 0AA55h ; Our boot sector identifier
----------------------------------------------------------------------------
Reference: http://osdever.net
Friday, December 19, 2008
Cricketing ties between India and Pakistan
I can imagine that even if there is no war between these two countries for the next 50 years, the new generation which would have never seen war will still treat Pakistan/India as an enemy mainly because of the arch-rival advertising of the sport.