Author Topic: Rasm Z80 assembler v0.85 [update 2018.04.18]  (Read 9174 times)

0 Members and 1 Guest are viewing this topic.

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 448
  • Country: fr
    • urban exploration
  • Liked: 505
Re: Rasm Z80 assembler v0.80 [update 2018.04.05]
« Reply #90 on: 10:28, 05 April 18 »
update v0.80

- bugfix operator > and >=
- bugfix Maxam priorities

use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 448
  • Country: fr
    • urban exploration
  • Liked: 505
Re: Rasm Z80 assembler v0.80 [update 2018.04.05]
« Reply #91 on: 14:53, 05 April 18 »

update v0.81
- added special maxam priorities for parenthesis and boolean operators




The priority management in maxam compatibility mode is less trivial than it seems to be  >:(
use RASM, the best assembler ever made :p

I will survive

Offline Golem13

  • CPC464
  • **
  • Posts: 18
  • Country: fr
  • Liked: 41
Re: Rasm Z80 assembler v0.80 [update 2018.04.05]
« Reply #92 on: 21:56, 05 April 18 »
Fixes are validated coz 0.81 is working fine for me. 8)
Thanks Roudoudou  :-*

Offline GUNHED

  • CPC6128
  • ****
  • Posts: 297
  • Country: us
  • Reincarnation of TFM
  • Liked: 135
Re: Rasm Z80 assembler v0.81 [update 2018.04.05]
« Reply #93 on: 15:32, 06 April 18 »
Yes, 81 seems to be a good number. Everything stable and well here too.  :)

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 448
  • Country: fr
    • urban exploration
  • Liked: 505
Re: Rasm Z80 assembler v0.81 [update 2018.04.05]
« Reply #94 on: 17:48, 06 April 18 »
Yes, 81 seems to be a good number. Everything stable and well here too.  :)
I have another version pending  ;D
With 'while 0 bugfix' but nothing really important
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 448
  • Country: fr
    • urban exploration
  • Liked: 505
Re: Rasm Z80 assembler v0.82 [update 2018.04.09]
« Reply #95 on: 15:38, 09 April 18 »
Due to my system upgrade (a 6 years old ubuntu LTS to the new Lubuntu beta LTS) i remove many compilation warnings. CLang compilation takes ages but the performance of the executable is noticable (30% faster)

- I added also SL1 alias for SLL
- better infinite loop detection (i mean, safer)
- bugfix while 0 loop (check and disable block)
- repeat until internal counter harmonisation (now they are all starting from value 1)
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 448
  • Country: fr
    • urban exploration
  • Liked: 505
Re: Rasm Z80 assembler v0.83 [update 2018.04.11]
« Reply #96 on: 21:28, 11 April 18 »
update v0.83
- NOCODE output must increment current adress in all cases
- new directives DR & DEFR to define REAL values (Amstrad firmware compatible)

Example:
Code: [Select]
org #8000
call #BBBA ; GRA initialize

ld a,1
call #BC0E ; mode 1
ld a,1
call #BD97 ; deg

ld de,320
ld hl,200
call #BBC9 ; origin 320,200

ld de,180
ld hl,0
call #BBC0 ; move 180,0



ld b,0

circle_trace
    push bc
    ld hl,angle
    ld de,incre
    call #BD7C ; angle=angle+incre

    ld de,angle
    ld hl,tmp
    call #BD61 ; tmp=angle
    call #BDAF ; tmp=cosinus(tmp)
    ld de,rayon
    call #BD85 ; tmp=tmp*rayon
    call #BD6A ; HL=int(tmp)
    call m,fixsign
    push hl

    ld de,angle
    ld hl,tmp
    call #BD61 ; tmp=angle
    call #BDAC ; tmp=sinus(tmp)
    ld de,rayon
    call #BD85 ; tmp=tmp*rayon
    call #BD6A ; HL=int(tmp)
    call m,fixsign
    pop de

    call #BBF6 ; LINE DE,HL

    pop bc
    djnz circle_trace
ret

fixsign
    ld de,0
    ex hl,de
    or a
    sbc hl,de
    ret
   

rayon   defr     180
angle   defr       0
incre   defr 360/256
tmp        defr       0

use RASM, the best assembler ever made :p

I will survive

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 572
  • Country: fr
  • Liked: 501
Re: Rasm Z80 assembler v0.83 [update 2018.04.11]
« Reply #97 on: 10:48, 12 April 18 »
I just learned (at the Revision, from Offset) that Basic has an integer division, with the symbol \ (or ç on French keyboard). I already reported you that the "accurate" division was a bit problematic in some cases. Do you think something similar could be implemented?

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 448
  • Country: fr
    • urban exploration
  • Liked: 505
Re: Rasm Z80 assembler v0.83 [update 2018.04.11]
« Reply #98 on: 12:56, 12 April 18 »
I just learned (at the Revision, from Offset) that Basic has an integer division, with the symbol \ (or ç on French keyboard). I already reported you that the "accurate" division was a bit problematic in some cases. Do you think something similar could be implemented?
Using INT() must solve the case
use RASM, the best assembler ever made :p

I will survive

Offline roudoudou

  • 464 Plus
  • *****
  • Posts: 448
  • Country: fr
    • urban exploration
  • Liked: 505
Re: Rasm Z80 assembler v0.83 [update 2018.04.11]
« Reply #99 on: 14:04, 12 April 18 »
You may be interrested also by the floor() function, the result is again different in another way


Example:



Code: [Select]

a=10
b=2
repeat 10
print a,"/",b," normal=",a/b," int()=",int(a/b)," floor()=",floor(a/b)
b=b+1
rend


Will produce


Code: [Select]
10.00 / 2.00  normal= 5.00  int()= 5.00  floor()= 5.00
10.00 / 3.00  normal= 3.33  int()= 3.00  floor()= 3.00
10.00 / 4.00  normal= 2.50  int()= 3.00  floor()= 2.00
10.00 / 5.00  normal= 2.00  int()= 2.00  floor()= 2.00
10.00 / 6.00  normal= 1.67  int()= 2.00  floor()= 1.00
10.00 / 7.00  normal= 1.43  int()= 1.00  floor()= 1.00
10.00 / 8.00  normal= 1.25  int()= 1.00  floor()= 1.00
10.00 / 9.00  normal= 1.11  int()= 1.00  floor()= 1.00
10.00 / 10.00  normal= 1.00  int()= 1.00  floor()= 1.00
10.00 / 11.00  normal= 0.91  int()= 1.00  floor()= 0.00

use RASM, the best assembler ever made :p

I will survive