JohnnyRockets Posted June 4, 2012 Share Posted June 4, 2012 Hi, Will DASM automatically generate code for the 6507/6502 processor, or does one have to tell it what type of processor is the "target"? Thanks, JR Quote Link to comment Share on other sites More sharing options...
+SvOlli Posted June 4, 2012 Share Posted June 4, 2012 I was always able to assemble the example code from this forum with dasm -f3 source.asm -otarget.bin So the answer should be "no, but be sure to include the '-f3' option. (I patched my dasm, so this is the default, though.) Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted June 4, 2012 Share Posted June 4, 2012 DASM can compile source for a number of different CPUs. If you don't tell it the type of CPU you'll end up with errors like this: error: Unknown Mnemonic 'sty' error: Unknown Mnemonic 'lda' error: Unknown Mnemonic 'nop' ... The way you tell it the type of CPU is by the processor pseudo-op: PROCESSOR 6502 Put it as the very first line of your source code. It must have whitespace before processor. If you do this: PROCESSOR 6502 you'll get an error: error: Unknown Mnemonic '6502'. Quote Link to comment Share on other sites More sharing options...
JohnnyRockets Posted June 4, 2012 Author Share Posted June 4, 2012 Awesome! Thanks guys! I'm on my way. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.