{"id":17965202,"url":"https://github.com/tokenrove/m68k-assembler","last_synced_at":"2025-04-03T19:43:59.284Z","repository":{"id":11579942,"uuid":"14069326","full_name":"tokenrove/m68k-assembler","owner":"tokenrove","description":"A simple, mostly-DevPAC-compatible assembler for the Motorola 68k series of proccessors.","archived":false,"fork":false,"pushed_at":"2013-11-02T16:25:10.000Z","size":400,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T08:16:47.119Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Common Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tokenrove.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-02T16:23:38.000Z","updated_at":"2022-09-27T02:00:56.000Z","dependencies_parsed_at":"2022-09-24T00:51:19.366Z","dependency_job_id":null,"html_url":"https://github.com/tokenrove/m68k-assembler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tokenrove%2Fm68k-assembler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tokenrove%2Fm68k-assembler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tokenrove%2Fm68k-assembler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tokenrove%2Fm68k-assembler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tokenrove","download_url":"https://codeload.github.com/tokenrove/m68k-assembler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247070779,"owners_count":20878581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T12:10:29.166Z","updated_at":"2025-04-03T19:43:59.258Z","avatar_url":"https://github.com/tokenrove.png","language":"Common Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nThe goal of this assembler is to eventually not be simply an M68K\nassembler, but to be relatively easily retargetable.  Also, this\nassembler should be callable from other CL applications, as well as\nexecutable as a stand-alone program.\n\nThe code's not so clean right now, maybe, but I've been using it for\nvarious Atari ST projects for a little while now to great personal\nsatisfaction.\n\n\nThe a.out object format supported here and by st-linker is not really\nquite exactly a.out.  It's close, though.\n\n\nTo build this from scratch, you'll need to do something like:\n(in the m68k-asm directory)\n\nCL-USER\u003e (asdf:oos 'asdf:load-op :lalr-parser-generator)\nCL-USER\u003e (load \"m68k-grammar\")\nCL-USER\u003e (with-open-file (stream \"parser.lisp\" :direction :output)\n            (lalr:make-parser m68k-asm::*m68k-asm-grammar*\n                              :package (find-package \"M68K-ASSEMBLER\")\n                              :stream stream))\n\nI'm going to make that a bit cleaner at some point.\n\n\n\nThings to add in the grammar/parser/lexer:\n\nSupport for ' (single ASCII character?) -- only because the\n\tbook I have says it's part of Motorola's standard.  Should it\n\tbehave like double-quotes or what?\nSupport for floats (once FPU instructions are supported).\n\n\nThings to add in the assembler:\n\nChecking ranges of types, signed indices, etc.\n\tAlso, type checking information stored in the symbol table.\nOutput listings (with cycle counts, et cetera).\nSupport for later chips in the m68k line, and enabling/disabling\n\tallowance of their added instructions.\nChange lookup tables so that on load, they get converted to hash\n\ttables or whatever's appropriate. [half-done]\nNifty local labels a-la GNU as or similar.  (0f, 1b, etc)\nBRA.S (currently you have to say BRA.B).\nCL-style macros?  (that would be cool!)\n\tThe natural thing to do is join this with my other experiment\n\t(assembly lisp) and use a sexp intermediary form still\n\taccessible to the user which would be more amenable to\n\tmacrology.\nDebugger info.\nOutput in object formats other than A.OUT.\nOptimizations/data flow analysis.\nOptional lispy object format.  (see st-linker README)\nStuff to make guesses about pairs of MOVEM instructions at head of\n\tfunction and just before RTS/RTE, and warn the user if they\n\tmismatch.\nCleaner abstract syntax.\n\n\nTHINGS TO DO BEFORE RELEASE\n\n- remove debugging output.\n- add a decent warning/error display and logging system.\n- compile list of known issues, try to resolve.\n- put together a basic automated test suite.\n  (once object format has settled down, start a set of regression files,\n   with sane output verified by hand; also, feed smaller files that\n   should deliberately provoke certain conditions in, watch for those\n   conditions.)\n- skim all XXXs.\n- once a better warning system is in place, allow routines like\n  MODIFIER-BITS to guess the size of underspecified operations, and warn\n  about them at suitable warning levels.\n- test with sourcer68 output of various files.\n- Things to test about relocation:\n\tare 8-bit indirect displacements being relocated correctly?\n\tverify all possible relocation combinations.\t\n- Update dependencies in ASDF file so that it compiles without warnings.\n- *last-label* feels like a hack.  See if there's an alternative.\n- DC needs some serious cleanups.\n- undo some of the intentional braindamage induced to make us closer\n  to devpac.\n- various pseudo-ops need to work on list of operands rather than\n  single operand.\n- stifle horrible potential bug with MOVEQ optimizations and negative\n  numbers/sign extension.\n- add basic sexp mode.\n\n\nTHINGS TO PUT IN TEST SUITE\n\n- conditional compilations;\n- ensure directives like ALIGN and EVEN don't emit unnecessary padding;\n- random instruction streams tested against disassembly;\n- test that * (as comment) and * (as multiply) are being handled correctly;\n- test (known broken) MOVE-\u003eMOVEQ sign extension bug;\n- extensive macrology;\n- files that end without newlines, that have funny characters in them, etc.\n\n\nKNOWN ISSUES\n\n- macro parameters are broken.  At least, \u003cfoo\u003e style ones are still\n  broken.  Also, \\n always expands to an absolute symbol, so you can't\n  use a register.  [assembler]\n- size output is broken if ORG is used.\n- Unfinished pseudo-ops: (all are quite easy)\n\tEQUR\n\tDCB\n\tEND\n\tIFxx (IFEQ and IFNE are already done)\n- branch-displacement-bits will behave badly in some unusual situations.\n  It's ugly and needs to be cleaned up.\n\n\nKNOWN MAJOR INCOMPATIBILITIES WITH DEVPAC\n\nThese are things which aren't likely to change soon.\n\nMacros:\n\n- we don't support \u003c or \u003e embedded in macro parameters which are\n  already wrapped in \u003c and \u003e.  (eg: \"\u003cfoo\u003e\u003e\u003e\u003e2\u003e\" =\u003e \"foo\u003e\u003e2\") [lexer]\n\n\nENHANCEMENTS FROM DEVPAC\n\n- We support EXTERN/GLOBAL as synonyms for XREF/XDEF,\n  respectively.  Also ALIGN as a simple version of CNOP.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftokenrove%2Fm68k-assembler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftokenrove%2Fm68k-assembler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftokenrove%2Fm68k-assembler/lists"}