flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > invalid symbol - macro |
Author |
|
rugxulo 29 May 2007, 01:22
I think the macro itself has to be defined before arg2 is. (Just an educated guess.)
|
|||
29 May 2007, 01:22 |
|
rkamarowski 29 May 2007, 11:47
the macro is defined first. it's part of an include file.
|
|||
29 May 2007, 11:47 |
|
vid 29 May 2007, 12:20
macro looks allright. show us code that uses that macro.
i bet you are doing this: Code: strCat myString, "abcde" so arg="abcde", and it results to Code: push "abcde" |
|||
29 May 2007, 12:20 |
|
rkamarowski 29 May 2007, 12:44
format PE console
include 'include/win32ax.inc' SYSTEM equ win32 include 'include/fasmlib/include/fasm/fasmlib-src.inc' include 'k2mMacros.inc' include 'k2mProcedures.inc' include 'k2wMacros.inc' PROMPT equ 'k2-m> ' TEMP_SIZE = 512 TEXT_SIZE = 1024 .data k2ExitCode db '0',0 ;used when exiting - '0' no error, 1 - error _char db 'char: ',0 _error db 'fasm error: ',0 _prompt db 'k2-m> ',0 x1 db '',0 x dd 'i',0 ;temporary storage that can be reused x2 dd '/',0 IncludeIData IncludeUData text rb TEXT_SIZE .code start: ; initialize modules initialize beginLoop: ; display prompt emit _prompt ; get single character getChar x push [x] call isAlpha jc endLoop ; concatenate string strCat x,_cat ; display string emit [x] endLoop: ; unititialize modules unInitialize ; exit without error exitProcess k2ExitCode exp: expected [x] .end start fasmError: ; eax holds fasmError code ; ebx = text of fasmError code in eax push eax call err.text mov ebx,eax ; display 'Error: ' push _error push stream.stderr call text.write ; display fasmError message push ebx push stream.stderr call text.write ; unitialize modules unInitialize ; exit with code '1' mov [k2ExitCode],1 exitProcess k2ExitCode ][/code] |
|||
29 May 2007, 12:44 |
|
vid 29 May 2007, 13:31
well... where is the problem? The symbol "_cat" is not defined. Exactly what error message says.
|
|||
29 May 2007, 13:31 |
|
rkamarowski 29 May 2007, 13:35
talk about obvious! that was it. my apologies for not being more thorough. sometimes i can't see the forest for the trees...
bob k. |
|||
29 May 2007, 13:35 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.