<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[ChipMusic.org - ASM Programming Info]]></title>
		<link>https://chipmusic.org/forums/topic/12189/asm-programming-info/</link>
		<description><![CDATA[The most recent posts in ASM Programming Info.]]></description>
		<lastBuildDate>Sun, 15 Sep 2013 19:47:06 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: ASM Programming Info]]></title>
			<link>https://chipmusic.org/forums/post/184282/#p184282</link>
			<description><![CDATA[<b><i>irrlichtproject says:</i></b><p>Wow, didn&#039;t know about The Hex Files. Awesome resource, can&#039;t stop reading.</p>]]></description>
			<pubDate>Sun, 15 Sep 2013 19:47:06 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/184282/#p184282</guid>
		</item>
		<item>
			<title><![CDATA[Re: ASM Programming Info]]></title>
			<link>https://chipmusic.org/forums/post/184270/#p184270</link>
			<description><![CDATA[<b><i>4mat says:</i></b><p>- It&#039;s easier to learn on a home computer than a console.&nbsp; Mainly because there&#039;s a lot less register setup and you can be a lot more generous with memory.&nbsp; With a console you&#039;ll be dealing with either an off-the-shelf framework that won&#039;t be readable to you at the beginning, or coding that bit yourself. (which is a hassle you don&#039;t need when first starting out)&nbsp; &nbsp;I&#039;m glad I learnt on c64 first before moving to NES.</p><p>- As Sandneil said you don&#039;t need to learn a lot to start, you can do quite a few things with just 10-15 opcodes, if that.&nbsp; Learning a full set isn&#039;t really useful until you get into optimisation.</p><p>- I&#039;ve linked a couple of good tutorials but they&#039;re machine specific.&nbsp; &nbsp;For 6502 I used TMR&#039;s <a href="http://www.oldschool-gaming.com/articles_index.php?view=c64_hex_files" target="_blank">The Hex Files</a> which is based around the c64.&nbsp; &nbsp;For 68000 Photon&#039;s recent <a href="http://www.youtube.com/user/ScoopexUs" target="_blank">Amiga video tutorials</a> have explained the basics quite well though it is very amiga-centric.</p><p>- When looking at a new assembly language I&#039;m basically looking for these things:<br />1) How do I get this value into that register?<br />2) How do I read that value back?<br />3) How do I compare one value against another?<br />4) How do I react to that to jump around my code?<br />5) How do I do some basic maths on there?&nbsp; (add/dec/and/ora/shift etc)<br />6) How do I do loops?</p><p>After that you get into the machine-specific things like which registers control timing, put stuff on screen etc.&nbsp; But those 6 things above are all you need to control the machine really.</p>]]></description>
			<pubDate>Sun, 15 Sep 2013 12:06:35 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/184270/#p184270</guid>
		</item>
		<item>
			<title><![CDATA[Re: ASM Programming Info]]></title>
			<link>https://chipmusic.org/forums/post/184269/#p184269</link>
			<description><![CDATA[<b><i>DogTag says:</i></b><div class="quotebox"><cite>irrlichtproject wrote:</cite><blockquote><p>- Always comment your code. In the beginning, it&#039;s a good idea to comment every line. After a few days of not looking at it, even the most well-written asm code tends to present itself as an inprenetrable jungle.</p></blockquote></div><p>This should be tattooed in our hands.</p>]]></description>
			<pubDate>Sun, 15 Sep 2013 10:47:32 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/184269/#p184269</guid>
		</item>
		<item>
			<title><![CDATA[Re: ASM Programming Info]]></title>
			<link>https://chipmusic.org/forums/post/184267/#p184267</link>
			<description><![CDATA[<b><i>sandneil says:</i></b><p>i can only speak for myself but imo Just Do It! dont read anything until you get stuck and then only read the things that will help you get unstuck</p><p>obveiously you still need a memory map and opcode list but you dont need to store them inside your head, they put themselves there after youve got stuck for the 100th&nbsp; time</p>]]></description>
			<pubDate>Sun, 15 Sep 2013 09:56:00 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/184267/#p184267</guid>
		</item>
		<item>
			<title><![CDATA[Re: ASM Programming Info]]></title>
			<link>https://chipmusic.org/forums/post/184221/#p184221</link>
			<description><![CDATA[<b><i>irrlichtproject says:</i></b><p>You are hereby awarded the irrlicht badge of honor for this excellent post, boomlinde.</p><p>One more important thing that came to my mind: Hang out in platform specific online communities, that&#039;s where you&#039;ll learn the most.</p>]]></description>
			<pubDate>Sat, 14 Sep 2013 19:08:02 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/184221/#p184221</guid>
		</item>
		<item>
			<title><![CDATA[Re: ASM Programming Info]]></title>
			<link>https://chipmusic.org/forums/post/184137/#p184137</link>
			<description><![CDATA[<b><i>boomlinde says:</i></b><p>For any platform I&#039;d:</p><ul><li><p>Read up on the features of the platform. Read loads of memory maps, learn about the chips, the architecture.</p></li><li><p>Learn the operation codes of the CPU(/s). At least get a good idea of what kind of instructions are available.</p></li><li><p>Get into a comfortable assembly/build setup</p></li><li><p>Experiment with the platform features, memorizing code patterns as you do.</p></li><li><p>Figure out how to do things you&#039;d typically do with a high-level language. Conditional execution, loops, array indexing, pointer passing, functions etc.</p></li><li><p>Learn the features of the assembler you&#039;re using.</p></li><li><p>Build a library of macros or just code snippets that you can use for otherwise repetitive tasks.</p></li></ul><p>This is not so much a &quot;crash course&quot; as a long term plan for fully understanding the system and the whole development chain.</p><p>I don&#039;t think assemblers are a good way to learn the fundamental concepts of software design, so you should probably have a good idea about that before you take on a larger project. Spend a great deal of time considering what a compiler would do when you&#039;re writing. Break down problems into unproblematic parts.</p><p>A very good exercise since you are already programming in Java is to write an assembler. It&#039;s probably easier with something like the PC Engine CPU than the 68k, which has tons of addressing modes and registers.</p>]]></description>
			<pubDate>Fri, 13 Sep 2013 19:56:22 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/184137/#p184137</guid>
		</item>
		<item>
			<title><![CDATA[Re: ASM Programming Info]]></title>
			<link>https://chipmusic.org/forums/post/184097/#p184097</link>
			<description><![CDATA[<b><i>irrlichtproject says:</i></b><p>Sorry, can&#039;t help you with that, as I mainly program for Z80. It seems WLA DX is indeed the way to go for PC-Engine. There&#039;s also the HuC devkit, which includes an assembler. Btw starting out by using a C compiler such as HuC might be another feasible way of getting into asm programming.<br /> For 68k why not try vasm. It may be somewhat less popular since users of the most common 68k systems (Amiga and Atari) don&#039;t do so much cross-assembling. If it doesn&#039;t work for you then you could also use gas from binutils.</p>]]></description>
			<pubDate>Fri, 13 Sep 2013 10:17:20 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/184097/#p184097</guid>
		</item>
		<item>
			<title><![CDATA[Re: ASM Programming Info]]></title>
			<link>https://chipmusic.org/forums/post/184048/#p184048</link>
			<description><![CDATA[<b><i>Theta_Frost says:</i></b><div class="quotebox"><cite>irrlichtproject wrote:</cite><blockquote><p>Your starting kit should include an accurate emulator with debugging capabilities, a modern cross-assembler (preferably one that can link binaries into target-specific executables/roms/whatever), and a text editor that can show line numbers (and maybe even supports syntax highlighting for your asm flavor of choice). It&#039;s also a good idea to have opcode list for your target processor at hand, for quick reference.</p></blockquote></div><p>Do you have any suggestion for a cross-assembler?&nbsp; WLA DX seems to support most of the things I&#039;m interested in, except the 68k.&nbsp; vasm supports the 68k, but I haven&#039;t heard much about it.&nbsp; Unfortunately, all the assemblers I can find are windows only which is a problem for the time being! <img src="https://chipmusic.org/forums/img/smilies/hmm.png" width="15" height="15" alt="hmm" /></p><p>Thank you so much!&nbsp; Very helpful! <img src="https://chipmusic.org/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<pubDate>Fri, 13 Sep 2013 01:11:46 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/184048/#p184048</guid>
		</item>
		<item>
			<title><![CDATA[Re: ASM Programming Info]]></title>
			<link>https://chipmusic.org/forums/post/184047/#p184047</link>
			<description><![CDATA[<b><i>irrlichtproject says:</i></b><p>The most important prerequisite for learning asm is having the dedication to master the very steep initial learning curve. You&#039;ll be doing a lot of reading before you can actually program something pratical. Once you&#039;ve got a general &quot;feel&quot; for the language then things start to become really easy.</p><p>So if you&#039;re interested in PC Engine and Neo Geo, you&#039;ll have to learn 65SC02 and 68k assembly, respectively. I think 68k is somewhat easier for beginners, since it has a fairly straight-forward instruction set and loads of registers to play with.</p><p>Your starting kit should include an accurate emulator with debugging capabilities, a modern cross-assembler (preferably one that can link binaries into target-specific executables/roms/whatever), and a text editor that can show line numbers (and maybe even supports syntax highlighting for your asm flavor of choice). It&#039;s also a good idea to have opcode list for your target processor at hand, for quick reference. </p><p>A couple of tips I learned the hard way:</p><p>- Always comment your code. In the beginning, it&#039;s a good idea to comment every line. After a few days of not looking at it, even the most well-written asm code tends to present itself as an inprenetrable jungle.</p><p>- You&#039;ll have a lot of different files floating around, so organize your working directory well.</p><p>- Familiarize yourself with batch and/or shell script. Automatizing the build process with scripts will save you a lot of time on the long run.</p><p>I can&#039;t really point you to any good sites for programming PC-Engine and Neo Geo. I&#039;m afraid a lot of good documentation might be in Japanese only. In any case tutorials for other systems won&#039;t be so helpful, especially not for SMS and GB. Might be good for a start, but otherwise you&#039;ll be wasting your time, because there are huge differences in programming the various 8-bitters.</p>]]></description>
			<pubDate>Fri, 13 Sep 2013 00:39:58 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/184047/#p184047</guid>
		</item>
		<item>
			<title><![CDATA[Re: ASM Programming Info]]></title>
			<link>https://chipmusic.org/forums/post/184043/#p184043</link>
			<description><![CDATA[<b><i>Theta_Frost says:</i></b><p>Okay, I&#039;m starting with this because it&#039;s amazing.&nbsp; I&#039;ll have to switch some stuff around because I&#039;m on Mac but it&#039;s still so well written!</p><p><a href="http://www.smspower.org/maxim/HowToProgram/Index" target="_blank">http://www.smspower.org/maxim/HowToProgram/Index</a></p>]]></description>
			<pubDate>Fri, 13 Sep 2013 00:12:04 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/184043/#p184043</guid>
		</item>
		<item>
			<title><![CDATA[ASM Programming Info]]></title>
			<link>https://chipmusic.org/forums/post/184040/#p184040</link>
			<description><![CDATA[<b><i>Theta_Frost says:</i></b><p>So I find myself with a large amount of free time over the next few months.&nbsp; I&#039;ve wanted to learn ASM for a while to program some of our favorite old machines, with the PC-Engine &amp; Neo Geo specifically in mind.&nbsp; Now, where to start?&nbsp; I&#039;ve got a background doing a bit of Java programming, but that&#039;s it.&nbsp; I&#039;ve seen a lot of excellent NES, SMS, and GB tutorials, so maybe start there and branch out?&nbsp; Hit me up with links, places to hang out, info, etc.&nbsp; I&#039;ve got the time!</p><p>Thanks!</p>]]></description>
			<pubDate>Thu, 12 Sep 2013 23:39:04 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/184040/#p184040</guid>
		</item>
	</channel>
</rss>
