Page 1 of 1
					
				stringmatch.asm self modifying code
				Posted: Tue Jun 04, 2024 1:14 am
				by JohnDoefromPodunk
				
			
		
				
			
 
						- Screenshot 2024-06-03 194405.png (62.21 KiB) Viewed 28320 times
 
		
		
		
			 
			
		
				
			
 
						- Screenshot 2024-06-03 194405.png (62.21 KiB) Viewed 28320 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.
 
			 
			
					
				Re: stringmatch.asm self modifying code
				Posted: Fri Jun 07, 2024 9:18 am
				by akuyou
				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 (37.51 KiB) Viewed 28296 times
 
		
		
		
			  
			 
			
					
				Re: stringmatch.asm self modifying code
				Posted: Fri Jun 07, 2024 6:57 pm
				by JohnDoefromPodunk
				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.