English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 04 November 2010, 08:30   #21
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,359
Quote:
Originally Posted by phx View Post
BASEREG and ENDB were not supported before V1.4. So I don't know how you got it to accept basereg at all with 1.3c?
Well, i saw it didn't work on 1.3c and i read the docs, which said that BASEREG label needed to be defined prior to the basereg. Probably the docs applied to 1.4

But does it work properly now ?

Also, does it support __CPU define ? 1.3c didn't and it's useful to make adaptative code.
meynaf is online now  
Old 04 November 2010, 10:51   #22
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,552
Quote:
Originally Posted by meynaf View Post
Well, i saw it didn't work on 1.3c and i read the docs, which said that BASEREG label needed to be defined prior to the basereg. Probably the docs applied to 1.4
Yes, but the docs never said that. There is just a hint that it is up to the programmer to load the base address register with the correct value, before using BASEREG, which should be obvious.

Quote:
But does it work properly now ?
Absolutely. Even better than with PhxAss, because any kind of complex expression is allowed in the BASEREG directive, not just a label.

Quote:
Also, does it support __CPU define ? 1.3c didn't and it's useful to make adaptative code.
No, it didn't. I just added that for V1.5 (needs PhxAss-compatibility mode).
phx is offline  
Old 04 November 2010, 12:12   #23
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,359
I'm eager to test V1.5 then !

Can't you make (pre-)1.5 binaries available for testing ?
meynaf is online now  
Old 04 November 2010, 13:41   #24
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,552
I have just committed my modifications since yesterday morning. Now every optimization has got its own flag, which should fix the problem which Leffmann described. This created the following new features:
- Full and exact Devpac3 optimization support
- Devpac OPT O3 .. O12 is supported
- New optimization: <op>.L #x,An --> <op>.W #x,An (O12)
- New optimization: LEA (d,An),An --> ADDQ/SUBQ #d,An (O11)

And it creates the PhxAss-specific __CPU, __FPU and __MMU symbols, which Meynaf suggested.

The next daily snapshot will be automatically created during the following night and it available tomorrow morning under: http://sun.hasenbraten.de/vasm/daily/vasm.tar.gz

Testing this beta version and reporting problems (preferably by email) is much appreciated.
phx is offline  
Old 07 November 2010, 09:06   #25
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,359
This is source release only. I'll see if i can compile that, but including an AOS executable would be good for me

Anyway i tested v1.4f binary and here is my report (from just uperficial testing) :
. found no equivalent to phxoptions
. i've found no command line option to prevent symbols from being present in the object file (only way is to write "opt d-" in source)
. file a.out is written by default ; no option in a config file to make it output myprog from myprog.s, like phxass does (or i didn't find it)
. phxass is able to turn tst.x myvar into tst.x myvar(pc) when in 020+ mode ; vasm isn't (at least by default)
. when an error is found, phxass wrote the offending line's contents with the error message, but vasm doesn't and this is painful
. 9 macro arguments are too few ; phxass supported many more and it would be clever to keep it this way (at least in phxass mode)
. phxass report saying pass 1, pass 2, # of symbols, sections lengths... was much more practical than just outputting the name of used modules
. vasm rejects accentuated characters in symbols ; phxass accepted them - besides, "illegal characters in label" would speak more than "illegal operand types"
. vasm locks input source files while processing, phxass didn't and it allowed to write the source back while the previous version is assembling (this may seem a detail, but i often do that when fixing errors)
. bss_c directive leads to "unknown mnemonic" ; this worked fine on phxass
meynaf is online now  
Old 07 November 2010, 16:33   #26
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,552
Quote:
Originally Posted by meynaf View Post
Anyway i tested v1.4f binary and here is my report (from just uperficial testing) :
Thanks a lot for your feedback!

Quote:
. found no equivalent to phxoptions
The concept of a PHXOPTIONS environment is quite PhxAss-specific and not very portable. I do not plan to do a 100% clone of PhxAss or DevPac, but to support old sources with vasm as best as I can.
I don't think I will support that in vasm.

Quote:
. i've found no command line option to prevent symbols from being present in the object file (only way is to write "opt d-" in source)
-nosym
Maybe you didn't find the option in the docs, because it is under general assembler options, not M68k-specific?

Quote:
. file a.out is written by default ; no option in a config file to make it output myprog from myprog.s, like phxass does (or i didn't find it)
a.out is the default in most portable (Unix) assemblers. I won't change that. Just use -o.

Quote:
. phxass is able to turn tst.x myvar into tst.x myvar(pc) when in 020+ mode ; vasm isn't (at least by default)
You're right! Caused by swapped positions in the opcode table. Fixed!

Quote:
. when an error is found, phxass wrote the offending line's contents with the error message, but vasm doesn't and this is painful
I cannot easily provide the source line, as vasm is already done with parsing at this point and no longer uses the source.
It could be done with some effort, but I doubt that it is worth that. You will have to enter the editor and look at the reported line number anyway.

Quote:
. 9 macro arguments are too few ; phxass supported many more and it would be clever to keep it this way (at least in phxass mode)
I had enabled 35 arguments for Devpac-mode only. I didn't do that for PhxAss-mode, because PhxAss supports escape codes in strings (e.g. "\n") as vasm does, so the arguments from \a to \z would conflict with the escape codes.
But ok, I made that as confusing as in PhxAss now (-phxass only).

Quote:
. phxass report saying pass 1, pass 2, # of symbols, sections lengths... was much more practical than just outputting the name of used modules
Others say that an assembler shouldn't output anything, when there was no problem. That's personal taste.
If you want some more information about vasm's output, let it generate an output file in "test" mode (without any -F option) and look into it. vasm also supports listing files.

Quote:
. vasm rejects accentuated characters in symbols ; phxass accepted them
This is a very good thing. IMHO. Never use any strange characters in symbols names, and fix your old sources!
You cannot use accents in C variables either.

Quote:
- besides, "illegal characters in label" would speak more than "illegal operand types"
Maybe this is not easily to determine for the parser at that point. It just gets half of an operand, because parsing stopped at the illegal character.
I agree some error messages could be more friendly, but that is not a priority for V1.5.

Quote:
. vasm locks input source files while processing, phxass didn't and it allowed to write the source back while the previous version is assembling (this may seem a detail, but i often do that when fixing errors)
Right. That's a bug! I forgot to close the files after reading them. Fixed.

Quote:
. bss_c directive leads to "unknown mnemonic" ; this worked fine on phxass
Ok. I implemented code_c, code_f, data_c, data_f, bss_c and bss_f now.
phx is offline  
Old 11 November 2010, 10:16   #27
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,359
Quote:
Originally Posted by phx View Post
The concept of a PHXOPTIONS environment is quite PhxAss-specific and not very portable. I do not plan to do a 100% clone of PhxAss or DevPac, but to support old sources with vasm as best as I can.
I don't think I will support that in vasm.
I'm not asking for phxoptions compatible support, but a config file for default options would be handy.

Quote:
Originally Posted by phx View Post
-nosym
Maybe you didn't find the option in the docs, because it is under general assembler options, not M68k-specific?
You guessed well ;-)
On the other hand, these .texi aren't as easy to use as the good old amigaguide doc...

Quote:
Originally Posted by phx View Post
a.out is the default in most portable (Unix) assemblers. I won't change that. Just use -o.
It's still practical to have this option somewhere. Say, like in a config file

Quote:
Originally Posted by phx View Post
I cannot easily provide the source line, as vasm is already done with parsing at this point and no longer uses the source.
It could be done with some effort, but I doubt that it is worth that. You will have to enter the editor and look at the reported line number anyway.
Yes, but with the output line you see what's wrong immediately.
Imagine you have several undefined symbols. With the output line you see what they are and when the same one comes twice you don't waste your time in looking twice in the source.
For me this option is an absolute necessity and i will not use any asm which doesn't have it.

Quote:
Originally Posted by phx View Post
I had enabled 35 arguments for Devpac-mode only. I didn't do that for PhxAss-mode, because PhxAss supports escape codes in strings (e.g. "\n") as vasm does, so the arguments from \a to \z would conflict with the escape codes.
But ok, I made that as confusing as in PhxAss now (-phxass only).
In my opinion escape codes weren't really a good idea
Good thing you have an option to disable them now.

Quote:
Originally Posted by phx View Post
Others say that an assembler shouldn't output anything, when there was no problem. That's personal taste.
If you want some more information about vasm's output, let it generate an output file in "test" mode (without any -F option) and look into it. vasm also supports listing files.
This doesn't replace the simple report, which can be made optional.

Quote:
Originally Posted by phx View Post
This is a very good thing. IMHO. Never use any strange characters in symbols names, and fix your old sources!
You cannot use accents in C variables either.
They are not strange characters. They are accents, they were valid in phxass and this is a good thing and i see no reason why they shouldn't be allowed. The fact C doesn't allow them isn't a good reason ; C just sucks in many syntax aspects you know

Quote:
Originally Posted by phx View Post
Maybe this is not easily to determine for the parser at that point. It just gets half of an operand, because parsing stopped at the illegal character.
I agree some error messages could be more friendly, but that is not a priority for V1.5.
Yes, some messages could be more friendly. Even though it's not a priority, this kind of information may be more difficult to add later so if i were you i'd take care of that now.
meynaf is online now  
Old 12 November 2010, 02:46   #28
matthey
Banned
 
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
@meynaf

It is possible to make a script (AmigaDOS or ARexx) for vasm that has the CLI options you want. I use an ARexx script for CED to assemble with basic options. It's in this archive along with a version of vasm I compiled from yesterday's sources...

http://www.heywheel.com/matthey/Amiga/vasm.lha

I prefer to put most options in the .asm file itself. That way I always know what options I assembled with for that .asm file. If I distribute the file then they know too. It might be nice to have a GUI to select and add the options to the beginning of the assembler file and a fancy editor that goes to the line of an error but we might have to wait for vasm 3 or 4 for that .

The message I don't like is "abs.l -> abs.w" which I would prefer to be "(xxx).l -> (xxx).w". I think of an absolute value function (Natami may get integer abs) when I see this optimization message. The (xxx).size representation is used in the Programmer's Reference Manuals. I do prefer the lower case though as it's easier to read but it's not to the Motorola/Freescale standard.

Last edited by matthey; 12 November 2010 at 04:09.
matthey is offline  
Old 12 November 2010, 14:27   #29
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,552
Quote:
Originally Posted by meynaf View Post
Yes, but with the output line you see what's wrong immediately.
Imagine you have several undefined symbols. With the output line you see what they are and when the same one comes twice you don't waste your time in looking twice in the source.
For me this option is an absolute necessity and i will not use any asm which doesn't have it.
Ok, done. Now the respective source text line is shown below an error message.
But I won't indicate the exact error position in such a line!

Quote:
This doesn't replace the simple report, which can be made optional.
Ok. Now you get a short report about sections and their size, as long as -quiet wasn't specified.
phx is offline  
Old 15 November 2010, 08:34   #30
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,359
Quote:
Originally Posted by matthey View Post
@meynaf

It is possible to make a script (AmigaDOS or ARexx) for vasm that has the CLI options you want. I use an ARexx script for CED to assemble with basic options. It's in this archive along with a version of vasm I compiled from yesterday's sources...

http://www.heywheel.com/matthey/Amiga/vasm.lha
A script ? Now it will call the Execute command and leave temporaries in RAM: every time. No, sincerely, a config file for default options is a must have. It does not need to be phxass compatible at all.

But this is giving me an idea. Perhaps a wrapper program will do the trick

Quote:
Originally Posted by matthey View Post
I prefer to put most options in the .asm file itself. That way I always know what options I assembled with for that .asm file. If I distribute the file then they know too.
As i'm reusing the very same includes over and over, it might be good to put the options there... apart that they may sometimes change and the include directory where it lies must be specified at command line and it's a pain.

Quote:
Originally Posted by phx View Post
Ok, done. Now the respective source text line is shown below an error message.
But I won't indicate the exact error position in such a line!
Indicating the exact error position isn't needed. But an output similar to phxass one is a very good thing. Thanks.

Quote:
Originally Posted by phx View Post
Ok. Now you get a short report about sections and their size, as long as -quiet wasn't specified.
Good
meynaf is online now  
Old 11 December 2010, 02:08   #31
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Just want to say that phx released vasm 1.5 and vlink 0.13 a week ago, since he forgot to mention it himself here. Great update, thanks a lot!
Leffmann is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
EAB Linux RFC gilgamesh request.Other 16 25 April 2014 04:19
vasm and word alignment Den Coders. Asm / Hardware 9 07 February 2014 11:25
Help linking VASM object code clenched Coders. Asm / Hardware 2 24 May 2013 22:32
vasm fsincos dalton Coders. Asm / Hardware 4 03 September 2012 10:35
RFC: SPS/CAPS @ back2roots ? hippie2000 project.SPS (was CAPS) 29 06 November 2007 23:25

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:05.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09113 seconds with 13 queries