Why ORG?

If I write something like that:

_Pila SEGMENT STACK 'PILA'
ORG 0100h
DB 64 DUP('PILA ')
_Pila ENDS

_Datos SEGMENT PUBLIC 'DATOS'
ORG 0300h
CR EQU 0Dh
_Datos ENDS

_Codigo SEGMENT PUBLIC 'CODIGO'
ASSUME CS:_Codigo,DS:_Datos,SS:_Pila
ORG 034Fh

Why _Codigo begins at 034Fh, but _Datos & _Pila doesn't begin at 0300h and 0100h?

Comments

  • Ok, I saw. I am only talking about offset inside segments values that are allocated by the DEBUG program.

    Is there any way to allocate my segments freely in the memory?
  • try something like:

    MYSEG SEGMENT AT 0B800H

    ...
    ...
    ...

    MYSEG ENDS

    : Ok, I saw. I am only talking about offset inside segments values that are allocated by the DEBUG program.
    :
    : Is there any way to allocate my segments freely in the memory?
    :

  • [b][red]This message was edited by bono02 at 2003-8-24 21:56:17[/red][/b][hr]
    : If I write something like that:
    :
    : _Pila SEGMENT STACK 'PILA'
    : ORG 0100h
    : DB 64 DUP('PILA ')
    : _Pila ENDS
    :
    : _Datos SEGMENT PUBLIC 'DATOS'
    : ORG 0300h
    : CR EQU 0Dh
    : _Datos ENDS
    :
    : _Codigo SEGMENT PUBLIC 'CODIGO'
    : ASSUME CS:_Codigo,DS:_Datos,SS:_Pila
    : ORG 034Fh
    :
    : Why _Codigo begins at 034Fh, but _Datos & _Pila doesn't begin at 0300h and 0100h?
    :
    :

    this is a kind of EXE program.
    Exe can access more than 1 segment.
    In your program _Datos & _Pila is actually set in (offset) 300h and 100h but it's in the different segment.
    Take a look!


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