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.

roudoudou

#75
update v071
- math functions HI & LO to get high 8 bits or low 8 bits of a pseudo 16 bits value
- @ prefix for octal values
- AS80 assembler compatibility mode* (enough to compile CNG player with the same wrong calculations  :P )








short doc
Quote
-ass   AS80 behaviour mimic

       
  • all calculations are done with 32 bits integer values and wrong rounding
  • macro parameters are not protected with {} anymore
  • multiple declarations with DEFB,DEFW,DEFI got reference adress of the first outputed byte. That's why with AS80, using multiple DEFB produces a different result than using DEFB with multiple values
  • MACRO declaration directive must be used after the macro name
My pronouns are RASM and ACE

GUNHED

http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

roudoudou

update v0.72
- ability to generate snapshot v2 (useful with M4Wifi)

short doc

BUILDSNA V2
My pronouns are RASM and ACE

Bill

Hi,

Now I feel dumb, I can not get the program to run. I just see the command prompt window to open in a fraction of a second, not able to read what it says, and that's it.


Bill

roudoudou

Quote from: Bill on 04:14, 27 February 18
Hi,

Now I feel dumb, I can not get the program to run. I just see the command prompt window to open in a fraction of a second, not able to read what it says, and that's it.


Bill
It is a command line tool.
Open a terminal and run
My pronouns are RASM and ACE

roudoudou

update v0.73
- bugfix in snapshot when using distinct banks instead of gathering them with bankset directive
My pronouns are RASM and ACE

roudoudou

quick update v0.74
- usage of snapshot directives forces snapshot output
- try to load .asm or .Z80 file if filename given is not found and has no extension
- BREAKPOINT directive may have an additional parameter to set break adress anywhere
- declaring two MACRO with the same name will trigger an error
- bugfix regression of -m option handling
- each REPEAT or WHILE loop export a REPEAT_COUNTER or WHILE_COUNTER variable, locally
My pronouns are RASM and ACE

roudoudou

update v0.75
- newer and faster expression calculator without limitations of comparisons
- % may be used as modulo (still used for binary values)
- Intel hexa & binary style support
- Binary prefix 0b fixed
- does not export IX and IY anymore in symbol files
- better error messages when calculating expressions
- boolean operators && and ||
- PUSH & POP may have more than one register in parameters
- NOP may be multiplied specifying a number of repetition in parameter
- alias <> for != comparison operator
- filenames are forced to upper case when saved to EDSK
- Infinite loop detection won't go to infinite loop anymore ^_^

As the solver is very different from the previous version, i keep the 0.74 version available, in case of regression

Now i have to work on the documentation, again  ;D
My pronouns are RASM and ACE

GUNHED

Another big update! Thank you!


It's great to have a French manual (mother tongue is always the best). But please also update the English manual if needed (still shows 0.72, not 0.75, but maybe it need no update - I have to find out :-))


Keep the great work going!!!  :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

roudoudou

I have to work on english version too before updating here ;)
My pronouns are RASM and ACE

GUNHED

Yeah, I know, and making docs and manuals is just no fun.  :P  But if you come to an end (or close to an end) I would like to make a translation to German language for you.  :)  Just let me know when "final" stage is in sight  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

roudoudou

update v0.76
- fix solver when using % prefixed binary values close to comparison operator or parenthesis

Both FR & EN doc updated  8)
My pronouns are RASM and ACE

roudoudou

quick update for maxam compatibility mode users
update v0.77

- even faster expression calculation
- maxam & AS80 comparison operators are back
My pronouns are RASM and ACE

roudoudou

ultra-light but requested update v0.78
- DEFS can handle multiple repetition schemas
- alias DM & DEFM for DEFB

My pronouns are RASM and ACE

roudoudou

update v0.79
- != operator is back with new solver  :doh:
My pronouns are RASM and ACE

roudoudou

update v0.80

- bugfix operator > and >=
- bugfix Maxam priorities

My pronouns are RASM and ACE

roudoudou


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  >:(
My pronouns are RASM and ACE

Golem13

Fixes are validated coz 0.81 is working fine for me. 8)
Thanks Roudoudou  :-*

GUNHED

Yes, 81 seems to be a good number. Everything stable and well here too.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

roudoudou

Quote from: GUNHED on 13:32, 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
My pronouns are RASM and ACE

roudoudou

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)
My pronouns are RASM and ACE

roudoudou

update v0.83
- NOCODE output must increment current adress in all cases
- new directives DR & DEFR to define REAL values (Amstrad firmware compatible)

Example:
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

My pronouns are RASM and ACE

Targhan

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?
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

roudoudou

Quote from: Targhan on 08: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?
Using INT() must solve the case
My pronouns are RASM and ACE

roudoudou

You may be interrested also by the floor() function, the result is again different in another way


Example:





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



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


My pronouns are RASM and ACE

Powered by SMFPacks Menu Editor Mod