fox Posted July 20, 2014 Share Posted July 20, 2014 (edited) Hello, I've just made a new release of xasm. xasm is a 6502 cross-assembler with original syntax extensions. Changes from 3.0.2: OS X, Ubuntu and Fedora packages (in addition to Windows) INS ("insert binary file") directive can be repeated (suggested by Marek Pavlik) any expression can take value of n-th file byte, using the syntax {INS 'filename',offset} OPT U- disables /u unused label warnings (suggested by Marek Pavlik) if the file to be included cannot be open, report error in the ICL line (suggested by Peter Dell) /M now filters out duplicate filenames /p implemented outside Windows xasm source code updated to the version 2 of the D programming language project moved to GitHub In Ubuntu you can install scite (system-provided) and xasm-scite to get syntax highlighing, single-keystroke compilation and clickable error messages. On other systems you need to copy xasm.properties to the SciTE directory. New website: https://github.com/pfusik/xasm Downloads: https://github.com/pfusik/xasm/releases/tag/xasm-3.1.0 Edited July 20, 2014 by fox 6 Quote Link to comment Share on other sites More sharing options...
Xuel Posted July 20, 2014 Share Posted July 20, 2014 Excellent! I wrote a VIM syntax file for XASM as well. I just put it on github here. Quote Link to comment Share on other sites More sharing options...
Chilly Willy Posted July 20, 2014 Share Posted July 20, 2014 It would be helpful for people not in the know to provide a link for D. http://dlang.org/index.html Anywho, nice little assembler. Quote Link to comment Share on other sites More sharing options...
Xuel Posted July 22, 2014 Share Posted July 22, 2014 fox, thanks for your comments on vim-xasm! I've integrated the changes you suggested. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted July 22, 2014 Share Posted July 22, 2014 Fox... thx for XASM... question... what are nowadays the benefits of using XASM compared to MADS? Quote Link to comment Share on other sites More sharing options...
fox Posted July 22, 2014 Author Share Posted July 22, 2014 (edited) Xuel: thank you. I've added link to vim-xasm in xasm README. Heaven: Reliability, full documentation, cross-platformness. What I mean by reliability: I've just made a quick check if "file byte expression" is supported by MADS: opt h- dta {ins 'test.asx',0} MADS compiles that without errors, but the output byte is zero. Edited July 22, 2014 by fox 1 Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted July 22, 2014 Share Posted July 22, 2014 so it's just matter of taste but XASM and MADS drove me sometimes nuts with all this short cuts... Quote Link to comment Share on other sites More sharing options...
+JAC! Posted July 30, 2014 Share Posted July 30, 2014 Verified the "ICL" error handling fix. Works fine now. I also tried to use the OS-X build on my Leopard VM. This is what I get. Is the the DMG a 64bit version? That would be sad. Quote Link to comment Share on other sites More sharing options...
analmux Posted July 30, 2014 Share Posted July 30, 2014 So there's still progress? Quote Link to comment Share on other sites More sharing options...
fox Posted August 1, 2014 Author Share Posted August 1, 2014 The OS X binary is 32-bit Intel, but requires OS X 10.6+. dmd refused to target 10.5. If you can compile xasm so that it runs on 10.5 (or better 10.4), please let me know. Quote Link to comment Share on other sites More sharing options...
+JAC! Posted August 5, 2014 Share Posted August 5, 2014 The V2 D-Lang compiler refuses to even install on anything lower than 10.6. So one more push towards getting a more recent environment up an running. And again it'll take days and weeks ... sigh. Quote Link to comment Share on other sites More sharing options...
MaPa Posted August 5, 2014 Share Posted August 5, 2014 use windows hehe Quote Link to comment Share on other sites More sharing options...
+JAC! Posted August 5, 2014 Share Posted August 5, 2014 I use window myself. But I want to provide a ready to run solution for those who don't 1 Quote Link to comment Share on other sites More sharing options...
analmux Posted August 24, 2014 Share Posted August 24, 2014 I have an old XASM version 2.5.2, compatible with old MSDOS: "xasm.exe" and "xboot.com". It doesn't work on my new laptop, with Windows 8.1 OS. Is there a win8 compatible new version? And, if so, where could I find it? Quote Link to comment Share on other sites More sharing options...
analmux Posted August 24, 2014 Share Posted August 24, 2014 I downloaded the XASM 3.1.0 for windows (see post 1) and I did a new test. It works OK under win8.1. If I have a filename "[program].asx", then the new XASM works to compute a "[program].obx". I can change the file extension myself: "[program].xex", and it runs fine on A800Win. Is there any newest XBOOT.COM version? Quote Link to comment Share on other sites More sharing options...
analmux Posted August 25, 2014 Share Posted August 25, 2014 @ Fox, would you like to look at this? I'm confused with the new XASM. To me it seems that the options [opt h-] and [opt h+] don't do what they should be. I did some tests and I compared the old with the new xex. The old one also plays the music, as it should do. The new one doesn't play anything. Normally the boot header (6 bytes, $ffff [from] [to]) of any .com file should not be included. The new 3.1.0 did. XASM 2.5.2: "main_old.xex" XASM 3.1.0 "main_new.xex" main_old.xex main_new.xex Quote Link to comment Share on other sites More sharing options...
fox Posted August 26, 2014 Author Share Posted August 26, 2014 xasm 2.x (and tools) is 16-bit MS-DOS. 64-bit Windows don't run 16-bit MS-DOS applications. XBOOT is discontinued as all emulators and SIO2PC software run XEXes now. Regarding opt h-, will you show me your source code? Quote Link to comment Share on other sites More sharing options...
analmux Posted August 26, 2014 Share Posted August 26, 2014 PM sent. Quote Link to comment Share on other sites More sharing options...
fox Posted August 26, 2014 Author Share Posted August 26, 2014 xasm 2 and xasm 3 generate DOS headers at a different time. xasm 2 generates a header for the first byte of the block, so the order of "opt h-" vs "org" doesn't matter. xasm 3 generates a header when assembling "org", so "opt h-" must precede "org". Just swap these directives in your code. Quote Link to comment Share on other sites More sharing options...
analmux Posted August 26, 2014 Share Posted August 26, 2014 (edited) OK, I changed the last 10 commands at the end from org $a400 MODUL opt h- ins "music.rmt" opt h+ starttune ldx #<MODUL ldy #>MODUL lda #0 jmp RASTERMUSICTRACKERto MODUL opt h- org $a400 ins "music.rmt" opt h+ starttune ldx #<MODUL ldy #>MODUL lda #0 jmp RASTERMUSICTRACKERIt's a pity that it doesn't work. It just crashes now. Edited August 26, 2014 by analmux Quote Link to comment Share on other sites More sharing options...
fox Posted August 26, 2014 Author Share Posted August 26, 2014 (edited) There are two problems with your modified code: 1. MODUL no longer points to the module's address. It points to where some previous code ended. 2. Location of starttune is unclear. You expect it to be located after the module, yet you insert bytes including the header starting from the module address. There are several possible solutions, e.g. a. Move starttune next to the rest of your code and keep just the module at the end: opt h- MODUL equ $a400 ins "music.rmt" b. If you really like the code to follow the module and the module is stripped from instrument names, insert just the contents without the headers: org $a400 MODUL ins "music.rmt",6 ; skip 6 leading bytes, ie. the header starttune ldx #<MODUL ldy #>MODUL lda #0 jmp RASTERMUSICTRACKER As a bonus, from xasm 3.1.0 on you can even take the loading address directly from the module file, e.g. org {ins "music.rmt",2}+{ins "music.rmt",3}*256 instead of org $a400 This way the address of your module won't get out of sync with your source code. Edited August 26, 2014 by fox 1 Quote Link to comment Share on other sites More sharing options...
analmux Posted August 26, 2014 Share Posted August 26, 2014 (edited) I'm not quite sure yet. Solution (a) still has a crash. Solution (b) DID work. Indeed ins "music.rmt",6 is the solution! Many thanks anyway, for a very fast help & replies. Edited August 26, 2014 by analmux Quote Link to comment Share on other sites More sharing options...
analmux Posted August 26, 2014 Share Posted August 26, 2014 @ Fox, I did some other small tests, w.r.t. your (a) solution. opt h- org $a400 MODUL ins "music.rmt" opt h+ org $bf00 starttune ldx #<MODUL ldy #>MODUL lda #0 jmp RASTERMUSICTRACKER To me it's a mystery, but it only works after doing a NEW org-definition, right before the "starttune". It didn't matter when I moved or just removed the "opt h+" command. Quote Link to comment Share on other sites More sharing options...
MaPa Posted August 26, 2014 Share Posted August 26, 2014 (edited) It's because of when inserting file with opt h- it's assumed that it is binary file and it is not parsed to deduct what is the end address (you can have several segments in binary file, several "orgs") or something like that. Fox explained it to me some time ago too as I run into the same "problem" like you. Edited August 26, 2014 by MaPa 1 Quote Link to comment Share on other sites More sharing options...
+JAC! Posted August 26, 2014 Share Posted August 26, 2014 The latter sounds strange. I'd expect "INS" works the same, no matter if/which header the surounding main file has: Insert binary content as described in the manual. 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.