Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. __asm?? Some help me!!

__asm?? Some help me!!

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelptutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mvworld
    wrote on last edited by
    #1

    Hi, ok how do I access contents of a structure from inside asm code? For example I have a structure (with which I will make a list) typedef struct _LIST{ DWORD value; struct _LIST *next; }list; then I have a pointer of this structure list *my_list; After having input the data in this list, how can I traverse the list from inside __asm to read the variable "value" for each of the structures? i.e. How do I read my_list->value and my_list->next from inside __asm block? Thanks

    P 1 Reply Last reply
    0
    • M mvworld

      Hi, ok how do I access contents of a structure from inside asm code? For example I have a structure (with which I will make a list) typedef struct _LIST{ DWORD value; struct _LIST *next; }list; then I have a pointer of this structure list *my_list; After having input the data in this list, how can I traverse the list from inside __asm to read the variable "value" for each of the structures? i.e. How do I read my_list->value and my_list->next from inside __asm block? Thanks

      P Offline
      P Offline
      Pavlos Touboulidis
      wrote on last edited by
      #2

      Ok. Here's a quick example. You should be able to figure out the rest. list *my_list; my_list = new list; my_list->value = 1234; my_list->next = new list; my_list->next->value = 5678; __asm { mov eax, my_list // eax = my_list; mov ebx, dword ptr [eax] // ebx = my_list->value mov ecx, dword ptr [eax+4] // ecx = my_list->next mov edx, dword ptr [ecx] // edx = ecx->value }

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups