You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add u32 expression support and whitespace handling improvements
Major enhancements: - Extended expression evaluator to use u32 internally, allowing values > 65535 (e.g., $10000 for top-of-memory calculations) - Added low/high byte operators (< and >) for extracting byte components - Fixed lexer to allow whitespace in operands by splitting on first space only - Improved long branch expansion algorithm with proper symbol table handling Technical changes: - number.rs: Changed parse() to return u32 instead of u16 - parser/expression.rs: Added Expr::Number(u32), LowByte, HighByte variants - eval/expression.rs: Added evaluate_u32() and evaluate_u16() methods - assembler.rs: Updated all evaluate() calls to use evaluate_u16() - lexer.rs: Changed split_whitespace() to splitn(2, char::is_whitespace) This enables real-world 6502 code patterns like: LDA #<($10000 - RAM_SIZE) ; Calculate from top of memory OFFSET = BASE + $100 ; Complex constant expressions All existing tests pass, new u32 calculation tests verify correctness.
0 commit comments