|
-
Apr 1st, 2003, 12:26 AM
#1
Thread Starter
Hyperactive Member
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?
-
Apr 15th, 2003, 06:46 AM
#2
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.
-
Jun 18th, 2003, 06:23 PM
#3
Fanatic Member
I don't think you can move an immediate operand to a segment...
-
Jun 18th, 2003, 08:53 PM
#4
Thread Starter
Hyperactive Member
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.
-
Jun 19th, 2003, 04:57 AM
#5
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.
-
Jun 19th, 2003, 10:07 AM
#6
Fanatic Member
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.
-
Jun 19th, 2003, 03:37 PM
#7
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|