Lillapojkenpåön Posted December 21, 2015 Share Posted December 21, 2015 Hello, I wanted to try and continue my bbasic game in assembly so I got dasm and jedit, but after saving my file and trying to assemble it I only get this message. START OF PASS: 1Warning: Unable to open 'kernel.asm'----------------------------------------------------------------------SEGMENT NAME INIT PC INIT RPC FINAL PC FINAL RPCINITIAL CODE SEGMENT 0000 ???? 0000 ????----------------------------------------------------------------------0 references to unknown symbols.0 events requiring another assembler pass.--- Symbol List (sorted by symbol)--- End of Symbol List.Complete.C:\> So far I've tried.. Running command prompt as admin. Switching macro.h and vcs.h files, I have these in the dasm folder along with my .asm files. Tried three different commands that other people here are using. Like.. C:\>DASM\dasm\dasm kernel.asm -lcollect.txt -f3 -v5 -ocollect.bin (two dasm folders, trying to assemble collect tutorial file) I think I'm using either command prompt or the support files wrong. Hopefully someone knows what i've missed. Windows 8.1 Quote Link to comment Share on other sites More sharing options...
Just Jeff Posted December 21, 2015 Share Posted December 21, 2015 I'm not the greatest at DASM but it looks like kernel.asm is either in the wrong directory or that kernel.asm is not named what you think it is named. Are you sure you are trying to assemble the file- kernel.asm because the collect files will usually it will look something like this: dasm collect.asm -f3 -ocollect.bin If I were assembling a collect file, I would get into the right folder first: cd DASM cd dasm then... dasm collect.asm -f3 -ocollect.bin or if you really have a file called "kernel", then it would look similar- dasm kernel.asm -f3 -okernal.bin Quote Link to comment Share on other sites More sharing options...
Lillapojkenpåön Posted December 22, 2015 Author Share Posted December 22, 2015 Thank you. You where double right, I had accidently copied and merged two different commands here, but i think that would still have worked, just renamed kernel.asm wrong. The cd commands made it work C:\DASM\dasm>dasm kernel.asm -f3 -okernel.binworksC:\>DASM\dasm\dasm kernel.asm -f3 -okernel.bindoesn't work Here's some more questions i've had while i'm at it, Is there any way to copy your batari basics source code from stella or something? Or how would i continue in assembly? Is it possible to use both assembly language and basic in batari basic together? Would it be possible to replace something like vertical scroll with horisontal in the batari basic dpc+ kernel or am i better off learning 6502? Quote Link to comment Share on other sites More sharing options...
Just Jeff Posted December 23, 2015 Share Posted December 23, 2015 I'm afraid I don't know anything at all about Batari. Maybe someone else can answer that one. Also, there is a list on Atariage specifically for Batari where you could ask. As for learning 6502 assembly, I do recommend it. Its not as hard as it looks. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted December 25, 2015 Share Posted December 25, 2015 Is there any way to copy your batari basics source code from stella or something? Or how would i continue in assembly? There is usually a .list file that is created when compiling a batari Basic program. Example: atariage.com/forums/topic/246881-is-more-efficient-than-when-using-batari-basic/?p=3394308 Is it possible to use both assembly language and basic in batari basic together? Have you looked here: randomterrain.com/atari-2600-memories-batari-basic-commands.html#assembly Quote Link to comment Share on other sites More sharing options...
Lillapojkenpåön Posted December 27, 2015 Author Share Posted December 27, 2015 Thank you! Changing everything I could to inline assembly was fun, I also noticed that the assembler had interpreted NUSIZ0 = $05 like this.. 1796 21d9 .L027 ; NUSIZ0 = $05 1797 21d9 1798 21d9 a9 05 LDA #$05 which works for some reason, but isn't it suppose to look like this? 1799 21d9 a9 05 lda #$05 1800 21db 1801 21db 85 04 sta NUSIZ0 After looking at all the weird extra.. arm code? I think I would rather use a regular single line kernel for now, but can't find any info on how to make one, something like a BlankCommentedStableSingleLineKernelDisplayTemplate.asm would be nice, but maybe I can figure it out by looking at other peoples code. Quote Link to comment Share on other sites More sharing options...
Lillapojkenpåön Posted December 29, 2015 Author Share Posted December 29, 2015 Ok, forget the last post, except for the NUSIZ0 question, I know you make single line playfield and sprites differently now, I only need single line sprites, and don't even need a playfield if I could only get this thing working, found it in the mailing list, it's written in A86 I think.http://www.biglist.com/lists/stella/archives/199705/msg00024.html very short, please have a look Changing the labels, the end, and including the header files got rid of most error messages,but still thiserror: Unknown Mnemonic 'DB'. it's here:table: DB 4,5,6,7,8,9,10,11,12,11,10,9,8,7,6,5 and error: Label mismatch... here: .1: STA Wsync ;change the colour every line for ;sparkling stars - otherwise do what ;you want here CLC ADC #$03 EOR #$A0 STA ColuP0 DEY BNE .1 I fell asleep on my keyboard yesterday with 40 tabs open trying to figure it out, so if someone can help me I will not ask more questions for a while, I think my harmony cart will get here today so I want to have a working foundation ready for it. If anyone sees anything else in there that's rarely used anymore I would love to know, thanks. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted December 29, 2015 Share Posted December 29, 2015 error: Unknown Mnemonic 'DB'. it's here: table: DB 4,5,6,7,8,9,10,11,12,11,10,9,8,7,6,5 I don't think they were using DASM for 2600 development back in 1997. replace DB with .BYTE Likewise in the vector table at the end replace DW with .WORD I believe the . is optional so you can also use BYTE and WORD. I suspect the initial source examples I looked at, back when I wrote Medieval Mayhem, used the leading . so I followed its example. and error: Label mismatch... Looks like you replaced the @1 label with .1, but there are 2 occurrences of @1 labels. In DASM the labels need to be unique, otherwise it doesn't know which one you mean - the one after Start: or the one after Screen:? Easiest fix is to change that to use a unique name, such as: ScreenLoop: STA Wsync ;change the colour every line for ;sparkling stars - otherwise do what ;you want here CLC ADC #$03 EOR #$A0 STA ColuP0 DEY BNE ScreenLoop Note: There is a way to use labels like .1 multiple times in your source if you use SUBROUTINE or macros. From dasm.txt: [label] SUBROUTINE name This isn't really a subroutine, but a boundry between sets of temporary labels (which begin with a dot). Temporary label names are unique within segments of code bounded by SUBROUTINE: CHARLIE subroutine ldx #10 .1 dex bne .1 BEN subroutine ldx #20 .qq dex bne .qq Automatic temporary label boundries occur for each macro level. Usually temporary labels are used in macros and within actual subroutines (so you don't have to think up a thousand different names) I used the . labels in these macros I used in Medieval Mayhem to read the paddles: MAC READ_PADDLE_1 lda INPT0 ; 3 - always 9 bpl .save ; 2 3 .byte $2d ; 4 0 .save sty Paddle1 ; 0 3 ENDM MAC READ_PADDLE_2 lda INPT1 ; 3 - always 9 bpl .save ; 2 3 .byte $2d ; 4 0 .save sty Paddle2 ; 0 3 ENDM MAC READ_PADDLE_3 lda INPT2 ; 3 - always 9 bpl .save ; 2 3 .byte $2d ; 4 0 .save sty Paddle3 ; 0 3 ENDM MAC READ_PADDLE_4 lda INPT3 ; 3 - always 9 bpl .save ; 2 3 .byte $2d ; 4 0 .save sty Paddle4 ; 0 3 ENDM As an aside - have you seen my blog series Collect? It's an in-depth tutorial for writing a 2K Atari game from scratch. 1 Quote Link to comment Share on other sites More sharing options...
Omegamatrix Posted December 29, 2015 Share Posted December 29, 2015 Note: There is a way to use labels like .1 multiple times in your source if you use SUBROUTINE or macros. From dasm.txt: [label] SUBROUTINE name This isn't really a subroutine, but a boundry between sets of temporary labels (which begin with a dot). Temporary label names are unique within segments of code bounded by SUBROUTINE: CHARLIE subroutine ldx #10 .1 dex bne .1 BEN subroutine ldx #20 .qq dex bne .qq Automatic temporary label boundries occur for each macro level. Usually temporary labels are used in macros and within actual subroutines (so you don't have to think up a thousand different names) I highly recommend people stick with unique labels instead of using that feature. If you ever read a source with multiple ".1", or with other compiliers ".+" and ".-", then you'll quickly realize how hard it is to search or replace the label. Inside of a macro it makes sense. I've used ".1" inside macro's myself... but in the main source it makes it harder to follow and troubleshoot. I guess people might get use to the directionality of ".+" (forward branch) and ".-" (backwards branch), but it just seems lazy to me. I believe ".+" and ".-" don't compile in DASM anyhow. Yep, just checked and they don't. Quote Link to comment Share on other sites More sharing options...
Lillapojkenpåön Posted January 4, 2016 Author Share Posted January 4, 2016 Thanks for the help As an aside - have you seen my blog series Collect? It's an in-depth tutorial for writing a 2K Atari game from scratch. Yup, I'm trying to add the stars to step 2 of it because I like the padagogical subroutine layout for the moment, I've only been able to make different versions of a vertical line so far, I could just copy and paste, but I won't learn anything from that 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.