Code Monkey home page Code Monkey logo

libasm's People

Contributors

tgtakaoka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

waltje

libasm's Issues

Improve error message

Command line interface should display much descriptive error message than just a number.
And listing file should be generated even there is an error.

[TEST] Improve auto test generator.

Currently test/gen command can generate fairly good auto-generated test assemble source for 8-bit CPU. Since 16-bit CPU's instruction usually has multiple bit-fields, scanning by simply incrementing instruction "value" doesn't work well. Need to find a good way to

  • find bit-fields in instruction code
  • iterate multiple bit-fields
  • omit similar test cases which might appear not consecutively.

expresions in assembler numeric evaluation & c header output & stdout

Is it possible to do math in mediate constants?

For example take the low or high bytes from a label's address.
In 6502
lda # high byte of 'return'
sta some high byte vector location
lda# low byte of 'return'
sta some low byte vector location
etc

.return RTI

In the BBC Micro BASIC's build in 6502 assembler I would use
LDA # return DIV 256
LDA # return MOD 256

I would also find it useful if asm could generate c header file like this. Probably the prefix string 'at' could be a parameter.
const unsigned char atFFE0[] =
{
0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9, 0xF8, 0xF7, 0xF6, 0xF5
};

Also '-' as a file name for 'use std out' would be handy to pipeline the processing of the hex file output for example.

Excellent work though, looking forward to using ins8060 and ins8070 modes.

[Z8] Support SETRP pseudo

Currently only 0~15 of 8-bit register address specified as assembler operand are converted to work register Rn or @rn.
we must support SETDP or ASSUME RP:nn directive.

Assembler directives don't work

After release 1.6.29, libasm assembler command line interface asm doesn't properly handle assembler directives.
Such as FCB in 6502.

My target is the TMS70C02 processor. This is what seems to work:

Report from https://github.com/electrickery

My target is the TMS70C02 processor. This is what seems to work:

For constants, libasm seems to use C-type presentations

Directives:
ORG
INCLUDE "assemblyHeader.asm"
EQU
DATA

Constant presentations:
%>0B immediate hex number
%0x0B immediate hex number
%0b01010101 immediate binary number
%!123 immediate 'not 123'
%030 immediate decimal number

In EQU declarations the 'nnnh' presentation is supported, but not in constants
used in code mnemonics.
The '*' comment character is supported but only as the first,
non-space character on the line

Bytes in memory use the DATA PseudoOp, text requires single quotes:
MSG_USAGE DATA CR, LF, 'H - this help text', CR, LF, PRMPT, EOL

Output ELF format support

It would be great if libasm generate ELF format file as an output binary with a relocation table.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.