The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: t48605 on July 04, 2006, 04:54:22 AM

Title: what are they about ???
Post by: t48605 on July 04, 2006, 04:54:22 AM
I see in the documentation about interrupt of emu8086
INT 10h / AH = 09h - write character and attribute at cursor position.


input:
AL = character to display.
BH = page number.
BL = attribute.
CX = number of times to write character.

   

well , what is "attribute" about , and ...'' page number'' , what is it ???
thanks
Title: Re: what are they about ???
Post by: MichaelW on July 04, 2006, 12:03:57 PM
The bit numbers and functions for a text mode attribute byte are:

7 blink or background intensity
6 background red component
5 background green component
4 background blue component
3 foreground intensity
2 foreground red component
1 foreground green component
0 foreground blue component

For the graphics modes only the foreground pixels are written, and bit 7 controls how the pixels are written (0 = overwrite existing pixels, 1 = XOR foreground color with existing pixels).

The page number identifies the display page. The VGA provides 1-8 display pages, depending on the display mode. For the modes that provide more than one display page, the programmer can write to any page at any time, or select any page for display.
Title: Re: what are they about ???
Post by: t48605 on July 05, 2006, 01:44:35 AM
thanks  :U
now I have a problem with programming and do you get any idea for me about it
I program to display the result of this sum 1+3+5+...+13+15+17
I had do it and also have the result of 81 but in hexadecimal form (51h) , how can I display the result
as 81 (decimal)
I can change 51h to 8 and 1 in ascii and see the result but seems not a good thinking ???
how do you think ???
Title: Re: what are they about ???
Post by: Mark Jones on July 05, 2006, 01:43:35 PM
http://www.ctyme.com/rbrown.htm
Title: Re: what are they about ???
Post by: MichaelW on July 05, 2006, 09:29:48 PM
The PORTS.ZIP attachment here:

http://www.masm32.com/board/index.php?topic=3747.0

Contains an asm source that includes, among other things, procedures to convert signed bytes, words, and dwords to decimal strings. The procedures are designed to be easy to understand, and are well commented (at least IMO).

Title: Re: what are they about ???
Post by: t48605 on July 08, 2006, 02:27:23 AM
QuoteThe procedures are designed to be easy to understand
seem hard to me  :( could you tell me your target to make it ???
why push 40h first , why not 30h or 20h ???
Title: Re: what are they about ???
Post by: MichaelW on July 08, 2006, 04:41:13 AM
The push 40h, pop es was used to set ES to the segment address of the BIOS data area, so the base addresses of the parallel and serial ports could be read and displayed. The source that I was directing you to is SUPPORT.ASM

Title: Re: what are they about ???
Post by: japheth on July 08, 2006, 05:50:58 AM
A forum search to find source how to convert a number in AX to a string let me find this:

http://www.masm32.com/board/index.php?topic=3239.0
Title: Re: what are they about ???
Post by: t48605 on July 08, 2006, 08:41:58 AM
thanks so much
I will do a more research on it !!!
but I wonder , I write masm5.0 code and could it run with masm32 ???
thanks !!!
Title: Re: what are they about ???
Post by: japheth on July 09, 2006, 02:31:02 AM

> but I wonder , I write masm5.0 code and could it run with masm32 ???

Try it! Either it runs or it doesn't. Obviously you're learning, so this is quite a good lesson  :green.

Title: Re: what are they about ???
Post by: Ossa on July 09, 2006, 10:10:47 AM
you might need to add the .M510 option in for some of the macro/structure behavior, but thats about it I think.

Ossa
Title: Re: what are they about ???
Post by: Casper on July 09, 2006, 05:41:33 PM
You will need to change any occurrences of ml.exe in the batch files to masm.exe, also.

Paul
Title: Re: what are they about ???
Post by: MichaelW on July 09, 2006, 07:56:33 PM
Quote from: t48605 on July 08, 2006, 08:41:58 AM
but I wonder , I write masm5.0 code and could it run with masm32 ???

It may ultimately be possible, but I have not been able to make it work with MASM 5.10. The problems I have encountered:

MASM 5.10 does not support the FLAT memory model. To get around this I used full segment definitions.

MASM 5.10 produces OMF object modules. When I link with the 32-bit linker, it reports that it is performing the conversion to COFF, so I assume that this is not a problem.

The 32-bit linker returns: "error LNK2001: unresolved external symbol _mainCRTStartup", or some variation depending on the value of the /ENTRY option. I gave up before I found any way around this.

Also, there is a minor problem with multiple lines in the MASM32 windows.inc that exceed the maximum line length for MASM 5.10.

Title: Re: what are they about ???
Post by: t48605 on July 10, 2006, 03:46:12 AM
well , well let I try advise by advise  :bg
thanks so much  :U