Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Can't send register value to port 0x43

Can't send register value to port 0x43

Scheduled Pinned Locked Moved C / C++ / MFC
c++hardwarequestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Heinz_
    wrote on last edited by
    #1

    Hi, with assembler code embedded in my c++ code i'm trying to send a value to I/O port 0x43 (8254 timer control) but the program crashes at this point, i'm using digital mars c++ compiler wich has an inline assembler, also tried mingw and it's worst (it doesn't even compile), here are the asm lines: asm { mov AL, 0xB6; out 0x43, AL; // It crashes in this line. mov AL, 54; out 0x42, AL; mov AL, 124 out 0x42, AL; in AL, 0x61; or AL, 0x3; out 0x61, AL; in AL, 0x61; and AL, 0xFC; out 0x42, AL; } I've also tried embedding this code into other languages like D, but it throws a win32 exception. What's wrong man? thx

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups