Quote Originally Posted by Tien Nguyen View Post
Thank you! That is kind of you. I managed to deal with the viruses for XP by disabling the internet from Windows XP. I believe NTVDM is built-in to XP natively so I believe you're right. For surfing the web I use Vista and FireFox. I haven't had any viruses since. However I keep my surfing clean. No weirdo websites if you get my drift. I believe most machines can dualboot especially back in the XP/Vista days. I did it once.
I was actually doing my "homework" and experimenting on my own time so I was trying to mix a C source code with an assembly source code. I'm just experimenting with the graphics systems right now. Usually you would pass a variable through a gateway at the stack. However I am using the display screen for my stack so to speak. So when you notice there are small tiny dots in the upper left corner. Those are the actual values that are changing to circle the display screen.

FILE: ccallasm.c
Code:
/* Example by Tien Khoa Nguyen */

#pragma inline

#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>

void extern plotdot();

unsigned long intro()
{
unsigned long delay5;
system("cls");
printf("\n mom:  Huong Thi Thuyen Vu");
printf("\n dad:  Nguyen Binh Thuy");
printf("\n ");
printf("\n Please enter delay value: (0-1000000000)");
printf("\n 0 will exit program.");
printf("\n A value too large may lock up on slow CPU");
printf("\n Try 12000 then move add 0 every time");
printf("\n Thank you.");
scanf("%lu", &delay5);
if(delay5 > 1000000000)
{
delay5 = 1000000000;
}
return(delay5);
}

void pause(unsigned long delaytime)
{
unsigned long delay2;

for(delay2 = 0; delay2 < delaytime; delay2++)
{
delay2++;
delay2--;
}

}

void plotcircle(unsigned long delay4)
{
int ix, iy, radius, color3;
double radian, fullradian, currentradian, centerx, centery;
double degree;

radian = 3.14;
fullradian = 2.0*radian;
degree = fullradian/360.0;

centerx = 155.0;
centery = 100.0;
radius = 80;

color3 = 1;

for(currentradian = 0; currentradian < fullradian; currentradian = currentradian + degree)
{
pause(delay4);

ix = (int)(centerx + (cos(currentradian)*(double)radius));
iy = (int)(centery + (sin(currentradian)*(double)radius));

asm mov bx, ix;
asm mov al, bl;
asm mov ah, 0ch;
asm mov cx, 1;
asm mov dx, 1;
asm int 10h;

asm mov al, bh;
asm mov ah, 0ch;
asm mov cx, 2;
asm mov dx, 1;
asm int 10h;

asm mov bx, iy;
asm mov al, bl;
asm mov ah, 0ch;
asm mov cx, 1;
asm mov dx, 2;
asm int 10h;

asm mov al, bh;
asm mov ah, 0ch;
asm mov cx, 2;
asm mov dx, 2;
asm int 10h;

color3++;
color3 = 1+(color3%15);
asm mov ax, color3;
asm mov ah, 0ch;
asm mov cx, 1;
asm mov dx, 3;
asm int 10h;

plotdot();
}
}

int main()
{
unsigned long delay3;

repeatprg:;
delay3 = intro();
if(delay3 == 0)
{
goto exitprg;
}

asm mov al, 19;
asm mov ah, 0;
asm int 10h;

plotcircle(delay3);

asm mov ah, 0;
asm int 16h;

goto repeatprg;
exitprg:;
asm mov al, 3;
asm mov ah, 0;
asm int 10h;

printf("\n See you next time...");
printf("\n NEVER FORGET GOD!");

asm mov ah, 0;
asm int 16h;

return(0);
}

The above C program has to be converted first before it could be integrated with the pure assembly one. Once again the Borland softwares are proprietary. I know Embarcadero continues to be in business for their modern OS developer packages. They also provide links to their 16 bit compiler but you have to have an agreement with them that it is for personal use and not for profit unless you purchase their professional packages then you could do whatever you wish. However you continue to need to acknowkedge their softwares. So anyways I use Borland Turbo C 2.01 copyrighted 1987 & 1988. Also, I use Borland Turbo Assembler 4.1. The Borland Turbo Assembler 4.1 is a paid-for product. So it IS a collector's item. Believe it or not I'm planning to stay home all my life and programming until I'm 100 years old!!! My sisters get to do that from very good companies. They sit home and program for the company............