News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_roudoudou

Rasm Z80 assembler

Started by roudoudou, 08:58, 22 February 17

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

roudoudou

update v0.119
- bugfix ASSERT with extra-parameters
- local labels are also reference for proximity label inside their respective scope
- struct may be indexed (work in progress concerning init and filler)
- RUN directive also set execution adress for SAVE directive and may be used multiple times
- new option -wu in order to make warnings for every unused var, alias or label
My pronouns are RASM and ACE

GUNHED

This great assembler runs with MS-DOS? Oh, then ... it would be really great to have a CP/M Plus version too.  :) ;D :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

cpcitor

Quote from: roudoudou on 08:58, 22 February 17
update v0.119

* rasm_v0119_srcbis.zip (185.86 kB - downloaded 10 times.)

Hey, RASM is open-source (MIT expat license).
Great!  This means it can be compiled on more exotic architectures (use it on ARM machines like Pi, smartphone, etc).
I might incorporate it in https://github.com/cpcitor/cpc-dev-tool-chain

Wow, one 600kbytes / 17klines source code file. Compiled in 7 seconds on my fast i7, mkay.

Other libraries "repacked" in one big .h file.
Roudoudou, what is the purpose of that? Simplifying compilation steps?

Notice that usual one-file libraries do have a common pattern to make them compatible with multi-file source: after the interface declaration (normal .h structure) append the implementation (normally in several .c) enclosed with #ifdef LIB_FOO_IMPLEMENTATION / #ENDIF . With this you can #include the single-file-lib from several source, and only one will do #define LIB_FOO_IMPLEMENTATION before.

For one example, miniaudio used in RetroVirtualMachine and to which I contributed a little, see https://github.com/dr-soft/miniaudio#user-content-building

Anyway, thanks a lot for sharing the source!

Back to my question, what is the purpose of repacking the external dependencies?
Had a CPC since 1985, currently software dev professional, including embedded systems.

I made in 2013 the first CPC cross-dev environment that auto-installs C compiler and tools: cpc-dev-tool-chain: a portable toolchain for C/ASM development targetting CPC, later forked into CPCTelera.

roudoudou

Quote from: cpcitor on 16:18, 12 January 20
Hey, RASM is open-source (MIT expat license).
Great!  This means it can be compiled on more exotic architectures (use it on ARM machines like Pi, smartphone, etc).
I might incorporate it in https://github.com/cpcitor/cpc-dev-tool-chain
Wow, one 600kbytes / 17klines source code file. Compiled in 7 seconds on my fast i7, mkay.
Back to my question, what is the purpose of repacking the external dependencies?
Hi
Rasm is already running on PowerPC and MorphOS (thanks Philippe R.) so i guess it should run properly on ARM (use the hidden option -autotest  ;D )

The non-standard package is for:
- execution speed
- easy for me to navigate in the source code
- easy to compile, avoid external dependencies version problems
- the project was not supposed to be public (just wanted to finish my demo on time)

My pronouns are RASM and ACE

cpcitor

Hey Roudoudou!  :)

Quote from: roudoudou on 08:58, 22 February 17
update v0.119

Thanks again a lot for making the source available under a FOSS license!

Context

I'm starting to integrate it in cpc-dev-tool-chain. Currently, my local branch of cpc-dev-tool-chain can automatically fetch Rasm, compile it and add it to PATH.
Thanks to basing everything on source code, this should work on many architectures and OS.
(Some day I will probably offer complete precompiled packages for cpc-dev-tool-chain. This should bring the benefit of many platforms with the convenience of one download for ready-to-use integrated tools.)

I have not yet thought about the various ways RASM and other tools can be mixed for versatility and convenience. First idea is to have projects automatically call Rasm for all files named like *.rasm.
The short-term goal motivating all this is "just" to incorporate music exported by Arkos Tracker in my existing ongoing SDCC/SDASZ80-based project JustGet9.

Issue

Integration is done by downloading source code from some "official" URL.

The current URL to source code is https://www.cpcwiki.eu/forum/programming/rasm-z80-assembler-in-beta/?action=dlattach;attach=30425 which:
* does not show clearly what is downloaded
* does not make obvious how to get back to the conversation
* feels brittle (we have seen some CPC-related forum disappear)
* tends to download to files named like index.html?action=dlattach;attach=30425 or even ?action=dlattach;attach=30425.

Solution

I wish the source code would be available from a site offering nice and stable URLs. Have you considered putting it on some code sharing platform like github?
Such solution also has convenient features like automatically building and serving binaries for various platforms whenever you push a new release.

For example you can visit https://github.com/ColinPitrat/caprice32/releases and
consider the stable URLs presented there:

https://github.com/ColinPitrat/caprice32/releases/download/v4.5.0/cap32-win64.zip
https://github.com/ColinPitrat/caprice32/releases/download/latest/cap32-win64.zip

I see you put version numbers on your releases. What kind of version tracking tool do you use?

Thank you for your attention.
Had a CPC since 1985, currently software dev professional, including embedded systems.

I made in 2013 the first CPC cross-dev environment that auto-installs C compiler and tools: cpc-dev-tool-chain: a portable toolchain for C/ASM development targetting CPC, later forked into CPCTelera.

roudoudou

Quote from: cpcitor on 20:33, 28 February 20
Issue
Integration is done by downloading source code from some "official" URL.
there is an (un)official but stable URL since 0117 for dev users like you
http://www.roudoudou.com/export/cpc/rasm/rasm_v0119_src.zip

My pronouns are RASM and ACE

cpcitor

Quote from: roudoudou on 22:27, 28 February 20
there is an (un)official but stable URL since 0117 for dev users like you
http://www.roudoudou.com/export/cpc/rasm/rasm_v0119_src.zip

Thanks! This is a much better URL!

Oh. This URL works when using a known interactive browser but fails when using Wget, which is what cpc-dev-tool-chain uses. Experimenting shows that the server rejects requests which have a User-Agent field containing the substring Wget.
I understand that some would had such an idea but find it somehow pointless as it's beyond easy to circumvent -- bad guys would use a different user agent on first query anyway. Were I worried about leechers on my servers, I would first host a robots.txt file at the root, following https://en.wikipedia.org/wiki/Robots_exclusion_standard which is obeyed by a number of programs like wget.

Anyway, thanks a lot!
Had a CPC since 1985, currently software dev professional, including embedded systems.

I made in 2013 the first CPC cross-dev environment that auto-installs C compiler and tools: cpc-dev-tool-chain: a portable toolchain for C/ASM development targetting CPC, later forked into CPCTelera.

roudoudou

update v0.120
- BIT,RES,SET may use deferred shifting value
- BANK directive may use NEXT as parameter to switch to next BANK space
- operator assignment are now supported
- may use tags in filenames with SAVE directive
- warn for huge shifting and force result to zero (as it's an architecture independant operation)


executables later...
My pronouns are RASM and ACE

roudoudou

update v0.121
- early stages MODULE support
- \ support (experimental)
- APlib Ultra integration (load&crunch + crunched section)
- bugfix segfault when trying to assemble a file that does not exists
- bugfix segfault with opened comment '/*' until the end of the file
- bugfix DEFB calculation with $ after crunched section
- proximity label beginning with BRK will generate an exportable breakpoint
- LIMIT directive evolution (mostly for #FFFF writing case)
- crunched INCBIN may use offset/length/remap before crunch
My pronouns are RASM and ACE

roudoudou

update v0.122
- proximity label enhancement with macro inception and loops
- new directive MODULE
My pronouns are RASM and ACE

roudoudou


documentation updated (Thanks Siko!) in v122!!!

and the release note as there is some oversights:
- you may use "BANK NEXT" to open next bank (snapshot or cartridge mode), useful when you are supposed to change bank order often
- you may SAVE a file with HOBETA header => SAVE 'myfile.bin',start,size,HOBETA



My pronouns are RASM and ACE

roudoudou

update v0.124
- new directive DF/DEFF in order to output Microsoft IEEE-754 40bits real
- pasmo compatibility option for DEFB/DEFW with multiple output and reference to current adress

update v0.123
- new option to treat warnings as errors
- bugfix segfault with empty struct declaration
- bugfix v0.121 regression for INCWAV
- check labels,variables and alias when declare macro name
My pronouns are RASM and ACE

TotO

Those versions numbers (0.1xx) with a program that will never reach 0.2 always make me smile. ;D

https://en.wikipedia.org/wiki/Software_versioning
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

roudoudou

just fix another (important) bug...will push win executables later

- bugfix EQU with current adress reference and crunched zones integration
My pronouns are RASM and ACE

roudoudou

update v0.126
- Rasm is able to mix LZsegments and contiguous ORG sections
example:
tabeul
defw script0
defw script1
defw script2

script0
org #4000,$
lz49
start1 : jr end1 :  defs 100: djnz start1
end1
lzclose

org $
script1
org #4000,$
lz49
start2 : jr end2 : defs 100 : djnz start2
end2
lzclose

org $
script2
org #4000,$
lz49
start3 : jr end3 : defs 100 : djnz start3
end3
lzclose
My pronouns are RASM and ACE

roudoudou

update v0.127
- bugfix some memory leaks
windows execs soon
My pronouns are RASM and ACE

roudoudou

update v0.128
- bugfix moar memory leaks
- label code clean-up

new execs
My pronouns are RASM and ACE

roudoudou

update v0.129
- bugfix read overrun in pre-processor
- bugfix read overrun in snapshot encoding
- bugfix AMSDOS header creation with filename that contains a path
- force memory cleanup with MorphOS
- when a variable cannot be computed, check for directive names to avoid confusion
My pronouns are RASM and ACE

reidrac

Yay! Thanks for using GitHub.

I'm subscribed to new releases, and that would make things easier for me!

Btw, if is OK to send you pull requests... may be we could add a Makefile for example :D
Released The Return of Traxtor, Golden Tail, Magica, The Dawn of Kernel, Kitsune`s Curse, Brick Rick and Hyperdrive for the CPC.

If you like my games and want to show some appreciation, you can always buy me a coffee.

roudoudou

Quote from: reidrac on 16:18, 11 June 20
Yay! Thanks for using GitHub.

I'm subscribed to new releases, and that would make things easier for me!

Btw, if is OK to send you pull requests... may be we could add a Makefile for example :D
Yeah, all new releases will be posted to github. I will come back here to mention stable releases or huge updates :)
Rasm does not need makefile and compilation command line are in the header of rasm.c but i may add some compilation .bat .sh or mention this in the readme :)

My pronouns are RASM and ACE

cpcitor

Quote from: roudoudou on 16:47, 11 June 20
Yeah, all new releases will be posted to github. I will come back here to mention stable releases or huge updates :)
Rasm does not need makefile and compilation command line are in the header of rasm.c but i may add some compilation .bat .sh or mention this in the readme :)

Thanks for opening a github repo! https://github.com/EdouardBERGE/rasm

cpc-dev-tool-chain started incorporating rasm recently, though I have not adjusted makefile rules for user projects.

The issue is: by default rasm likes .asm suffix, while in SDCC, assembly source is .s (probably consistent with embedded systems traditions).
SDCC generates .asm files containing assembly generated by the C compiler (very handy to check for efficiency).
Thus, make clean deletes .asm files and they are excluded from source code history.
Currently I use .rasm for assembly source to be compiled by RASM, vs .s for assembly source to be compiled by sdasz80.
Had a CPC since 1985, currently software dev professional, including embedded systems.

I made in 2013 the first CPC cross-dev environment that auto-installs C compiler and tools: cpc-dev-tool-chain: a portable toolchain for C/ASM development targetting CPC, later forked into CPCTelera.

roudoudou

Quote from: cpcitor on 08:38, 12 June 20
Thanks for opening a github repo! https://github.com/EdouardBERGE/rasm

cpc-dev-tool-chain started incorporating rasm recently, though I have not adjusted makefile rules for user projects.

The issue is: by default rasm likes .asm suffix, while in SDCC, assembly source is .s (probably consistent with embedded systems traditions).
SDCC generates .asm files containing assembly generated by the C compiler (very handy to check for efficiency).
Thus, make clean deletes .asm files and they are excluded from source code history.
Currently I use .rasm for assembly source to be compiled by RASM, vs .s for assembly source to be compiled by sdasz80.
When there is no extension i try char *LTryExtension[]={".asm",".z80",".o",".dam",".mxm",".txt"
But if you give the fullname rasm will load it whatever the extension is, so i do not understand where is the issue?
My pronouns are RASM and ACE

pelrun

Quote from: roudoudou on 16:47, 11 June 20
Rasm does not need makefile and compilation command line are in the header of rasm.c but i may add some compilation .bat .sh or mention this in the readme :)


Please don't reinvent the wheel. Makefiles are useful even for single-file builds because they remove the need for "some compilation .bat .sh or mention this in the readme". The simplest makefile has one more line than a shell script, and then it builds with "make" just like every other project that uses it.

OffseT

Quote from: pelrun on 10:32, 12 June 20

Please don't reinvent the wheel. Makefiles are useful even for single-file builds because they remove the need for "some compilation .bat .sh or mention this in the readme". The simplest makefile has one more line than a shell script, and then it builds with "make" just like every other project that uses it.


Well, in perfect world maybe. But in real life Makefiles never work out of the box and you always have to dig inside, and to moan because it is over-complicated for nothing.  :P


roudoudou

Quote from: OffseT on 17:47, 12 June 20

Well, in perfect world maybe. But in real life Makefiles never work out of the box and you always have to dig inside, and to moan because it is over-complicated for nothing.  :P
it's obviously one makefile per OS so...  why not a script? => because there is only one command line to compile rasm  ;D
Read the funny manual!
My pronouns are RASM and ACE

Powered by SMFPacks Menu Editor Mod