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 1 Guest are viewing this topic.

reidrac

Quote from: cpcitor on 08:38, 12 June 20
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.

Use .z80 for example (I prefer it because I can set specific syntax highlighting for Z80).
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.

cpcitor

#251
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

Don't blame friends that help you

You're conflating. Variety of build environments is not Make's fault.

Complaining like this is like blaming a friend that helps you because they don't have a solution for every problem of your life.

Different build systems for different kind of programs.

Programs with tons of dependencies on modern features often use different, higher level tools, because in those cases, pure makefile-based workflow cannot simply express the needs. Perhaps you have suffered some program where author wrote a big makefile in a situation where it was not the simplest solution.

Simple program, simple makefile.

rasm is simple to build, it uses basic file APIs along with standard input and output. It's typically a program perfectly suited for a simple makefile.

A simple makefile is where people are looking first.

When getting source code, people look at file names for hints.
Makefile is a traditional entry point.

A simple makefile is machine-executable documentation.

Programs need it too. IDE, packaging infrastructures, automated quality assurance tools like travis need machine-readable instructions. A two-line Makefile eases integration and avoids bugs due to different contexts using different build options.

No makefile feels like the author is too lazy, doesn't know how to write a two-line makefile.

Simple and convenient solution that always works

For the user, typing make is shorter than other options.

Even make -f Makefile.other is only a few more keystrokes using Tab key.

Such directory layout is very clear, shows that author is seasoned about portability, with default Makefile for gcc-compatible build environment and took care of making things easy for users of a number of platforms:


Makefile
Makefile.win-msvs
Makefile.dos-watcom
Makefile.morphos-gcc
Makefile.macos
source.c


In the case of RASM it *will* work out-of-the-box.
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.

pelrun

I wasn't going to push the point quite that hard. In fact I forked RASM so I could write the Makefile myself but I was beaten to the punch. Cheers!

reidrac

Is not the end of the world, really.

I also write my own Makefile for rasm, for example for the rasm version I used in Kitsune's Curse:

all: rasm

rasm: rasm_v0119.c
gcc -s -O2 $< -o $@ -lm -lrt -march=native

clean:
rm -f rasm

.PHONY: all clean


I use GNU Make, but you can make it generic enough.
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.

cpcitor

Quote from: reidrac on 08:17, 13 June 20
Is not the end of the world, really.

I also write my own Makefile for rasm, for example for the rasm version I used in Kitsune's Curse:

You makefile is nice and complete with usual patterns.

I went straight to the point when integrating RASM in cpc-dev-tool-chain: after automatically fetching and unpacking rasm source, cpc-dev-tool-chain build system copies a strictly two lines makefile into the source directory and calls it.
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

My pronouns are RASM and ACE

roudoudou

https://github.com/EdouardBERGE/rasm/releases/tag/v1.2
release v1.2

       
  • nightly bugfix
  • bugfix memory leaks and error management with includes in embedded rasm
  • bugfix INCLZ4 directive
  • many new autotests for include and crunch
  • RUN directive do not force PPI configuration to #C0 if there is no second argument
  • produce zero size file when there is no breakpoint
  • new command line option -amper in order to use ampersand for hex values
  • new directive BREAKPOINT_Z80 to produce #ED,#FF opcode
  • new directives beginings GETTICK, DURATION (only a few instructions supported)
  • new ROM mode to automatically save multiple numbered ROM files
  • ability to split 16 bits registers in macro declaration (example: hl.low or {register}.high )
documentation will be updated later
My pronouns are RASM and ACE

roudoudou

new release v1.3
https://github.com/EdouardBERGE/rasm/releases/tag/v1.3

       
  • extended cartridge support
  • new directive LZSA1, LZSA2 for crunched code sections
  • new directives INCLZSA1 and INCLZSA2 for binary import and LZSA crunching
  • new directives XORMEM and SUMMEM to generate checksum of a memory area
  • new directive TIMESTAMP to output date/time
  • new TAPE option for SAVE directive
  • new DMA import options with INCBIN directive (new checks & warnings)
  • new enhanced instructions LD IX/IY,BC/DE & LD BC/DE,IX/IY
  • new tag {SLOT} for extended cartridge management
  • new suffix .HIGH and .LOW to split 16bits register in macro definition
  • new option -msep to specify separator for labels inside modules
  • new option -amper to use ampersand for hex values
  • directive BRK now generates #ED,#FF opcode
  • bugfix byte order for Microsoft real format
  • bugfix DSK header with nightly build
  • bugfix 16bits PCM wav import
  • do not warn for missing file with INCLUDE in disabled condition
  • do not export struct definition with symbols
  • many warnings removed, cleanup, some draft for future functionalities
My pronouns are RASM and ACE

GUNHED

#258
Great job done!


Hint to new users: You find the documentation inside the source code.
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)

roudoudou

Quote from: GUNHED on 15:40, 24 November 20
Hint to new users: You find the documentation inside the source code.
always get the latest PDF on master branch because documentation is never up to date when i'm doing a release !
My pronouns are RASM and ACE

GUNHED

Writing documentation suxx. (I know that from own projects). But nevertheless we all need it. Thanks for this, it's made in an "easy to be understood" way.  :) :)
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)

roudoudou

Quote from: GUNHED on 15:50, 24 November 20
Writing documentation suxx. (I know that from own projects). But nevertheless we all need it. Thanks for this, it's made in an "easy to be understood" way.  :) :)
anyway i'm always ok to answer any question by mail  ;D
My pronouns are RASM and ACE

roudoudou

My pronouns are RASM and ACE

GOB


roudoudou

https://github.com/EdouardBERGE/rasm/releases/tag/v1.4

new release v1.4
new TAPE output code from CNG in GPL2
new directive BUILDTAPE
new directives GETNOP to count Amstrad nops
new directives GETTICK to count Z80 ticks
new DMA options for Amstrad Plus WAV import
new LZSA directives for LZSA1 and LZSA2 compression
new ZX0 directives for ZX0 compression and backward compression
new CONFINE directive
new command line option for amper hex values usage
new command line option for quick ZX0 compression
new postfix .low and .high to split registers in macro definition
BANK tag may process proximity label
bugfix some warnings
bugfix IN A,(C) timing in rasm
bugfix moar timings in documentation
bugfix SRL reg16 alias
bugfix segfault when LZ section was not closed
bugfix compilation without third parties
latest directives will be documented soon (i hope  :P )
My pronouns are RASM and ACE

GUNHED

#265
Quote from: roudoudou on 08:58, 22 February 17
Official repository is now on github
https://github.com/EdouardBERGE/rasm
Github is a pain, anything else I would appreciate.
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)

mahlemiut

- Barry Rodewald

roudoudou

Quote from: GUNHED on 21:51, 03 February 21

Super chaotic, can't find it. Github SUXX!! (And I tell the other members of the group I'm a member all the time).


Can you please put something somewhere just to click at. I'm not willing to waste (now more) than 30 minutes to search a download for something I just can't find.
i put the release link each time i talk about a release :)
see immediate upper post
My pronouns are RASM and ACE

gurneyh

Quote from: GUNHED on 21:51, 03 February 21Super chaotic, can't find it. Github SUXX!!

:picard:
git clone ...

and compile for your platform.


GUNHED

#269
What's wrong with a download link (working!) of a ZIP or whatever?
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)

roudoudou

Quote from: GUNHED on 23:42, 03 February 21
What's wrong with a download link (working!) of a ZIP or whatever?
There is a direct link and it's working  :-X
Then there is many binaries, just get the one you need, no useless ZIP or whatever because binaries are auto-crunched

Can we move on another subject please?



My pronouns are RASM and ACE

GUNHED

Maybe it's my Windows 7 or my browser, it's a pain in the back for me. 'Just klick and download' doesn't work for me. But nice if it works for everybody else.
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)

Ygdrazil

Hi There ....

I am in the process of porting som old code to RASM, so far going pretty well

But I get a strange error when trying to assemble using directives defb, defm...

this eg.

; test.asm
org #4000



defm    'Banks:      Name:           SP   AF',39

or when using defs...
I get this error:
Pre-processing [test.asm]
[test.asm:7] quote opened was not closed
Assembling
1 error

I am really lost... What am I doing wrong... Tried with defb directive as well!

Hope someone can help
Regards,Ygdrazil

PS. The code I am porting is from Maxam...

[/code]

roudoudou

change single quote with double quote for strings and DEFB

but i agree this is a bug i will fix  ;D
My pronouns are RASM and ACE

Ygdrazil


Thanks  :D !

Quote from: roudoudou on 21:24, 27 February 21
change single quote with double quote for strings and DEFB

but i agree this is a bug i will fix  ;D

Powered by SMFPacks Menu Editor Mod