Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8682163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:41:50+00:00 2026-06-12T21:41:50+00:00

I am trying to do some simulation. In the real case, an x86-based Industrial

  • 0

I am trying to do some simulation. In the real case, an x86-based Industrial PC connects with an network board using PC/104. The network board is treated as an I/O device. The code running on IPC uses assembly instructions like IN, OUT to access the I/O ports. I want to simulate the whole thing on my laptop.

The c++ program running on IPC can be ported to my laptop since they are both based on x86-architecture. But for IN/OUT instructions, I ran into troubles since no real network board is connected to my laptop. I simulated the logics of the network board using SystemC. I am wondering if there’s a way to intercept the I/O port access(IN/OUT) to real hardware and let the logics of the virtualized hardware take over.

I appreciate any help or advice from you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T21:41:52+00:00Added an answer on June 12, 2026 at 9:41 pm

    If your code with IN/OUT instructions is in a user program, you need to find out how to intercept and handle these instructions either in this same program (perhaps, by means of signals?) or in the kernel. IN and OUT are privileged instructions and by default they cause an exception (#GP) in user-mode code and the kernel then handles this exception. You need to have your own handler for this case. In Windows this can be done using so-called Structured Exception Handling (AKA SEH).

    If the code is in the kernel already, it’s tricky because IN/OUT in there don’t cause #GP.

    Couldn’t you just replace the routines doing IN and OUT with something else, with the calls to the device emulation code? You’re emulating it anyway, nobody cares if it’s IN/OUT or something else.

    See how this can be done with SEH.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to build some simulation software using makefile provided by them after
i'm trying to make some sort of Business Simulation Game and everything is working
I'm trying to use a case statement to make some code more readable. It
I'm trying to write a driving simulation program and I need some help on
I have been developing some iOs stuff using the simulator and a real iPad.
I'm trying to create some sort of simulation program and I've searched the net
I am trying to create some rules and facts on a certain situation. The
I'm trying some iOS test applications on the new Mac mini, that supports Bluetooth
I am trying some basic application on Sencha Touch 2. Instead of json ,
Recently I was trying some practice programs in python and I came across this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.