flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Dragontamer 05 Sep 2004, 04:38
Matrix wrote: Hy, i'd like to suggest u some features, I don't quite understand why not? Fasm is plenty fast, not to mention, macros can be redefined, right? Quote:
No no no no... How are macro to be redefined? If you have one macro, then the entire point of the "restore" macro is lost!! Ok, restore can be used with other stuff... But thats not the point. Quote:
why not just the main one? Possibly an FAQ, have you read the documentation? |
|||
![]() |
|
Matrix 05 Sep 2004, 05:16
Hy, sorry if my thoughts are not clear but i post an example what i mean:
file : "small.asm" org $100 include 'big.inc' int $20 now, when i compile this code, the whole inc file is parsed in to my little com file, and i didn't use anything of it, i hope u get the point. When useing a 100 byte set of routines from inc file, compiler should see if the code is used or not, and include if for example function used. on that macro thing i was just thinking of that: if someone like me wanted to use a macro in the whole asm file, not wanting to break usage of it, could put the macro definitions on the bottom of the code, really this doesn't mater much, just that: for example u have an inc file with macros and functions - in that case, you are forced to include anything on to the top of the code, and i don't know if someone has discovered that if you include a code with the include function, it will be compiled and inserted in that EXACT position, which means that many junk maj be compiled to the begining of the com file not just taking up space, but you even have to jump the code over if you don't want it to be executed immediately. if someone whould like to see an example after this i will make one and post it. and yes, i have read everything, and much beyond. MATRIX |
|||
![]() |
|
Dragontamer 05 Sep 2004, 05:42
The solution is quite simple.
Use a linker, like everyone else ![]() <edit> Only include macros, structures, defines, and actually, anything preprocessor material in include files </edit> Watch: You have 3 files. main.asm functions.asm functions.inc main looks like this: Code: format ELF include "function.inc" public main section '.text' main: call sub ret function.asm : Code: format ELF global sub section '.text' sub: mov eax, 5 ret Finally, function.inc Code: extrn sub Now you execute: fasm function.asm function.o fasm main.asm main.o ld main.o function.o This is the way C programmers handle it. And it works fine. If you want less typing, learn how to use a makefile or an IDE. Last edited by Dragontamer on 05 Sep 2004, 06:10; edited 1 time in total |
|||
![]() |
|
pelaillo 05 Sep 2004, 06:00
Matrix wrote: now, when i compile this code, the whole inc file is parsed in to my little com file, and i didn't use anything of it, i hope u get the point. If you have definitions, macros, structures, your com file will not be increased neither in a single byte because the include's contents don't go beyond preprocessor stage. If you have code snippets in your include file and you don't want unused code to be generated, you could use standard proc macro or equivalent. Quote: ...and i don't know if someone has discovered that if you include a code with the include function, it will be compiled and inserted in that EXACT position FASM do exactly what you expect because you write it that way. 100% control the EXACT position. Quote: and yes, i have read everything, and much beyond. Everything is such a big word... |
|||
![]() |
|
Matrix 08 Sep 2004, 02:10
org 256
int 20h rb $ffffff compiled ok org 256 int 20h rb $fffffff its out of memory ![]() the accurate limit was rb 41942625 on my machine +1 bytes meant not enough memory ![]() MATRIX |
|||
![]() |
|
Tomasz Grysztar 08 Sep 2004, 07:27
Use "-m" switch to adjust.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.