Im having trouble translating this c++ program into pep8 assembly language
if someone could help with at least part of it, I would appreciatte it, it would be extremely helpful
thanks in advance

# include <iostream>
using namespace std;

int get1(int list[])
{
    int j;
    int n;
    cin >> n;
    for (j = 0; j < n; j++)
        cin >> list[j];
    return n;
}

void get2(int list[], int n)
{
    int j;
    for (j = 0; j < n, j++)
        cin >> list[j];
}

void max(int int list1[], int list2[], int list3[], int n)
{
    int j;
    for (j = 0; j < n; j++)
        if (list1[j] > list2[j])
            list3[j] = list1[j];
        else
            list3[j3] = list2[j];
}

void even(int list[], int n, int *p)
{
    int j;
    *p = 0;
    for (j = 0; j < n; j++)
        if (list[j] % 2 == 0)
            (*p)++;
}

void reverse(int list[], int n)
{
    int j;
    int temp;
    for (j = 0; j < n / 2; j++)
    {
        temp = list[j];
        list[j] = list[n - j - 1];
        list[n - j - 1] = temp;
    }
}

void put(int list[], int n)
{
    int j;
    for (j = 0; j < n; j++)
        cout << list[j] << ' ';
    cout << endl;
}

void main()
{
    int list1[6];
    int list2[6];
    int list3[6];
    int n;
    int num;
    n = get1(list1);
    cout << "n = " << n << endl;
    put(list1, n);
    get2(list2, n);
    put(list2, n);
    max(list1, list2, list3, n);
    put(list3, n);
    even(list3, n, &num);
    cout << "num = " << num << endl;
    reverse(int list3, n);
    put(list3, n);
}

if someone could help with at least part of it

You mean you want us the translate the entire program? What exactly do you mean by "last part"?

Comments
Hi, sorry for the confusion. I am having problems with all of the code, I'm teaching myself how to use assembly language by reading the theory from a book; and have not been very succesful. translating everything would be to much to ask, do I just need at

Hi, sorry for the confusion. I am having problems with all of the code, I'm teaching myself how to use assembly language by reading the theory from a book; and have not been very succesful. translating everything would be to much to ask, I just need at least some guidance in the translation. But Im specially having problem with code between lines 23 and 28. Thank you for help!

This article has been dead for over six months. Start a new discussion instead.