Author Topic: Rasm Z80 assembler v0.116 [update 2019.11.13]  (Read 29529 times)

0 Members and 1 Guest are viewing this topic.

Offline krusty_benediction

  • CPC664
  • ***
  • Posts: 140
  • Country: fr
  • Liked: 102
  • Likes Given: 36
Re: Rasm Z80 assembler v0.95 [update 2018.07.22]
« Reply #150 on: 10:07, 24 July 18 »
For those using Visual Studio Code as Integrated Development Environment for the Amstrad CPC, you can install the "z80 macro assembler" extension that provides syntaxic coloration of code and some snippets for rasm. On my side it has completely replaced vim and its tailored extension. Syntax error analysis is only the missing thing for me

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 942
  • Country: fr
  • Liked: 902
  • Likes Given: 139
Re: Rasm Z80 assembler v0.95 [update 2018.07.22]
« Reply #151 on: 12:46, 24 July 18 »
Quote
For those using Visual Studio Code as Integrated Development Environment for the Amstrad CPC, you can install the "z80 macro assembler"


Looks interesting. But the "Goto definition" does not seem to look outside the current file. And how do you create a build task?
Targhan/Arkos

Arkos Tracker 2 - alpha 7 now released! - Follow the news on Twitter!
Disark A cross-platform Z80 disassembler/source converter

Imperial Mahjong
Orion Prime

Offline krusty_benediction

  • CPC664
  • ***
  • Posts: 140
  • Country: fr
  • Liked: 102
  • Likes Given: 36
Re: Rasm Z80 assembler v0.95 [update 2018.07.22]
« Reply #152 on: 15:12, 24 July 18 »
A javascript master like you may be able to fix this goto issue by proposing a patch to its author ;)
On my side I use Makefiles in a Dockerized environment  to manage all my stuff, so my build task is simply a Makefile call. So my minimum tasks.json file looks like taht
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build",
            "type": "shell",
            "command": "./bootstrap.sh make",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        },

        {
            "label": "CPC",
            "type": "shell",
            "command": "./bootstrap.sh make run_on_cpc",
            "group": {
                "kind": "run",
                "isDefault": false
            }
        }
    ]
}


Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 942
  • Country: fr
  • Liked: 902
  • Likes Given: 139
Re: Rasm Z80 assembler v0.95 [update 2018.07.22]
« Reply #153 on: 00:57, 25 July 18 »
Javascript master? Well, that's one language I certainly don't master :). Thanks for the script, I'll check it out! But right now, the solution isn't as good as what I already have!
Targhan/Arkos

Arkos Tracker 2 - alpha 7 now released! - Follow the news on Twitter!
Disark A cross-platform Z80 disassembler/source converter

Imperial Mahjong
Orion Prime

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 684
  • Country: fr
    • urban exploration
  • Liked: 955
  • Likes Given: 597
Re: Rasm Z80 assembler v0.96 [update 2018.07.25]
« Reply #154 on: 15:16, 25 July 18 »
update v0.96
- bugfix memory leak in tag translation with PRINT directive
- bugfix negative offset with INCBIN
- bugfix autotests memory handling
- added include path in command line
- doc updated
msdos version does not include all v96 update (monday)
use RASM, the best assembler ever made :p

I will survive

Offline krusty_benediction

  • CPC664
  • ***
  • Posts: 140
  • Country: fr
  • Liked: 102
  • Likes Given: 36
Re: Rasm Z80 assembler v0.95 [update 2018.07.22]
« Reply #155 on: 15:55, 26 July 18 »

Looks interesting. But the "Goto definition" does not seem to look outside the current file. And how do you create a build task?
are you sure about the goto thing ? Just be able to jump in another (but opened) file

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 684
  • Country: fr
    • urban exploration
  • Liked: 955
  • Likes Given: 597
Re: Rasm Z80 assembler v0.97 [update 2018.07.27]
« Reply #156 on: 19:05, 27 July 18 »
update v0.97
- bugfix conditionnal code inhibition with macro declaration
- better alias infinite recursivity detection
use RASM, the best assembler ever made :p

I will survive

Offline norecess

  • CPC664
  • ***
  • Posts: 88
  • Country: ca
  • Liked: 236
  • Likes Given: 78
Re: Rasm Z80 assembler v0.97 [update 2018.07.27]
« Reply #157 on: 21:25, 29 July 18 »
So I finally decided to give a try to Rasm.. so far so good :P

The transition was smooth (coming after years of dev under WinAPE). I was used to & for hexadecimal values, had to spend few hours before getting used to # notation.

What I am appreciating so far:
- the doc is awesome (I started with the English version but finally ended with the French one, my eyes were bleeding too much ;-).
- the << >> & parentheses etc. All those stuff works as expected. Under WinAPE, I (sometimes) had to fight with several constants to get same result
- the print vs. fail commands is good catch! I use fail in my macros to simulate an Assert at compile-time, very practical
- WinAPE was often kind of confused when dealing with macros, rasm does a much better job here to handle (report) errors
- looks mature in current state!

Good job Roudoudou.

Offline krusty_benediction

  • CPC664
  • ***
  • Posts: 140
  • Country: fr
  • Liked: 102
  • Likes Given: 36
Re: Rasm Z80 assembler v0.97 [update 2018.07.27]
« Reply #158 on: 21:43, 29 July 18 »
Yes, this is definitively the most promising assembler.
However, it is not yet enough mature (I regularly hit bugs), but is going to be as Roudoudou is really reactive when we catch bugs (and is not closed to suggestions).

 I have not yet totally switch from vasm to rasm.

Offline HAL 6128

  • 464 Plus
  • *****
  • Posts: 490
  • Country: de
    • index.php?action=treasury
  • Liked: 242
  • Likes Given: 1198
Re: Rasm Z80 assembler v0.97 [update 2018.07.27]
« Reply #159 on: 16:06, 31 July 18 »
Hi @roudoudou
the code next shows me an error message "cannot use register 6<>A in this context". How can I solve this?
Kind regards,
HAL6128
Code: [Select]
macro setreg val
if {val}<>a
ld a,{val}
endif
push bc
ld bc,PORT ;PORT to be defined
out (c),a
pop bc
endm

org #9000
setreg 6
ret
...proudly supported Pentomino and NQ-Music-Disc with GFX

Offline krusty_benediction

  • CPC664
  • ***
  • Posts: 140
  • Country: fr
  • Liked: 102
  • Likes Given: 36
Re: Rasm Z80 assembler v0.97 [update 2018.07.27]
« Reply #160 on: 16:44, 31 July 18 »
conditional directives do not know the content of registers, so this is a correct behavior for any assembler
maybe you should add a second argument to your macro that contains the current value of A but YOU have to know it when calling it

Offline HAL 6128

  • 464 Plus
  • *****
  • Posts: 490
  • Country: de
    • index.php?action=treasury
  • Liked: 242
  • Likes Given: 1198
Re: Rasm Z80 assembler v0.97 [update 2018.07.27]
« Reply #161 on: 22:34, 31 July 18 »

This is a code snipped from 1990. Compiled with Z80ASM which looks like this. Maybe I misinterpreted it?
Code: [Select]
macro setreg val
ifdif val,a
  ld a,val
endif
.. endm
org #9000
setreg 6
ret
...proudly supported Pentomino and NQ-Music-Disc with GFX

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 684
  • Country: fr
    • urban exploration
  • Liked: 955
  • Likes Given: 597
Re: Rasm Z80 assembler v0.97 [update 2018.07.27]
« Reply #162 on: 22:44, 31 July 18 »
With a (partial) integrated code simulator this may work but not in all cases (example: register a taking his previous value from memory)
Golem is using macros and variables like this, with a variable REG_A mirroring register A, so when he does LD A,n he's doing also REG_A=n
This can work with very linear code
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 684
  • Country: fr
    • urban exploration
  • Liked: 955
  • Likes Given: 597
Re: Rasm Z80 assembler v0.98 [update 2018.08.03]
« Reply #163 on: 14:47, 03 August 18 »
update v0.98
- bugfix with snapshot v2 memory size detection
- new optional parameter to get file size when load and crunch on the fly
- new option to remove warnings
- new fake instructions RR,RL,SRL,SRA,SLL,SLA with 16 bits (BC,DE,HL) registers
- preprocessing does not allow empty parameter to avoid confusion
- extended error may suggest a name if a variable/label/alias looks similar to a 'not found' value
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 684
  • Country: fr
    • urban exploration
  • Liked: 955
  • Likes Given: 597
Re: Rasm Z80 assembler v0.99 [update 2018.08.16]
« Reply #164 on: 16:13, 16 August 18 »
update v0.99
- new directive UNDEF
- bugfix memory leaks
- bugfix calculations with functions immediatly followed by two or more opened parenthesis
use RASM, the best assembler ever made :p

I will survive

Offline Arnaud

  • Supporter
  • 6128 Plus
  • *
  • Posts: 535
  • Country: fr
  • Liked: 450
  • Likes Given: 864
Re: Rasm Z80 assembler v0.99 [update 2018.08.16]
« Reply #165 on: 18:59, 16 August 18 »
update v0.99
- new directive UNDEF
- bugfix memory leaks
- bugfix calculations with functions immediatly followed by two or more opened parenthesis
The v1.0 is near  :D 
« Last Edit: 20:08, 16 August 18 by Arnaud »

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 684
  • Country: fr
    • urban exploration
  • Liked: 955
  • Likes Given: 597
Re: Rasm Z80 assembler v0.100 [update 2018.09.03]
« Reply #166 on: 14:06, 03 September 18 »
back from holidays, small update
update v0.100
- bugfix crash with zeroed output file
- bugfix moar memory leaks
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 684
  • Country: fr
    • urban exploration
  • Liked: 955
  • Likes Given: 597
Re: Rasm Z80 assembler v0.101 [update 2018.10.09]
« Reply #167 on: 20:29, 09 October 18 »
update v0.101
- warn if no byte is written to a snapshot
- warn if RUN directive was already used
- bugfix calculation error cases
- bugfix maxam AND/OR/XOR/MOD operator (regression of v0.89)
- UNDEF does not care anymore about variable existence
- better error management with macro and wrong number of parameters

Siko is working on a new FR/ENG documentation, please be patient  8)
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 684
  • Country: fr
    • urban exploration
  • Liked: 955
  • Likes Given: 597
Re: Rasm Z80 assembler v0.102 [update 2018.10.15]
« Reply #168 on: 21:27, 15 October 18 »
update v0.102
- bugfix 'BREAKPOINT <adress>' export
- bugfix default limit of 65535
- bugfix limit autotest
- bugfix path simplification for dependencies export
- bugfix memory leak when using (VOID) with macro
- new math function to get a random value

use RASM, the best assembler ever made :p

I will survive

Offline gryken

  • CPC464
  • **
  • Posts: 7
  • Country: fr
  • Liked: 2
  • Likes Given: 0
Re: Rasm Z80 assembler v0.103 [update 2018.10.17]
« Reply #169 on: 12:31, 29 November 18 »
Hi,
Very impressive work with RASM  ;)
 I have noticed an error in documentation
I think that it should be
- Merkle tree
and not
- Merkel tree.
Don’t you think ?
 
Bye.

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 684
  • Country: fr
    • urban exploration
  • Liked: 955
  • Likes Given: 597
Re: Rasm Z80 assembler v0.103 [update 2018.10.17]
« Reply #170 on: 13:43, 29 November 18 »
Hi,
Very impressive work with RASM  ;)
 I have noticed an error in documentation
I think that it should be
- Merkle tree
and not
- Merkel tree.
Don’t you think ?
 
Bye.
Thanks
The documentation will be updated soon
use RASM, the best assembler ever made :p

I will survive

Offline krusty_benediction

  • CPC664
  • ***
  • Posts: 140
  • Country: fr
  • Liked: 102
  • Likes Given: 36
Re: Rasm Z80 assembler v0.103 [update 2018.10.17]
« Reply #171 on: 01:19, 28 December 18 »
Hello,I mainly use rasm for my current handwritten code, but I have also written an assembler for my computer generated code (of course, wh'ne I'll have the courage to implement all mnemonics it will replace rasm in my workflow ;)).I have played today with some directives that could be also usefull with rasm.
Here is a test code that validated the approach

        ld a, screen_height
player_line_loop
        stableticker start effectduration ; Start to count nops
            ex af, af'

            pop hl ; 0 1
            xor a : out (c), a : out (c), l
            inc a : out (c), a : out (c), h

            repeat 7
                pop hl ; 2 3 to 14 15
                inc a : out (c), a : out (c), l
                inc a : out (c), a : out (c), h
            endr

            ex af, af'
            dec a
        stableticker stop
        defs 64*3 - effectduration - (1 + duration(jr nz, player_line_loop))
    jr nz, player_line_loop

There is a simple routine that must be played at a certain frequency. Usually we manually compute the number of nops it takes in order to add filling instructions to have the right duration.Its booooring, especially when you forget the timing. So I have added 2 directives to delegate the job to the assembler:- stableticker that counts the number of nops and store them in a variable- duration that can be used in any expression and provide the number of nops of its instruction
Of course there is a limitation with the conditional opcodes having different durations. In my implementation I select the shortest one (that's why I add 1).
This can be generalized to other kind of functions like opcode(mnemonic) that would return the 16bits value of any 8bits/16bits instruction. It will be probalby my homework of tomorrow

@roudoudou what do you think about implementing them (or more egonomics versions) ?

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 684
  • Country: fr
    • urban exploration
  • Liked: 955
  • Likes Given: 597
Re: Rasm Z80 assembler v0.103 [update 2018.10.17]
« Reply #172 on: 10:14, 28 December 18 »
...

This would be cool!
But if you start ticker with a variable name, why not stopping ticker also with a variable name?
Then you may start as many tickers as you want?
use RASM, the best assembler ever made :p

I will survive

Offline krusty_benediction

  • CPC664
  • ***
  • Posts: 140
  • Country: fr
  • Liked: 102
  • Likes Given: 36
Re: Rasm Z80 assembler v0.103 [update 2018.10.17]
« Reply #173 on: 11:36, 28 December 18 »
2 resaons :
- I did that late, it is more difficult to make good choices ;)

- I only though about nested calls and not overlapping calls. But yes to provide an optional argument to stop allows to handle all cases

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 684
  • Country: fr
    • urban exploration
  • Liked: 955
  • Likes Given: 597
Re: Rasm Z80 assembler v0.103 [update 2018.10.17]
« Reply #174 on: 16:16, 28 December 18 »
BTW tell us more about your assembler  :P
use RASM, the best assembler ever made :p

I will survive