Author Topic: Rasm Z80 assembler v0.98 [update 2018.08.03]  (Read 13549 times)

0 Members and 1 Guest are viewing this topic.

Offline krusty_benediction

  • CPC664
  • ***
  • Posts: 105
  • Country: fr
  • Liked: 86
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

Online Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 686
  • Country: fr
  • Liked: 612
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?

Offline krusty_benediction

  • CPC664
  • ***
  • Posts: 105
  • Country: fr
  • Liked: 86
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
            }
        }
    ]
}


Online Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 686
  • Country: fr
  • Liked: 612
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!

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 502
  • Country: fr
    • urban exploration
  • Liked: 655
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: 105
  • Country: fr
  • Liked: 86
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: 502
  • Country: fr
    • urban exploration
  • Liked: 655
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

  • CPC464
  • **
  • Posts: 16
  • Country: ca
  • Liked: 45
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: 105
  • Country: fr
  • Liked: 86
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: 426
  • Country: de
    • index.php?action=treasury
  • Liked: 196
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: 105
  • Country: fr
  • Liked: 86
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: 426
  • Country: de
    • index.php?action=treasury
  • Liked: 196
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: 502
  • Country: fr
    • urban exploration
  • Liked: 655
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: 502
  • Country: fr
    • urban exploration
  • Liked: 655
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