Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 4,006 of 4,675    |
|    2018peb5224@nospicedham.mnit.ac.in to All    |
|    Re: register pointer to memory    |
|    15 Jan 20 21:45:52    |
      On Thursday, January 16, 2020 at 2:51:38 AM UTC+5:30, JJ wrote:       > On Tue, 14 Jan 2020 00:47:38 -0800 (PST), 2018peb5224@nospicedham.mnit.ac.in       > wrote:       > > Hi,i am new in assembly coding. i want to do some memory address       manipulation for my project       > > what i want is to save a memory address in a Register then done some       manipulation on that address like changing the address and so on, then get the       data from the newly updated address.       > > So far i am not able to do it.       > > i am using nasm.       > >       > > mov ebx,000000h       > > add ebx,000230h       > > mov eax,[ebx]       > > push eax       > > push .fmt       > > call _printf       > > ret       > >       > > ..fmt db '%d',0x0d,0x0a,0       > >       > > Thanks       >       > Your problem is not an assembly issue. But a problem understanding what kind       > of value is expected by a function's argument.              can you help me with that?              i can get the data from a particular memory location using section data, but i       want to use registers, cause i want to change the address dynamically which i       can'y do with section data              ________________________________       lea si , [000000H]       lea di ,[test1]       movsb       movsb       push test1       call _printf       ____________________________       section .data       test1: dd 00h              then i am getting output of 2 bytes.       but if i try to move the address to the register and then try to print it, its       not printing anything, no error nothing just blank.section .data       ____________________________________       mov ecx,000000h       mov eax, [ecx]       push eax       push .fmt       call _printf       ret                ____________________________________       i just wanna know what is there that i am doing wrong.              In the end, I just want to get the data from a particular memory location       using registers not using section data. is there any way?              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca