stringmatch.asm self modifying code

Posts about Z80 programming that do not relate to a particular computer
Post Reply
JohnDoefromPodunk
Posts: 2
Joined: Mon Jun 03, 2024 5:05 am

stringmatch.asm self modifying code

Post by JohnDoefromPodunk » Tue Jun 04, 2024 1:14 am

Screenshot 2024-06-03 194405.png
Screenshot 2024-06-03 194405.png (62.21 KiB) Viewed 12438 times
Screenshot 2024-06-03 194405.png
Screenshot 2024-06-03 194405.png (62.21 KiB) Viewed 12438 times
Let me preface this by saying that I am a relative beginner, just trying to figure stuff out.
I think I understand what you are trying to do with the self-modifying code, I just get an error trying to compile the line with the :scanListString_Plus2 label. Compiling with VASM, using one of the .bat files for MSX.

It appears that maybe I am missing a compiler option? or something else?

I'd be grateful for any insight/help in getting this resolved.
Attachments
Screenshot 2024-06-03 194741.png
Screenshot 2024-06-03 194741.png (29.01 KiB) Viewed 12438 times

User avatar
akuyou
Posts: 570
Joined: Mon Apr 22, 2019 3:19 am
Contact:

Re: stringmatch.asm self modifying code

Post by akuyou » Fri Jun 07, 2024 9:18 am

Hey there!

You're not doing anything wrong, the problem is that's a very old example, back from the days when I did all my assembly with WinApe.

WinApe supports a label being on the right of a line, but Vasm doesn't - which is why you're getting the error (I do all my assembly with VASM now)

So the only problem is the example code is obsolete - I've just updated the version in the sources.7z with one that should work, please re-download it or make the change below yourself!

oh and If you're using my Notepad++ to do your editing, it's easier to compile with F6, and just select MSX2_ROM, the example seems to work here - LICK was detected as string 04.
ksnip_20240607-180829.png
ksnip_20240607-180829.png (37.51 KiB) Viewed 12414 times
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens

Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809

JohnDoefromPodunk
Posts: 2
Joined: Mon Jun 03, 2024 5:05 am

Re: stringmatch.asm self modifying code

Post by JohnDoefromPodunk » Fri Jun 07, 2024 6:57 pm

Thanks for the reply.
I was actually about to reply that I had figured it out myself. It took me a while, by writing out the individual steps of what the code was doing and reading pretty much the complete vasm manual ;-)
I like your content and got me interested in assembly for the z80, something I couldn't get a handle on when I had my own MSX back in the day. Now to get my hands on one, lol. Not particularly trivial, here in the USA.

Post Reply

Return to “General Z80 Programming”