News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

what are they about ???

Started by t48605, July 04, 2006, 04:54:22 AM

Previous topic - Next topic

t48605

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

MichaelW

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.
eschew obfuscation

t48605

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 ???

Mark Jones

"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

MichaelW

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).

eschew obfuscation

t48605

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 ???

MichaelW

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

eschew obfuscation

japheth

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

t48605

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 !!!

japheth


> 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.


Ossa

you might need to add the .M510 option in for some of the macro/structure behavior, but thats about it I think.

Ossa
Website (very old): ossa.the-wot.co.uk

Casper

You will need to change any occurrences of ml.exe in the batch files to masm.exe, also.

Paul

MichaelW

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.

eschew obfuscation

t48605

well , well let I try advise by advise  :bg
thanks so much  :U