Results 1 to 2 of 2

Thread: Declare Double Arrays

  1. #1

    Thread Starter
    Hyperactive Member made_of_asp's Avatar
    Join Date
    Jul 2001
    Location
    123 Fake Street
    Posts
    394

    Declare Double Arrays

    Hi

    Is there a way to declare char** in Assembler? I need to create a split function.
    VS.NET 2003

    Need to email me?

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Declare? It all depends on how you interpret it.

    char **ptr;
    bring ptr[3][2] in al:
    Code:
    ; bring into ebx so we can use it
    mov ebx, DWORD PTR [ebp+$ptr]
    ; dereference: ebx = ebx[3]
    mov ebx, DWORD PTR [ebx+12]
    ; dereference: al = ebx[2]:
    mov al, BYTE PTR [ebx+2]
    Or a real 2d array:
    char ar[10][10]
    Code:
    ; create space:
    sub esp, 100
    ; access [4][3]
    mov ecx, 4
    ; not sure about this line
    mov al, BYTE PTR [esp+ecx*10+3]
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width