Author Topic: Rasm Z80 assembler v1.2 [update 2020.07.18]  (Read 55242 times)

0 Members and 2 Guests are viewing this topic.

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.119 [update 2020.01.08]
« Reply #225 on: 16:12, 08 January 20 »
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
use RASM, the best assembler ever made :p

I will survive

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.031
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 913
  • Likes Given: 2293
Re: Rasm Z80 assembler v0.119 [update 2020.01.08]
« Reply #226 on: 22:08, 08 January 20 »
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 (Recent update: 2019.08.07)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2019.08.14)

Offline cpcitor

  • The user previously known as FindYWay
  • CPC6128
  • ****
  • Posts: 298
  • Country: fr
  • My heart still runs on traditional CPC.
    • My code for the CPC.
  • Liked: 148
  • Likes Given: 370
Re: Rasm Z80 assembler v0.119 [update 2020.01.08]
« Reply #227 on: 17:18, 12 January 20 »
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 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.

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.119 [update 2020.01.08]
« Reply #228 on: 21:39, 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)

use RASM, the best assembler ever made :p

I will survive

Offline cpcitor

  • The user previously known as FindYWay
  • CPC6128
  • ****
  • Posts: 298
  • Country: fr
  • My heart still runs on traditional CPC.
    • My code for the CPC.
  • Liked: 148
  • Likes Given: 370
Re: Rasm Z80 assembler v0.119 [update 2020.01.08]
« Reply #229 on: 21:33, 28 February 20 »
Hey Roudoudou!  :)

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 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.

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.119 [update 2020.01.08]
« Reply #230 on: 23:27, 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

use RASM, the best assembler ever made :p

I will survive

Offline cpcitor

  • The user previously known as FindYWay
  • CPC6128
  • ****
  • Posts: 298
  • Country: fr
  • My heart still runs on traditional CPC.
    • My code for the CPC.
  • Liked: 148
  • Likes Given: 370
Re: Rasm Z80 assembler v0.119 [update 2020.01.08]
« Reply #231 on: 22:49, 02 March 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 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.

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.119 [update 2020.01.08]
« Reply #232 on: 09:44, 27 March 20 »
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...
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.121 [update 2020.05.18]
« Reply #233 on: 18:15, 18 May 20 »
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
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.122 [update 2020.05.20]
« Reply #234 on: 11:01, 20 May 20 »
update v0.122
- proximity label enhancement with macro inception and loops
- new directive MODULE
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.122 [update 2020.05.20]
« Reply #235 on: 16:19, 20 May 20 »

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



use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.124 [update 2020.06.04]
« Reply #236 on: 10:58, 04 June 20 »
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
use RASM, the best assembler ever made :p

I will survive

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.779
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2895
  • Likes Given: 1742
Re: Rasm Z80 assembler v0.124 [update 2020.06.04]
« Reply #237 on: 11:44, 04 June 20 »
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)

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.125 [update 2020.06.04]
« Reply #238 on: 16:19, 04 June 20 »
just fix another (important) bug...will push win executables later

- bugfix EQU with current adress reference and crunched zones integration
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.126 [update 2020.06.05]
« Reply #239 on: 19:05, 05 June 20 »
update v0.126
- Rasm is able to mix LZsegments and contiguous ORG sections
example:
Code: [Select]
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
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.127 [update 2020.06.06]
« Reply #240 on: 01:21, 06 June 20 »
update v0.127
- bugfix some memory leaks
windows execs soon
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.128 [update 2020.06.06]
« Reply #241 on: 12:02, 06 June 20 »
update v0.128
- bugfix moar memory leaks
- label code clean-up

new execs
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.129 [update 2020.06.08]
« Reply #242 on: 11:31, 08 June 20 »
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
use RASM, the best assembler ever made :p

I will survive

Offline reidrac

  • Supporter
  • 6128 Plus
  • *
  • Posts: 905
  • Country: gb
  • Trying to gamedev!
    • index.php?action=treasury
    • usebox.net
  • Liked: 1667
  • Likes Given: 896
Re: Rasm Z80 assembler v0.129 [update 2020.06.08]
« Reply #243 on: 18: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
Released The Return of Traxtor, Golden Tail, Magica, The Dawn of Kernel, Kitsune`s Curse and Brick Rick for the CPC.

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

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.129 [update 2020.06.08]
« Reply #244 on: 18:47, 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 :)

use RASM, the best assembler ever made :p

I will survive

Offline cpcitor

  • The user previously known as FindYWay
  • CPC6128
  • ****
  • Posts: 298
  • Country: fr
  • My heart still runs on traditional CPC.
    • My code for the CPC.
  • Liked: 148
  • Likes Given: 370
Re: Rasm Z80 assembler v0.129 [update 2020.06.08]
« Reply #245 on: 10:38, 12 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 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.

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.129 [update 2020.06.08]
« Reply #246 on: 10:56, 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
Code: [Select]
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?
use RASM, the best assembler ever made :p

I will survive

Offline pelrun

  • Supporter
  • 6128 Plus
  • *
  • Posts: 661
  • Country: au
    • index.php?action=treasury
  • Liked: 349
  • Likes Given: 217
Re: Rasm Z80 assembler v0.129 [update 2020.06.08]
« Reply #247 on: 12:32, 12 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.

Offline OffseT

  • CPC464
  • **
  • Posts: 33
  • Country: fr
    • Futurs' Freeware Diffusion
  • Liked: 82
  • Likes Given: 2
Re: Rasm Z80 assembler v0.129 [update 2020.06.08]
« Reply #248 on: 19:47, 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


Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 883
  • Country: fr
    • urban exploration
  • Liked: 1177
  • Likes Given: 725
Re: Rasm Z80 assembler v0.129 [update 2020.06.08]
« Reply #249 on: 20:11, 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!
use RASM, the best assembler ever made :p

I will survive