flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tommy 24 Apr 2004, 07:23
First request: use the file-directive...
![]() Cheers, Tommy |
|||
![]() |
|
Tomasz Grysztar 24 Apr 2004, 12:00
For the first one, look at the first question in FAQ.
For the second problem, I can propose the following solution: create few header files with the constant and macros declarations, and in your main file include a header this way: Code: include "%myheader%.inc" then in your batch you need to set MYHEADER variable to contain the name of header file you want to use, for example if you wanted to compile your source with HDR17.INC file as a header, you would do it this way: SET MYHEADER=HDR17 FASM INPUT.ASM OUTPUT.COM |
|||
![]() |
|
comrade 27 Apr 2004, 02:12
The latter feature using SET and INCLUDE crashes FASM like so:
test.asm: Code: include "%xyztest%.inc" test.inc: Code: nop build.bat: Code: @echo off
set xyztest=test
fasm.exe test.asm test.com Crash is in EXPRESSI.INC: Code: 15: mov al,[esi] 16: cmp al,1Ah 17: je expression_number 18: cmp al,22h 19: je expression_number 20: cmp al,'(' 21: je expression_number 22: mov al,11h 23: stos byte [edi] 24: or eax,-1 25: stos dword [edi] <--- HERE (access violation on [edi]) 26: jmp expression_number_ok It works in FASMW.EXE only if XYZTEST is defined in FASMW.INI in [Environment] section. But if it is defined using DOS "SET" command, FASMW.EXE also crashes in same spot. System is Windows 2000 Professional SP4 5.00.2195 If you specify a large memory settings (like -m16384) to fasm.exe, crash comes almost immediately. Otherwise, it waits a bit then crashes.
Last edited by comrade on 27 Apr 2004, 02:32; edited 5 times in total |
|||||||||||
![]() |
|
comrade 27 Apr 2004, 02:24
On Linux it does not work at all:
Code: -bash-2.05b$ set xyztest=test -bash-2.05b$ xyztest=test -bash-2.05b$ set BASH=/bin/bash MACHTYPE=i386-redhat-linux-gnu ... USER=comrade _= xyztest=test -bash-2.05b$ ./fasm test.asm test.com flat assembler version 1.52 test.asm [1]: include "%xyztest%.inc" error: file not found. |
|||
![]() |
|
Tomasz Grysztar 27 Apr 2004, 06:21
It was a bug that revealed itself only with some particular variable name and contents combinations - please check the updated 1.52 release.
|
|||
![]() |
|
comrade 28 Apr 2004, 02:06
Works fine now thanks. I think you forgot to update fasmw152.zip, it still has old preproce.inc.
|
|||
![]() |
|
Tomasz Grysztar 28 Apr 2004, 06:51
No, it's OK. Perhaps you had it cached or something like that.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.