![]() |
|
#1
|
|||
|
|||
Error A2070: invalid instruction operands; Find the sum and average for trapeziod arrays.
area_stats macro areas, len, asum, aave local asum_lp mov cx, len lea bx, areas mov asum, 0 asum_lp: mov ax, word ptr[bx] add asum, ax add bx, 2 dec cx cmp cx, 0 jg asum_lp mov ax, asum mov dx, 0 div len mov aave, ax endm This is the envocation of the macro- trap_areas height1, a_side1, c_side1, len1, areas1 These are the data declarations- a_side1 db 10, 15, 10, 13, 14, 17, 10, 6, 13, 11 b_side1 db 15, 2, 13, 6, 12, 16, 7, 12, 10, 12 c_side1 db 11, 12, 3, 9, 7, 6, 17, 6, 1, 5 height1 db 4, 12, 11, 3, 8, 12, 14, 13, 18, 9 areas1 dw 10 dup (?) perims1 dw 10 dup (?) len1 dw 10 asum1 dw ? aave1 db ? psum1 dw ? pave1 dw ? These are the errors the assembler gives me. I am using MASMv6. asst5.asm(225) : error A2070: invalid instruction operands area_stats(15): Macro called from asst5.asm(225): main line code I have 5 of these when i try to assemble. Any help would be greatly appreciated. |
|||
|
#2
|
|||
|
|||
Re: new to assembly, trying to get macros to workI would like to help but I have not used masm yet.
Is that masmv6 assembler part of Visual Studio or is it separate? Does it come with XP Home? Do you use it on the command line or IDE? |
|
#3
|
|||
|
|||
Re: Error A2070: invalid instruction operandsAre you saying that this is the invocation at line 225?:
CPP / C++ / C Code:
CPP / C++ / C Code:
The number of args don't match either. |
Recent GIDBlog
Problems with the Navy (Chiefs) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 32 bit assembly code doesn't work on 64 bit | vikramaditya | Assembly Language | 1 | 08-Jan-2009 17:49 |
| Mixing C and assembly in x86 - Makefile nuances | aijazbaig1 | Assembly Language | 3 | 23-Apr-2008 09:29 |
| Random access files | Krazy_yA | C Programming Language | 6 | 07-May-2006 02:44 |
| How do web redirection scripts work? | rhino1616 | Web Design Forum | 9 | 27-Oct-2003 10:47 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The