Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

US Job listings




   Misc

   Amazon

   Links

    


Flash Led Visual C++ code
 

 

Visual C++ source code

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

int main()
{

_outp(0x378,0);
_sleep(1000);
_outp(0x378,1);
_sleep(1000);

return 0;
}

Description

This example uses the _outp() function in Visual C++ , this takes 2 parameters firstly the port , in this case 0x378 which is the address of the printer port on my PC and then the value to send to the port , which in this case is either 0 or 1 which switches the LED on and off . We also use the_sleep() function for a delay so you can actually see the LED going on and off . The 1000 is the amount of milliseconds to delay for .

This code is for Windows 95 , 98 . This will not work on Windows 2000 , NT or XP.

Download

ledflashvisc++.txt

 

 

 

 

 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
Is a number odd or even(C Sharp)
List all fonts(VB)
Delete a file(VB)
Do While loop(Javascript)
Play a wav file(VB.net)
Empty recycle bin(C)
close button(HTML)
decimal to octal conversion(PHP)

    




Copyright © 2003 by programmershelp.co.uk