![]() |
|
#1
|
|||
|
|||
Inline Assembly languageI'm trying to write a program which will have to read from the parallel port. I was given the following sample code which is supposed to clear the screen, access the parallel port and light eight LED lamps in sequence connected to data lines D0 - D7 of port 956 (LPT1).
CPP / C++ / C Code:
The problem is that it my compilers demand a file called "TASM.exe" or "TASM32.exe" depending on the compiler. I downloaded TASM.exe from a website, but I'm still getting fatal errors in the linker. Can anyone either tell me what's the problem, or suggest an alternative method for accessing the parallel port? Any help would be much appreciated. Last edited by dsmith : 16-Mar-2004 at 11:50.
Reason: Use the [c] and [/c] to highlight C syntax code
|
|
#2
|
||||
|
||||
|
Hi mikhail.
Is the tasm.exe in a folder that is in your search path? Also, are you programming in DOS? If you are programming in Windows 98 or higher, this is not going to work. Windows does not allow direct access to the ports in this manner. You are going to have to work more under the windows API. If you let us know what O/S you are doing this under we may be able to give you some more info. Cheers, d |
|
#3
|
||||
|
||||
|
TASM is the assembler program that comes with Turbo C. What you downloaded is probably not the TASM that goes with whatever compiler you're using
|
|
#4
|
|||
|
|||
|
Quote:
I'm programming on the college network here, which has in various places Windows 95,98 and even 2000. I've got XP at home, but the compiler I have there doesn't allow me to use the Borland Graphics interface, which I'm using in another part of the program. To get that to work, I'm right clicking on the text of the .cpp file, clicking "TargetExpert" then selecting "DOS (Standard)" from the menu under "platform" and checking the "BGI" box under "Libraries". I imagine I can't use Windows API and BGI in the same program? I really don't want to have to start over on the graphics work, since I've got exams at the end of April and I'd prefer to have this whole thing done by then. Thanks d. Cheers, Mik |
|
#5
|
|||
|
|||
|
Quote:
|
|
#6
|
||||
|
||||
|
Quote:
Here is a link that may help you out. If you do use this, read the PDF file very carefully as it cautions about security risks in using this. This will allow the direct access to the parports in NT and above like you are looking for. Otherwise, you will need to look into the Windows sdk or api's. I haven't compiled inline assembler for several years now. I agree with Walt. Make sure that you are using the Turbo Assembler. I don't think that this is something that you can just download - I may be mistaken, but this is something that you would have to buy from Borland. In any case, make sure it is in your search path and you may even need to specify something in your compile command to get it to work. Good luck! d |
|
#7
|
||||
|
||||
|
Quote:
__________________
-Aaron |
|
#8
|
|||
|
|||
|
Quote:
I'm under the impression now that it's not possible. I'm having a look at http://www.geekhideout.com/iodll.shtml which looks ideal, but I got the following linking error when I tried to compile the io.cpp file included with it: Error: Unresolved external '_main' referanced from Y:\Nalapps\W95\Devsuite\lib\cox32.obj Any ideas fellows? |
Recent GIDBlog
More photos on Flickr by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| .htaccess language / rewrite problem | spinflip | Apache Web Server Forum | 5 | 15-Dec-2003 14:14 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The