Author Topic: Rasm Z80 assembler v0.86 [update 2018.04.27]  (Read 10728 times)

0 Members and 1 Guest are viewing this topic.

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 655
  • Country: fr
  • Liked: 596
Re: Rasm Z80 assembler v0.83 [update 2018.04.11]
« Reply #100 on: 14:50, 12 April 18 »
Interesting. But for my use case, I think the shift (>>) will be more explicit, in fact!

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 472
  • Country: fr
    • urban exploration
  • Liked: 523
Re: Rasm Z80 assembler v0.84 [update 2018.04.18]
« Reply #101 on: 12:22, 18 April 18 »
update v0.84
- new directives STRUCT and ENDSTRUCT, ENDS to create structures
- fix regression introduced with v0.75 and embedded usage (like Arkos Tracker II does)

Documentation FR updated, EN will follow


Example of structures manipulations

 
Code: [Select]
org #1000

label1

struct st1
ch1 defw 0
ch2 defb 0
endstruct

struct st2
ch1 defb 0
ch2 defw 0
endstruct

label2

assert label1==label2           ; declaring a struct does not change code output
assert st1.ch1<st1              ; declaring a struct is not affected by current output adress
assert st1==st2                 ; size of both structs is equal (NOT recommended vasm syntax)
assert {sizeof}st1=={sizeof}st2 ; explicit size of
assert st1.ch2!=st2.ch2         ; no confusion between struct with identical fields names

struct metast1
struct st1 sub1 ; imbricated structs
struct st2 sub2
endstruct

label3

assert label3==label2 && label3==label1         ; declaring a struct using struct does not change code output
assert metast1.sub1<metast1.sub2                ; check sub-structs are in order
assert metast1.sub1.ch2<metast1.sub2.ch1        ; check sub-structs are not overlapping
assert {sizeof}metast1.sub1=={sizeof}st1        ; can get sizeof in many ways
assert {sizeof}metast1=={sizeof}st1+{sizeof}st2 ; metast1 struct = struct st1+st2
use RASM, the best assembler ever made :p

I will survive

Offline Golem13

  • CPC464
  • **
  • Posts: 21
  • Country: fr
  • Liked: 43
Re: Rasm Z80 assembler v0.84 [update 2018.04.18]
« Reply #102 on: 12:26, 18 April 18 »
Ok ok :P ... That's a fact: I am in love :-* :-*

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 472
  • Country: fr
    • urban exploration
  • Liked: 523
Re: Rasm Z80 assembler v0.85 [update 2018.04.18]
« Reply #103 on: 23:03, 18 April 18 »
update v0.85
- fix regressions introduced by STRUCT code modifications
- added some checks and error messages

for the record, one of this regression had 1 chance on a billion to occur. Golem13 project wins the ticket!  :laugh:
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 472
  • Country: fr
    • urban exploration
  • Liked: 523
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #104 on: 15:54, 27 April 18 »
update v0.86
- fix many bugs in label import
- fix multi-nops
- fix automatic extension for primary source
- fix infinite loop when error on reserved keyword in an expression
- shortcuts LD BC/DE/HL,BC/DE/HL (uz80 style)
- UZ80 compatibility option (for new versions of CNG player)


NEW online documentation FR http://www.roudoudou.com/rasm/rasm_fr.html

Still working on online ENglish documentation
« Last Edit: 15:56, 27 April 18 by roudoudou »
use RASM, the best assembler ever made :p

I will survive

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.133
  • Country: au
    • index.php?action=treasury
  • Liked: 765
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #105 on: 07:38, 01 May 18 »
I'm really enjoying using RASM - thanks roudoudou!
Just wondering, is there a way to have multiple commands on one line?

For example, instead of:
Code: [Select]
ld a,#33
ld (hl),a
inc l

Is there a way to do something like this?
Code: [Select]
ld a,#33; ld (hl),a; inc l

[EDIT] I think I found the answer.  ;D 

Code: [Select]
ld a,#33:ld (hl),a:inc l

Now THAT is a great feature!
« Last Edit: 07:47, 01 May 18 by ervin »
My entry for the CPCRetroDev 2017 Competition http://www.cpcwiki.eu/forum/programming/my-cpcretrodev-2017-entry/
FAST line drawing in CPCtelera http://www.cpcwiki.eu/forum/programming/drawing-lines-with-cpctelera-sdcc/
RUNCPC My entry for the CPCRetroDev 2015 Competition http://www.pouet.net/prod.php?which=66566

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 472
  • Country: fr
    • urban exploration
  • Liked: 523
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #106 on: 23:19, 05 May 18 »
I updated the z80.vim in order to highlight rasm directives
http://www.roudoudou.com/rasm/z80.vim

But i'm still stuck with literal values...
Sometimes no color, sometimes half color (hex values...)

Code: [Select]
syn match z80Number "\$[\x]\{1,8}"
syn match z80Number "\$"
syn match z80Number "0x[\x]\{1,8}"
syn match z80Number "0b[01]\{1,32}"
syn match z80Number "#[\x]\{1,8}"
syn match z80Number "%[01]\{1,32}"
syn match z80Number "@[\o]\+"
syn match z80Number "[01]\{1,32}b"
syn match z80Number "[\x]\{1,8}h"
syn match z80Number "[0-9\.]\+"
use RASM, the best assembler ever made :p

I will survive

Offline Arnaud

  • Supporter
  • 464 Plus
  • *
  • Posts: 372
  • Country: fr
  • Liked: 258
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #107 on: 10:01, 06 May 18 »
I very nice feature for the C developper could be the possibility to generate a Library compatible SDCC.

Of course i have not idea how difficult could be the task  :P

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 472
  • Country: fr
    • urban exploration
  • Liked: 523
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #108 on: 10:09, 06 May 18 »
I very nice feature for the C developper could be the possibility to generate a Library compatible SDCC.
Of course i have not idea how difficult could be the task  :P

I guess i have to find the .rel format description?
use RASM, the best assembler ever made :p

I will survive

Offline Arnaud

  • Supporter
  • 464 Plus
  • *
  • Posts: 372
  • Country: fr
  • Liked: 258
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #109 on: 10:26, 06 May 18 »
I guess i have to find the .rel format description?

There's a doc about library in SDCC / SDASsembly (sdcc/src/sdas/doc)

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.133
  • Country: au
    • index.php?action=treasury
  • Liked: 765
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #110 on: 03:09, 11 May 18 »
Quick question about using ORG...

I've got a bunch of code that refers to a jump table.

A trivial example:

Code: [Select]
ORG #9000

LD HL,jumptable
; do some stuff
RET

jumptable:
defw row1,row2,row3,row4
defw row5,row6,row7,row8

I can't figure out how to put the jump table at a specific memory address.
When I try (by putting ORG #9800, for example), I get all sorts of unexpected behaviour.
When I don't have ORG before the jump table, the program behaves correctly.

Is there a way to put the jump table into a specific memory address?

Thanks.
My entry for the CPCRetroDev 2017 Competition http://www.cpcwiki.eu/forum/programming/my-cpcretrodev-2017-entry/
FAST line drawing in CPCtelera http://www.cpcwiki.eu/forum/programming/drawing-lines-with-cpctelera-sdcc/
RUNCPC My entry for the CPCRetroDev 2015 Competition http://www.pouet.net/prod.php?which=66566

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 472
  • Country: fr
    • urban exploration
  • Liked: 523
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #111 on: 09:57, 11 May 18 »
Quick question about using ORG...

I've got a bunch of code that refers to a jump table.

A trivial example:

Code: [Select]
ORG #9000

LD HL,jumptable
; do some stuff
RET

jumptable:
defw row1,row2,row3,row4
defw row5,row6,row7,row8

I can't figure out how to put the jump table at a specific memory address.
When I try (by putting ORG #9800, for example), I get all sorts of unexpected behaviour.
When I don't have ORG before the jump table, the program behaves correctly.

Is there a way to put the jump table into a specific memory address?

Thanks.

Could you be more specific?

Code: [Select]
org #9000

ld hl,jumptable

org #9800

jumptable
defw row1,row2,row3

org #A000
row1 nop
row2 nop
row3 nop

is assembled correctly so i guess the error is elsewhere

Code: [Select]
#21 #00 #98
...many zeroes...
#00 #A0 #01 #A0 #02 #A0

for a total of 4099 bytes

use RASM, the best assembler ever made :p

I will survive

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.133
  • Country: au
    • index.php?action=treasury
  • Liked: 765
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #112 on: 10:28, 11 May 18 »
Could you be more specific?

Code: [Select]
org #9000

ld hl,jumptable

org #9800

jumptable
defw row1,row2,row3

org #A000
row1 nop
row2 nop
row3 nop

is assembled correctly so i guess the error is elsewhere

Code: [Select]
#21 #00 #98
...many zeroes...
#00 #A0 #01 #A0 #02 #A0

for a total of 4099 bytes

The simplified example I gave was just to demonstrate the code structure.

In my program where I'm moving a large sprite around the screen, the sprite is drawn very quickly, when I don't have the ORG before the jumptable.
When I do have the ORG before the jumptable, the program slows down tremendously, although I think it is the screen rendering that is being slowed down instead of the sprite.

Actually maybe the ORG #9800 is clashing with something in my rendering code... I don't think it is, but I'll check it out.
My entry for the CPCRetroDev 2017 Competition http://www.cpcwiki.eu/forum/programming/my-cpcretrodev-2017-entry/
FAST line drawing in CPCtelera http://www.cpcwiki.eu/forum/programming/drawing-lines-with-cpctelera-sdcc/
RUNCPC My entry for the CPCRetroDev 2015 Competition http://www.pouet.net/prod.php?which=66566

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.133
  • Country: au
    • index.php?action=treasury
  • Liked: 765
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #113 on: 15:41, 11 May 18 »
Yes, indeed it was my silly mistake.
I was overwriting other data.

My apologies for the confusion.
My entry for the CPCRetroDev 2017 Competition http://www.cpcwiki.eu/forum/programming/my-cpcretrodev-2017-entry/
FAST line drawing in CPCtelera http://www.cpcwiki.eu/forum/programming/drawing-lines-with-cpctelera-sdcc/
RUNCPC My entry for the CPCRetroDev 2015 Competition http://www.pouet.net/prod.php?which=66566

Offline fgbrain

  • CPC6128
  • ****
  • Posts: 192
  • Country: gr
    • index.php?action=treasury
    • Chaos CPC Homepage
  • Liked: 82
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #114 on: 11:05, 14 May 18 »
RASM looks awesome... but it doesnt run in my old PC  (win xp)

it says "rasm.exe is not a valid win32 application"  >:(

sorry perhaps I am old and lame...
_____

6128 (UK keyboard, Crtc type 0/2), 6128+ (UK keyboard), 3.5" and 5.25" drives, Reset switch and Digiblaster (selfmade), Inicron Romram box, Bryce Megaflash, SVideo & PS/2 mouse, , Magnum Lightgun, X-MEM, X4 Board, C4CPC, Multiface2 X4, RTC X4 and Gotek USB Floppy emulator.

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 472
  • Country: fr
    • urban exploration
  • Liked: 523
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #115 on: 11:53, 14 May 18 »
RASM looks awesome... but it doesnt run in my old PC  (win xp)

it says "rasm.exe is not a valid win32 application"  >:(

sorry perhaps I am old and lame...


I will try to compile a 32 bits version (if i find the correct compiler option)
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 472
  • Country: fr
    • urban exploration
  • Liked: 523
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #116 on: 14:54, 14 May 18 »
RASM looks awesome... but it doesnt run in my old PC  (win xp)
it says "rasm.exe is not a valid win32 application"  >:(


I added the archive rasm_v086_exewin32.zipin the first post
use RASM, the best assembler ever made :p

I will survive

Offline fgbrain

  • CPC6128
  • ****
  • Posts: 192
  • Country: gr
    • index.php?action=treasury
    • Chaos CPC Homepage
  • Liked: 82
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #117 on: 21:15, 14 May 18 »
I am sorry to say that this new exe doesn't work as well...

Runs in window and closes immediately!!
_____

6128 (UK keyboard, Crtc type 0/2), 6128+ (UK keyboard), 3.5" and 5.25" drives, Reset switch and Digiblaster (selfmade), Inicron Romram box, Bryce Megaflash, SVideo & PS/2 mouse, , Magnum Lightgun, X-MEM, X4 Board, C4CPC, Multiface2 X4, RTC X4 and Gotek USB Floppy emulator.

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 472
  • Country: fr
    • urban exploration
  • Liked: 523
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #118 on: 21:19, 14 May 18 »
I am sorry to say that this new exe doesn't work as well...

Runs in window and closes immediately!!
It's a command line tool, so open a terminal to run it

And as Rasm is the fastest assembler ever made, i'm happy to see the windows closes "immediately" even on an old XP machine  ;D
use RASM, the best assembler ever made :p

I will survive

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 848
  • Country: dk
    • spinpoint.org
  • Liked: 789
Re: Rasm Z80 assembler v0.86 [update 2018.04.27]
« Reply #119 on: 23:15, 14 May 18 »
And as Rasm is the fastest assembler ever made, i'm happy to see the windows closes "immediately" even on an old XP machine  ;D
It's lightning fast indeed, big pleasure to use, thanks!