News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

64 NOPs | Tech blog for Amstrad CPC

Started by toms, 17:49, 26 October 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Targhan

Twitter is an excellent idea! However, watch out, both your links are broken :).
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

Gryzor

#26
Well the link to twitter is wrong (I fixed it) and the account doesn't have any tweets to rt ;)

But thanks for the ever interresting articles!


Actually for some weird reason there's always a "The" appended to the twitter url! https://twitter.com/64Nops

Hicks

You are true @Gryzor !So here is a first post on our Twiter account, for this new article: Clean z80 Coding (2/2).
I wish this time my links will be ok :)

Gryzor


Z|G

#29
Great read!

I hope to see more.

https://64nops.wordpress.com/
1xCPC6128, 1xTandy Model 4, 1xC64 (IN BOX)

eto

Quote from: Hicks on 09:19, 01 July 21for this new article: Clean z80 Coding (2/2).

Awesome! Really helpful for Assembler newbies like myself! Thanks a lot, I will give this a try.

Targhan

Nice article, @Hicks, thanks!

One addition about labels. One great feature of Rasm (but I'm sure Orgams may implement it in the future, isn't it @m_dr_m?) is proximity labels.
For example, a lot of times, you have loop labels because most of our code is made of loops. One solution is to prefix the loop label with a context.
DisplaySprite
     ld b,40
DisplaySpriteLoopY
...
     djnz DisplaySpriteLoopY

NextStuff
     ld b,12
NextStuffLoopY
...
     djnz NextStuffLoopY


This is ok, but cumbersome. With proximity labels, you can write:
DisplaySprite
     ld b,40
.loopY
...
     djnz .loopY

NextStuff
     ld b,12
.loopY
...
     djnz .loopY



Two instances of LoopY, yet they don't conflict, because proximity labels are linked to the previous non-proximity label.
Cleaner code!
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

eto

Quote from: Targhan on 08:48, 02 July 21Two instances of LoopY, yet they don't conflict, because proximity labels are linked to the previous non-proximity label.

I'm not sure if this is more elegant or can cause problems. Probably depends how and where these are used. If you refactor code, you could end up in a situation where you accidentally remove one of the labels but your code could still properly assemble - and now jumps to another area in RAM. Probably less of a problem if you use it only for (short) loops.

Targhan

I use it a lot, it works great, and I almost never had problems. But it is for proximity labels, so it should be used only in short codes. As every tool, it has to be used in contexts that fit.
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

m_dr_m

Quote from: Targhan on 08:48, 02 July 21(but I'm sure Orgams may implement it in the future
Orgams implements that in the past (e.g. FF alpha 2): http://orgams.wikidot.com/userguide#toc41
No distinction between local/proximity labels.

Quote from: eto on 12:40, 02 July 21
- and now jumps to another area in RAM.
I don't know about pc assemblers, but cannot happen in Orgams, since "global" labels hide/encapsulate the local ones.


genere_texture
   jr .loop ; <- will provoque an assembly error.

infinite_meditation
.loop  jr .loop





m_dr_m

Quote from: Targhan on 14:26, 02 July 21I almost never had problems.
Almost? When *did* you have problems? Genuinely interested, since Orgams will soon provide linter warnings about possible ambiguous or problematic code.

Targhan

I guess I forgot about those in Orgasm, sorry!! However, the documentation seems to state that they can be used only in macros and repetition blocks. Can they be used in a "global" context?

Quote from: m_dr_m on 14:42, 02 July 21
Almost? When *did* you have problems? Genuinely interested, since Orgams will soon provide linter warnings about possible ambiguous or problematic code.
I never used local labels with Orgams (hence my ignorance about them). In Rasm, I had some slight troubles because I used proximity labels in a code that grew a bit too much, and I added "normal" labels, making some proximity labels out of context. So I had to replace some of them with normal labels, which looked a bit inconsistent.
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

Hicks

@targhan: yes, I push you 'local labels" suggestion, it's a very nice habit. Madram suggest me the same kind of idea, I will include them in the article.

But, but! A new article, already!
Yes, thanks to roudoudou, who start a serie about Floppy-Disc Controller (FDC) programmation. It's french-only, but DeepL does the job well ;) Thanks to him!

GUNHED

Sorry, for getting off-topic here, but I could imagine to find the answer to my question right here...

A buddy recently asked me for the best way to learn Z80 on CPC. Well.... I couldn't give an appropriate answer, because what I had back the day wasn't that good at all.

So, does somebody know how to learn Z80 in an easy way for CPC?
Doesn't matter if you suggest a book or an homepage in the web.
Any help is appreciated.
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)

eto

Quote from: GUNHED on 15:13, 05 July 21So, does somebody know how to learn Z80 in an easy way for CPC?

In German? Data Becker - Das Maschinensprachebuch

It has some flaws but it starts with the basics and covers pretty much the whole Z80, while many other books only cover parts.

So basically how I just recently learned it:

- reading the above book back to back (the physical book)
- doing some actual enhancements for my BASIC game as exercises
- checking out lots of the CPC related assembler books that are available online as PDFs
- then (ongoing) diving into the information that's spread across websites and forums

GUNHED

Quote from: eto on 15:57, 05 July 21
In German? Data Becker - Das Maschinensprachebuch
Well, that was the source I don't want to use, because its really buggy, terribly written and I'm afraid to loose my buddy if I hand him over that kind of stuff. (Actually - that was the one I had back the day 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)

Bug Powell

#41
Bug Powell is dead.

TotO

Quote from: Bug Powell on 13:27, 18 July 21
Why did roudoudou write his articles in french? does he think that people who are not french can not be interested by fdc programming? the cpc community will never grow up if you keep writing technical articles in a language that most people can not understand.
Ask him first the reason... What hypocritical reasoning.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Bug Powell

#43
Bug Powell is dead.

eto

Quote from: Bug Powell on 15:11, 18 July 21And please, don't start to be insulting.

You probably did not recognise it, but that's exactly what you did in the first place.

- if you have criticism, personal messages could be an option
- if you think the forum is the right place to do that, then please don't talk about people but with them
- "der Ton macht die Musik". Politely asking is probably a lot more helpful than aggressive and/or insulting assumptions

In my personal opinion I also always find it sad that a lot of information is not immediately available to me, but if we would have a real German community, there would also be information that is spread in our language only. This is just natural. Not everybody always wants to write up stuff in English. No justification needed for that. And thanks to Google translate and similar services, we still can get the information we need. If any enthusiast shares his knowledge in the language that he thinks is appropriate, then this is totally fine for me, I am happy that it is shared. The reason behind the decision for a specific language is none of my business. If I am really interested, I can use one of the many tools and then send a message to the author or ask on the forum, if I am struggling to understand something. In my personal experience, then you will always get an answer.

TotO

#45
Quote from: Bug Powell on 15:11, 18 July 21
My first sentence was: "Why did roudoudou write his articles in french?". that is exactly what I did.
And please, don't start to be insulting. we know how it can quickly deteriorate on a forum.
Please... @eto is right.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

reidrac

#46
I think it really doesn't matter, there will always be unhappy people. When I produce content in English, I get asked to use Spanish by the Spanish community (and even insulted, pretty much calling me a traitor because I don't use my mother tongue; which obviously makes me less and less inclined to produce content in Spanish).

I'm not sure if this helps, but the way I see it, that article by @roudoudou is a gift: we don't get to decide how is he supposed to do it.

There's a lot of excellent content in French, and I can't read that language. If is a website, I can use translation services, which isn't perfect but good enough for me.
Released The Return of Traxtor, Golden Tail, Magica, The Dawn of Kernel, Kitsune`s Curse, Brick Rick and Hyperdrive for the CPC.

If you like my games and want to show some appreciation, you can always buy me a coffee.

ComSoft6128


Targhan

I think @Bug Powell remark is relevant (and not insulting). If it is of any comfort, I heard that the articles are going to be translated to English "soon".
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

Bug Powell

#49
Bug Powell is dead.

Powered by SMFPacks Menu Editor Mod