Skip to main content

Posts

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.