3 questions about using the memory in assembler

hi! I began to write programs 1 or 2 weeks ago so I don't know a lot of thing about using the RAM memory in assembler and I have several questions:
1)It is possible to use more than 64kb of memory. But how can I set the value of a memory cell having number 100 000(for example). If it is number 170 I will use mov [170],ax.
2)I store the address of a cell in ax. How can I get the value of this cell in bx(for example).
3)Is there a way to check if some memory cell is used or not?

10x in advance

Comments

  • : hi! I began to write programs 1 or 2 weeks ago so I don't know a lot of thing about using the RAM memory in assembler and I have several questions:
    : 1)It is possible to use more than 64kb of memory. But how can I set the value of a memory cell having number 100 000(for example). If it is number 170 I will use mov [170],ax.

    [blue]It is possible, of course.
    You have to load a segment address into a segment register and an offset into offset register (BX,SI,DI...) and then access the cell with MOV or other command.[/blue]

    : 2)I store the address of a cell in ax. How can I get the value of this cell in bx(for example).

    [blue]Address does not go into AX - it can be there temporarily (as a binary value), you have to use the registers which are offset registers, see my comment above ^^^.[/blue]

    : 3)Is there a way to check if some memory cell is used or not?

    [blue]It is possible with 'walking' the memory. In DOS all memory divided into blocks which were allocated by tasks. You need to use interrupt to get the first block location and then 'walk' these blocks using parameters saved in the block headers. Some of the blocks will be occupied, some are free. That is a complex task for a beginner...[/blue]

    :
    : 10x in advance
    :

    [blue]Before you begin coding under DOS in ASM you need some info: how is the addressing system works? So very famous SEGMENT:OFFSET stuff and all that...

    You can get from my site the DOS Help Utility:

    http://www.codexxi.com/MyTools.html

    Read the info on DOS structures. For SEGMENT:OFFSET thing - you need a good book or search here on forums - we had a pile of topics on this matter.[/blue]
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

In this Discussion