Skip to main content

Posts

Showing posts from 2006

Added new memory module

Just extended my RAM to 512mb with heat spreaders attached. DDR400 Module Size: 512 MBytes Max. Bandwidth: PC3200 (200MHz) Part Number: M2G9IAKATT9F0839SD Manufacturing Date: Week 46, Year 03 Timings Table Frequency: 200MHz CAS# Latency: 2.5 RAS# to CAS#: 3 RAS# Precharge: 3 Tras: 8

Blog suspended

It has been a long time since I blogged. As for now, I am filing a blog leave. I just want to enjoy the Ateneo Fiesta week. To be honest, I want to savor every moment here in my school where I studied for almost 16 years. At the same time, I should not forget the tasks reflected in the gantt chart of activities of our thesis. If you want to track down the Ateneo Fiesta event, click here .

nVidia & Xorg issues

This entry should have been posted some time ago. Well, I hope this would still serve as a valuable reference. The most annoying part in making your OS work is the X server especially if you are using decade-old displays that can only handle a maximum of 1024x768 @ 60Hz. Worse if its EDID is not being read correctly by the driver. I guess driver writers from nVidia should pay much attention to this issue. Video Card: GeForce FX5700 128-bit 256mb Display: DTS CM-14D (Made in China) Xorg Version: xorg-x11-7.1 nVidia Driver Version: nvidia-drivers-1.0.8776 Setting things for Xorg and nVidia proprietary drivers may not be of much pain for Ubuntites but it is the other way around for Gentooligans. In Section "Monitor" this line should be appended. Modeline "1024x768@60" 65.0 1024 1048 1184 1344 768 771 777 806 -vsync -hsync In Section "Device" Identifier "nVidia GeForce FX5700" this line should be appended as well. Option "UseED...

Ebuilds: media-gfx/f4l

F4L is an open source development environment for Macromedia Flash, a multi-platform format(swf/svg) widely used for web applications and vector animation. I have found out that there is no existing ebuild yet for this cool project. It is not included in the official Gentoo Portage yet. Here is the ebuild. Use at your own risk. I assume you already have a working overlay of your local portage. in file f4l-0.2.1.ebuild # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit qt3 eutils DESCRIPTION="F4L is an open source development environment for Macromedia Flash" HOMEPAGE="http://f4l.sourceforge.net/" SRC_URI="mirror://sourceforge/f4l/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" DEPEND="=x11-libs/qt-3.3*" RDEPEND="${DEPEND}" src_compile() { "${QTDIR}"/bin/qmake -o Makefile ${PN}.pro || die "...

Halloween

It is a season when children enjoy collecting candles, jumping around sarcophagi, wearing dirty masks, and scaring other children(smaller/younger). TV shows are fun to watch. In the United States, children usually play snowballs during winter. Well, it is totally a different story here since children play waxballs during Halloween. Not forgetting adults, it is a season for filling stomachs with barrels of beer, bottles of wine, and gallons of coconut-fermented drinks otherwise known as tuba . I really do not enjoy roaming around burial grounds especially during Halloween for the reasons that, you will see people shouting at each other, throwing punches, showing knives, and trying to boast their clan’s supremacy among others. The fear of ghosts is not a thing to consider here, it is the fear of being unable to withstand adults looking for troubles no matter how hard you try ignoring their fun. This is true to cheap cemeteries that are maintained by the local government unit. Comp...

Some updates on my Gentoo box

Get in position and wait for my go. I recompiled the kernel applying Con Kolivas ‘ kernel patchset for linux-2.6.18. Accordingly, his patchsets are designed to improve system responsiveness with specific emphasis on the desktop, but suitable to any workload. Feedbacks show that it scales well for a typical desktop use. If you want to try this out, here is a comprehensive walkthrough that will get you on your feet along the way. I also felt the need of updating my Xorg. I had a smooth shift from Xorg 6.9 to Xorg 7.1. So far so good. Firefox 2.0 rocks as well! There are obvious improvements so grab yourself one. Currently, it is masked by x86 keyword in the Gentoo Official Portage so just deal with it.

Crackmes: cyrex’s Linux CrackMe

Find the correct password to get the good boy message it would be great for an solution how you solve this , and with what i solve this with the standard GNU Debugger (gdb) Difficulty: 1 - Very easy, for newbies Platform: Unix/Linux, etc. Language: C/C++ [Solving the Crackme] Solving crackmes is fun but if you screwed up, it sucks big time. Thank goodness, heavy tasks are over. Anyway, let us see what we can do with this. joset@kee:~/src/crackmes/crackme_01$ ./crackme -[ Linux CrackMe (Level:2) by cyrex ]- -[ TODO: You have to get the valid Password ]- Enter Password: 0x7d7 -[ Ohhhh, your skills are bad try again later ]- joset@kee:~/src/crackmes/crackme_01$ Do we have to use the debugger first? How about this? joset@kee:~/src/crackmes/crackme_01$ strings crackme /lib/ld-linux.so.2 libc.so.6 printf __deregister_frame_info strcmp scanf _IO_stdin_used __libc_start_main __register_frame_info __gmon_start__ GLIBC_2.0 PTRhP QVhP [^_] -[ Linux CrackMe (Level:2) by cyrex ]- -[ T...

ISP lock-ins

Globe Broadband and Bayantel please invest here as soon as possible. We need the quality of services that you offer. Majority of the broadband subscribers here are not that satisfied. One year contract is not worth it. I have received the first bill already. Does it mean that I will be suffering 11 months more? Geez! pldc ka kasi tol! ang hina ng broadband mo! ano yan pentium poor? sm*rt broken ata yan eh! [bayantel only] join now! tol, ipconfig /release tapos ipconfig /renew lol! I can’t even access the website of Mindanao Open Source Society . Damn it. Hoping for better days.

Bad luck

This is a program that simply extracts numbers from buffered input. I do not have any idea why this didn’t work. I got a zero. input: mov ah, 0ah ; buffered input sys call lea dx, strptr ; load effective address int 21h ; call kernel mov ah, 02h ; write character to stdout sys call mov dl, 0ah ; issue carriage-return int 21h ; call kernel lea si, string ; set source index to start of string mov cl, [strlen] ; set loop counter here: mov dl, [si] ; place current character in dl cmp dl, '0' ; compare if below '0' jb traverse cmp dl, '9' ; compare if above '9' ja traverse mov ah, 02h ; write character to stdout sys call int 21h ; call kernel cmp dl, '$' ; check end-of-string sentinel je exit traverse: inc si ; increment source index pointer loop here exit: int 20h ...

Happy Fiesta Zamboanga!

Viva! Nuestra Senora del Pilar. Today is the feast of Our Lady of the Pilar, our city’s patron saint. Here is a description of the city where I live in. A very peaceful place that is. I guess I won’t be enjoying the feast today since I’ll be finishing our OpenGL project. In my list, it also says that I’ll be writing a simple C program today incorporating Balanced Trees . Well, it’s my own approach to file system writing.

RX Band Breakout conquered!

We did our best! We burned the stage! A video of our performance will be uploaded in youtube soon. I will post the notification here. We got the most awards. It was indeed a blessing! 1) Best Bassist - Joset Zamora 2) Best Vocalist/s - Bon Padayhag, Macky Alger 3) Best Drummer - Daryll De Leon 4) 2nd Place - Junkyard Congratulations to the winners as well. You did great! Thank you Dream Radio RX 93.1 ! [Resolution] No gigs before graduation day. Now it’s time to get the Reiser4 File System Driver for Windoze XP done. Yeah, that’s our thesis. God bless us all.

Binary Trees

A tree has a finite set of elements called nodes. It has a unique node called the root node, where the remaining nodes are a disjoint collection of subtrees. A binary tree is a tree whose elements have two children at maximum. It is considered as a data structure composed of elements that are characterized by two link fields, left and right children. A leaf node contains 0 children meaning both children point to a NULL value. A binary search tree is a special type of a binary tree . These terms are sometimes used interchangeably in some articles, so do not be confused. For this purpose, I’ll limit my article to binary trees in general. First let’s define the structure to be used. #include <stdio.h> #include <stdlib.h> typedef char DATA; struct node { DATA d; struct node *left; struct node *right; }; typedef struct node NODE; typedef struct NODE *BINTREE; [Creating a Binary Tree] Dynamic allocation. BINTREE new_node() { ...

RX Band Breakout

RX Band Breakout will be on October 9, 2006. It is going to be a tough competition though. Most competing bands are extremely good! So acting like a duck on stage would surely drive you down. We want to burn on stage and fire them up with our solos. Sad thing is that, I do not have enough time for practice so I searched for bass solo stuffs. I found a lot of cool Brazilian scales incorporated in a bass solo and all that. Which also lead me to rank bassists who happened to be my influences. I wish could play well like them. Here’s my ranking. 1) Victor Wooten - Versatile 2) Bill Dickens - Versatile 3) John Myung (Dream Theatre) - Progressive Rock 4) Romel (Barbie’s Cradle, Freestyle) - Progressive Folk 5) - name - (P.O.T.) - Funk Rock 6) Flea (Red Hot Chili Peppers) - Funk Rock 7) Nathan (Rivermaya, Kapatid, Bamboo) - Rock 8) - name - (Wolfgang) - Rock 9) - name - (Razorback) - Rock 10) Stuart Ham - Jazz For as long as we’ll be able to burn the stage, it doesn...

SFD: FOSS @ Claret College of Isabela

First of all, thank you God for giving me the gift of life and the countless blessings. Many thanks to Ma’am Yolynne Medina for choosing me as a speaker. I am so grateful. As well as RJ Ian Sevilla, thanks man! You did a great job! For the audience, muchas gracias for fighting boredom during my presentation. Click here to view the FOSS@CCI website. We left Zamboanga City around 0700H aboard on a fastcraft. It’s a fast craft! I did not take any anti-vertigo tabs. It’s not Rialto anyway. We took the last trip around 1730H on our way back. I will never forget this event. My first time to step on Isabela City, Basilan, will never be an ordinary day for me.

Bubble sort in C

I’m writing this for someone special. Hope this would help. This is at the same time a review of my past lessons. Assuming i,j and tmp are defined as integers, num[] as an array of integers, and SIZE as a constant. for (i = 0; i < SIZE - 1; ++i) for (j = SIZE - 1; j < i; --j) if (num[j-1] > num[j]) { tmp = num[j-1]; num[j-1] = num[j]; num[j] = tmp; } Here is another way of doing it. This is a demo on how the function works on a particular array of integers. a[] is the array of integers while n is the size of the array. void swap(int *, int *); void bubble(int a[], int n) { int i, j; for (i = 0; i < n - 1; ++i) for (j = n - 1; j > i; --j) if (a[j-1] > a[j]) swap(&a[j-1], &a[j]); } void swap(int *p, int *q) { int tmp; tmp =...

Recognizing unknown partitions in Windoze

This is the starting point if you are planning to develop an Installable File System Driver (IFSD) for Windoze. You can also use this if you want to format partitions that aren’t visible inside your Windoze box. First thing’s first, fire up a registry editor. Use regedit or any third party editors. Search for the entry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices If you’re in the right place then, add a new string value. The name should be the drive letter you wish to associate and should be a drive letter that currently isn’t used by your box. The name along with its value should be of the form: K: \Device\Harddisk0\Partition1 In Windoze, hard drive numbers start at 0 and partition numbers start at 1. The above example is equivalent to /dev/hda1. You can also verify your partition table without any third party applications such as Partition Magic, GParted, etc. by running diskmgmt.msc on the command line. The drive ...

I am created in the image and likeness of God. I am divine. I am born of God. I am a child of God. Everything I have is God’s gift to me. I do not own anything. Everything comes from and returns to God. I am a child of God. Everyone is my brother. Everyone is my sister. I love each person the way I love myself. I am a child of God. God loves me. In Him alone, I place my faith. This was distributed during our junior’s recollection. I have this posted in my room. I know most of you reading my blog are busied by your jobs and other concerns. I hope this would lighten up your day. Remember, someone out there is ready to back us up especially in times of troubles.

Random number generator in 16-bit DOS assembly

Most code for randomizing is not as short as this one. Try to incorporate this procedure in your code and see how it works! randomize: in al, 40h ; read micro-clock for initial seed mov ah, al in al, 40h xchg al, ah or ax, 1 mov rnum, ax ret Random number will be stored in rnum. Fairly straightforward isn’t it? [Edit] Here’s another solution by sir Eugene Kanindot. This is a 3-digit random number generator. jmp start xxx: mov ah, 02ch int 21h and dl, 0fh cmp dl, 9 ja xxx add dl, 30h mov [di], dl ret delay: mov cx, 0 yyy: mov dx, 0a00h zzz: xor ax, ax dec dx cmp dx, 0 jne zzz loop yyy ret start: lea di, numb call xxx inc di call delay call xxx inc di call delay call xxx mov ah, 09h lea dx, numb int 21h int 20h numb db 4 dup('$')

Coding therapy

This is what I usually do whenever I am tired and hungry. #include <GL/glut.h> void disp(void) { glClear(GL_COLOR_BUFFER_BIT); glColor3d(0.43, 0.12, 1.00); glBegin(GL_POLYGON); glVertex3f(-0.75, -0.75, 0.0); glVertex3f( 0.75, -0.75, 0.0); glVertex3f( 0.75, 0.75, 0.0); glVertex3f(-0.75, 0.75, 0.0); glEnd(); glFlush(); } void init(void) { glClearColor(0.0, 0.0, 0.0, 0.0); } void main(int argc, char **argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(300,300); glutInitWindowPosition(0, 0); glutCreateWindow(argv[0]); init(); glutDisplayFunc(disp); glutMainLoop(); }

Redesigned

[Thesis] Well, it was rejected as expected. Plan B was accepted. Do you know what Plan B is? Look for another project that is. [Redesigned] Got nothing to do right now. I tried redesigning my blog. I was executed in The Reincarnation . I failed to defend my country. I didn’t have any time for offensive moves. Opposing guilds were a step ahead. I had 5 fortresses left and 5 attacks went in. I had no choice. I guess it’s time to quit playing. Redesigning the blog as well as the attitude for a big blow.

Sad

Low grades. Time to say “good bye scholarship.” Anyway, I did my best but I failed. Now I don’t know how to explain this. I really do not want to add any more heartaches to my parents. They’ve spent so much already. I really want to help them. This is really sad. Now they would think again that I’m this irresponsible, careless, and mentally inefficient lad. It’s not too late though. Sad and painful because I did my best then I will just be tagged as irresponsible, careless, you name it.

A new air-soft rifle

So dad bought a new air-soft rifle. Weeee! Now I have two in my room. The new one can adapt a .22 caliber bullet with an improvised hammer. Its recoil kicks a little stronger than when fired with air. Now even if I will ran out of C02 gas tanks it will not stop the fun. Its far and near sights were calibrated perfectly. Unlike my 15-year old air-soft gun whose (0,0) sight lands at six o’ clock.

Flashback

Now I can update my Gentoo box even on a daily basis. Using my 30GB USB mass storage device, I can do so even if my prepaid internet account runs zero. Here’s a short guide for those who haven’t tried this one yet. An emerge –sync alternative would be downloading the latest snapshot on any Gentoo mirror site using a machine with a high-speed connection. You might want to salvage the /usr/portage/distfiles of your machine first before proceeding. kee ~ # rm -r /usr/portage/ kee ~ # tar -xvjf portage-latest.tar.bz2 -C /usr/ ... kee ~ # update-eix Reading Portage settings .. Building database (/var/cache/eix) from scratch .. [0] /usr/portage/ (cache: metadata) Reading 100% [1] /usr/local/portage (cache: none) Reading 100% Applying masks .. Database contains 11268 packages in 149 categories. kee ~ # env-update >>> Regenerating /etc/ld.so.cache... kee / # Now for downloading packages for emerge. kee ~ # emerge -fp package ... 2> somefilename.txt The li...

Bin to hex converter in 16-bit DOS assembly

Just a quick code like putting your keyboard where your brain is. There should be another way of doing this. I hate this code. start: xor al, al xor bl, bl xor cl, cl mov dl, 4 ; use dl as counter input: mov ah, 00 int 16h cmp ah, 1ch je exit cmp al, '0' jb input cmp al, '1' ja input convert: mov cl, dl dec cl ; dl - 1 sub al, 30h ; get original value shl al, cl ; place in the appropriate bit position or bl, al ; save in bl dec dl ; prepare for the next bit jnz input ; must be 4 bits cmp bl, 9 ja letter jbe number letter: add bl, 37h ; because 'A' - 37h is 0Ah jmp here number: add bl, 30h ; because '0' - 30h is 00h here: call display jmp start display: mov ah, 02h ...

Moving on

So I bought my self a 2.5″ hard drive enclosure for about 750 bucks. I wish I have my own tools for constructing a device as such. Instead of going for a 2GB USB flash drive, I chose to salvage the 30GB hard drive of an incapacitated laptop. Cool isn’t it? Though relatively slower than a typical USB flash drive, the storage capacity outweighs it. [To God] Thanks for being there always.

Hetero-stress experience

I didn’t make the CS 315 (Elementary Computer Graphics w/ OpenGL) midterm examination. Sad, but I have to admit that I am mentally, emotionally and physically disturbed these days. It seems that I am carrying a magnet attracting bad luck. I have turned out restless and confused with almost eveything. From waking up to lying down, I don’t know what to do, I don’t know how to start my day. This is the dullest day of my life. Stress, pressure. Some thrive on it, others find the spotlight and the responsibility to be too much for them. It distracts and scares them. The fear translates in to a physical stiffness. Mentally they become less focused and more self-conscious. Thus, their performance deteriorates.

Motion for brain rejuvenation

Confusion, defined by WordWeb as a mental state characterized by a lack of clear and orderly thought and behavior, is infesting my brain. Can someone help me? Is there a cure for that? If serenity is sold in the market then I would pack my self dozens of it. Being a computer science student demands a lot of concentration. I’m on a worst-case scenario. If anyone of you out there knows how to cast a spell for brain rejuvenation, count me as one of your targets.

Bit masking

I was thinking of the hex to bin converter in the previous post. The fun part there was the extraction of the desired bit. With the knowledge in mind, it resulted me to devise a function in C that uses a mask to print out the bit representation of an integer. void bitprint(int a) { int i; int n = sizeof(int) * CHAR_BIT; int mask = 1 << (n - 1); for (i = 1; i <= n; ++i) { putchar(((a & mask) == 0) ? '0' : '1'); a <<= 1; if (i % CHAR_BIT == 0 && i < n) putchar(' '); } } CHAR_BIT is defined in limits.h and holding a value of 8. Try it, it’s fun. I’m bored, just extending my thanks to beandog for enlisting me in Planet Larry: Gentoo Users’ Blogs .

Hex to bin converter in 16-bit DOS assembly

You can try this out, get the assembler here . This is just a simple hexadecimal to binary converter, a CS217 exercise and not supposed to be pasted here but just for the sake of having a post. Here it is: input: mov ah, 00h int 16h cmp ah, 1ch je exit number: cmp al, '0' jb input cmp al, '9' ja uppercase sub al, 30h call process jmp input uppercase: cmp al, 'A' jb input cmp al, 'F' ja lowercase sub al, 37h call process jmp input lowercase: cmp al, 'a' jb input cmp al, 'f' ja input sub al, 57h call process jmp input loop input process: mov ch, 4 mov cl, 3 mov bl, al convert: mov al, bl ror al, cl and al, 01 add al, 30h mov ah, 02h mov dl, al int 21h dec cl dec ch jnz convert mov dl, 20h int 21h ret exit: int 20h “And my God will meet all your needs according to His glorious riches in Christ Jesus.” - Philip 4:19

Crackmes: cli3nt’s mycrk

Language C Linux x86/ELF Difficulty: 1 - Very easy, for newbies Platform: Unix/Linux, etc. Language: C/C++ [Solving the Crackme] As usual, we have to run the file first. joset@kee:~/src/crackmes/mycrk$ ./mycrk Type cd-key: eve wrong! joset@kee:~/src/crackmes/mycrk$ From this point we already know what the file needs, a correct key . I immediately disassembled the file without even bothering about its characteristics. joset@kee:~/src/crackmes/mycrk$ objdump -d mycrk > temp.txt joset@kee:~/src/crackmes/mycrk$ less temp.txt The first trick, is to look for the disassembly of the main function. Here’s a portion of it. ... 80483d4: c7 45 fc 67 1e 01 00 movl $0x11e67,0xfffffffc(%ebp) 80483db: c7 45 f8 70 12 5b 00 movl $0x5b1270,0xfffffff8(%ebp) 80483e2: c7 45 f0 06 00 00 00 movl $0x6,0xfffffff0(%ebp) 80483e9: 83 ec 0c sub $0xc,%esp 80483ec: 68 14 85 04 08 push $0x8048514 80483f1: e8 ee f...

A palindrome checker in 16-bit DOS assembly

A good morning to start off is to get this simple program working. This is an improvement of the previous palindrome checker posted. What can we benefit from this anyway? ; palindrome checker start: mov ah, 0ah lea dx, strptr int 21h lea di, string lea si, strlen mov cl, [si] xor ch, ch mov bx, cx lea si, string shr cl, 1 check: mov dl, [si] mov dh, [di+bx-1] cmp dl, dh jne notpal inc si dec di loop check cmp dl, dh je pal notpal: mov ah, 09h lea dx, msg2 int 21h int 20h pal: mov ah, 09h lea dx, msg1 int 21h int 20h strptr label byte maxlen db 49 strlen db ? string db 50 dup ('$') msg1 db '',10,'string is a palindrome!$' msg2 db '',10,'string is not a palindrome!$' “If God’s people which are call...

A case inverter in 16-bit DOS assembly

This is a simple case inverter, if you want to try this out download the a86 assembler here . It works like a charm in dosemu-freedos . ; case inverter start: mov ah, 0ah lea dx, strptr int 21h lea si, string mov cl, [strlen] check: mov al, [si] cmp al, 'Z' ja lowercase cmp al, 'a' jb uppercase lowercase: cmp al, 'a' jb traverse cmp al, 'z' jbe toupper uppercase: cmp al, 'Z' ja traverse cmp al, 'A' jae tolower toupper: sub al, 32 mov [si], al jmp traverse tolower: add al, 32 mov [si], al traverse: inc si loop check mov ah, 02h mov dl, 10 int 21h mov ah, 09h lea dx, string int 21h int 20h strptr label byte maxlen db 49 strlen db ? string db 50 dup ('$') “Fo...

Crackmes: lord’s easy Linux crackme

crackme will print text under certain conditions what are the conditions? sorry for my bad english - lord Difficulty: 1 - very easy, for newbies Platform: Unix/Linux, etc. Language: Assembler [Solving the Crackme] An initiative would be running the file: joset@kee:~/src/crackmes$ ./blah joset@kee:~/src/crackmes$ It didn’t print anything at all. So the conditions aren’t met. I’ve been using gdb and objdump for quite some time now. Since there is no form of corruption in the file, these tools will be more than enough. Here’s the disassembly of the file in objdump: blah: file format elf32-i386 Disassembly of section .text: 08048094 : 8048094: 31 c0 xor %eax,%eax 8048096: b8 2f 00 00 00 mov $0x2f,%eax 804809b: cd 80 int $0x80 804809d: 3d ad de 00 00 cmp $0xdead,%eax 80480a2: 75 16 jne 0x80480ba 80480a4: b8 04 00 00 ...

Making you feel loved was the easiest thing I have ever done before. It’s just sad to think that things just changed. I wish I could turn back those days. The times when we sat down under a tree, observed the fading horizon, held hands and stared at the crimsoning sun. I know how destiny fools us. If destiny asserts that we are not for each other, then I would fight destiny just to have you in my arms forever. I love you my everdearest. I’m sorry for what had happened to the rose. It’s not too late though, I can still take care another bud for you.

Antidote for insanity

Simple programming stuffs save me from insanity. This a86 assembly program tells if str1 is a palindrome. start: cld mov cx, 7 lea si, str1 lea di, temp reverse: mov al, [si+6] mov [di], al inc di dec si loop reverse mov ah, 09h lea dx, temp int 21h cld mov cx, 4 compare: lea di, temp lea si, str1 repe cmpsb jne exit mov ah, 09h lea dx, yes int 21h exit: mov ah, 4Ch mov al, 00 int 21h int 20h str1 db 'racecar$' yes db '',10,'string is a palindrome!$' temp db 8 dup ('$') [Middle-East Crisis] Israel, known as the chosen people of God called a thousand reservists in a possible prelude to a ground offensive against Lebanon. Accordingly, they have to clean up bunkers and tunnels that are invulnerable to air attacks. Isn’t it ironic...

Outdoorsman recall

I can still remember way back then, I was five years old when I had my primary hobbies, hunting, fishing, and shooting-range. Today, we went to Sinubung, a semi-dangerous place located in the far west coast of Zamboanga City and is known for its shore having huge waves and numerous sea urchins. We have gone fishing. It was fun riding my grandfather’s motor-operated vinta again though I am deeply saddened with what had happened today. The last time I set foot on that vinta was 15 years ago. I can still remember my grandfather pulling the nylon with a huge squid hooked up. Of course, the squid fired up a black tint. Because of that black tint, and the times when I threw up while riding the vinta, I have something now which I call memories worth remembering. Awhile ago, we did the same but no squid and from what I have observed fishes are already scarce! We spent almost three hours, changing position from time to time on the sea. I was the one throwing and pulling the anchor everyt...

Preparing for Muziklaban

Red Horse Muziklaban is fast approaching. Tomorrow will be the qualification or shall I say audition. One composition down. I am still trying to come up with a nice riff for the adlib. Hoping to impress the judges tomorrow. [Programming] I am just messing up with DOS Assembly. I started out programming in 32-bit protected mode, now broadening my knowledge by diving into 16-bit real mode. I have nothing new these days, just reviewing C++. Signing off through a quote by Albert Einstein “Information is not knowledge.”

Victory!

Congratulations Manny Pacquiao! He was once a singer of a local band in Gen. Santos City. Look at him now, he is the most influential person in our nation and probably one of the most influential persons around the globe. I was really fascinated by his fight with Oscar Larios. He has become faster than ever. Incomparable vigor that is! Raise it up Manny. More power and advertisements ahead. On the other hand, I pity Oscar Larios, he was a great fighter. I admire his sportsmanship and humility. He is one of the cheerful and honest boxers I’ve ever seen. His courage is a deadly weapon that one shouldn’t take advantage of. Maintaining his mind in equilibrium state could have driven Manny on the floor. [Globe Telecom] What is happening? I couldn’t send and receive SMSs. Calling does not solve the issue either. Hoping for better services in the future.

GDT Explained

GDT contains a number of entries, Segment Descriptors . Usually each is 8 bytes long and marks the starting point, length, and access rights of the segment. It is stored in memory of course. The address is stored in a special 48-bit CPU register called Global Descriptor Table Register (GDTR). The lower 16 bits inform the size of the GDT while the upper 32 bits inform the location of the GDT in memory. The GDT itself is a 64-bit long entries. These entries define whether the current segment that the processor is running is for Ring 0 or Ring 3. Ring levels are restrictions, Ring 0 is for system use while Ring 3 is for application use. Such protection exists to prevent applications from causing the kernel to crash and to tell the processor which instructions are valid. –snipped–

Orders received!

ADZU Open Lab will be switching to Edubuntu 6.06 Dapper Drake! Wee! Expecting Ubuntu sovereignty in the University! More power Ubuntu Linux Development Team. A Freedom Toaster empowered by Shuttleworth Foundation is badly needed in our University. The network administrator, Sir Greg, also suggested Xubuntu 6.06 in the College Internet Access Area (CIAA). Well, it’s easy as one-two-three.

I’m back!

It’s good to be back to one’s abode. I haven’t been blogging lately for the reason that my dad was confined and there were no other who could watch over him except me. Good thing that my dad’s okay now. Got to go, have to finish the enrollment process. God bless.

20!

Twenty factorial? Thank God for all the blessings especially the gift of life. Thank you mom and dad for taking care of me. Thank you everyone! Happy birthday to me! I am no longer a teenage lad. I could not believe it. Time flies so fast.

Revamp, an apology

[Previous Post] Sorry I forgot the private flag because I was in a hurry awhile ago. I hope it didn’t deface Planet Ubuntu-PH. [OS Development] Global Descriptor Table conquered! Nothing special, more tasks ahead. So far so good. Linux 0.01 is cool and MiniOS (Minix) too! Hail to you Linus Torvalds and Andrew Tanenbaum.

Jeepney, today - 2

Thinking of the song? No, definitely not Kala’s hit in the Myx Daily Top 10. It was 31 down 7 o’clock in the evening, the last day of our training. The sky was darkening and the wind blew softly as I walked toward the terminal. Going home later than 6 o’clock in the evening is such a waste of time I heard myself whisper. Before taking the jeepney in line, I have decided to sit down and buy a bottle of coke in a bakery situated near the end of the terminal. While taking a sip, I observed people passing by. Definitely not Manila, whispering to myself and reminiscing the events a year ago. 5 minutes would be long enough for me to begin sipping air so I took a jeepney. I have waited for the jeepney to be filled up. Not exceeding 10 minutes, the wheels started rolling as expected. This year is going to be the hardest school year ever. Again, talking to myself. Anticipating sleepless nights, hardworks, additional duties or obligations, etc. Then suddenly while thinking o...

Kernel head

This is a late post. Simply explains how the kernel sits in after grub. [BITS 32] global _start extern kernel_entry PAGEALIGN equ 1<<0 MEMORYINFO equ 1<<1 HEADERFLAGS equ PAGEALIGN | MEMORYINFO ; 0x3 that is HEADERMAGIC equ 0x1BADB002 CHECKSUM equ -(HEADERMAGIC + HEADERFLAGS) STACKSIZE equ 0x4000 section .text ALIGN 4 ; section must be 4 byte-aligned multibootheader ; dd HEADERMAGIC dd HEADERFLAGS dd CHECKSUM _start: mov esp, stack+STACKSIZE push eax push ebx call kernel_entry jmp $ ; GDT here ; ISRs here section .bss ALIGN 4 stack resb STACKSIZE ; 16KB of memory I’m just sad tonight, that’s why I decided to post this out of nothing. Well I guess keeping myself busy would be wise enough.

Sunday, sad discovery

[Da Vinci Code] I have been to the movie house recently and watched this controversial film. The book, despite its ever-growing popularity, did not interest me that much since I equate my faith with a sword mightier than Tireal’s Azurewrath. I was saddened deeply when I reached the movie house and saw numerous people there oozing with their teenage curiosity. First of all, have they been to church? It’s Sunday for pete’s sake. Why would they prioritize watching a film that is against their religion without even thinking that they have their obligations? Dan Brown’s manuscript is really a work of art and no question about that but people should remember it as a fiction book and nothing beyond. To all those who have read the book or have watched the film, try reading The Da Vinci Code Decoded written by a Jesuit priest. [OS Development] Do not write your own operating system. An information available globally that could be considered as a blackhole where o...

Early take-off

I have emerged vim-7.0-r2 just recently. Preparing a lot for our college thesis. Not excluding the amount of food intake. Reading the intel manuals from hell. Heavy bondings with bochs, vim, nasm, gcc, ld, strace, objdump, hexedit, as, etc. Requesting a divine intervention for strength.

Making C++ behave like Java

I was sidetracked from my C++ programming ( Battle for Wesnoth ) by the school’s Senior Summer Trainings 2006. After MySQL and PHP, and a week OJT at Zamboanga Freeport (OMED IT Solutions), the dark side of the force has arrived, Java Programming. We are currently being trained by Ma’am Ebony Domingo and some CS upperclasses who already received their respective diplomas last March of this year. Their spirits of magis uplift my morale and drive me to be more optimistic especially in dealing with a language that I’m not quite familiar with. Java is known for its being a platform independent language, equipped with an auto garbage collection mechanism, etc. (I don’t want to elaborate more on these). What I am trying to point here out is that, one of Java’s assets, which is the auto garbage collection, is also possible in C++ using an auto pointer . Now, how is this possible? What an auto pointer does is, it owns a dynamically created object and automa...

Locked and loaded

Today is the second day of the Senior Summer Trainings 2006 . Yesterday, we have started off MySQL running on Ubuntu. We did just simple exercises but very worth-doing even if I had previous experiences with the subject. To Ma’am Flisha Fernandez, thanks a lot. The Ateneo Spirit of Magis has a way of rewarding people like you. [Kernel] Please welcome “The Instrument of Doom” linux-2.6.14-kee-innovative with nVidia support. I have purchased a second-hand graphics card (GeForce FX 5700 256mb 128bit) from a friend. Good to go! [Gig] I hope the training will end up earlier than the usual time. I have to warm up for the gig tonight at Park 88.

Getting the feel of the groove

Junior year’s over. New daily schedule has emerged. In a day there must be at least 2 hours of bass exercises which include music bass theory, scales, funky bass lines, and jamming sessions. 6 hours of programming (right after this sissy FoxPro RDBMS project). In weekends, there must be at least 2 jamming sessions with my band for compositions and reviews. Play at different bars at night, for pleasure and income. My top priority for this summer break is to code some modules for our final project ahead. Of course, schedule is subject to change due to unpredictable and uncontrollable forces such as heavy household chores, family affairs, family business, or anything that concerns morality.

Palindrome syndrome

I really do not enjoy coding in MS Visual FoxPro but I have no choice. Damn! I swear not to use it any longer after this RDBMS project. I was asked by a friend to code a simple program to check if a string is a palindrome. I miss coding in C and assembly a lot! So to satisfy my urge, I tried to do it in a different manner. A timed coding session! #include<stdio.h> #include<string.h> #define MAXSTRING 50 int main(void) { int i; int ctr = 0; char c; char string[MAXSTRING] = "\0"; char temp[MAXSTRING] = "\0"; printf("Enter a string: "); for (i = 0; (c = getchar()) != '\n'; ++i) string[i] = c; string[i] = '\0'; for (--i; i >= 0; --i){ temp[ctr] = putchar(string[i]); ++ctr; } if (!strcmp(string, temp)) printf("\nString is a palindrome!\n"); else printf("\nNot a palindrome!\n"); return 0; } I finished coding in 4 minutes and 37 seconds. Not a good record though. So sad.

LPT1 stepper motor control

Last Sunday, I was coding some modules for our RDBMS project and playing Dungeon Siege: Legend of Aranna (quite old but it would be a waste of time if I did not) in parallel. I received a phone call asking a favor to write a program for sending signals through the parallel port. It sounds a little scary at first because I did not have any idea on parallel port interfacing. Let me explain the project. The project is a Car Control System. They have 2 bipolar stepper motors. One is responsible for the forward-reverse function and the other one is for the left-right function. Signals recognized by the floppy drive stepper motor: Clockwise 18-degree turn 1001 or 0x9 0110 or 0x6 Counterclockwise 18-degree turn 0110 or 0x6 1001 or 0x9 Now, how is it possible to send these signals using the parallel port? Not all 25 pins are needed. For this project, only the data pins are needed. Pin Function 2 D0 3 D...

Ethical hacking, a glimpse of my Philo paper

Is hacking ethical? It is if viewed within the context of the three definitions offered: hacktivist, hobbyist and researcher. We have the right in this country to protest, and if our activism takes a digital or electronic form, we have the right to do so. But don’t take my word for it. Who are ethical hackers? These early efforts provide good examples of ethical hackers. Successful ethical hackers possess a variety of skills. First and foremost, they must be completely trustworthy. While testing the security of a client’s systems, the ethical hacker may discover information about the client that should remain secret. In many cases, this information, if publicized, could lead to real intruders breaking into the systems, possibly leading to financial losses. During an evaluation, the ethical hacker often holds the “keys to the company,” and therefore must be trusted to exercise tight control over any information about a target that could be misused. The sensitivity of the in...

A change-gas

The danger of reading Randall Hyde’s book, The Art of Assembly is that it contains addictive substances. Yesterday, I have decided to joset@kee $ su -c "emerge -C nasm" After cleaning up, a tune-up followed .data msg: .ascii "A small step for me is a big leap for... me!\n" len = . - msg .text .global _start _start: # write string to stdout movl $len, %edx movl $msg, %ecx movl $1, %ebx movl $4, %eax int $0x80 # exit movl $0, %ebx movl $1, %eax int $0x80 Now I have finally made a change-gas. Expecting a lot of maintenance work to follow.

ADZU openlab scutworks

I really do not enjoy network administration a lot but the tasks listed below are rewarding. Let optimism light the path. 0] Tweak and secure box 1] Video screen capture 2] ADZU Debian repository 3] OpenAFS and Kerberos 4] IPv6 5] Honeypot 6] SETI Expect postponement of blog posts. Everything will be documented here upon completion. Signing off through a quote by Mr. Oscar Wilde Experience is one thing you can’t get for nothing.

Verify user in /etc/passwd

This is a product of wonder. In file verify.c #include <stdio.h> #include <string.h> #define MAX_LENGTH 1024 int is_local(char *user) { FILE *fd; char line[MAX_LENGTH]; int local = 0; if(!(fd = fopen("/etc/passwd", "r"))) { puts("Can't read /etc/passwd, exiting."); exit(1); } while(fgets(line, MAX_LENGTH, fd) > 0) { if(!strncmp(line, user, strlen(user))) { local = 1; break; } } fclose(fd); return local; } Use at your own risk. Disclaimer: Please refer to my first post ‘General notice’ Posted using Scott Yang’s mtsend.py python script. Thanks to Niel for his cool vim mappings.

A hidden post made visible

I was afraid to make this available in public. When I tried to browse some counterpart of it in other distros, I have realized that there are a lot of similar topics found even in the official forums of major distros. There are many people doing this already. So for people ranging from lowerclass to middleclass, who can not afford a digital subscriber line, here is a wiser alternative. If you have a Smartlink chipset winmodem in possession, then you are a bit luckier than those who own a Conexant chipset winmodem. Smartlink drivers are available for free eversince. Conexant drivers (lin*xant) were freely distributed during the 2.4 series era. This means, 2.4 kernels can still abuse the driver’s full-functionality. Bad news for 2.6 starters, 2.4-2.6 shifters, and 2.4 starters who hold Conexant chipset winmodems. Why? 1. Free drivers for 2.4 series are no longer available in the official repository. 2. Drivers for 2.6 are free but limit your bandwidth to 14.4kbps. Free isn...

Test mtsend

mtsend.py is a command line tool written in python. It uses Movable Type’s XML-RPC interface. It appears that it also works with WordPress’ XML-RPC interface. So I have decided to give it a try. In file ~/.mtsendrc [global] default=eradicus [site-blogsome] url=http://eradicus.blogsome.com/xmlrpc.php username=***** password=***** encoding=UTF-8 [blog-eradicus] site=blogsome blogid=1 It works! joset@kee$ ./mtsend.py -B blogsome +----+-----------+-------------------------------+ | ID | Blog Name | URL | +----+-----------+-------------------------------+ | 1 | Sophie | http://eradicus.blogsome.com/ | +----+-----------+-------------------------------+ joset@kee$ ./mtsend.py -C +----+----------------------+ | ID | Category Name | +----+----------------------+ | 5 | Healthy Vices | | 2 | Of Love and Romance | | 1 | Progressive Studies | | 3 | Uncategorized | | 6 | Unsolicited Opinions | +----+------------------...

Queued tasks

Hopefully these features would be added on the game soon. 1. Nick completion 2. Default turn time limit 300/150 3. Display number of players 4. Notify if a player leaves 5. Sortable columns in lobby The root of all evil in programming starts at early optimization in coding. - Donald E. Knuth

Wesnoth terrain

How are maps created? How are terrains organized? These questions are no way different from asking how GNU/Linux works. The brief explanation is, it is very complicated! Conceptually it works like this: Terrains are defined in terrain.cfg . They get assigned ID, name, char, etc. A snippet of terrain.cfg # Terrain configuration file. Defines how the terrain _work_ in the game. How # the terrains _look_ is defined in terrain_graphics.cfg . # NOTE: terrain id's are used implicitly by the in-game help: # each "[terrain] id=some_id" corresponds to "[section] id=terrain_some_id" # or "[topic] id=terrain_some_id" identifying its description in [help] [terrain] symbol_image=void id=shroud name= _ "Shroud" char=" " [/terrain] [terrain] symbol_image=fog id=fog name= _ "Fog" char="~" [/terrain] [terrain] symbol_image=ocean id=deep_water name= _ "Deep Water" char=s submerge=0.5 unit_height_adjust=-3...

Unix half-duplex pipes

The pipe ‘|’ is a type of inter-process communication. Its facilities provide a method for multiple processes to communicate with one another. Simply putting a pipe in between is a method of connecting the standard output of one process to the standard input of another. joset@kee$ ls -l | grep -i foo In the example above, the output of ls is written to the input of grep. Obviously, the output of grep is written to the standard output of the shell, the screen. Here is how a pipe works. #include<stdio.h> #include<unistd.h> #include<sys/types.h> int main(void) { int fd[2], n_bytes; pid_t child; char string[] = "Hello, world!\n"; char readbuf[80]; pipe(fd); if ((child = fork()) == -1){ perror("fork"); exit(1); } if ((child == 0)){ /* child process closes up input side of pipe */ close(fd[0]); /* send "string" through the output side of pipe */ write(fd[1], string, strlen(string)); exit(0); ...

A legal alien?

Yesterday, I was triggered by my ego to attend a session of WMSU’s review for the incoming ICT proficiency exam. Each student spent a total of Php 460.00 for the review and test fee. It started last week. Passers of the said exam are guaranteed to be certified ICT professionals as noted by NCC. I was curious about how the review was being held. I was able to set myself in the classroom without catching much of the professor’s attention. It was my first attempt. I was somehow excited at first, but as the review went on, the professor did not talk that much and started filling up the chalkboard. The topic was about data structures. I was surprised with what I have found out. I bet you have the idea.

A sticky lesson

With a dial-up connection reaching 14kbps at max, an ‘emerge-delta-webrsync’ consuming only 5 minutes of your uptime, a free access from 0000H - 0800H, and a script that does nasty things like disconnect after ‘emerge -f foo’ and switch to ‘init 0′, You will not be able to resist the clamor for an up-to-date box. The lesson began here: root@kee# emerge =sys-devel/gcc-3.4.4 This does not mean dirty! joset@kee$ eix -e gcc * sys-devel/gcc ... Installed: 3.3.6 3.4.4-r1 Homepage: http://www.gnu.org/software/gcc/gcc.html ... Found 1 matches joset@kee$ Not realizing that having multiple GCCs installed is normal, and without following the upgrading-gcc-guide, a stupid action followed. root@kee# emerge -C =sys-devel/gcc-3.3.6 Bang! libstdc++.so.5.0.6, where the hell are you? All programs linked dynamically to this library were paralized! My intention was to clean up gcc-3.3.6 since I have emerged gcc-3.4.4 recently. A...