LATEST POSTS - page 2


x86-64 TUTORIAL: HILBERT MATRIX

The aim of solving this problem is to learn how to use the XMM registers for multiplication of floating point numbers. Matrix multiplication is a slow calculation especially if the floating point unit is used, and hence doing packed floating point calculations (if double precision is not required) might just be much faster. So this program will test that.

Read More
Posted on by Vikas N. Kumar.

LABOUCHERE SYSTEM PROGRAM USING x86-64 REGISTERS

This program does not use any fixed memory locations for the head or tail of the link list, but uses all the registers available to it. However, for some of the functions it does not follow the convention of saving all the registers RBX, R12-R15 on the stack at every function call since some of these registers contain pointers to the head and tail of the link list. Even if we did that, the program would hardly change much.

Read More
Posted on by Vikas N. Kumar.

LABOUCHERE SYSTEM C PROGRAM

Here is the full C code for the Doubly Linked List: Labouchere System.

Read More
Posted on by Vikas N. Kumar.

x86-64 TUTORIAL: DOUBLY LINKED LIST

THE LABOUCHERE SYSTEM

The Labouchere system for roulette is played as follows. Write down a list of numbers, usually 1, 2, 3, 4. Bet the sum of the first and last, i.e. 1 + 4 = 5, on red. If you win, delete the first and last numbers from the list. If you lose, add the amount that you last bet to the end of the list. Then use the new list and bet the sum of the first and last numbers (if there is only one number, bet that amount). Continue until your list becomes empty. You will see that, if this happens, you will always win the sum 1 + 2 + 3 + 4 = 10, of the original list. The below program simulates this system. Execute the program, and see if you always win!

Read More
Posted on by Vikas N. Kumar.

x86-64 TUTORIAL: FACTORIAL WITH RECURSION

The calculation of a factorial of a number can be done using recursion. Below is the algorithm:

Read More
Posted on by Vikas N. Kumar.

Pages: Newer  |  1  |  2  |  3  |  4  |  5  |  Older