The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: loki_dre on April 15, 2008, 12:23:07 PM

Title: MASM32 int 05h to print screen
Post by: loki_dre on April 15, 2008, 12:23:07 PM
Hello,
Every time I try to use "int 05h" to print screen, my program can compile but it crashes once I run it.

PS:
Is MASM32 completely free to develop with?
Title: Re: MASM32 int 05h to print screen
Post by: Tedd on April 15, 2008, 12:34:43 PM
Who told you int 05h would print to the screen?

PS: Yes, pretty much.
Title: Re: MASM32 int 05h to print screen
Post by: hutch-- on April 15, 2008, 12:44:43 PM
From my vague memorries of DOS it was either int 09h or int 40h that you uaed to display text to the console.

Neither will work in 32 bit protected mode windows and you need to use windows API calls to perform functions like this. Tell us what you are trying to write and we can probably point you in the right direction.
Title: Re: MASM32 int 05h to print screen
Post by: loki_dre on April 15, 2008, 01:24:23 PM
http://www.ousob.com/ng/masm/ng64dfe.php             <---------------------- said that is the interrupt

I basically just need something that will capture the screen and save it to a memory location (preferable as a BMP) pointed by pMemory....

I tried using several other int functions and it always seems to crash

Title: Re: MASM32 int 05h to print screen
Post by: hutch-- on April 15, 2008, 01:57:06 PM
loki,

The code examples are old 16 bit DOS, we have a 16 bit section but its different to 32 bit code. If you have any further questions, post them in the 16 bit DOS sub forum.
Title: Re: MASM32 int 05h to print screen
Post by: MichaelW on April 15, 2008, 06:24:10 PM
For a 16-bit DOS application, how you go about capturing the contents of the screen would depend on the current video mode. Since you mention bitmap, I assume that your goal is to capture a graphics screen. If this is so, and you are allowed to select the mode, you should probably select VGA mode 13h because the memory model is much simpler than the other graphics modes.

http://www.osdever.net/FreeVGA/home.htm