write and read a value in COM 1 (0x3F8)

Posted on 2004-11-22
Last Modified: 2013-11-25
This is a simple program in c to write and read a value from COM 1.The question is how i write this code in asm.
#include <stdio.h>
#define com 0x3f8
int valoare;
Question by:cipriancomsa
    1 Comment

    Accepted Solution

    I suggest a good google on assembler op codes to get the commands needed to read and write to a port. Then it is just a matter of moving data values into registers and calling the command to read and write from the port. The tricky part will be outputing the results for which the easiest thing to do is use BIOS routines to print out a zero delimited string. All this can be found using google.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    Title # Comments Views Activity
    FizzBuzz challenge 9 64
    maxMirror challenge 10 67
    wordsWithout 49 64
    VB 6.0 printer how to align 6 34
    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    A short article about problems I had with the new location API and permissions in Marshmallow
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now