I had to write program which finds all negative elements in columns and calculates their average values and i had to do this with index addressing method. My code below:
Could someone help me fix my errors? I would be very thankful.Code:.model tiny .code .startup Org 100h Jmp Short Start Vector Dw 2, -7, -1, 16, -15 N Equ 5 Start: Xor Bx, Bx Xor Dx, Dx Xor Si, Si Mov Cx, N Dec Cx S: Mov Ax, Vector[Bx] Add Bx, 2 Cmp Ax, 0 Jge _next Inc Si Add Dx, Ax _next: Dec Cx Loop S AVG: Mov Ax, Dx Cwd Idiv Si



LinkBack URL
About LinkBacks


