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
Printable View
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
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
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.
INT is the interrupt command, and the number is the requested function.
(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.
Only it's much more complicated in protected mode...
How's that?
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.