Assembler basics

Hi

I am busy with assembler and have a problem. When I use the buffer input it saves the keys pressed in DS:DX according to Norton Guides now where is DS:DX and what dose it meen?Thans in advance.

Comments

  • : Hi
    : I am busy with assembler and have a problem. When I use the buffer input it saves the keys pressed in DS:DX according to Norton Guides now where is DS:DX and what dose it meen?Thans in advance.
    :
    [green]
    You appear to be refering to INT 21h function AH=0Ah (10) BUFFERED INPUT
    Down load Ralf Brown's interrupt list INTER61#.ZIP where #=A,B,C,D,etc
    www.google.com search will get you to a download site.
    The information about most all interrupts are in there.
    DS:DX = segment:offset address of an area of memory you know you can use and know it's size.
    The size is written to the first byte of the buffer at DS:DX before the interrupt is involked.
    The interrupt loads byte 2 in the buffer = size of input excluding the CR=13=Carriage Return (enter key press)
    Then your buffer holds the keys pressed.
    (I personally couldn't get any usable info out of Norton Guide stuff.)
    (You may want to try another source, but norasm.zip by Norton is good.)
    You appear to be stuck in limbo untill an understanding of real mode conventional memory addressing is understood, which is your DS:DX address.
    It takes 5 hex digits to address all the 1 meg of conventional memory.
    5 hex digits is 20 bits.
    In seg:offset seg holds one digit. 1000: (hex) is the second segment of 65,535 bytes or :FFFF (hex) 1000:0000 is the first byte, 1000:FFFF =last byte
    add 1 byte and 2000:0000 is the next byte
    so there are 16 full segments of 65,535
    since a Dword=32 bits can address more than the 1 meg
    they use real mode addressing, and that is where it gets confusing.
    In seg:offset the SEG part increments the address by 16 bytes
    so your 5 hex digits can be moved around in the seg:offset address
    1234:0000 to 1234:000F is 16 bytes
    1235:0000 points to the next 16 bytes

    1234:5678 = seg:offset
    1234 seg (in positions 2 3 & 4, values can be mov/add/sub up/dn)
    :5678 offset
    with out altering the actual byte the seg:offset points to.
    1734:0678 points to the same byte

    I hope that helps somehow.
    Bitdog
    [/green]

  • Bitdog

    Thanks for the reply. It's a lot to take in at once but if you read it a few times makes sence. The link to Ralf Brown's files is also a lot better then Norton Guide. Thanks again.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories