Skip to content

directives bikeshed#4

Closed
zignig wants to merge 34 commits intowhitequark:masterfrom
zignig:assembler_v3
Closed

directives bikeshed#4
zignig wants to merge 34 commits intowhitequark:masterfrom
zignig:assembler_v3

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.

2 participants