Author Topic: 64 NOPs | Tech blog for Amstrad CPC  (Read 9603 times)

0 Members and 1 Guest are viewing this topic.

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.382
  • Country: fr
  • Liked: 1310
  • Likes Given: 191
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #25 on: 10:08, 01 July 21 »
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

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 16.915
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 4031
  • Likes Given: 7261
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #26 on: 10:09, 01 July 21 »
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
« Last Edit: 10:11, 01 July 21 by Gryzor »

Offline Hicks

  • CPC664
  • ***
  • Posts: 84
  • Country: fr
    • Vanity
  • Liked: 169
  • Likes Given: 14
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #27 on: 11:19, 01 July 21 »
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 :)

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 16.915
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 4031
  • Likes Given: 7261

Offline Z|G

  • CPC464
  • **
  • Posts: 17
  • Country: af
  • Liked: 20
  • Likes Given: 23
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #29 on: 12:11, 01 July 21 »
Great read!

I hope to see more.

https://64nops.wordpress.com/
« Last Edit: 12:17, 01 July 21 by Z|G »
1xCPC6128, 1xTandy Model 4, 1xC64 (IN BOX)

Offline eto

  • Supporter
  • 464 Plus
  • *
  • Posts: 372
  • Country: de
  • Liked: 226
  • Likes Given: 221
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #30 on: 12:33, 01 July 21 »
for 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.

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.382
  • Country: fr
  • Liked: 1310
  • Likes Given: 191
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #31 on: 10:48, 02 July 21 »
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.
Code: [Select]
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:
Code: [Select]
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

Offline eto

  • Supporter
  • 464 Plus
  • *
  • Posts: 372
  • Country: de
  • Liked: 226
  • Likes Given: 221
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #32 on: 14:40, 02 July 21 »
Two 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.

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.382
  • Country: fr
  • Liked: 1310
  • Likes Given: 191
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #33 on: 16:26, 02 July 21 »
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

Offline m_dr_m

  • CPC6128
  • ****
  • Posts: 261
  • Country: se
  • http://orgams.wikidot.com/
    • OrgaMS!
  • Liked: 172
  • Likes Given: 187
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #34 on: 16:38, 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.

- 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.

Code: [Select]
genere_texture
   jr .loop ; <- will provoque an assembly error.

infinite_meditation
.loop  jr .loop




Offline m_dr_m

  • CPC6128
  • ****
  • Posts: 261
  • Country: se
  • http://orgams.wikidot.com/
    • OrgaMS!
  • Liked: 172
  • Likes Given: 187
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #35 on: 16:42, 02 July 21 »
I 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.

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.382
  • Country: fr
  • Liked: 1310
  • Likes Given: 191
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #36 on: 16:46, 02 July 21 »
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?

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

Offline Hicks

  • CPC664
  • ***
  • Posts: 84
  • Country: fr
    • Vanity
  • Liked: 169
  • Likes Given: 14
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #37 on: 01:08, 05 July 21 »
@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!

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.706
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 1270
  • Likes Given: 2964
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #38 on: 17:13, 05 July 21 »
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: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline eto

  • Supporter
  • 464 Plus
  • *
  • Posts: 372
  • Country: de
  • Liked: 226
  • Likes Given: 221
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #39 on: 17:57, 05 July 21 »
So, 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

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.706
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 1270
  • Likes Given: 2964
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #40 on: 18:09, 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: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.07.15)

Offline Bug Powell

  • CPC664
  • ***
  • Posts: 59
  • Country: de
  • Liked: 45
  • Likes Given: 13
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #41 on: 15:27, 18 July 21 »
Bug Powell is dead.
« Last Edit: 21:37, 28 July 21 by Bug Powell »

Online TotO

  • 6128 Plus
  • ******
  • Posts: 3.971
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 3070
  • Likes Given: 1858
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #42 on: 16:51, 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)

Offline Bug Powell

  • CPC664
  • ***
  • Posts: 59
  • Country: de
  • Liked: 45
  • Likes Given: 13
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #43 on: 17:11, 18 July 21 »
Bug Powell is dead.
« Last Edit: 21:37, 28 July 21 by Bug Powell »

Offline eto

  • Supporter
  • 464 Plus
  • *
  • Posts: 372
  • Country: de
  • Liked: 226
  • Likes Given: 221
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #44 on: 17:48, 18 July 21 »
And 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.

Online TotO

  • 6128 Plus
  • ******
  • Posts: 3.971
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 3070
  • Likes Given: 1858
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #45 on: 17:53, 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.
« Last Edit: 17:55, 18 July 21 by TotO »
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline reidrac

  • Supporter
  • 6128 Plus
  • *
  • Posts: 991
  • Country: gb
  • Trying to gamedev!
    • index.php?action=treasury
    • usebox.net
  • Liked: 1817
  • Likes Given: 992
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #46 on: 18:14, 18 July 21 »
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.
« Last Edit: 18:17, 18 July 21 by reidrac »
Released The Return of Traxtor, Golden Tail, Magica, The Dawn of Kernel, Kitsune`s Curse and Brick Rick for the CPC.

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

Offline ComSoft6128

  • ..................................
  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.224
  • Country: scotland
  • CPC THEN CPC NOW
    • index.php?action=treasury
  • Liked: 2429
  • Likes Given: 4692
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #47 on: 18:18, 18 July 21 »
Are the files available to download?


If so, this might help:


https://www.howtogeek.com/664434/how-to-translate-a-word-document/

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.382
  • Country: fr
  • Liked: 1310
  • Likes Given: 191
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #48 on: 18:20, 18 July 21 »
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

Offline Bug Powell

  • CPC664
  • ***
  • Posts: 59
  • Country: de
  • Liked: 45
  • Likes Given: 13
Re: 64 NOPs | Tech blog for Amstrad CPC
« Reply #49 on: 18:38, 18 July 21 »
Bug Powell is dead.
« Last Edit: 21:38, 28 July 21 by Bug Powell »