Archive | dos RSS feed for this section

Install Windows 7/Vista From USB Drive

23 Nov

 Follow the below steps to create bootable Windows 7/Vista USB drive using which you can install Windows 7/Vista easily.

1. Plug-in your USB flash drive to USB port and move all the contents from USB drive to a safe location on your system.

2. Open Command Prompt with admin rights. Use any of the below methods to open Command Prompt with admin rights.

3. You need to know about the USB drive a little bit. Type in the following commands in the command prompt:

First type DISKPART and hit enter to see the below message.

Bootable USB Drive

Next type LIST DISK command and note down the Disk number (ex: Disk 1) of your USB flash drive. In the below screenshot my Flash Drive Disk no is Disk 1.

4. Next type all the below commands one by one. Here I assume that your disk drive no is “Disk 1”.If you have Disk 2 as your USB flash drive then use Disk 2.Refer the above step to confirm it.

So below are the commands you need to type and execute one by one:

SELECT DISK 1

CLEAN

CREATE PARTITION PRIMARY

SELECT PARTITION 1

ACTIVE

FORMAT FS=NTFS

(Format process may take few seconds)

ASSIGN

EXIT

Don’t close the command prompt as we need to execute one more command at the next step. Just minimize it.

5. Next insert your Windows7/Vista DVD into the optical drive and check the drive letter of the DVD drive. In this guide I will assume that your DVD drive letter is “D” and USB drive letter is “H” (open my computer to know about it).

6. Maximize the minimized Command Prompt in the 4th step.Type the following command now:

D:CD BOOT and hit enter.Where “D” is your DVD drive letter.

CD BOOT and hit enter to see the below message.

7. Type another command given below to update the USB drive with BOOTMGR compatible code.

BOOTSECT.EXE/NT60 H:

Where “H” is your USB drive letter. Once you enter the above command you will see the below message.

8. Copy your Windows 7/Vista DVD contents to the USB flash drive.

9. Your USB drive is ready to boot and install Windows 7/Vista.

Running C/C++ [old DOS programs] in Windows Vista / 7 in Fullscreen Mode

5 Jul

I’m now using Windows 7 the new Windows OS which is working fine with my PC. It was a long time i had installed Turbo C++ in my system. That was our exam times, i tried installing Turbo C++ in my system. It worked fine but only one problem is that full screen mode is disabled. My monitor is of 1440×900 resolution so that the Turbo C++ screen fit in 1/4th of the total window more than that the graphics programs are not working… because in cant initialize the graphics object. After a lot of searching i found a software it was DOSBOX. DOSBox emulates an Intel x86 PC with sound, graphics, mouse and more. DOSBox emulates a 286/386 CPU, supports realmode amd protected mode, has a full virtual file system, support for XMS and EMS, graphics support including Tandy/Hercules/CGA/EGA/VGA/VESA and sound support including SoundBlaster and Gravis Ultra Sound cards. It has excellent compatibility with many classic games.



Download DOSBOX

Programming with Parallel Port LPT

24 Mar

Now i’m working on a project to create a C/C++ software for communicating to the Parallel Port [LPT1]. Here i’m giving you the source code part which can be used for Parallel Port Programming. I’m sure that this may help you in some ways for your projects. Later i found that there is a library file named ParaPin which it easy to write C code under Linux that controls individual pins on a PC parallel port. but i didnt use that coz my whole system must be changed in order to do a small program. But Parapin is really helpful file for developers.

Source Code

———-
#include
#include
#include
#include
#include
#define port 0x378 //data port 8pins 2,3,4,5,6,7,8,9
#define status 0x379 //status 5pins 11,10,12,13,15
#define control 0x37A //control 4pins 17,16,14,1

void main()
{
long int value;
int ch;
go:
clrscr();
//checkstatus();
cout<<“** AD9851 Programming with LPT1 **”;
cout<<“\n———————————-“;
cout<<“\n1. Send values to LPT”;
cout<<“\n2. Set all data pins HIGH”;
cout<<“\n3. Set all data pins LOW”;
cout<<“\n4. Reset”;
cout<<“\n5. Exit”;
cout<<“\n Choose your entry :”;
cin>>ch;
switch(ch)
{
case 1:
for(int i=0;i<5;i++)
{
cout<<“\nEnter W”<<<“=”;>
cin>>value;
outport(port,value);
cout<<“\nValue”<<<“sent>
outport(control,0001); //clock high
cout<<“Setting Word Clock High!!!\n”;
}
outport(control,0010); //freq update high
cout<<“Setting Frequency Update as HIGH !!!”;
cout<<“Word Entered Successfully….”;
getch();
goto go;

case 2:
outport(port,255);
cout<<“\n Setting all data pins to high…”;
cout<<“\nPress any key to continue…”;
getch();
goto go;

case 3:
outport(port,0);
cout<<“\n Setting all data pins to low…”;
cout<<“\nPress any key to continue…”;
getch();

goto go;

case 4:
outport(control,0011);
cout<<“\nResetting Complete…”;
cout<<“\nPress any key to continue…”;
getch();
goto go;

case 5: exit(0); break;
default : cout<<“\nWrong entry…”;

}
}

void checkstatus()
{

unsigned int far *ptradr; /* Pointer to location of Port Addresses */
unsigned int address; /* Address of Port */
int a;

ptradr=(unsigned int far *)0x00000408;

for (a = 0; a <>
{
address = *ptradr;
if (address == 0)
printf(“No port found for LPT%d \n”,a+1);
else
printf(“Address assigned to LPT%d is %Xh\n”,a+1,address);
*ptradr++;
}

}