From: rs <> Date: Thu, 3 Jul 2025 04:55:18 +0000 (-0500) Subject: Add align assembler directive X-Git-Url: https://git.the-white-hart.net/?a=commitdiff_plain;h=08635ffc8c5d9e9def105c0955da2aa47150caa9;p=vhdl Add align assembler directive --- diff --git a/projects/cpu_0/asm/as.py b/projects/cpu_0/asm/as.py index 8db13b8..a8104ea 100755 --- a/projects/cpu_0/asm/as.py +++ b/projects/cpu_0/asm/as.py @@ -37,6 +37,10 @@ def assemble(source: str) -> bytearray: if token == '(': comment = True + elif token == 'align': + x = len(b) % 4 + if x != 0: + b += b'\x00'*(4-x) elif token in instrs: b += instrs[token] elif '=' in token: