#z80 #assembly #cpc #amstrad #amstrad-cpc #basm #z80-assembler

nightly bin+lib cpclib-basm

依赖于 cpclib-asm 的 z80 汇编器

6 个版本

0.8.3 2024 年 8 月 5 日
0.8.2 2024 年 7 月 14 日
0.7.0 2023 年 8 月 14 日
0.6.0 2022 年 4 月 24 日

279嵌入式开发

Download history 1/week @ 2024-06-03 1/week @ 2024-06-24 282/week @ 2024-07-08 53/week @ 2024-07-15 29/week @ 2024-07-22 120/week @ 2024-08-05

每月 312 次下载
2 个 crate 中使用 (通过 cpclib-bndbuild)

MIT 和可能 GPL-3.0-only

2MB
30K SLoC

BASM

概要

Benediction ASseMbler 是一个针对 Amstrad CPC 平台的现代 z80 汇编器。它主要开发和用于演示 CRTC

尚未编写真正的文档... 但可以在 这里 找到一些小部分。可以保留的是

  • 它的解析器肯定比 rasm 的慢,但速度仍然具有竞争力
  • 它包含所有标准汇编指令(文件包含、条件汇编、变量、宏定义、循环、局部标签)
  • 以及不常见的指令(函数定义、列表和矩阵处理、汇编器嵌入文件)

当然,由于用户数量有限,仍然存在一些错误;但它在我的用例中工作得很好

<tests/asm> 文件夹中提供了大量示例。

帮助

basm.exe --help`
Profile debug compiled: Fri, 18 Aug 2023 14:05:52 +0000

Benediction ASM -- z80 assembler that mainly targets Amstrad CPC

Usage: basm.exe [OPTIONS] [INPUT]

Arguments:
  [INPUT]  Input file to read.

Options:
      --inline <INLINE>                Z80 code is provided inline
  -o, --output <OUTPUT>                Filename of the output.
      --db                             Write a db list on screen (usefull to get the value of an opcode)    
      --lst <LISTING_OUTPUT>           Filename of the listing output.
      --sym <SYMBOLS_OUTPUT>           Filename of the output symbols file.
      --sym_kind <SYMBOLS_KIND>        Format of the output symbols file [default: basm] [possible values: winape, basm]
      --basic                          Request a Basic header (the very first instruction has to be the LOCOMOTIVE directive).
      --binary                         Request a binary header
      --snapshot                       Generate a snapshot
  -i, --case-insensitive               Configure the assembler to be case insensitive.
  -d, --directives-prefixed-by-dot     Expect directives to by prefixed with a dot
  -I, --include <INCLUDE_DIRECTORIES>  Provide additional directories used to search files
  -D, --define <DEFINE_SYMBOL>         Provide a symbol with its value (default set to 1)
      --m4 <TO_M4>                     Provide the IP address of the M4
  -l <LOAD_SYMBOLS>                    Load symbols from the given file
      --Werror                         Warning are considered to be errors
      --progress                       Show a progress bar.
      --list-embedded                  List the embedded files
      --view-embedded <VIEW_EMBEDDED>  Display one specific embedded file [possible values: inner://crtc.asm, inner://deexo.asm, inner://dzx0_fast.asm, inner://dzx0_standard.asm, inner://firmware/amsdos.asm, inner://firmware/casmng.asm, inner://firmware/gfxvdu.asm, inner://firmware/highkern.asm, inner://firmware/indirect.asm, inner://firmware/kernel.asm, inner://firmware/keymng.asm, inner://firmware/lowkern.asm, inner://firmware/machine.asm, inner://firmware/math6128.asm, inner://firmware/mathnot464.asm, inner://firmware/mathnot6xx.asm, inner://firmware/not464.asm, inner://firmware/scrpack.asm, inner://firmware/sound.asm, inner://firmware/txtvdu.asm, inner://ga.asm, inner://lz48decrunch.asm, inner://lz49decrunch.asm, inner://lz4_docent.asm, inner://opcodes_first_byte.asm, inner://pixels-routs.asm, inner://unaplib.asm, inner://unaplib_fast.asm]
  -h, --help                           Print help
  -V, --version                        Print version

Still a Work In Progress assembler

依赖项

~23–39MB
~533K SLoC