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.

SkulleateR

just tried to compile this on my Pi400 (Raspbian 64Bit) but I get an error :




rasm.c: In function 'Assemble':
rasm.c:17771:10: error: '*debug' is a pointer; did you mean to use '->'?
    debug -> run=run;
          ^~
          ->
rasm.c:17771:17: error: 'run' undeclared (first use in this function)
    debug -> run=run;
                 ^~~
rasm.c:17771:17: note: each undeclared identifier is reported only once for each function it appears in
rasm.c:17772:10: error: '*debug' is a pointer; did you mean to use '->'?
    debug -> start=minmem;
          ^~
          ->
make: *** [makefile:102: prod] Fehler 1



Hints ???


SkulleateR

Since it has a makefile I'll do a MAKE in console  :laugh:

roudoudou

My pronouns are RASM and ACE

roudoudou

https://github.com/EdouardBERGE/rasm/releases/tag/v1.5
Release v1.5
new directive DELAYED_PRINT
new directive STARTINGINDEX + REPEAT options
new directives PROCEDURE, EXTERNAL, BUILDOBJ for kind of objects export
new shortcut ENDMODULE
new autotests + debug struct info RUN+START
new external function for emulators and assembling into RAM
ROM flat output for BUILDROM directive
use _setmode only with Visual Studio 14.0 and below
use custom strnlen with BorlandC
use only declarations from rasm.h
bugfix IX/IY invalid syntaxes
bugfix INCBIN wav preamp with DMA options
bugfix ZX snapshot output + RUN bugfix
bugfix TIMESTAMP and custom charset
bugfix Borland compatibility
bugfix segfault with wrong char in DEFB/DEFM string
bugfix segfault with quote not closed in the very last directive
bugfix INTn prefix behaviour
bugfix LD reg16,(IX/IY) alias
warn about ORG inside crunched section
compute alias values before crunching sections, this fix some side effects of EQU inside crunched sections
ZX0 firmware compatible decrunch routine
Linux version compiled with GCC v9.3.0
MS-DOS version compiled with Open-Watcom 1.9
Windows version compiled with Microsoft Compiler v19
Documentation is almost up to date (except release version number ^_^ )
My pronouns are RASM and ACE

roudoudou


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

       
  • ZX0 cruncher upgraded to v2 + new Z80 decrunchers
  • do not export command line define(s)
  • bugfix ZX0 backward compression
  • bugfix automatic filetype search for main source
  • bugfix autotests with 3rd parties disabled
  • bugfix include paths search
  • bugfix IFUSED, IFDEF, IFNDEF when used with MODULE directive
  • bugfix file output with HOBETA header
  • new option to export ROM description
  • new option to export label with original case
My pronouns are RASM and ACE

roudoudou


for people following latest commit, i rewrote the floating point conversion to be more accurate (directives DEFR or DEFF)
still not enough evolutions/bugfix to make a release
My pronouns are RASM and ACE

roudoudou

#282
new release 1.7
https://github.com/EdouardBERGE/rasm/releases/tag/v1.7
  • bugfix snapshot v3 first chunks when memory cannot be crunched in RLE
  • bugfix negative rounding for REAL conversion
  • bugfix segfault with UTF8 char usage in strings
  • bugfix quote starting with escaped char
  • bugfix macOS support, new target install
  • bugfix label import
  • bugfix GETNOP/GETTICK LD (HL),im8 + some missing instructions added
  • bugfix breakpoints missing when exporting for snap and breakpoint file
  • bugfix undefined behaviour with EQU usage before declaration
  • new Amstrad/Microsoft conversion to 5-bytes REAL with full precision
  • new math function FILESIZE to get file size on disk
  • new math function GETSIZE to get opcode size
  • new poker option with a few cipher methods
  • new directive CIPHERMEM to cipher memory
  • new directive SNAPINIT to initialize memory with a snapshot
  • new CONFINE option in order to enforce location
  • new UTF8 support to convert legacy french or spanish char to proper Locomotive Basic values + new command line option
  • more symbol exports with "ignore case" (and faster)
  • GTILES option for INCBIN to import tiles with gray encoding
documentation NOT updated since 1.6
My pronouns are RASM and ACE

Nicolas Lecoq


litwr

Quote from: roudoudou on 22:14, 11 April 22new release 1.7
I tried to compile my pasmo program and I failed.  I used
rasm -pasmo pi-cpc-cpm3.asmand got a lot of error messages.  The original pasmo works flawlessly.  I have attached files of my old pasmo project.

roudoudou

Quote from: litwr on 07:00, 06 September 22
Quote from: roudoudou on 22:14, 11 April 22new release 1.7
I tried to compile my pasmo program and I failed.  I used
rasm -pasmo pi-cpc-cpm3.asmand got a lot of error messages.  The original pasmo works flawlessly.  I have attached files of my old pasmo project.

yeah, Pasmo compatibility is to compile old Pasmo projects

i wrote the compatibility long time ago when Pasmo seemed abandonned

as Pasmo is back with active developpements, just use Pasmo if you like Pasmo syntax



My pronouns are RASM and ACE

roudoudou

8 months since the 1.7 release, here is an updated documentation (with almost all last Rasm improvements)

French documentation is now on http://rasm.wikidot.com/

English documentation is now on http://rasm.wikidot.com/english-index:home

My pronouns are RASM and ACE

ervin


roudoudou

new release :)

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

  • new up to date documentation on wikidot => http://rasm.wikidot.com/home:home
  • new conditional directive ELSEIFNOT
  • new math function IS_REGISTER
  • new directives CPRINIT and SNAPINIT in order to initialise RASM memory with a cartridge or a snapshot
  • new command line option to handler macro calls on multiple lines
  • MAP output improvements
  • MODULE support for EQU => Alias are now inside modules, like labels
  • CHARSET can be used with string to string conversion
  • removed ENDREPEAT and ENDREP literaly unused directives
  • bugfix WATCOM compatibility issue
  • bugfix STR endmark with CHARSET conversion
  • bugfix CONFINE directive with ENFORCE parameter usage
  • bugfix backslash usage with CHARSET defined for it
  • bugfix memory leak with map output and alias usage
  • bugfix memory overrun at memory cleanup
  • bugfix preprocessor with include filename strictly ending the line
My pronouns are RASM and ACE

zhulien

with RASM, is there a way to generate the relocation file so that I can make a relocator? or do i need to assemble it twice at different locations then create the file from that?  - just a file with series of addresses for which to add a 16bit offset would be more ideal - in binary format.

Interesting someone else asked for a similar thing in a different forum:  https://www.z88dk.org/forum/viewtopic.php?t=9116

I am guessing my approach would be to assemble the code at 0000 and then again at 1111 and compare the differences and make an address list.

roudoudou

Quote from: zhulien on 02:41, 02 May 23with RASM, is there a way to generate the relocation file so that I can make a relocator? or do i need to assemble it twice at different locations then create the file from that?  - just a file with series of addresses for which to add a 16bit offset would be more ideal - in binary format.

Interesting someone else asked for a similar thing in a different forum:  https://www.z88dk.org/forum/viewtopic.php?t=9116

I am guessing my approach would be to assemble the code at 0000 and then again at 1111 and compare the differences and make an address list.
an external relocator is possible, i made a prototype years ago where you can declare procedure etc. https://github.com/EdouardBERGE/rasm/issues/8

but as .REL files are not really documented...

it may be possible to make an relocation table inside the binary (at the beggining?) or another file but i guess you need to be more specific (contact me via email)



My pronouns are RASM and ACE

zhulien

Quote from: roudoudou on 06:56, 02 May 23
Quote from: zhulien on 02:41, 02 May 23with RASM, is there a way to generate the relocation file so that I can make a relocator? or do i need to assemble it twice at different locations then create the file from that?  - just a file with series of addresses for which to add a 16bit offset would be more ideal - in binary format.

Interesting someone else asked for a similar thing in a different forum:  https://www.z88dk.org/forum/viewtopic.php?t=9116

I am guessing my approach would be to assemble the code at 0000 and then again at 1111 and compare the differences and make an address list.
an external relocator is possible, i made a prototype years ago where you can declare procedure etc. https://github.com/EdouardBERGE/rasm/issues/8

but as .REL files are not really documented...

it may be possible to make an relocation table inside the binary (at the beggining?) or another file but i guess you need to be more specific (contact me via email)




It would be great if there was an option to have a table of addresses at the start or end (optional).  For me the end is best, because I can load an application, relocate and write over the relocation table, I guess someone could do that at the start if they prefer that, but... the start is more often a header or where program execution starts - so it would be less common.  If at the end, a simple table of 16-bit values, the first being a count of how many 16-bit values follow.  Those values would all be addresses (assuming 0000 is the start address) for which a 16-bit offset would be added.  The 16-bit offsets of course up to the developer, but it makes their (and mine) life easier if we assemble the code at 0000 also so it is just a simple addition of the load address to each of those addresses in the table.

It's a fantastic assembler and now use it for my Z80 dev when cross assembling. 

zhulien

I found sjasmplus has pretty much that exact feature (it seems).  it works by having 2 assembler directives.

relocate_start and relocate_end which you wrap around the entire code you want to relocate, oddly the examples also put the following assembler variables within those.

relocate_table and relocate_count.  This means the count can be anywhere assigned to a dw for example.  and the table put anywhere also.  I'd rather use rasm if i have a choice.

roudoudou

Quote from: zhulien on 23:24, 02 May 23I found sjasmplus has pretty much that exact feature (it seems).  it works by having 2 assembler directives.

relocate_start and relocate_end which you wrap around the entire code you want to relocate, oddly the examples also put the following assembler variables within those.

relocate_table and relocate_count.  This means the count can be anywhere assigned to a dw for example.  and the table put anywhere also.  I'd rather use rasm if i have a choice.

Yep, there is something similar with winape assembler, will dig into it
My pronouns are RASM and ACE

roudoudou

i made a prototype version of relocation section, the directives names are different from winape/sjasm because the behaviour is not the same

what i understand from winape is that you can only relocate 16 bits pointers which is a very simplified version of relocation

my version can handle 16bits as 8bits pointer usage, distinguishing low weight and high weight usage cases

short doc for the prototype => http://rasm.wikidot.com/directives:relocate
My pronouns are RASM and ACE

zhulien

Quote from: roudoudou on 11:32, 21 May 23i made a prototype version of relocation section, the directives names are different from winape/sjasm because the behaviour is not the same

what i understand from winape is that you can only relocate 16 bits pointers which is a very simplified version of relocation

my version can handle 16bits as 8bits pointer usage, distinguishing low weight and high weight usage cases

short doc for the prototype => http://rasm.wikidot.com/directives:relocate
Can you elaborate on what the 8bit pointers are?  I did read your PMs about lo and hi, are they assembler directives or macros?  or unofficial Z80 instructions?

roudoudou

#296
Quote from: zhulien on 12:48, 22 May 23
Quote from: roudoudou on 11:32, 21 May 23i made a prototype version of relocation section, the directives names are different from winape/sjasm because the behaviour is not the same

what i understand from winape is that you can only relocate 16 bits pointers which is a very simplified version of relocation

my version can handle 16bits as 8bits pointer usage, distinguishing low weight and high weight usage cases

short doc for the prototype => http://rasm.wikidot.com/directives:relocate
Can you elaborate on what the 8bit pointers are?  I did read your PMs about lo and hi, are they assembler directives or macros?  or unofficial Z80 instructions?

it's high weight or low weight, it's useful to compute addresses by spliting weight sometimes

hi and lo are math functions (common with other assemblers)  to get lo w or high w of a 16 value
forget about it, it's barely like using ptr>>8 or ptr&0xFF as immediate value
My pronouns are RASM and ACE

zhulien

Is low weight and high weight a specific RASM feature? I've never heard of such before.

roudoudou

Quote from: zhulien on 12:55, 22 May 23Is low weight and high weight a specific RASM feature? I've never heard of such before.
it's a very common feature of many assemblers ;D sometimes with high/low keyword
My pronouns are RASM and ACE

zhulien

SJASM for some things which breaks the relocation throws up a warning, perhaps hi and lo could do that - and people who need relocation wouldn't use those - it is 'sort of' a copout, but it is a reasonable one until a way to resolve that could be found.

Powered by SMFPacks Menu Editor Mod