PavelCheckov wrote:
Can I use the following to print to my printer on an Intel64 system?
Under special circumstances, yes. But even when you could, I wouldn't recommend it, as it would be extremely slow, plus you probably won't have Teletype video mode anyway, only pixel-based graphics on modern machines (only a few BIOS implements that and only for some video modes. Chances are that that BIOS int won't work). Check out
PC Screen Font or consider using a minimalistic library such as
Scalable Screen Font instead.
For printing not on screen but to somewhere else, you should use IO ports. It's not that difficult,
parallel port is very
easy to program in particular. However again, chances are good that your modern Intel64 machine doesn't have an LPT port in the first place...
Thomas wrote:
That looks like legacy code and makes only sense when using real mode.
Not really, you could switch modes temporarily.
Thomas wrote:
int86 is part of the old dos turbo C++ library if I remember correctly
Also in Minix (see
source line 8861). It switches to real mode, does the BIOS call and then switches back to protmode. The caller of int86() is none the wiser. You could implement something like that in long mode too, but BIOS must exists in the first place of course (and the machine must have an LPT peripheral which is unlikely these days).
Cheers,
bzt