Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

directives bikeshed #4

Closed
wants to merge 34 commits into from
Closed

directives bikeshed #4

wants to merge 34 commits into from

Conversation

zignig
Copy link
Contributor

@zignig zignig commented Jul 13, 2019

First try.

@zignig
Copy link
Contributor Author

zignig commented Jul 14, 2019

Not sure how to approach this, I would like to make sure that it is in @whitequark style, but not waste time building dead ends.

Would I be able to get an example asm file with macros , constants and STUFF for direction ?

Purely speculative of course. :)

@whitequark
Copy link
Owner

I'll try to do something like that in the following days.

@zignig
Copy link
Contributor Author

zignig commented Jul 17, 2019

Intent:

  1. Directives , have a series of directives that for performing tasks inside the assembler.

.equ , define a constant symbol (done)
.macro and .endm , to define a series of instructions that can be invoked by an instruction (partial)
.include , prepend another .asm to the current build, so libraries can be built.
.section , create a code section for later linking

  1. Encapsulate the Assembler in an object so internal constructs can be interrogated and metadata (symbol maps, entry points, and memory structures) can build built. This is half done, class level variables need to be defined.

2.1 Create linking infrastructure, so the assembler can build a full binary from named and positioned code blocks.

3.0 Pass all existing test scripts.

I think that macro would work as an Instr , so operands and symbols are created and resolved with existing code. There is some dense python magic going on inside these files.

I will merge my current work onto this branch and you can review at your pleasure.

@zignig
Copy link
Contributor Author

zignig commented Jul 30, 2019

being able to rename registers would be nice.

@zignig
Copy link
Contributor Author

zignig commented Apr 13, 2020

Direction has changed, this patch is no longer germane.

Will rework for new infrastructure.

@zignig zignig closed this Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants