You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Marie程序汇编报错:标签不能以0..9作为起始字符的问题排查

Fixing "A label cannot have 0..9 as its beginning character" in MARIE Assembly

Hey there, let's break down exactly what's causing your assembly failure and how to fix it:

The Root Cause

The error message spells it out clearly: MARIE's assembler doesn't allow labels to start with a digit (0-9). Looking at your code, the issue is the line near the end: 0, DEC 01. The label here is a single digit 0, which violates MARIE's label naming rules.

MARIE requires all labels to start with an alphabetic character (A-Z, case typically doesn't matter for most MARIE assemblers), and you can follow it with additional letters or digits if needed.

Corrected Code

Here's your code with the problematic label fixed (I renamed 0 to ZERO to comply with the rules):

START, INPUT 
SKIPCOND 800 
HALT 
OUTPUT 
STORE A 
SUB Z 
SKIPCOND 800 
SKIPCOND 000 
JUMP START 
X, INPUT 
STORE B 
OUTPUT 
SUB A 
SKIPCOND 800 
JUMP Y 
JUMP X 
Y, LOAD B 
ADD C 
STORE S 
EVEN, SUB T 
SKIPCOND 800 
JUMP L 
JUMP EVEN 
L, SKIPCOND 400 
JNS ODD 
LOAD S 
OUTPUT 
LOAD A 
SUB S 
STORE N 
OUTPUT 
JUMP START 
ODD, OUTPUT S 
LOAD S 
ADD 0 
STORE S 
JUMPI ODD 
A, DEC 00 
B, DEC 00 
S, DEC 00 
N, DEC 04 
C, DEC 04 
Z, DEC 94 
T, DEC 02 
ZERO, DEC 01 
END START

Quick Reminder

Going forward, double-check any new labels you add to make sure they start with a letter—this will keep you from running into the same error again.

内容的提问来源于stack exchange,提问作者TK708

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.30 18:27:28