+rbairos Posted December 3, 2017 Share Posted December 3, 2017 (edited) I've tried 3 versions of dasm (one I just compiled from scratch to be sure), and it keeps hanging/crashing when I try to compile the following: (any or no compile options) processor 6502 org $F000 Start repeat 2 STA $02 repend LDA #0 ; STA $02 jmp Start org $FFFC .word Start .word Start Whether it not it compiles successfully is completely finicky.Deleting an extra blank line will fix the problem etc.Anyone else suffer from this? Edited December 3, 2017 by rbairos Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted December 3, 2017 Share Posted December 3, 2017 Worked OK on my Mac using DASM 2.20.11. ------- FILE test.asm LEVEL 1 PASS 1 1 0000 processor 6502 2 f000 org $F000 3 f000 Start 4 f000 repeat 2 5 f000 85 02 STA $02 4 f000 repend 5 f002 85 02 STA $02 6 f004 repend 7 f004 a9 00 LDA #0 8 f006 ; STA $02 9 f006 4c 00 f0 jmp Start 10 f009 11 f009 12 fffc org $FFFC 13 fffc 00 f0 .word.w Start 14 fffe 00 f0 .word.w Start Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted December 3, 2017 Share Posted December 3, 2017 DASM has problems with Linux CR/LF. So if you are on Windows, make sure that the file is not in Linux format. Quote Link to comment Share on other sites More sharing options...
+rbairos Posted December 3, 2017 Author Share Posted December 3, 2017 Thanks guys.I edit in unix style by default.That was driving me nuts! Here's an even simpler example that produces several repeated warning unless I switch do CR/LF , if anyone's interested in a small example: processor 6502 org $F000 repeat 10 STA $02 repend Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted December 3, 2017 Share Posted December 3, 2017 I had the same frustrating experience until I finally found out. Somehow the problem is only occurring with REPEAT. Something in the code must be wrong there. Quote Link to comment Share on other sites More sharing options...
RevEng Posted December 7, 2017 Share Posted December 7, 2017 The problem doesn't reproduce on Linux either, but I gave a theory a shot - does the version inside the attached zip avoid the bug? 7800AsmDevKit.0.6-20171206.zip Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted December 7, 2017 Share Posted December 7, 2017 I would need Linux formatted code. Quote Link to comment Share on other sites More sharing options...
RevEng Posted December 7, 2017 Share Posted December 7, 2017 Here's the first posted example, with Unix 0A newlines. bugtrigger-lf-only.asm Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted December 7, 2017 Share Posted December 7, 2017 That seems to fix it. What did you do? Quote Link to comment Share on other sites More sharing options...
RevEng Posted December 7, 2017 Share Posted December 7, 2017 I changed the fopen() call used to open the assembly source file (and includes) to use binary mode ("rb") instead of text mode. ("r") For non-POSIX systems, text mode will translate newlines. Unfortunately the functions responsible for reporting/moving the current position within the file (ftell and fseek) don't have a correct definitive behavior when translating newlines. (ie. serious cross-platform bug territory) The dasm REPEAT/REPEND functionality uses ftell and fseek to bounce around in the assembly code, which made me think of the above being the cause of the bug. I don't believe there will be ill effects from opening in binary mode. Just in case, I'll leave the above zip up for a week or so, before moving it into the official 7800 assembly dev kit. 3 Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted June 25, 2019 Share Posted June 25, 2019 On 12/6/2017 at 9:41 PM, RevEng said: The problem doesn't reproduce on Linux either, but I gave a theory a shot - does the version inside the attached zip avoid the bug? 7800AsmDevKit.0.6-20171206.zip 1.29 MB · 29 downloads Is this the most up to date version of DASM around? If so I'll use it for the DPC+, BUS, and CDFJ examples I'll be posting in the Harmony/Melody Club. Thanks! Quote Link to comment Share on other sites More sharing options...
RevEng Posted June 25, 2019 Share Posted June 25, 2019 Best to grab a fresh copy from here. Since DASM is used by other communities, I suspect there's might be other minorly tweaked releases elsewhere. Mine would be the latest AA-homegrown version, except it's missing your string define patch. I meant to add that, but life got in the way. I'll add it when I get a good chance to test it out, as I need to ensure it doesn't break anything with bB and 7800basic. 2 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.