Omegamatrix Posted June 3, 2008 Share Posted June 3, 2008 Yeah the .bin extensions are binary files. An .asm file is just a plain old text document with a different extension name, so you know it is for assembly. The compiler doesn't care about the extension name, it just has to know what value to give all those labels in the file. Make sure you have a copy of the vcs.h and macro.h file in the same folder as DASM along with your .asm file. Quote Link to comment Share on other sites More sharing options...
davyK Posted October 21, 2008 Share Posted October 21, 2008 (edited) I don't know what I'm doing wrong here. I can't get the sample kernel1.asm to compile/assemble. (btw there is no .asm in the attachment - only a .bin so I pasted the code into an editor.. I get an error message for each and every mnemonic ... help! ---------- compile ---------- START OF PASS: 1 kernel1.asm (2): error: Unknown Mnemonic '6502'. kernel1.asm (26): error: Unknown Mnemonic 'lda'. kernel1.asm (28): error: Unknown Mnemonic 'sta'. kernel1.asm (32): error: Unknown Mnemonic 'lda'. kernel1.asm (34): error: Unknown Mnemonic 'sta'. kernel1.asm (42): error: Unknown Mnemonic 'sta'. kernel1.asm (44): error: Unknown Mnemonic 'sta'. ..... and so on. EDIT Sorry - found out instructions need to be indented..... move on - nothing to see here. Edited October 21, 2008 by davyK Quote Link to comment Share on other sites More sharing options...
Wickeycolumbus Posted October 21, 2008 Share Posted October 21, 2008 (edited) I don't know what I'm doing wrong here. I can't get the sample kernel1.asm to compile/assemble. (btw there is no .asm in the attachment - only a .bin so I pasted the code into an editor.. I get an error message for each and every mnemonic ... help! ---------- compile ---------- START OF PASS: 1 kernel1.asm (2): error: Unknown Mnemonic '6502'. kernel1.asm (26): error: Unknown Mnemonic 'lda'. kernel1.asm (28): error: Unknown Mnemonic 'sta'. kernel1.asm (32): error: Unknown Mnemonic 'lda'. kernel1.asm (34): error: Unknown Mnemonic 'sta'. kernel1.asm (42): error: Unknown Mnemonic 'sta'. kernel1.asm (44): error: Unknown Mnemonic 'sta'. ..... and so on. are your instructions indented? this will not work: processor 6502 include "vcs.h" include "macro.h" org $F000 START lda #$82 sta VBLANK sta VSYNC ; Ect... but this will: processor 6502 include "vcs.h" include "macro.h" org $F000 START lda #$82 sta VBLANK sta VSYNC ; Ect... all instructions must be indented and labels must be all the way to the left. also, you may want to zip the .asm file so you can upload it Edited October 21, 2008 by Wickeycolumbus Quote Link to comment Share on other sites More sharing options...
+thegoldenband Posted March 13, 2009 Share Posted March 13, 2009 (edited) A note for future newbies who might be tempted to skip steps: The other switches "-f3" and "-v5" control some internals of DASM - and for now just assume you need these whenever you assemble with DASM. I'm going through these tutorials now, and was having problems assembling this kernel until I reread this line. If the assembler seems to work, but the .bins you create are garbage, this may well be why! If you omit these switches, the assembler doesn't complain, but in my case, I got a .bin that emitted a high-pitched tone and did nothing else. Oops. Edited March 13, 2009 by thegoldenband Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted March 13, 2009 Share Posted March 13, 2009 A note for future newbies who might be tempted to skip steps:The other switches "-f3" and "-v5" control some internals of DASM - and for now just assume you need these whenever you assemble with DASM. I'm going through these tutorials now, and was having problems assembling this kernel until I reread this line. If the assembler seems to work, but the .bins you create are garbage, this may well be why! If you omit these switches, the assembler doesn't complain, but in my case, I got a .bin that emitted a high-pitched tone and did nothing else. Oops. I don't think you need to worry about the -v5 switch ("-v" is for "verbosity")... but you absolutely, positively need the -f3 switch, or the .BIN won't be in the correct format ("-f" is for "format"). Well, I did find the -f2 format to be useful when I was customizing batari Basic to create MNetwork bankswitched ROMs, but I had to write a utility to convert the output to the proper format-- and even though I didn't realize it back then, I have since learned that there's a much, *much* easier way to do what I was trying to do (by using ORG and RORG to define the different banks), and still be able to use -f3. Michael Quote Link to comment Share on other sites More sharing options...
+thegoldenband Posted March 13, 2009 Share Posted March 13, 2009 I don't think you need to worry about the -v5 switch ("-v" is for "verbosity")... but you absolutely, positively need the -f3 switch, or the .BIN won't be in the correct format ("-f" is for "format"). Thanks for that clarification! That makes a lot of sense. Meanwhile, I'm having a fun time using this code for a purpose wholly different than what it was intended for, i.e. throwing things at the sound registers at various points in the kernel and seeing what results I get! It seems like if you're mainly interested in sound design and manipulating the sound hardware (as I am), you can dive into this stuff surprisingly quickly. Quote Link to comment Share on other sites More sharing options...
SavedByZero Posted October 10, 2019 Share Posted October 10, 2019 Late to the party by a decade or so, but: I'm noticing that most of the dasm zip files, including the linked one, do not come with the includes. I had to hunt for the batari basic package to find 'em. Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted October 10, 2019 Author Share Posted October 10, 2019 35 minutes ago, SavedByZero said: Late to the party by a decade or so, but: I'm noticing that most of the dasm zip files, including the linked one, do not come with the includes. I had to hunt for the batari basic package to find 'em. That is one source, but the best place to get dasm these days, including the includes, is at... https://dasm-assembler.github.io/ 2 Quote Link to comment Share on other sites More sharing options...
SavedByZero Posted October 10, 2019 Share Posted October 10, 2019 I will say I'm finding "Atari 2600 programming for newbies" wayyyyy easier to understand, so far, than "Making Games For the Atari 2600" book for kindle. This is not to slight Huggins' book, but I feel like that's much more of an intermediate level book that I might read again after I finish the newbies tutorials. 1 Quote Link to comment Share on other sites More sharing options...
Grant Posted November 24, 2019 Share Posted November 24, 2019 It works! Using Windows 10 with dasm 2.20-11 and z26_407. -The include file needs the path from dasm to the atari header files. Currently that is #include "Atari-2600\vcs.h" (for example). Thank you so much. -Grant Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted November 25, 2019 Author Share Posted November 25, 2019 On 11/24/2019 at 12:38 PM, Grant said: It works! Using Windows 10 with dasm 2.20-11 and z26_407. -The include file needs the path from dasm to the atari header files. Currently that is #include "Atari-2600\vcs.h" (for example). Thank you so much. -Grant It is usual/common to to copy those files to the directory with your code. Quote Link to comment Share on other sites More sharing options...
JeffJetton Posted November 26, 2019 Share Posted November 26, 2019 On 11/23/2019 at 8:38 PM, Grant said: It works! Using Windows 10 with dasm 2.20-11 and z26_407. -The include file needs the path from dasm to the atari header files. Currently that is #include "Atari-2600\vcs.h" (for example). Thank you so much. -Grant Other options include A) adding an incdir instruction before your includes to specify the directory all your include files are in, or B) specifying the include directory at compile-time using the -I option. But yeah, it's probably easier to just copy the files over. They're small. ? Quote Link to comment Share on other sites More sharing options...
sparkplug.0128 Posted February 20, 2021 Share Posted February 20, 2021 (edited) i am having trouble running this code. so i run this on an emulator? where do i put the dasm kernel.asm -lkernel.txt -f3 -v5 -okernel.bin is this a separate file i make? Edited February 20, 2021 by sparkplug.0128 Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted February 20, 2021 Share Posted February 20, 2021 8 hours ago, sparkplug.0128 said: i am having trouble running this code. so i run this on an emulator? where do i put the dasm kernel.asm -lkernel.txt -f3 -v5 -okernel.bin is this a separate file i make? dasm is a command line program. If you're on Windows you'll run it via the Command Prompt (dos window), if on Mac you'll run it via a Terminal session. If you're on Linux you'll also use a terminal session, though how you launch it depends upon your particular distribution. Quote Link to comment Share on other sites More sharing options...
sparkplug.0128 Posted February 21, 2021 Share Posted February 21, 2021 (edited) 11 hours ago, SpiceWare said: dasm is a command line program. If you're on Windows you'll run it via the Command Prompt (dos window), if on Mac you'll run it via a Terminal session. If you're on Linux you'll also use a terminal session, though how you launch it depends upon your particular distribution. this is the output i get: i tried running as an administrator and it was the same output Edited February 21, 2021 by sparkplug.0128 Quote Link to comment Share on other sites More sharing options...
sparkplug.0128 Posted February 21, 2021 Share Posted February 21, 2021 1 hour ago, sparkplug.0128 said: this is the output i get: i tried running as an administrator and it was the same output update: i think i got something? Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted February 21, 2021 Share Posted February 21, 2021 4 minutes ago, sparkplug.0128 said: update: i think i got something? easiest to get started is to create a new directory(folder) for your project, such as c:\atari\project1 Then you'd do this: Use file explorer and put dasm.exe and kernel.asm into c:\atari\project1 start the Command Prompt type cd c:\atari\project1 type dasm kernel.asm -lkernel.txt -f3 -v5 -okernel.bin 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.