Jump to content
IGNORED

xasm 3.1.0 released


Recommended Posts


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.






Edited by fox
  • Like 6
Link to comment
Share on other sites

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 by fox
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

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.

 

 

post-17404-0-70499700-1406755456_thumb.png

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 3 weeks later...

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?

Link to comment
Share on other sites

@ 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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 RASTERMUSICTRACKER
to

 

MODUL
 opt h-
 org $a400
 ins "music.rmt"
 opt h+

starttune
 ldx #<MODUL
 ldy #>MODUL
 lda #0
 jmp RASTERMUSICTRACKER
It's a pity that it doesn't work. It just crashes now. Edited by analmux
Link to comment
Share on other sites

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 by fox
  • Like 1
Link to comment
Share on other sites

@ 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.

Link to comment
Share on other sites

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 by MaPa
  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...