nasm assembly language, add two arrays slot by slot, into a third array, REAL NUMBERS

working on a 32bit architecture and i'm adding two arrays together slot by slot into a third array so if I have 3,4,4 and 4,4,4 in the arrays the third array should contain 7,8,8 at the end of the function

I was able to pass in the arrays correctly and the amount of items into the function arleady, i know this because I ran test code

now i'm working on the addition part of it, here is what I have, the logic makes sense to me but it's still seg faulting...ideas?

;*************************************ADD ARRAY**********************************************
segment .bss
segment .data
summessage db "The Sum is: ", 0
segment .text
extern readdouble,print_string, read_int, writedouble, print_nl, print_int
global addarray
mov edi, 0 ;initialize counter to 0
mov ecx, 0 ;zero out ecx and edx
mov edx, 0

mov ebx, [esp+48] ;moves starting location of array1 into ebx
mov edi, [ebp+40] ;move quantity into edi
mov ebp, [esp+60] ;move the starting location of array2 into ebp

mov esi, [esi] ;move starting locatino of array3 into esi

;mov ecx, [ebp]
;mov edx, [ebp+4]
;call writedouble
;call print_nl


fld qword [ebx] ;The second input is now in a floating point register, specifically st0.
fld qword [ebp]

fadd ;The first input is added to the second input and the sum
;replaces the second input in st0

fstp qword [ecx] ;copy top of stack onto ecx
mov ecx,[ecx]
mov edx,[edx+4]

mov [esi], ecx
mov [esi+4], ecx
add esi, 8 ;increment to the next loaction of esi

add ebx,8 ;increment location of ebx to the next floating point value of array1
;add ebp,8 ;increment location of ebp to the next floating point value of array2

dec edi ;increment counter

cmp edi, 0 ;compare to see if all values have been added
jz add_done
jmp add_loop

Merge two arrays into a third array

I would very much appreciate if someone would aid me with a hint.My problem is as follows :read two arrays of chars and merge them into a third array like so :ARR1 :123abcARR2: rt678ioglARR3:1r2t36a7b8cioglThe problem must be solved without pointers and string.hBasically Im stuck at the the above me ...

NASM assmebly language, addition of 2 arrays, and store into 3rd

my program needs some tweaking,so far it reads in 6 values then stores them into array1, then reads in another 6 and stores them into array 2then i initialiaze array3 to store the sums of array1 and array2,but i get a segmentation fault in my add function i believeany suggestions guys?I know my esp+ ...

allocating elements - arrays in Mips assembly language

all, I have a two dimensional array which looks like A: .byte 'A','B','C','D' .byte 'E','F','G','H'but I would like to make each element fit two characters e.g .byte "8C","9A" ...etchow to allocate 2 byte for each element to make it hold two characters? ...

Compiling assembly language in a VC++ program

Sorry to double post but about a week ago I asked this question ( on the Assembly language forum. Unfortunately, not many people seem to answer (or even ask) questions there. Can anyone offer any help with this problem? ...

Assembly language help

The given question is below. Write two (2) ARM assembly language subroutines, called output_character and read_character. These subroutines will allow a user to enter a character and display the character in PuTTy via the UART. All user input should be echoed back to the display.The following ARM as ...

beginning assembly language, need help

so i'm taking an intro computer organization class and we're learning assembly language right nowone of our first labs is to create a program that will ask for an encryption key and a message to be encrypted, and using an algorithm we are supposed to output the encrypted message. i have two question ...

Assembly Language (1 Error)

Problem was not solved in time :(Delete thread :) ...

Assembly Language Error

I have written the following code which is supposed to add up all the numbers in the array and print out the sum:.text.globl mainmain:la $t0,arraylw $t1,countloop:lw $t2,($t0)add $t3,$t3,$t2add $t1,$t1,-1bneq $t1,loop # Error hereend:la $a0,ans1li $v0,4syscallmove $a0,$t3li $v0,1syscallla $a0,end1li ...

Assembly Language MIPS

Just a very quick question:What does the following line of code mean/do?lb $t0,str($t1)I am just unsure about the bracket. ...

Assembly Language stack issue

I'm trying to use stacks in this fibonacci program and I'm not doing it right and looking for suggestions because if i comment out the push/pop statements it still writes to the string correctly but if i push a different register it changes the output....or am i already doing it correctly? c ...

VAX Assembly Language - Do While

I'm trying to do a basic do while loop in VAX, here is a basic example of what I mean in C++ do { cout << "enter a number :\n";cin >> input;}while input>=0 && input<=100EDIT ::: Nevermind, I figured it out..Might not be the most effiecent way but LOOP:TSTW XBLSS D ...

Learning Assembly Language

I've read a few different articles about the pros and cons of learning Assembly Language; most notably regarding the potential benefits in code efficiency, and also the increased level of expertise required to really use it to its full potential.Just wondering whether anybody out there can tell me w ...

Assembly Language: delete string in the file

I'm trying to write a program that can ask user to enter a string and then search for that string, delete the string and redisplay the data with the string deleted, or a message indicating that the string was not found. so far i can display the file on the screen, but have no idea how to delete the ...

Assembly Language: Guidance on a 32-bit character program

I'm stuck in thick fog. Can anyone guide my group and I on a project that we have.It's a 32-bit character program for reading and writing in protected mode that returns strings and characters. Can anyone be a guiding light? ...

Assembly Language

My program as follows in assembly and what i have learn and what i have not so help is needed here to make it work.section .datadata_items:.string "Mytest\n".section .text.globl _start_start:movl $0, %eaxmovl $data_items, %ebpmovl %ebp, %eaxmovl $11, %eaxmovl $80, %edxmovl $data_items, %ed ...

Assembly language program help

I need to create two procedures: (1) SetColor receives two BYTE parameters: forecolor and backcolor. It calls the SetTextColor procedure from the Irvine32 library. (2) WriteColorChar receives three byte parameters: char, forecolor, and backcolor. It displays a single character,using the color attrib ...

Assembly language program

Question:Create two procedures: (1) SetColor receives two BYTE parameters: forecolor and backcolor. It calls the SetTextColor procedure from the Irvine32 library. (2) WriteColorChar receives three byte parameters: char, forecolor, and backcolor. It displays a single character, using the color attrib ...

Find minimum value using 68000 assembly language

Write an assembly program to find the minimum value from N unsigned numbers, - The N unsigned numbers are stored in memory location starting from $4008- Each unsigned number occupies one word- N is a long word stored in memory location $4000- Store the minimum value in memory location $4004.Thx all ...

Assembly language problem, Renaming a file

I have an assignment to do...that is to create a file, input some string, rename the file and display the contents. well creating a file, inputing a string into the file and display the contents is working file. But I am not able to rename the file. I have developed procedures for each of these and ...

Need help with assembly language question

HelloI need help with an A level computing exam that is coming up very soon.Sometimes in the exam students are asked to write some assembly language code. A typical question is:Using the trace table below write the assembly language equivalent of the following:X=0 While Not (x = 999)Do x = x + 1End ...

Assembly Language Question

I am writing a program in assembly language and need help. I am given two 16 bit integers that represent a candidate and a reference respectively. The object is to see if the candidate and the reference are equal. The 16 bit integer represents eight colors around a square and the graphical represent ...

Structures in assembly language

I've been in a class on assembly programming recently, and I wrote the following piece up in response to a question from another student. I thought it might be worth posting here, as I know that we get questions along these lines from time to time, and it might be useful even for those who aren't do ...

Assembly Language beginner question.

Hi. I've been learning assembly languages for a couple weeks with Kip Irvine's book, and I was working on one exercise program and I could never figure out why program was doing this.It starts like....dataarray2 WORD 10, blah, blah, blah, blahindex WORD 0.codemain PROCmov bp, indexmov ax, array2[ bp ...

Impossible assembly language question

Kind folks,I don't know assembly language, but need to get an old app to compile (VC++ 6.0, SP5, MASM 6.11).There are a bunch of "ALIGN 16" statements that throw errors during compile time."error A2189: invalid combination with segment alignment : 16"Not sure what my course of ac ...

Need help about assembly language

This is knapsack programme that I will send to teacher.I write this program and can compile but when I run it has that I don't understand.please help me to solve this ploblem in line between call waitMsg.Thank you.INCLUDE byte 11,8,7,6,5found byte "The correct combination ...

Mathematical Assembly Language Program (Help).

I'm writing assembly language code to run this pseudocode:*************************************************** * This program will run the structure: * * * * while (a <= 10) * * { * * if ((a +b) >= c) * * { * * a = a - b * * c = c - 1 * * } * * else * * { * * a = a + b * * c = c + 1 * * } * * c ...

how to use assembly language

can anyone tell me how to use assembly language to get mac id in c++??see that,i have to use cpuid instruction or bit of assembly code in program...if i use cpuid instrcution,is there any other requirements for the system??how can i check whether the system supports or not??if anyone can provide as ...

Plz tell, urgent(Assembly language)?

How can we get our name in reverse order in a Assembly language, like Maria...airam..plz write the code. ...

Assembly Language

Does anybody know if I can do assembly languages on RH 9 like it using TASM & MASM on Windows? ...