flat assembler
Message board for the users of flat assembler.
Index
> Programming Language Design > On my new assembler Goto page Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Next |
Author |
|
Tomasz Grysztar 03 Feb 2017, 18:05
Turns out writing AVX2 macros went quickly. And AVX-512 ones are already underway.
|
|||
03 Feb 2017, 18:05 |
|
Tomasz Grysztar 06 Mar 2017, 14:29
The "hq7d2" release introduces a new variant of POSTPONE directive, invoked with "postpone ?" construction. The assembler refrains from processing such block until it has nothing else to do, so it is a good place for tasks like computing checksums or constructing and displaying summaries/listings, as it allows to avoid processing these things unnecessarily in the intermediate passes. I have modified the PE formatting macros so that they use this feature when computing PE checksum, and I made them compute checksum always, as fasm 1 did.
Note that it should not be recommended to use any values defined inside "postpone ?" block outside of it, as it may interfere with the resolving process and make things worse than when this feature was not used. I have also prepared a copy of fasmg repository that can be browsed online, for anyone interested. |
|||
06 Mar 2017, 14:29 |
|
Roman 07 Mar 2017, 06:12
My question how load 256 bits ?
MyVal dd 1.0,2.0,3.0,4.0,5.0,6.0,1.0,7.0 I write vmovups ymm1,[MyVal] but fasm get me error operand size do not match ! How say fasm i want load 256 bits in ymm1 from MyVal ? Use qqword ? vmovups ymm1,qqword [MyVal] |
|||
07 Mar 2017, 06:12 |
|
revolution 07 Mar 2017, 07:29
Roman: are you asking about fasmg or fasm?
|
|||
07 Mar 2017, 07:29 |
|
Tomasz Grysztar 07 Mar 2017, 07:41
Roman wrote: My question how load 256 bits ? Code: label MyVal:qqword dd 1.0,2.0,3.0,4.0,5.0,6.0,1.0,7.0 Code: label MyVal:32 |
|||
07 Mar 2017, 07:41 |
|
Tomasz Grysztar 08 Apr 2017, 23:16
With another update I've added macros for COFF output format and now all formats that are supported by fasm 1 are also available with "format" macro I made for fasmg. With this being complete I may now start thinking about implementing some formats that fasm 1 does not have. Mach-O perhaps?
|
|||
08 Apr 2017, 23:16 |
|
Trinitek 09 Apr 2017, 00:09
OMF?
|
|||
09 Apr 2017, 00:09 |
|
Tomasz Grysztar 09 Apr 2017, 07:25
Yes, that's another option, I even thought it could be combined with instruction set macros that would emulate the syntax of old DOS assemblers to assemble things like PC BIOS sources. It could be interesting, though perhaps only to a couple of people.
On the other hand Mach-O format is something that still haunts me, because I promised to implement it one day (but that was back when I thought that I would get a machine for testing) and I never even started it. And making an OS X version of fasmg and even fasm 1 might be a good idea. |
|||
09 Apr 2017, 07:25 |
|
Tomasz Grysztar 15 Apr 2017, 20:59
There are some updates to the assembler core. In version "hroxx" I have added the -I command line switch which is a very versatile variation on theme of defining symbols from command line. I've been planning this feature for a long time, but it took me a while to figure out how to best implement it.
And release "hrp59" brings fixes to two bugs that I discovered while testing my new Windows headers. Because fasmg allows macros to be forward-referenced, it is valid to start a source like this: Code: format PE GUI 4.0 entry start include 'win32w.inc' |
|||
15 Apr 2017, 20:59 |
|
shoorick 16 Apr 2017, 07:46
thanks for the -i switch!
there are some cases which I wish to be switchable except debug/release mode: sometimes I wish to include hex.inc, sometimes I don't, etc. _________________ UNICODE forever! |
|||
16 Apr 2017, 07:46 |
|
jacobly 13 Jun 2017, 09:22
I'm not sure if this is supposed to work, but it would be useful:
Code: macro a local b namespace b end namespace end macro a Defining b doesn't seem to help, it seems to always error on any macro it encounters after opening the namespace. |
|||
13 Jun 2017, 09:22 |
|
Tomasz Grysztar 13 Jun 2017, 09:29
jacobly wrote: I'm not sure if this is supposed to work, but it would be useful: |
|||
13 Jun 2017, 09:29 |
|
jacobly 12 Jul 2017, 13:59
Is there a reason for not being able to use irpv on variables defined with =? I did notice you can do:
Code: while defined symbol ; use symbol restore symbol end while but that is backwards, destructive, and can't use indx. There's also a method using a repeat after every assignment: Code: a =: 0 repeat 1, x:a list equ x end repeat a =: 1 repeat 1, x:a list equ x end repeat a =: 2 repeat 1, x:a list equ x end repeat irpv elt, list repeat 1, x:elt display `x, 10 end repeat end irpv but that seems overly verbose when it seems like irpv could just do the same thing as repeat. After some more tests I realized that repeat is already reasonably restricted to constant polys, but "Error: value of type not allowed in this context." does indeed seem reasonable for non-constant polys encountered during irpv, just not for constant ones. |
|||
12 Jul 2017, 13:59 |
|
Tomasz Grysztar 12 Jul 2017, 19:37
jacobly wrote: Is there a reason for not being able to use irpv on variables defined with =? |
|||
12 Jul 2017, 19:37 |
|
jacobly 13 Jul 2017, 01:46
That makes sense, I was just hoping that it could be done in the same way that repeat 1, x:1 manages to create a parameter x that substitutes to `x = "1".
On an unrelated note, I was having problems understanding and debugging multiple pass issues, so I ended up creating a debug version of fasmg that outputs the display buffer every pass (usually with a small pass limit < 10 or so). This was so invaluable that I was thinking maybe it could be added as a command line argument. |
|||
13 Jul 2017, 01:46 |
|
Tomasz Grysztar 13 Jul 2017, 14:22
jacobly wrote: That makes sense, I was just hoping that it could be done in the same way that repeat 1, x:1 manages to create a parameter x that substitutes to `x = "1". jacobly wrote: On an unrelated note, I was having problems understanding and debugging multiple pass issues, so I ended up creating a debug version of fasmg that outputs the display buffer every pass (usually with a small pass limit < 10 or so). This was so invaluable that I was thinking maybe it could be added as a command line argument. |
|||
13 Jul 2017, 14:22 |
|
jacobly 26 Jul 2017, 07:42
The libc version of fasmg crashes due to a corrupted heap because "ccall getenv,esi" can clobber ecx.
|
|||
26 Jul 2017, 07:42 |
|
Tomasz Grysztar 26 Jul 2017, 09:42
Thank you. I have not tested this version much.
|
|||
26 Jul 2017, 09:42 |
|
Tomasz Grysztar 27 Jul 2017, 18:15
jacobly wrote: That makes sense, I was just hoping that it could be done in the same way that repeat 1, x:1 manages to create a parameter x that substitutes to `x = "1". Now you can use IRPV to iterate through all kinds of values (it is never going to give an error). When a given value is not symbolic, there are two cases. When the value is a plain positive number, the parameter works similarly to the counter of REPEAT and it contains a text with decimal digits. For any other kind of value a proxy variable is created, and the parameter contains the identifier of this variable - which is simply the "." identifier equipped with appropriate recognition context. You may try it out with the hvic8 version. |
|||
27 Jul 2017, 18:15 |
|
Goto page Previous 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.