Author Topic: accessing memory via nasm  (Read 4354 times)

nobody

  • Guest
accessing memory via nasm
« on: March 17, 2005, 08:21:16 AM »
im having a big problem with my program. i am trying to build a program that would enable me to somehow view memory and transfer data from memory to memory. im really having trouble.

and to add to that, ive just begun programming in nasm just now. ive learned it before but i stopped doing it since i studied microcontroller programming. anyway, im kinda in the dark here. i really dunno what to do. i have a partial program though, but when it comes to the actual subject of it, i dunno what to do.

my main objective is to view and transfer data from memory to memory. but itll just be little transfers which i think wont really matter much. anyway thats what i want to do... im lost really. i am.

help!!!!!!

- gv_lafavilla@yahoo.com

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2447
  • Country: us
Re: accessing memory via nasm
« Reply #1 on: March 17, 2005, 10:17:12 PM »
I'm not sure just what "level" your problem is on... You can't "mov [mem2], [mem1]", of course - you have to move memory contents into a register, and then move the register back into memory. Or movsb/movsw/movsd will move a byte/word/dword from [ds:esi] to [es:edi]... You can push/pop from/to memory, too...

When it comes to displaying memory - or displaying anything - it matters what OS you're targetting. With a "protected" OS, you won't be able to access memory you don't "own", which might be a problem, too...

Maybe if you post the partial program you've got, or tell us what you've tried that doesn't work, we could be more help...

Best,
Frank