pfeuh Posted August 19, 2014 Share Posted August 19, 2014 (edited) Hello, C programs is my everyday job, A8 is my hobby (since... the heighties). I'm found of 6502 assembler, but i think that something is missing. Typically, you write a game in asm for your favorite system, let's say a file on a disk for a 48K machine. Then somebody would like to have a K7 version for a 16K or a cartdrige... It's generally the begining of the problems. Another problem is passing parameters to a subroutine. Not a real problem, but it's really boring and causes a lot of bugs not easy to solve. I've done a program which solve this two problems and has other features (like including files, convert from ascii to atascii or screen codes), and I'm asking myself : is it just a gadget for my pleasure or could it be useful? It works for ATASM, I would like you to have a look. Here is the segments definition I've used, the project is totally at the begining. Language is python, creating an application to distribute is very easy. segments = SEGMENTS()segments.addSegment("zdata", "$80")segments.addSegment("data", "$3000")segments.addSegment("persistent")segments.addSegment("heap")segments.addSegment("code", "$3800")segments.addSegment("rodata")segments.addSegment("runvec", "$2E0") The result of the pre-assembling is "test_pre.asm". You can test it, it work with ATASM as a source file. The file which was pre-assembled is "test.asm". It doesn't work with ATASM because it contains some keywords that a 6502 assembler doesn't understand like .function, .endfunc, .call and so on. Let me know if there is an interest or do I have to switch to something else. Regards, Pfeuh test.asm test_pre.asm Boost65.pdf test_pre.xex Edited August 19, 2014 by pfeuh Quote Link to comment Share on other sites More sharing options...
+JAC! Posted August 19, 2014 Share Posted August 19, 2014 (edited) Actually all of what you have written above is readily available in MADS out of the box. Procedure call with parameters included. Conversion from ATASM to MADS just takes three search and replace ops. Edited August 19, 2014 by JAC! 2 Quote Link to comment Share on other sites More sharing options...
pfeuh Posted August 20, 2014 Author Share Posted August 20, 2014 Does MADS manages the memory segmentation too? Quote Link to comment Share on other sites More sharing options...
+JAC! Posted August 20, 2014 Share Posted August 20, 2014 I am not 100% sure what you mean. I assume file segments. ATASM is special in that it converges and sorts memory blocks when wrting the file. This can save a few bytes. But you can use .bank to explicitly start a new segment. In all other compilers the ORG statement also starts a new segment by default. 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.