Results 1 to 4 of 4

Thread: Default segment register

  1. #1

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    Default segment register

    Whenever I use Based Indexed Memory Addressing Mode, the syntax is like this:
    PHP Code:
    mov ax, [reg1][reg2
    SI, DI, and BX will always use DS as the segment register but BP will use SS as its default segment register.
    So if I do something like this:
    PHP Code:
    mov ax, [bx][si
    It'll use DS as its default segment register (mov ax, ds:[bx + si]) because there is no BP register - that uses SS.
    But now if I do something like this:
    PHP Code:
    mov ax, [bx][bp
    Will the default segment register be DS(mov ax, DS:[bx + bp]) because the first register is bx that uses DS as its default segnment register?
    And if I do the other way around:
    PHP Code:
    mov ax, [bp][bx
    The default segment register will be SS)mov ax, SS:[bp + bx]) because first offset register is bp and it uses SS as its default segment register?
    Baaaaaaaaah

  2. #2
    Lively Member mmiill's Avatar
    Join Date
    May 2002
    Location
    SERBIA
    Posts
    73

    ?

    what is your question????
    mm

  3. #3

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Well, my question was that wether whatever I said was right but now I already found the answer.
    Baaaaaaaaah

  4. #4
    Lively Member mmiill's Avatar
    Join Date
    May 2002
    Location
    SERBIA
    Posts
    73

    !

    im g..d to hear that

    and now im looking your program and ill see if everything OK
    mm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width