There are many
programming languages in the world. Each programming language has its own
advantages and disadvantages. For example,C and C++ are good in handling complex
function structures but are relatively weak in high-speed direct control of
memory as well as some low-level high-speed calculation which involve suitable
management of registers. Assembly language, although being dexterous, is too
complicated and impractical for writing big programmes. Therefore, a combination
of several programming languages can complement each other's weakness and
achieve greater efficiency and capability. Nowadays, our computers are equiped
with SIMD (Single Instruction Multiple Data) instructions which can perform
multiple algebraic operations simultaneously using one instruction. This is
esspecially useful in vector calculations.
To use C
program to achieve high screen resolution in MS-DOS real mode does not need to
install your video card's driver. As long as your SVGA video card (no matter how
poor) is plugged in, it can draw. Here is a header file SVGA.H for
C/C++ programmers to access SVGA graphic modes in MS-DOS mode. It is also a good
example of coorperation between C++ and assembly language.
Description:
This is a very
good graphic tool, it provides putpixel() and getpixel() functions for different
SVGA graphic modes. These functions works excellently fast. They can draw
1,200,000 to 5,000,000 pixels in order on the screen within 1 second on a PC300.
These programmes works well in MS-DOS real mode and any windows versions except
Win2000/WinXP/WinNT.
Here is a MS-DOS graphic
calculator in SVGA mode using the above SVGA.H. It can plot 2D graphs and do
differentiation. Quite useless and obsolete! But this is the way how computer
graphics works in the past. Press F12 to abort program in case of crash. Here is my simple MS-DOS game, Tank Battle,
together with tile editor and map editor! Can you remember that old
Ninetendo game you played in your childhood? This one a bit different.
The graphics is very poor because I cannot use SVGA mode under WinXP/NT/2000. So
320*200*256 color mode! SUPER BIG MOSAIC!
Here is my first network application, LanChat. You can use this to send message
to each other, send files to each other and talk to each other while playing LAN (Local Area Network) games if you are on the same
level
of NAT (Network Address Translation) but different Local Area Network. Use the first button to find other
people and the second button to host a game so that other people can see (this function is very bandwidth consuming, do never abuse it!!!) and join the game you have
created.
You can also download the source code here.
Here
is a 3D model
editor using Direct3D 9.0 SDK. A simple mesh editor:
This is a Card
Game Solver for the game Final Fantasy VIII, I just make it for fun. The total
number of cases are not too much. If the
first move is yours, N=5*9*5*8*4*7*4*6*3*5*3*4*2*3*2*2*1*1 = 9!*(5!)^2 =
5,225,472,000 cases. If the first move is by computer,
N=5*8*4*7*4*6*3*5*3*4*2*3*2*2*1*1=5!*4!*8!=116,121,600 cases (much faster). It uses brute force
permutation to calculate, your CPU should be above 1.6GHz for decent performance. In cases when there
is no bounded-win strategies, it can still give relatively the best move which the computer has a highest
chance of making a mistake later so that your chances for winning is higher.-:)
Useful Links and Downloads:
BIOS INT 13H specification
Linux Web Browser Flash-Plugin test (Á©Á©ÏàÍü)
Linux Web Browser Java-Plugin test (Mine-Sweeper)
If you encounter any problems,
or you want to download my source code for improvement, feel free
to contact me at wangxuancong@yahoo.com