| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Assembly Questions and Answers for Assembly here! |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
i programmed some instructions... i was wondering if it is right...that it would copy the value FF into memory locations 50 to 6F
mov a, #ff mov r0,#50 ; load pointer mov r2,#32 ; load counter to go 32 times ( was more concerned about this) again: mov@r0, a inc r0 djnz r2, again i think it will have to be 32 loops because from 50 to 5F it is 16 bits...and from 60 to 6F is another 16 bits..so it would have to go 32 bits or times to load up all in memory...right? |
|
#2
|
|||
|
|||
|
Re: simple assembly program
Hi!
Maybe try using stosb or something like that. I'm not saying it's good, but I would try doing something like that: xor eax,eax dec eax mov ecx,(how many times) shr ecx,2 mov edi,(address) rep stosd I'm not sure if it's correct. I was doing asm for some time 'till I discovered c++ :P but I still love asm anyway If you need something feel free to ask: lican@wp.pl
|
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|