I got a EXCEPTION_PRIV_INSTRUCTION

Hi there,
I'm trying to control the parallel port using java.
Here's my code(very simple):
import parport.ParallelPort;
public class Principal {
     public static void main(String[] args) {
          ParallelPort lpt1 = new ParallelPort(0x378);
          for(int i=1; i<128; i=i*2){
               lpt1.write(i);
               try {
                    Thread.sleep(500);
               } catch (InterruptedException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
}Here's the code of the ParalellPort:
package parport;
     public class ParallelPort {
        /** The port base address (e.g. 0x378 is base address for LPT1) */
        private int portBase;
        /** To cunstruct a ParallelPort object,
          * you need the port base address
        public ParallelPort (int portBase)
           this.portBase = portBase;
        /** Reads one byte from the STATUS pins of the parallel port.
          * The byte read contains 5 valid bits, corresponing to 5 pins of input
          * from the STATUS pins of the parallel port (the STATUS is located
          * at "portBase + 1", e.g. the STATUS address for LPT1 is 0x379).
          * This diagram shows the content of the byte:
          *  Bit | Pin # | Printer Status  | Inverted
          * -----+-------+-----------------+-----------
          *   7  |  ~11  | Busy            |   Yes
          *   6  |   10  | Acknowledge     |
          *   5  |   12  | Out of paper    |
          *   4  |   13  | Selected        |
          *   3  |   15  | I/O error       |
          * Note that Pin 11 is inverted, this means that "Hi" input on pin
          * means 0 on bit 7, "Low" input on pin means 1 on bit 7.
        public int read ()
           return ParallelPort.readOneByte (this.portBase+1);
        /** Writes one byte to the DATA pins of parallel port.
          * The byte is written to the DATA pins of the port. The DATA pins are
          * located at the base address of the port (e.g. DATA address for LPT1
          * is 0x378).
          * This diagram shows how the byte is written:
          *  Bit | Pin # | Printer DATA
          * -----+-------+--------------
          *   7  |   9   |   DATA 7
          *   6  |   8   |   DATA 6
          *   5  |   7   |   DATA 5
          *   4  |   6   |   DATA 4
          *   3  |   5   |   DATA 3
          *   2  |   4   |   DATA 2
          *   1  |   3   |   DATA 1
          *   0  |   2   |   DATA 0
        public void write (int oneByte)
           ParallelPort.writeOneByte (this.portBase, oneByte);
        /** Reads one byte from the specified address.
          * (normally the address is the STATUS pins of the port)
        public static native int readOneByte (int address);
        /** Writes one byte to the specified address
          * (normally the address is the DATA pins of the port)
        public static native void writeOneByte (int address, int oneByte);
        static
           System.loadLibrary("parport");
     }And here's the message i got when i try to run it:
# An unexpected error has been detected by Java Runtime Environment:
#  EXCEPTION_PRIV_INSTRUCTION (0xc0000096) at pc=0x1000107b, pid=2464, tid=896
# Java VM: Java HotSpot(TM) Client VM (1.6.0_03-b05 mixed mode)
# Problematic frame:
# C  [parport.dll+0x107b]
# An error report file with more information is saved as hs_err_pid2464.log
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#Any ideas? I'm using Windows XP Sp2.
In my university i was able to use this algoritm, but there we use Sp1, could be it?
Before someone ask i'm suing UsePort to unlock the Paralell Port.
Thx a lot.

What is the parport native library?
It is not a JVM error, but a parport library error. It tries to execute privilidged instruction (like 'in' or 'out' for intel x86) in user mode, but this instruction should be executed only in kernel mode. You should write proper kernel driver and communicate with it via public OS api, or use some undocumented API to allow you application to use some privilidged instructions like port I/O for specific number of ports (search web for giveio.sys or inpout32.dll, they use second approach).

Similar Messages

  • When i first got my iphone i plugged it into my friend's computer and songs on from itunes. Now it will not show up in the side bar when i plug it into my computer. I have already tried 'authorizing this computer'. What can i do?

    When I first got my iphone i plugged it into my friends computer and added songs from their itunes. Now when i plug it into my computer it will not connect or show up in the sidebar in itunes. I have already tried factory resetting the phone and 'authorizing this computer' in itunes. Can anyone help?

    Is your iTunes up to date, it is now 10.7, click the iTunes button at the top of this page if you need the new version.

  • HT201272 right im trying too download more apps on my phone and it wont let me saying my payment method was declined try again when ive got money in my bank

    im trying too download apps but it saying my payment is declined when i got money in my bank

    im trying too download apps but it saying my payment is declined when i got money in my bank

  • I have got problem with flash in my New Iphone5..

    I have got flash problem in my new iphone5...any solution plz let me know..

    It is because you are taking pictures in the dark.
    Stop doing that.
    The flash will help some with shadows on a close up pic.
    It is not intended for taking pics in the dark.

  • Got a problem with BIOS in my board MSI 785GM-E51

    i have a MSI 785GM-E51 board,i got a problem with the graphic card bus interface,it still run in 8x not in 16x
    i try to disable a onboard graphic on BIOS,but i not find it.
    and last i try to update BIOS to v2.4 n' not work too.
    this a example;

    Quote from: Bas on 08-March-10, 21:21:36
    You do not need to disable the onboard.
    As for the plug-in card, there is nothing in the BIOS to make it work 8x or 16x.
    Make sure your card is seated correctly, else it will work but at lower number of lanes.
    What program is telling you it's 8x?
    GPU-Z

  • My Screen Broke, And Ive Got A Mini-DVI To Video Adapter (Help Please)

    and all i see is my background and my mouse on my tv, no icons or anything. any one got any helps.

    Press the F7 key to toggle between mirror and extended desktop modes.

  • Got my password wrong twice and my mini is disable. I connected to iTunes, but can't get it to work. Can some one guide my through?

    got my password wrong twice and my mini is disable. I connected to iTunes, but can't get it to work. Can some one guide my through?

    If it's showing the red disabled screen due to incorrect passcodes then you may need to put the iPad into recovery mode : http://support.apple.com/kb/ht1808 - you should then be able to reset the iPad via your computer's iTunes and restore/resync your content to it

  • Hi I have just purchased a new iMac and I am trying to move my iTunes files into iTunes on the iMac.  I have got as far as pasting the music folder from my pc onto the desktop of my iMac.  How do I now put this folder into my iTunes?

    I have just purchased a new iMac and this is all new to me as it is so different from my PC.  I am trying to transfer my iTunes from my PC onto the iMac, I have got as far as pasting the itunes music folder onto the desktop but I cant seem to transfer that into iTunes on my iMac. Can anyone help me out with this?

    See iTunes: How to move your music to a new computer
    BTW this list os for discussing the list itself. You'll get better response to questiosn you post if you post them to the correct list. I'll ask to have this moved to the iTunes list.
    regards

  • I was updating Firefox from version 6 to version 7, after updating I tried to open Firefox and the message I got is this: This application has failed to start because xul.dll was not found. How can I fix this?

    I was updating Firefox to the newest version 7.0.1 from version 6.0.2 I think it was, I clicked the restart Firefox button that always comes up after updating. It started updating and then Firefox never restarted like it was supposed to after it was done updating. I then tried to open Firefox and it told me "This application has failed to start because xul.dll was not found." I did have Firefox crash on maybe about 30 minutes or so earlier which bothered me because I have been using Firefox for years and never had it crash on me before but I didn't think much of it at the time it happened because I was able to go back onto Firefox and finish what I had been working on. A while later I checked for updates and updated. The first time I tried to update it didn't work though so I had to shutdown Firefox and reopen Firefox and start the update a second time. It was after the second time that when I tried to open Firefox I got that message about failing to start because xul.dll can't be found. I filed a crash report when my Firefox crashed. This would have been around 1am-2am in the morning that Firefox first crashed and then wouldn't allow me to open it after updating. I have a DELL laptop running the Windows XP operating system but the laptop is probably at least 6 or 7 years old. The laptop will no longer charge so I always have to have it plugged into an outlet. Both my laptop hard drive and my external hard drive give me messages that I am running out of disk space on my hard drive. I bought this laptop 6 or 7 years ago second hand so it could be even older. In short it's a piece of crap and it gives me all kinds of issues but I currently can't afford a new one, but I have never had any problems with Firefox and I use Firefox more than any other aspect of my laptop so it's really really bothering me. May you please help me fix it?

    Unfortunately I tried that and it didn't work. Thanks for the help though. I tried to uninstall and it said I couldn't because the file is corrupt or something, but I think I finally got it uninstalled and/or deleted or whatever, but now I try to reinstall/download it again from the beginning and I can't. No matter what I do I can not get Firefox working again. No matter how many times I try to redownload it. Any other suggestions?

  • I got a new macbook pro and am having a great deal of trouble with it from the start!  But other than that, which I will get to, I have had macs since the one following Lisa and I am a diehard apple fan, yet now with the macbook pro and Lion and its

    I could not download the upgrade to the mountain lion. my updates were taking an enormous amount of time for other programs. When I finally got the indication it was waiting to be downloaded I had to shut down. It was after 2 am and I was practically unconscious already with all the trauma of trying to find the right place for the redeem of the code to open the password. It was all confusing and poorly communicated by Apple. The terrible deterioration of Apple's written communications by non-American techies who can't write for easy understanding, even by this old time tech afficianado is heart-breaking and frustrating is putting the effects mildly.  I have not yet gone back to the mac book pro to finish the job. I am too frustrated and unhappy with the new system.  Also, I found out the hard way that my time capsule saved files on the macbook Snow Leopard, which still works fine after 6 years of use, is locked in that external drive and I cannot transfer the items except one by one or by folders on that computer to a DVD or to a flash drive, to mport to this new computer. Because the systems are not the same, I can't access the files automatically. I fear I will have further problems with the mountain lion vs. lion in seeing those files. What can I do? What should I do?  I am afraid to designate an external hard drive I purchased with the new laptop for the time capsule because then it won't work with any other computer.  I read of terrible incompatibility issues and crashes and things not working right once Mountain Lion was installed and now I am terrified they will happen to me. I just wanted the computer to be as easy to use as all the other macs I have and have had and now it is more like a horribly complicated and difficult Microsoft IBM compatible PC. I hate this. Perhaps Apple wanted to appeal to new Apple users and tried to make them comfortable while disregarding the comfort of loyal Apple users?  It's a sell-out. Meanwhile, I have to get senior tech people because the kids who try to answer my questions much of the time don't interpret what i am telling them and it takes a pro.  Perhaps the kids can answer what I should do in preferenced to scroll the screen, since the scroll indicators disappear and I can't see them and have to resort to using the arrows on the keyboard, which is not the way I like to work.    Please advise me about all of these things!

    Use the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
    This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.

  • Web-Disk on OSX 10.9 Give me this error: "Finder got an error: Network file permission error."

    Previously I was using OSX 10.8 and Web Disk was working great.
    Since I upgraded to OSX 10.9 Web Disk Dont Attach to my compputer and give me this ERROR:
    FInder got an error: Network file permission error.
    When I got this ERROR first time I searched GOOGLE and found this link: http://cammodude.blogspot.no/
    And I did:
    To force all connections to be SMB1:
    Open A terminal window
    paste in the following line followed by the return key(should be all on one line): 
    echo "[default]" >> ~/Library/Preferences/nsmb.conf; echo "smb_neg=smb1_only" >> ~/Library/Preferences/nsmb.conf
    What the command does:
    Creates a file called nsmb.conf  in your  home directory at the path ~/Library/Preferences/nsmb.conf.
    Adds directives to force SMB connections to use the SMB1 protocol.  This is slower but stable.
    Then I could use Web Disk on OSX 10.9 after executing this command in Terminal.
    But now I restarted my Macbook and now Im NOT able to connect to Web Disk and get the same ERROR.
    FInder got an error: Network file permission error
    After trying 100 times it attaches 1 time but then show this ERROR:
    Can't get <<class cdis>> "my.server.com/2078" of application "Finder".
    If this happen then I can see the files in Finder and see the Contents and Size of files but if I open a PHP file in BBEdit then it shows BLANK.. But actually it is NOT blank.
    Now Im stuck How can I solve this? All help is highly appericated..
    Thank you so much...

    Hi,
    Make sure to chmod the app, something like this :
    chmod -Rf 777  secure_site_WebDisk.app
    (in my case the CPanel provided the app for my OSx version.)

  • PI is generated but delivery got cancelled, now i want to generate

    SAP Gurus,
    Actually i generated PI but delivery got cancelled. Now i want to generate Invoice. this is real time issue. kindly tell me the procedure how to rectify this.
    Regards
    K.Kalpana

    hello, friend.
    a pro forma invoice could be order-related.  pro forma invoices do not affect subsequent SD or FI transactions.  they are usually generated as an advance reference for the customer, or to fulfill certain customer or legal requirements.  pro forma invoices do not update statuses of SD documents.
    as the others advise, don't worry too much about the PI.  whether you can create deliveries and invoices or not is not affected by the PI.
    regards.

  • How I got my 2011 MacBook Pro (17") to work with the UML290 without any 'hackery'

    Frustrated and fed up with waiting for Verizon to finally fully support an operating system that is almost two and a half years old now, I decided to experiment and play around with things myself.  Here is what I learned:
    For some reason, the "dial your number" network hack that people got working didn't work for me.  I set up everything as the tutorials all said (GRPS (GSM/2G), APN to "vzwinternet", dial your phone number, user name is [email protected], password is vzw, CID 3, etc).  It just would not work for me.  Maybe it's becasue I had my UML290 hooked up to a Windows 7 box that updated the firmware, which may have rendered this 'hack' inept.  I don't know; all I know as that, despite trying to get this method to work for several days, I was never able to get it to work.
    There was no way, as far as I could see, to force the Verizon Access Manager (VZAM) software to run in 32bit mode as you can with most other programs.  Typically, you can hilight a program, press CMD+I and select a checkbox to run an app in 32bit mode, but no such option existed for VZAM (for whatever reason).
    Finally, I found a workaround to get the modem working until Verizon gets their act together and makes VZAM work with 64bit OS X.  Here's how:
    Completely power off your computer. 
    Depress and hold the "3" key and the "2" key (at the top of your keyboard) at the same time BEFORE pressing the power button.
    Press the power button while continuing to hold the "3" key and the "2" key.
    Continue to hold the "3" key and the "2" key until the login prompt comes up.
    Log in as normal (you may have to remove a bunch of characters from the password field; just CMD+A and delete what's in there and type your password as usual).
    After following the steps above, you should have forced your Mac to run in 32bit mode.  Run VZAM as normal and you should have no trouble connecting to the 4G/3G network.
    Note: This measure is TEMPORARY, and will force OS X to load the 32bit kernel instead of the default 64bit kernel (if your MacBook is set up to use the 64bit kernel by default).  This change will be undone at your next restart provided you do not hold down the "3" key and the "2" key.
    Note: If you used previously posted "dial-up" methods to get your modem working on your Mac, you will need to undo the 'damage' to your settings that that workaround caused.  Please see my post here (post 14) for detailed instructions on how to do so.
    Note: This is a temporary solution that carries with it some down sides:
    True 64bit support offers higher levels of security than 32bit.
    You will likely be unable to use more than 3GB of of memory as a 32bit OS cannot, by nature, address that much RAM.
    Please let me know if you have any problems.  I can't promise I can help, but I'll do my best.

    Hey, it's a simple fix that should give most people what they want until there is full VZW support: the ability to use their card with the VZAM software.  I didn't see anyone else offering that suggestion...  If you don't want to use it, you don't have to.
    At the very least, this does seem to prove the theory that this is an issue with the 32/64bit compatability that some have refuted.

  • HT4910 Have two phones with same apple id as I got one for my hubbie .he tried to back up his numbers in I cloud . Our contacts have now merged and neither can delete from our phone without it coming off the other . Any ideas how we can stop this

    Have two iPhones with the same id as I got hubbie one in week and when I got it they asked for email address so I gave the one we use, so when my husband started phone up he just put my password in. When he tried to back his numbers on iCloud they all appeared on my phone and now I can't delete his numbers without them deleting on his phone as well . Any help would be appreciated.

    You'll have to migrate one of the phones to a different account, then delete the other person's data from each account (you can continue to share the same Apple ID for purchasing from the iTunes and app stores). 
    Decide which iPhone will be keeping the current iCloud account.  On the one that will be changing accounts, if you have any photos in photo stream that are not in your camera roll or backed up somewhere else save these to your camera roll by opening the photo stream album in the thumbnail view, tapping Edit, then tap all the photos you want to save, tap Share and tap Save to Camera Roll. 
    Once this is done, go to Settings>iCloud, scroll to the bottom and tap Delete Account.  (This will only delete the account from this phone, not from iCloud.  The phone that will be keeping the account will not be effected by this.)  When prompted about what to do with the iCloud data, be sure to select Keep On My iPhone.  Next, set up a new iCloud account using a different Apple ID (if you don't have one, tap Get a Free Apple ID at the bottom).  Then turn iCloud data syncing for contacts, etc. back to On, and when prompted about merging with iCloud, choose Merge.  This will upload the data to the new account.
    Finally, go to icloud.com on your computer and sign into each iCloud account separately and manually delete the data you don't from each account.

  • HT202667 Hi - My daughter was using her Apple TV until recently when she got a Smart TV.  Now the Apple TV is not needed so she passed it on to me.  How do I get it transferred over from her Home Sharing account to mine so that I can use it with my PC?

    Hi - My daughter was using her Apple TV until recently when she got a Smart TV.  Now the Apple TV is not needed so she passed it on to me.  How do I get her Home Sharing account transferred over to mine so that I can use it with my PC? Thanks!

    As  Winston Churchill wrote, however you might want to do a factory reset on the Apple TV.
    This way all information pertaining to your daughter will be removed from the device. Specifically if see was sign into any of the streaming service, Netflix, Hulu, etc. her credentials will still be associated with this Apple TV, doing  a factory reset will remove all that and make it as if you purchased the device and just plugged it in.
    regards

Maybe you are looking for

  • How enhanced receiver determination works..?

    hi all, In enhanced receiver determination Interface mapping(which has java mapping) I have also included logic to make some change in content of input file and dynamic configuration for output file name. My input and output are flat files. So I m us

  • FCP & XDCAM?

    Hi Guys, New to the community, my question is, I imported footage from XDCAM EX with the XDCAM Transfer software, as said in the manual, but I think something is wrong, because I went to check the file specifications and my data rate is just like an

  • Compiling for solaris 9 on solaris 8 machine

    Hi, is it possible to use a solaris 8 machine with workshop, to compile binary for solaris 9. I need to compile user-mode app as well as kernel modules both for 64/32 bit environments. The modules are all dynamically linked. If this is possible, what

  • When I connected my ipod with the cable to my laptop so I could sync my itunes library.

    Came up with this error message: Itunes could not connect to iPhone. An unknown error occured (OE8000084).  What do I do?

  • They tend to be more complicated

    There was a time when video surveillance was used only in big malls and shopping centers. These days, you can see CCTV's almost any place you go, from a small shop to homes and religious centers. Thus, they ensure greater public safety at a fraction