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 2 Guests are viewing this topic.

roudoudou

The purpose of proximity labels is to offer an entry point everywhere, without having unicity of labels


You can use a label .loop almost everywhere when you need it (but not directly after another .loop label) :)


BUT, if you need to jump to a proximity label out of the scope, just add the global reference -> routine1.loop, routine2.loop, ...


Anyway, that feature is a feature, there is no obligation to use it.



My pronouns are RASM and ACE

Targhan

Hmm, I'm note sure I understand, but is the following correct:
MySubCode:
ld a,5
.loop
dec a
jr nz, .loop    --> it will jump one line above.
ret


MySubCode2:
ld b,10
.loop
djnz .loop     --> it will jump one line above, NOT to the MySubCode.loop
ret


Right?
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

krusty_benediction

yes. This is what I'm doing since years with vasm and asjamsplus
I use normal label as function (i.e. similar to a function in C language) name and local labels as branches inside the function (.i.e. similar to a label in C language)

Quote from: Targhan on 13:48, 19 June 18Hmm, I'm note sure I understand, but is the following correct:
MySubCode:
ld a,5
.loop
dec a
jr nz, .loop    --> it will jump one line above.
ret


MySubCode2:
ld b,10
.loop
djnz .loop     --> it will jump one line above, NOT to the MySubCode.loop
ret


Right?

Targhan

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

huge update, documentation is not finished yet (and the english version is still 10 versions late...)
update v0.87
- new proximity labels
- rasm is able to use variables inside label names
- INCBIN directive enhanced for WAV import as a CPC sample or DMA list
- REPEAT directive may export internal counter to a variable
- new directive IFUSED & IFNUSED
- new math operator ! for NOT
- new math function PSGVALUE
- rasm return 1 to shell when there is error(s)
- new options to export dependencies (makefile style)
- new option to define variable(s) from command line
- new option for extended error messages
- bugfix cases during preprocessing
- bugfix tags PAGE & PAGESET
- new autotests embedded in Rasm in order to reduce regressions

My pronouns are RASM and ACE

GUNHED

Quote from: roudoudou on 08:37, 24 June 18
(and the english version is still 10 versions late...)


Please catch up, before you forget everything  ;)   :) :) :)
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.89, many bugfixes due to recent evolutions
- bugfix dependencies export
- bugfix in preprocessor
- simplify path of dependencies when possible
- enhanced ASSERT may PRINT additional parameters
My pronouns are RASM and ACE

roudoudou

update v0.90
- PROTECT directive does not increase automatic binary size anymore
- bugfix memory leak with proximity labels
- proximity label properties also for alias EQU
- label declaration may use formula (with tags), but only declaration for the moment

still working on doc. French doc partially updated and onlineEnglish online documentation done at 75%
My pronouns are RASM and ACE

roudoudou

#133
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

Quote from: GUNHED on 09:27, 28 June 18
Actually for EN this link works:
http://www.roudoudou.com/rasm/rasm_en.html
Thanks! Again this shitty editor  :'( I fixed my postS

My pronouns are RASM and ACE

HAL6128


@roudoudou :
RASM says during assembling that after e.g. LD BC,#FF63 and an OUT (C),A it is truncating the value #FF63 to #63. Does it really truncate it?
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

roudoudou

Quote from: HAL 6128 on 18:36, 07 July 18
@roudoudou :
RASM says during assembling that after e.g. LD BC,#FF63 and an OUT (C),A it is truncating the value #FF63 to #63. Does it really truncate it?
Quotesorry i cannot reproduce what you say with ld bc,#FF63 and out (c),a
Quotemust be another line
Quotehave you some DB/DEFB around?

My pronouns are RASM and ACE

HAL6128


Hmm, sorry. I found the error I made.
I've defined a variable:

VALUE EQU #FF63
...
LD A,0
LD BC,#FF63
OUT (VALUE),A

I had forgot to rewrite the out command.
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

roudoudou

update v0.91
- bugfix school case with crunched block
- bugfix proximity labels when using loops or macros
- bugfix imbricated IFUSED/IFNUSED
- new directive FAIL will print a message before exiting with an error flag
- label usage may use formula
- escaped codes support in strings (disregarding the current charset)
- PRINT directive may compute formula in strings when using curly brackets
- RUN directive may set the gate array configuration for snapshots
- generated label with negative index will trigger an error
- overriding an alias with a variable will trigger an error
- overriding a variable with an alias will trigger an error
- missing ENDIF at the end of the source will trigger an error
My pronouns are RASM and ACE

Ast

Rasm forever ! May the french soccer team win tonight !
_____________________

Ast/iMP4CT. "By the power of Grayskull, i've the power"

http://amstradplus.forumforever.com/index.php
http://impdos.wikidot.com/
http://impdraw.wikidot.com/

All friends are welcome !

roudoudou

Did not see the match, i was busy fixing PAGE tag -> v0.92 update  ;D
My pronouns are RASM and ACE

GUNHED

Hi!

In RASM there is this code example:

ld (iy+1),PDATE
ld (iy+2),PDATE>>8

PDATE equ 1234

How would this be written in Maxam (I need this for quick testing)
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

replace >>8 by /256

Note: In rasm mode /256 will round upper, in maxam mode this will truncate and may lead to another result
My pronouns are RASM and ACE

GUNHED

Thanks, I thought about /256. Maxam does it like RASM. But...

ld (iy),variable_of_16_bit

What does it do in RASM? Does it only write the lower 8 bits? Maxam produces an error.

Sorry for bugging, but in the example before, it would write the hi-byte first, and then the low-byte. Shouldn't it the other way around?

RASM is really full of new features, lot's of stuff to learn ;-)
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 00:27, 11 July 18
Thanks, I thought about /256. Maxam does it like RASM. But...

ld (iy),variable_of_16_bit

What does it do in RASM? Does it only write the lower 8 bits? Maxam produces an error.

Sorry for bugging, but in the example before, it would write the hi-byte first, and then the low-byte. Shouldn't it the other way around?

RASM is really full of new features, lot's of stuff to learn ;-)
with rasm you can do
ld (iy+0),lo(variable_of_16_bit)
ld (iy+1),hi(variable_of_16_bit)
orld (iy+0),variable_of_16_bit&#FF
ld (iy+1),variable_of_16_bit>>8
there is no other shortcut but you can also do a macro :) macro LDIY16 valuetoput
ld (iy+0),lo({valuetoput})
ld (iy+1),hi({valuetoput})
endm
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.93
- bugfix RUN gate array configuration
- overriding an alias with a label will trigger an error
- PRINT directive may use escaped chars in strings
- tags BANK,PAGE,PAGESET may be used with current adress $

A bug may still occur with proximity labels mixing macro, generated names (but i cannot reproduce it)
My pronouns are RASM and ACE

roudoudou

update v0.94
- bugfix using macro parameter inside print quote
- bugfix multiple memory leak with tag replacement
- bugfix command line side effect with wrong option
- better hack in expression calculator for expression beginning with negative value
- better equality processing in expression calculator
exewin32 does not have all the fix, will be available monday since i need a 32 bits compiler i do not have at home
My pronouns are RASM and ACE

roudoudou

update v0.95
- allow spaces in tags inside strings with PRINT directive
- display warning if you try to export symbols or breakpoints with snapshot version 2
- proximity label beginning with BRK will generate an exportable breakpoint
- new enhanced LD instructions documented here http://www.roudoudou.com/rasm/rasm_en.html#Instructions
My pronouns are RASM and ACE

Powered by SMFPacks Menu Editor Mod