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

  • Home
  • SEARCH
  • 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 916771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:06:07+00:00 2026-05-15T18:06:07+00:00

the semester is over so I sank a bit into assembly again. I have

  • 0

the semester is over so I sank a bit into assembly again. I have read some articles and parts of x86 family user’s manual concerning the memory map and I/Os and I still haven’t figured out how does it work.. As I understand it now, I can access the I/Os with IN and OUT instructions, in that case is it like the port number I use as an argument is actually relative address to some predefined area? or what do these two instructions do when being executed? or are the I/Os addressed completely diferent way from the RAM?

  • 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-05-15T18:06:07+00:00Added an answer on May 15, 2026 at 6:06 pm

    I/O ports are sort of like memory addresses, but are accessed differently, using IN and OUT instructions. The full story on modern hardware is very complicated, but accessing legacy devices in real mode is straightforward. Here’s an example of how to read a scan code from the keyboard (technically, the keyboard controller).

    Wait:
      IN  AL, 64H   ; read keyboard status port
      AND AL, 1     ; a key is ready when bit 0 is set
      JZ  Wait
      IN  AL, 60H   ; read scan code
    

    The port numbers 60H and 64H were established by IBM sometime before you were born, but every PC since then has mimicked this behavior in the name of backwards compatibility. Other legacy devices have fixed port numbers as well. Here’s a fun one, if you’ve got a floppy drive:

    MOV DX, 3F2H  ; 3F2 is the floppy controller's control port
    MOV AL, 10H   ; turn on bit 4
    OUT DX, AL    ; start the floppy motor!
    

    For port numbers bigger than 8-bits (e.g. 3F2), you have to put the port number in DX first (just a quirk of the instruction set). Again, the 3F2 assignment was fixed a long time ago with the introduction of the IBM PC.

    Accessing today’s devices on a modern bus is much, much trickier.

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

Sidebar

Related Questions

Intro We have a project to design and implement this semester. For our project,
I have an interesting problem here... <cfloop from=1 to=#form.countField# index=i> <cfif isdefined('form[semester#i#]')> <cfquery name
This semester, I took a course in computer graphics at my University. At the
This semester I'm teaching a class at a local university. Thus far, I've had
I teach a one semester University course in systems analysis and design. Topics include
I'm just finishing up a computer architecture course this semester where, among other things,
Hey all, my Computational Science course this semester is entirely in Java. I was
I'm currently having fun trying to learn some of the Boost libary. I'm currently
I'm starting Calculus this semester. I've used programming (or scripting) languages before, mostly PHP
I am taking a C programming class this semester, and was somehow allowed to

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.