Results 1 to 7 of 7

Thread: accessing address 0xb000:0000

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    313

    accessing address 0xb000:0000

    how do you write to address 0xb000:0000 in memory? like say i did this

    mov al, 'A' ; or mov al, 56
    and say i wanted to move the contents of al to address 0xb000:0000 how would i do that?

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    mov es b000h
    xor bx bx ; on 16-bit
    mov BYTE PTR [es:bx] al
    Last edited by CornedBee; Jun 19th, 2003 at 04:56 AM.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004
    I don't think you can move an immediate operand to a segment...

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    313
    Well if i move 'A' into al first the compiler wont care if its and immediat because it's gonna have 65 in al anyways the same as if i pulled it out of memory at some random address. Either way it's a value being placed in memory. So it should work. Now i can not move an immediat directly to memory is that was you were refering to? because in that case you are right, i have to go though a register first.

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    You're right DW, you can't. I forgot.
    Code:
    mov ax b000h
    mov es ax
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004
    Well if i move 'A' into al first the compiler wont care if its and immediat because it's gonna have 65 in al anyways the same as if i pulled it out of memory at some random address. Either way it's a value being placed in memory. So it should work. Now i can not move an immediat directly to memory is that was you were refering to? because in that case you are right, i have to go though a register first.
    There's certain combinations of operands that do not work, deoblo1. One of them is immediate -> segment. There's a few more and any ASM book will tell you the limitations.

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Location
    Texas
    Posts
    313
    I was going from memory i havent done anything in asm since this post, so im a bit rusty. Ill get back into the swing of things in a while. Thanks for the help though guys.

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