Quantcast
Channel: x86 Assembly - Programmers Heaven
Viewing all articles
Browse latest Browse all 152

how do write to/read from memory?

$
0
0
hi.
i was wondering someone could explain to me how to write to memory and read from it as well.

for example, lets say i want to put the value 6 (decimal) in the segment:offset 34c4:22f4 (i just made those numbers up then, so im not trying to do anything specific at that location).

im thinking if i wanted to read the value back again and put it on the screen i could use int 21h function 09. would this work? eg:
mov ax, 34c4h
mov ds, ax
mov dx, 22f4h
mov ah, 09
int 21h

3rd question:
how could i copy the contents from a place in memory, say 34c4:22f4 into a register, or 2 registers, (ax and bx). and how would i copy them into a variable?

would love some help on this one. ive tried looking through the texts i have but cant find anything that actually shows me how its done.

Viewing all articles
Browse latest Browse all 152

Trending Articles