rensoup Posted July 24, 2019 Share Posted July 24, 2019 I'm using the .align directive which works fine usually but not in this particular case: As you can see the directive is at A28C and the string "does not align" should be at A300 like it says in the generated listing file. However looking at it in the debugger, that's not the case: the directive just gets ignored. I've even tried ORG which doesn't work either (works fine too usually) using 2.0.8 b31 (switches in the pic) Quote Link to comment Share on other sites More sharing options...
phaeron Posted July 24, 2019 Share Posted July 24, 2019 Normally, a change in ORG would cause the assembler to end the current segment and start a new one so the loader changes to a new address. You have DOS headers turned off (OPT H-), though, so it can't do this and just writes the segments back-to-back. If you want the assembler to insert bytes to fill the difference in addresses, you need to enable fill (OPT F+). Quote Link to comment Share on other sites More sharing options...
rensoup Posted July 24, 2019 Author Share Posted July 24, 2019 (edited) 1 hour ago, phaeron said: Normally, a change in ORG would cause the assembler to end the current segment and start a new one so the loader changes to a new address. You have DOS headers turned off (OPT H-), though, so it can't do this and just writes the segments back-to-back. If you want the assembler to insert bytes to fill the difference in addresses, you need to enable fill (OPT F+). Ah Thanks, I actually did .align $100,$ff and that did the same thing. OPT F+ is the better solution because I'm sure I've got a few other .align scattered. (the listing is still inaccurate though) Edited July 24, 2019 by rensoup Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted July 24, 2019 Share Posted July 24, 2019 (edited) Just checked some listings and looks like you'd use the address, not that you would like to align to the next page, e.g. opt h - NO_QUOTE = 1 org $4000 icl 'charset40.s' icl 'mem4400.s' icl 'GameOver.s' .align $5000,0 icl 'charset50.s' icl 'logos.s' A alternative way to align to a page: :(((*+$FF)&$FF00)-*) dta 0 Edited July 24, 2019 by Wrathchild Quote Link to comment Share on other sites More sharing options...
rensoup Posted July 24, 2019 Author Share Posted July 24, 2019 5 hours ago, Wrathchild said: .align $5000,0 icl 'charset50.s' icl 'logos.s' ? That doesn't seem right? that would make .align really painful to use... Thanks for the alternative! 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.