would anyone be able to help me convert this c function to an assembler function? Any help would be greatly appreciated thanks.

void load(char x[][1000], int collum, int row, char ln)
{
   int i =0;
   int j =0;

   for( i = 0; i < row; i++ )
   {
      for( j = 0; j < collum; j++)
      {
         scanf("%c",&x[i][j]);
      }
      scanf("%c",&ln);
   }
}

I have gotten this far

%define maze ebp-24
%define collum ebp-20
%define row ebp-16
%define doorx ebp-12
%define doory ebp-8
%define trash ebp-4


section .data
outJ db "Jamie - Position(%d,%d): %c",0
infmt db "%d ",0
in_fmt db "%c",0

section .text
main:
enter 1024,0

lea ebx,[row]
push ebx
push infmt
call scanf
add esp,8

lea ebx,[collum]
push ebx
push infmt
call scanf
add esp,8

lea ebx,[doory]
push ebx
push infmt
call scanf
add esp,8

lea ebx,[doorx]
push ebx
push infmt
call scanf
add esp,8

lea ebx,[trash]
push ebx
push in_fmt
call scanf
add esp,8

leave

ret

global load
extern printf
extern scanf

%define row ebp+24
%define column ebp+20
%define doorx ebp+16
%define doory ebp+12
%define maze ebp+8
%define i ebp+4
%define j ebp-4
%define trash ebp-8
section .data
infmt db "%d ",0
in_fmt db "%c",0

load:
enter 8,0

lea ebx,[row]
push ebx
push infmt
call scanf
add esp,8

lea ebx,[column]
push ebx
push infmt
call scanf
add esp,8

lea ebx,[doory]
push ebx
push infmt
call scanf
add esp,8

lea ebx,[doorx]
push ebx
push infmt
call scanf
add esp,8

lea ebx,[doory]
push ebx
push infmt
call printf
add esp,8


mov dword,0
outer:
mov edi,
cmp edi,[row]
jge odone
mov dword[j],0
inner:

mov ecx,[j]
cmp ecx,[column]
jge idone

mov edx,[maze]
mov eax,[column]
mul edi
add eax,[j]

mov ebx,[edx+eax]
push dword [ebx]
push in_fmt
call scanf
add esp,8


idone:
push dword [trash]
push in_fmt
call scanf
add esp,8

odone:

leave
ret

please help me load this array!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.