Sasm
Simple Assembler for SIMPLE Architecture
Install / Use
/learn @ymyzk/SasmREADME
sasm
Simple Assembler for SIMPLE Architecture
Requirements
- Python 2.7+
- Python 3.3+
- PyPy
- PyPy3
Installation
git clone https://github.com/ymyzk/sasm.gitcd sasmpip install .
Assemble
- Write .sasm file
sasm -o test.mif test.sasm
Sample
Input .sasm file
option(address_radix, HEX)
option(data_radix, HEX)
option(depth, 4096)
li(r1, 1)
li(r2, 0x10)
label(loop)
add(r0, r1)
cmp(r0, r2)
blt(loop)
hlt()
Output .mif file
-- SASM generated Memory Initialization File (.mif)
WIDTH=16;
DEPTH=4096;
ADDRESS_RADIX=HEX;
DATA_RADIX=HEX;
CONTENT BEGIN
000 : 8101;
001 : 8210;
002 : c800;
003 : d050;
004 : b9fd;
005 : c0f0;
006 : 0000;
007 : 0000;
008 : 0000;
009 : 0000;
See sample files.
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
