Results 1 to 8 of 8

Thread: Ports

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Location
    aaaaaa
    Posts
    3

    Cool Ports

    hello everyone,

    what about ports programing in asembley?
    I'm beginner on asm, and i want to know something about data sending & receiving via COM ports, printer ports, etc etc

    i'm using a86 compiler

  2. #2
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004
    Check out:

    INT 17h for your printer port stuff.
    INT 0Bh and INT 0Ch for COM1 and COM2
    INT 0Dh and INT 0Fh for LPT2 and LPT1
    "Can't" and "shouldn't" are two totally separate things.

    All questions should be answered. All answers should be true. That is why I post.

  3. #3
    Addicted Member Buy2easy.com's Avatar
    Join Date
    Jul 2002
    Posts
    200
    i do not know asm but have learned how to program in almost every other programing language. In the future i plan on learning asm for my engineering courses but i was just looking in this forum and was wondering what

    INT 17h for your printer port stuff.
    INT 0Bh and INT 0Ch for COM1 and COM2
    INT 0Dh and INT 0Fh for LPT2 and LPT1

    what does the INT 17h,INT 0bh,INT 0dh stand for? Is it a type of memory address or a function? thanks for any info on this, I was just curious.

  4. #4
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004
    INT is the interrupt command, and the number is the requested function.
    "Can't" and "shouldn't" are two totally separate things.

    All questions should be answered. All answers should be true. That is why I post.

  5. #5
    Member AirScape17's Avatar
    Join Date
    Aug 2002
    Location
    England
    Posts
    34
    (From what I remember:)

    The number after INT refers to 4 bytes in the 1k interrupt vector table (IVT), located at 0:0 (eg: 17h = 0:[17h*4]). These 4 bytes give the CS:IP of where the interrupt is located. Before an interrupt is called the CS:IP is pushed to the stack, which is then popped when interrupt is finished.

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Only it's much more complicated in protected mode...
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004
    How's that?
    "Can't" and "shouldn't" are two totally separate things.

    All questions should be answered. All answers should be true. That is why I post.

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Well, for one thing most OSs won't let you do all those interrupts. In both NT and Linux you have to open the ports as files and write to them.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width