News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_krusty_benediction

Some thoughts for modern assembler in Amstrad world

Started by krusty_benediction, 10:13, 26 March 24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


krusty_benediction

#1
But a quick answer. The issue exists in most assembler I know, it is not related at all to rasm. rasm only follows the existing convention. My own assembler suffers of the same drawback.

For example the SAVE directive as documented in rasm works this way (I translated in english @roudoudou fin should be taille, no ?)

SAVE 'AMSDOS.BIN', start, length,DSK, 'thedisc.dsk'
4 mandatory parameters to provide before giving the name of the disc image.
if we do not want to provide them, the assembler has to accept empty arguments. If I remember well not all of them agree to do that.


SAVE 'AMSDOS.BIN', , ,DSK, 'thedisc.dsk'
there are so many variants of SAVE that it is not always easy to remember the order and meaning of the arguments.

I guess named parameter would help to increase readability


SAVE FNAME='AMSDOS.BIN',  DSK='thedisc.dsk'
and would ease to add variants with new parameters that do not exist today

SAVE FNAME='AMSDOS.ASC',  IMAGE='thedisc.dsk', NOAMSDOSHEADER
SAVE FNAME='AMSDOS.BIN',  IMAGE='thedisc.hfe', EXEC=address   ; here we do not use the exec address from the RUN directive which allwos to create several executabe from one source


roudoudou

Quote from: krusty_benediction on 10:25, 26 March 24For example the SAVE directive as documented in rasm works this way (I translated in english @roudoudou fin should be taille, no ?)
thanks, i modify the documentation...

My pronouns are RASM and ACE

zhulien

if a new modern assembler came out, ideally it could support macros and multiple memory models (the normal vertical, and a sideways model).

krusty_benediction

Macros are not modern and exist since forever  every good assembler have them ;)
I have no clue of the meaning of this " memory models (the normal vertical, and a sideways model) "

lightforce6128

Quote from: krusty_benediction on 10:13, 26 March 24[...]

@lightforce6128 does this webpage answer to your question ? Otherwhise I can argue more here

https://64nops.wordpress.com/2021/10/26/some-thoughts-for-modern-assembler-in-amstrad-world/

Yes, it clearly does! This is a very good and detailed discussion about the thing I oversimplified called "the gap" between old assemblers and modern development environments.

I think I agree to most of the points, beside one: Keeping compatibility to existing assembler code that is included or imported is okay. But writing assembler code for the modern assembler should clearly define one way to do things, e.g. which syntax should be used for hexadecimal numbers. Keeping all old syntaxes in parallel might help in using the new assembler, but continues to create assembler code where everything can be mixed. A clear decision for one syntax might be unpopular, but will help in the future to create cleaner code.

Powered by SMFPacks Menu Editor Mod