flat assembler
Message board for the users of flat assembler.
Index
> Main > Hi,Man! Please help compile: \fasmg\examples\avr\counter.ASM Goto page 1, 2 Next |
Author |
|
l_inc 02 Jan 2016, 13:55
I'm not much into fasmg, but it seems to be a bug. fasmg has stopped being able to process single quotes as a part of a number.
While checking this I noticed another bug. fasmg is unable to process OS-specific paths correctly: in order to compile counter.asm in linux one needs to replace backslashes with forward slashes in the include argument. _________________ Faith is a superposition of knowledge and fallacy |
|||
02 Jan 2016, 13:55 |
|
uor99 03 Jan 2016, 06:59
Thanks for your reply.
FASMG.EXE also failed to compile : ;============================= format ELF executable entry start segment readable executable start: mov r0,0 add r1,pc,hello-$-8 mov r2,hello_len swi 0x900004 mov r0,6 swi 0x900001 hello: db 'Hello world',10 hello_len=$-hello segment writeable ;============================= |
|||
03 Jan 2016, 06:59 |
|
Tomasz Grysztar 03 Jan 2016, 16:15
l_inc wrote: I'm not much into fasmg, but it seems to be a bug. fasmg has stopped being able to process single quotes as a part of a number. l_inc wrote: While checking this I noticed another bug. fasmg is unable to process OS-specific paths correctly: in order to compile counter.asm in linux one needs to replace backslashes with forward slashes in the include argument. |
|||
03 Jan 2016, 16:15 |
|
Tomasz Grysztar 03 Jan 2016, 16:19
uor99 wrote: Thanks for your reply. |
|||
03 Jan 2016, 16:19 |
|
uor99 04 Jan 2016, 07:36
Thanks for Tomasz Grysztar !
OK. I will try to implement some macroes to compile it by myself. |
|||
04 Jan 2016, 07:36 |
|
Tomasz Grysztar 04 Jan 2016, 15:49
uor99 wrote: OK. I will try to implement some macroes to compile it by myself. As for the "format ELF executable", you could re-use the ELF executable formatter macros I created for x86 (I used them for fasmg Linux version self-hosting). They reside in fasmg/examples/x86/elfexe.inc - to adapt them to ARM at least the contents of "e_machine" field would need to be changed (creating another property in ELF.Settings for this purpose might be a good idea - I think I may add it myself). And this is only for direct ELF executable output, I haven't yet made macros for ELF object formatting (but I may do it so that I can make libc version self-hosting too). |
|||
04 Jan 2016, 15:49 |
|
l_inc 04 Jan 2016, 17:35
Tomasz Grysztar
Quote: I still plan to try out my "stability counter" idea for an additional operator I don't think there's a necessity in a special operator. If I understand this correctly you want to provide an operator, which would bring up internal operation details of the assembler (multiple passes and value prediction/stabilization algorithms) to the interface instead of creating high-level rules that would persist independently on the ways the assembler finds the solution. This is pretty much what I've been talking about in the topic you referenced, and what you subsequently elaborated by showing an extended condition to be satisfied by the assembler that guarantees no infinite oscillation. I see the problem as being just about finding a good high-level condition. It doesn't need explicit intra-pass specific checking and pass count control that you wanna legitimize by providing the additional special-purpose operator. _________________ Faith is a superposition of knowledge and fallacy |
|||
04 Jan 2016, 17:35 |
|
Tomasz Grysztar 04 Jan 2016, 18:21
l_inc wrote: Tomasz Grysztar |
|||
04 Jan 2016, 18:21 |
|
l_inc 04 Jan 2016, 20:56
Tomasz Grysztar
Quote: You may be right that any such feature would automatically be narrowing down the general concepts of fasm's language to specific implementation. Well, I have the opposite opinion on the number formats. Especially with respect to the floating point numbers, when supported and acceptable precision ranges constrain the way a programmer carries out the calculation. _________________ Faith is a superposition of knowledge and fallacy |
|||
04 Jan 2016, 20:56 |
|
Tomasz Grysztar 04 Jan 2016, 22:28
As opposed to binary integers, with floating point numbers I cannot have unlimited precision, so that created a real problem in defining the feature. As it was in fasm 1 the internal precision is chosen so that it is larger that any of the supported formats that the number can be converted to, but in case of fasm g it is no longer transparent as it was in fasm 1 where no operations on such numbers could be performed. But as I'm not aware whether the floating point calculations of fasm g may actually be useful for anything other than basic purposes, I decided to stick to the "precision and range at least as high as" declaration in manual and nothing more. You can also adjust the precision by altering the single constant in fasm g sources.
|
|||
04 Jan 2016, 22:28 |
|
l_inc 04 Jan 2016, 22:58
Tomasz Grysztar
Quote: But as I'm not aware whether the floating point calculations of fasm g may actually be useful for anything other than basic purposes I think it is if you add some more operations including exponentiation and co, as well as the trigonometry. First thing coming to mind is then precomputation of constant tables, such as the md5 lookup table. Another (probably less serious) thing I though of was bitmap generation. Like plotting functions or fractals. I saw here and had my own little implementation of the Mandelbrot fractal that could be made simpler with proper support for floating point calculations. Quote: You can also adjust the precision by altering the single constant in fasm g sources. Well, that's a nice thing to have. The implementation is then probably not as trivial. _________________ Faith is a superposition of knowledge and fallacy |
|||
04 Jan 2016, 22:58 |
|
Tomasz Grysztar 05 Jan 2016, 17:51
BTW, l_inc, are you still interested in proofreading the fasm g documentation, as you once declared?
|
|||
05 Jan 2016, 17:51 |
|
l_inc 05 Jan 2016, 20:42
Tomasz Grysztar
I am. As you are bringing this up, I conclude, you are going to make the 1.0 release soon. So what's the deadline? _________________ Faith is a superposition of knowledge and fallacy |
|||
05 Jan 2016, 20:42 |
|
uor99 06 Jan 2016, 07:39
I implemented the BIT as EQU. But I wonder there must be a better way.
;MY.INC struc BIT? value . = value end struc ; P00 EQU P0+0 P01 EQU P0+1 P02 EQU P0+2 P03 EQU P0+3 P04 EQU P0+4 P05 EQU P0+5 P06 EQU P0+6 P07 EQU P0+7 ;=========== ;TEST.ASM LED BIT P02 |
|||
06 Jan 2016, 07:39 |
|
uor99 06 Jan 2016, 07:48
Tomasz Grysztar
Did you have some macros to compile MSP430/MSP432 in FASM ? |
|||
06 Jan 2016, 07:48 |
|
Tomasz Grysztar 06 Jan 2016, 10:59
uor99 wrote: I implemented the BIT as EQU. But I wonder there must be a better way. You can define it as a symbolic constant with fasm's DEFINE directive (also the built-in EQU directive defines symbol of this kind, but 8051.INC redefines EQU to work like =, to make it work similar to classic assemblers). Such declaration defines a text that is substituted for the variable when it is used. Code: struc BIT? value define . value end struc LED BIT P0.2 CLR LED If you wanted to make BIT with more rigorous syntax checking, you could use the construction similar to "bitaddr" macro used internally by 8051 example macros: Code: struc BIT? value match any., value err "syntax error" else match base.index, value match any.other, base index err "syntax error" else define . base.index end match else match .any, value err "syntax error" else . = value end match end struc LED BIT P0.2 |
|||
06 Jan 2016, 10:59 |
|
Tomasz Grysztar 06 Jan 2016, 11:04
uor99 wrote: Tomasz Grysztar |
|||
06 Jan 2016, 11:04 |
|
Tomasz Grysztar 06 Jan 2016, 11:10
l_inc wrote: Tomasz Grysztar In addition to the syntax reference I also plan to write something like readme.txt that would explain contents of the package and how the fasmg can be re-assembled (including self-hosting). |
|||
06 Jan 2016, 11:10 |
|
uor99 12 Jan 2016, 08:43
How simple but powerful the fasmg is to implement BIT !
I do expect the shared space for macros . A new problem need your help : ;test.asm INCLUDE '8051.INC' RR A DA A flat assembler g version 0.97.1452517066 1.asm (89) macro RR [0] Error: extra characters on line. |
|||
12 Jan 2016, 08:43 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.