TheHoboInYourRoom Posted October 18, 2014 Share Posted October 18, 2014 Hi, everyone.I finally decided to start really learning how to program the VCS. I already have a general idea of how the VCS builds a picture line by line and sets up the appropriate blanking and syncronization inbetween frames, so I wrote a little assembly file to confirm if I actually know what I'm doing (all it's supposed to do is increment X and set PF1 and COLUPF to that value once every frame). However, every time I've tried assembling it with DASM the past few days, DASM trips up on something in the file and can't resolve any of the labels I've set up. What's more, the list file DASM produced reports "Unknown Mnemonic" errors on every single line of the assembly file.I'm using DASM v2.20.11 for Windows with v1.05 of vcs.h and v1.06 of macro.h. The command line I used is "dasm bartest2.asm -f3 -v4 -Lbars-l.txt -sbars-s.txt -obartest2.bin".Below is the assembly and DASM's output, and I've attached the list file.Is there some boneheaded fundamental mistake I'm making? Assembly: PROCESSOR 6502 INCLUDE "vcs.h" INCLUDE "macro.h" ORG $f800 init: CLEAN_START lda #2 sta VBLANK startFrame: VERTICAL_SYNC lda #44 sta TIM64T vertBlank: sta WSYNC lda INTIM bne vertBlank stx PF1 stx COLUPF lda #0 sta VBLANK ldy #191 sta WSYNC kernel: sta WSYNC dey bne kernel inx lda #2 sta VBLANK lda #35 sta TIM64T overscan: sta WSYNC lda INTIM bne overscan jmp startFrame ORG $fffa .word init ; NMI .word init ; Reset .word init ; IRQ DASM output: START OF PASS: 1 Including file "bartest2.asm" ---------------------------------------------------------------------- SEGMENT NAME INIT PC INIT RPC FINAL PC FINAL RPC INITIAL CODE SEGMENT 0000 ???? 0000 ???? ---------------------------------------------------------------------- 0 references to unknown symbols. 0 events requiring another assembler pass. --- Symbol List (sorted by symbol) init 0000 ???? kernel 0000 ???? overscan 0000 ???? startFrame 0000 ???? vertBlank 0000 ???? --- End of Symbol List. --- Unresolved Symbol List overscan 0000 ???? startFrame 0000 ???? init 0000 ???? kernel 0000 ???? vertBlank 0000 ???? --- 5 Unresolved Symbols Thanks in advance for any help! bars-l.txt Quote Link to comment Share on other sites More sharing options...
Omegamatrix Posted October 18, 2014 Share Posted October 18, 2014 You need line indentation for Processor, Include, and ORG statements. You also need line indentation for ".word". I think something like this will make you a binary file and a list file: dasm bartest2.asm -f3 -obartest2.bin -lbartest2.lst Quote Link to comment Share on other sites More sharing options...
TheHoboInYourRoom Posted October 18, 2014 Author Share Posted October 18, 2014 Oh my gosh, it works now! Thank you, Omegamatrix! 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.