Tag Archives: programming

Create a starfield with Three.js .

You need to create two files into your folder and use this filenames : index.html and starfield.js .
First file index.html come this source code:

The next file is a java script and come with this source code:

Posted in All, HTML 5, javascript, Programming. Tagged with , , , , , .

Programming with FASM – test with CPUID .

First you need to take a look at this website.
The CPUID returns processor identification and feature information in the EAX, EBX, ECX, and EDX registers.
What the source code from my example do ?
First I start with the default assembly program .
The next step is to strat with reset xor eax,eax use cpuid.
The result of CPUID will be put into EBX.
Into section ‘.data’ data readable writeable make a structure named out_buffer.
The structure will be fill so you need to EBX, see example:
mov [out_buffer.vendor_ebx],ebx will give us “Genu”.
The next step for test EBX is this example:
test edx,00010000000000000000000000000000b
jz .NoHTT
mov [out_buffer.htt_arch4],’YES ‘

The structure of out_buffer is :
db ‘NoHTT’,2,9,’- ‘
.htt_arch4 dd ‘NO ‘
db 9,10

Because I used MessageBox to show us the out_buffer.
The result will be : No or Yes with the size of dd.
The db can define byte variables, as well as arrays of bytes.
Fasm documentation tell us: For example db 1,2,3 will define the three bytes of values 1, 2 and 3 respectively.
The dd has 4 bytes.
The result will be this text (the result is true so the text will be YES): “NoHTT – YES”.
Let’s see one screenshot:

This is the source code:

Posted in All, Assembler, Windows 10, Windows 7, Windows 8. Tagged with , , , , , .

C# – First steps with C# and .NET – part 002 .

Today I will show you more about C# and the subject of this tutorial is: threads.
First you need to start a project into your folder. Let’s see my example:

You can use notepad or any editor to edit the Program.cs:

About the thread issue then you need to know is a very complex subject.
My example will show you how the thread works.
First you need to start the thread and then deal with the thread.
Two methods is used: Start and Join.
Start begins executing at the first line of the method and does not block the calling thread.
Join is a synchronization method that blocks the calling thread (that is, the thread that calls the method) until the thread whose Join method is called has completed.
I used three threads and this threads just start count first 5 sec , next 8 sec and the last is set to 10 sec.
Let’s see the example:

Each thread will write to the output and then will see the time used.
See the output of dotnet run command:

Posted in All, C#, Commands, Programming, Windows 10. Tagged with , , , , , , , .

C# – First steps with C# and .NET – part 001 .

First you need to take a look at Microsoft DotNET – Core website..
This website will be the start for any .NET and C# issue on any operating system Linux, Windows, Mac or Docker.
I used for this tutorial Windows OS and for Fedora distro you can take a look here.
First you need to

The result of Hello World! show us the console application works well.
This will run this program:

You can change the text Hello World or test something else.
If you got errors the you need to fix it with :

Posted in All, C#, Commands, Programming, Windows 10. Tagged with , , , , , , , .

JavaScript – Processing.js 2D library – part 003.

In this tutorial I will show you how to use images with processing.js.
You can use image from your computer or from url.
Let’s see one simple code example:

You can see same example on openprocessing web tool.
The openprocessing web tool allow you to use Processing.js and P5.js .

Posted in All, HTML 5, javascript, Programming. Tagged with , , , , , , .