Jump to content
IGNORED

[pre-assembler] Boost65


pfeuh

Recommended Posts

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 by pfeuh
Link to comment
Share on other sites

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 by JAC!
  • Like 2
Link to comment
Share on other sites

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.

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