diff --git a/doc/src/errors.md b/doc/src/errors.md index 5b5482c6..8da04435 100644 --- a/doc/src/errors.md +++ b/doc/src/errors.md @@ -49,8 +49,8 @@ spcasm::arch::valid · ───────┬─────── · ╰── `arch` directive 2 │ org 0 - 3 │ start: ; @ 0 - 4 │ MOV A,#$10 ;= E8 10 + 3 │ startpos + 4 │ start: ; @ 0 ╰──── help: spcasm supports `arch` directives for compatibility with the Asar multi-architecture assembler. This arch directive points to the @@ -203,6 +203,32 @@ See [arch::valid](#spcasmarchvalid); when compiling files originally targeted at This category contains directive-related errors. +#### spcasm::directive::duplicate_startpos + +```trycmd +$ spcasm -w all tests/errors/duplicate-startpos.spcasmtest +? 1 +spcasm::directive::duplicate_startpos + + × Duplicate startpos directive + ╭─[tests/errors/duplicate-startpos.spcasmtest:6:1] + 3 │ nop + 4 │ + 5 │ org $300 + 6 │ startpos + · ────┬─── + · ╰── `startpos` directive + 7 │ nop + ╰──── + help: the `startpos` directive defines the execution entry point of the + ROM after it was loaded. There can only be one entry point. + + +``` + +The [`startpos` directive](reference/directives.md#startpos) can only be specified once, since there can only be one program entry point. + + #### spcasm::directive::invalid_directive_option ```trycmd @@ -245,7 +271,7 @@ spcasm::directive::invalid_range For range specifications, like when including binary files, the Asar style range syntax is a `start-end` format. Obviously, the start then needs to be before (or the same as) the end. Often you just accidentally swapped these limits. -#### spcasm::math_pri_unsupported +#### spcasm::directive::math_pri_unsupported ```trycmd $ spcasm -w all tests/errors/math-pri.spcasmtest diff --git a/doc/src/reference/directives.md b/doc/src/reference/directives.md index eff28460..218a6f1c 100644 --- a/doc/src/reference/directives.md +++ b/doc/src/reference/directives.md @@ -156,6 +156,22 @@ org $4000+30 Because segment start locations must be known early on, using references in the value is quite restricted. +### `startpos` + +The `startpos` directive specifies that the program’s entry point should be at the current position (that is, at the next instruction). The entry point is what the program executes after being loaded by the ROM loader. + +Note that this directive is not always required depending on the output format. If you are assembling a raw RAM image, the entry point will not stored anywhere anyways. + +If you implement a custom fastloader, the code at the entry point is what should be uploaded with the bootrom uploader. + +```asm +org $1000 +startpos + ; your entry point code, e.g. initialization... +main_function: + mov a, #2 +``` + ### Segment stack The segment stack can be controlled with the `pushpc` and `pullpc` instructions. `pushpc` pushes the current segment to the segment stack, and there will not be an active segment afterwards. `pullpc` pulls the last segment from the segment stack, reactivating it and allowing you to continue appending data to its end. This is currently the only way of continuing to put data into an already-existing segment that was "interrupted", so to speak. diff --git a/src/assembler/directive.rs b/src/assembler/directive.rs index 2c52bbc3..3a3c8db2 100644 --- a/src/assembler/directive.rs +++ b/src/assembler/directive.rs @@ -8,7 +8,7 @@ use flexstr::{shared_str, IntoSharedStr, SharedStr, ToSharedStr}; use miette::SourceSpan; use num_traits::{FromPrimitive, ToPrimitive}; -use super::{resolve_file, AssembledData}; +use super::{resolve_file, AssembledData, ClearLabels}; use crate::brr::wav; use crate::directive::{symbolic_directives, DirectiveValue, FillOperation}; use crate::sema::instruction::MemoryAddress; @@ -18,7 +18,8 @@ use crate::sema::AssemblyTimeValue; use crate::{brr, AssemblyError, Directive}; impl AssembledData { - /// Assemble a single assembler directive into this assembly data. + /// Assemble a single assembler directive into this assembly data. Returns whether the label list needs to be + /// cleared or (if the directive is transparent to labels) not. /// /// # Errors /// Any error caused by the directive assembly process is returned. @@ -26,39 +27,37 @@ impl AssembledData { /// # Panics /// All panics are programming bugs. #[allow(clippy::unnecessary_wraps)] - pub fn assemble_directive( + pub(super) fn assemble_directive( &mut self, directive: &mut Directive, current_labels: &Vec, - ) -> Result<(), Box> { + ) -> Result> { match directive.value { // Symbolic directives should not be around anymore. symbolic_directives!() => unreachable!(), - DirectiveValue::Table { ref values } => - try { - let mut is_first = true; - for value in values { - self.append_sized_unresolved( - value.clone(), - if is_first { current_labels } else { Self::DEFAULT_VEC }, - directive.span, - )?; - is_first = false; - } - }, - DirectiveValue::Brr { ref file, range, auto_trim, .. } => - self.assemble_brr(directive, file, range, auto_trim, current_labels), - DirectiveValue::String { ref text, has_null_terminator } => - try { - self.append_bytes(text.clone(), current_labels, directive.span)?; - if has_null_terminator { - self.append( - 0, - if text.is_empty() { current_labels } else { Self::DEFAULT_VEC }, - directive.span, - )?; - } - }, + DirectiveValue::Table { ref values } => { + let mut is_first = true; + for value in values { + self.append_sized_unresolved( + value.clone(), + if is_first { current_labels } else { Self::DEFAULT_VEC }, + directive.span, + )?; + is_first = false; + } + Ok(ClearLabels::Yes) + }, + DirectiveValue::Brr { ref file, range, auto_trim, .. } => { + self.assemble_brr(directive, file, range, auto_trim, current_labels)?; + Ok(ClearLabels::Yes) + }, + DirectiveValue::String { ref text, has_null_terminator } => { + self.append_bytes(text.clone(), current_labels, directive.span)?; + if has_null_terminator { + self.append(0, if text.is_empty() { current_labels } else { Self::DEFAULT_VEC }, directive.span)?; + } + Ok(ClearLabels::Yes) + }, DirectiveValue::Include { ref file, range } => { let binary_file = resolve_file(&self.source_code, file); let mut binary_data = std::fs::read(binary_file).map_err(|os_error| AssemblyError::FileNotFound { @@ -69,7 +68,8 @@ impl AssembledData { })?; binary_data = self.slice_data_if_necessary(file, directive.span, binary_data, range)?; - self.append_bytes(binary_data, current_labels, directive.span) + self.append_bytes(binary_data, current_labels, directive.span)?; + Ok(ClearLabels::Yes) }, DirectiveValue::SampleTable { auto_align } => { let current_address = self.segments.current_location().unwrap(); @@ -88,11 +88,20 @@ impl AssembledData { } .into()); } - self.assemble_sample_table(current_labels, directive.span) + self.assemble_sample_table(current_labels, directive.span)?; + Ok(ClearLabels::Yes) }, DirectiveValue::Fill { ref operation, ref parameter, ref value } => { let current_address = self.segments.current_location().unwrap(); - self.assemble_fill(operation, parameter, value.clone(), current_address, current_labels, directive.span) + self.assemble_fill( + operation, + parameter, + value.clone(), + current_address, + current_labels, + directive.span, + )?; + Ok(ClearLabels::Yes) }, DirectiveValue::Conditional { ref mut condition, ref mut true_block, ref mut false_block } => { let condition = condition.try_value(directive.span, &self.source_code)?; @@ -100,6 +109,24 @@ impl AssembledData { self.assemble_all_from_list(false_block) } else { self.assemble_all_from_list(true_block) + }?; + Ok(ClearLabels::Yes) + }, + DirectiveValue::Startpos => { + let current = self.segments.current_location().map_err(|()| AssemblyError::MissingSegment { + location: directive.span, + src: self.source_code.clone(), + })?; + + if self.entry_point.is_some() { + Err(AssemblyError::DuplicateStartpos { + src: self.source_code.clone(), + location: directive.span, + } + .into()) + } else { + self.entry_point = Some(current); + Ok(ClearLabels::No) } }, } diff --git a/src/assembler/mod.rs b/src/assembler/mod.rs index 4bda11df..3545fc3f 100644 --- a/src/assembler/mod.rs +++ b/src/assembler/mod.rs @@ -27,6 +27,13 @@ use table::{EntryOrFirstOperandTable, EntryOrSecondOperandTable, TwoOperandEntry use self::memory::{LabeledMemoryValue, MemoryValue}; +#[derive(Debug, Default, Copy, Clone, Eq, PartialEq)] +enum ClearLabels { + #[default] + Yes, + No, +} + /// Assembles the instructions into a byte sequence. This function receives already-separated sections as input, so it /// does not do section splitting itself. It might modify the input segments as well during optimization. /// @@ -52,8 +59,9 @@ pub fn assemble_inside_segments( segments: &mut Segments, source_code: &Arc, options: Arc, -) -> Result, Box> { - assemble_to_data(segments, source_code, options)?.resolve_segments() +) -> Result<(Segments, EntryPoint), Box> { + let data = assemble_to_data(segments, source_code, options)?; + Ok((data.resolve_segments()?, data.entry_point)) } /// Assembles a [`ProgramElement`] inside a loop. @@ -68,8 +76,12 @@ macro_rules! assemble_element { }, $crate::sema::ProgramElement::Instruction(instruction) => $data.assemble_instruction(instruction, &$current_labels)?, - $crate::sema::ProgramElement::Directive(directive) => - $data.assemble_directive(directive, &$current_labels)?, + $crate::sema::ProgramElement::Directive(directive) => { + let clear_labels = $data.assemble_directive(directive, &$current_labels)?; + if clear_labels == ClearLabels::No { + continue; + } + }, $crate::sema::ProgramElement::IncludeSource { .. } => unreachable!("there should not be any remaining unincluded source code at assembly time"), $crate::sema::ProgramElement::UserDefinedMacroCall { .. } => @@ -119,6 +131,9 @@ pub(crate) fn resolve_file(source_code: &Arc, target_file: &str) - .expect("file path was root, this makes no sense") } +/// Entry point specification. +pub type EntryPoint = Option; + /// The assembled data, which consists of multiple sections. #[derive(Debug)] pub struct AssembledData { @@ -128,6 +143,8 @@ pub struct AssembledData { pub source_code: Arc, /// Assembler subroutines use this as a flag to signal an end of assembly as soon as possible. should_stop: bool, + /// Execution entry point of the code after being loaded. + pub entry_point: EntryPoint, /// Options that command line received; used for determining what to do with warnings. options: Arc, } @@ -193,7 +210,13 @@ impl AssembledData { #[must_use] #[inline] pub fn new(source_code: Arc) -> Self { - Self { segments: Segments::default(), source_code, should_stop: false, options: default_backend_options() } + Self { + segments: Segments::default(), + source_code, + should_stop: false, + entry_point: None, + options: default_backend_options(), + } } /// Change the error options for assembler warning and error reporting. diff --git a/src/common.rs b/src/common.rs index ed9de5bd..032cb494 100644 --- a/src/common.rs +++ b/src/common.rs @@ -11,6 +11,7 @@ use parking_lot::RwLock; pub use super::directive::Directive; pub use super::error::AssemblyError; pub use super::sema::Environment; +use crate::assembler::EntryPoint; use crate::cli::{default_backend_options, Frontend}; use crate::sema::reference::Label; use crate::sema::ProgramElement; @@ -167,11 +168,12 @@ pub fn run_assembler_into_symbolic_segments( pub fn run_assembler_into_segments( source_code: &Arc, options: Arc, -) -> Result<(Segments, Segments), Box> { +) -> Result<(Segments, Segments, EntryPoint), Box> { let (_, mut segmented_program) = run_assembler_into_symbolic_segments(source_code, options.clone())?; - let assembled = crate::assembler::assemble_inside_segments(&mut segmented_program, source_code, options) - .map_err(AssemblyError::from)?; - Ok((segmented_program, assembled)) + let (assembled, entry_point) = + crate::assembler::assemble_inside_segments(&mut segmented_program, source_code, options) + .map_err(AssemblyError::from)?; + Ok((segmented_program, assembled, entry_point)) } /// Provides a name for enum variants. diff --git a/src/directive.rs b/src/directive.rs index 39bf6865..e61819c4 100644 --- a/src/directive.rs +++ b/src/directive.rs @@ -188,6 +188,7 @@ pub enum DirectiveSymbol { PadWord, PadLong, PadDWord, + Startpos, Namespace, } @@ -226,6 +227,7 @@ impl Display for DirectiveSymbol { Self::PadWord => "padword", Self::PadLong => "padlong", Self::PadDWord => "paddword", + Self::Startpos => "startpos", Self::Namespace => "namespace", }) } @@ -294,6 +296,8 @@ pub enum DirectiveValue { /// The block that is assembled if the condition is falsy. false_block: Vec, }, + /// `startpos` + Startpos, /// `namespace` StartNamespace { name: SharedStr }, /// `namespace off` @@ -339,6 +343,7 @@ impl DirectiveValue { | Self::AssignReference { .. } | Self::Placeholder | Self::SetDirectiveParameters { .. } + | Self::Startpos | Self::StartNamespace { .. } | Self::EndNamespace | Self::Org(..) => 0, @@ -403,6 +408,7 @@ impl Display for DirectiveValue { Self::End => "endasm".to_string(), Self::PushSection => "push".to_string(), Self::PopSection => "pop".to_string(), + Self::Startpos => "startpos".to_string(), Self::EndNamespace => "namespace off".to_string(), Self::StartNamespace { name } => format!("namespace {name}"), Self::UserDefinedMacro { name, arguments, body } => format!( @@ -485,6 +491,7 @@ impl ReferenceResolvable for DirectiveValue { | Self::SetDirectiveParameters { .. } | Self::Fill { .. } | Self::PopSection + | Self::Startpos | Self::StartNamespace { .. } | Self::EndNamespace | Self::Org(_) => Ok(()), @@ -531,6 +538,7 @@ impl ReferenceResolvable for DirectiveValue { | Self::SampleTable { .. } | Self::SetDirectiveParameters { .. } | Self::PopSection + | Self::Startpos | Self::StartNamespace { .. } | Self::EndNamespace | Self::Org(_) @@ -564,6 +572,7 @@ impl ReferenceResolvable for DirectiveValue { | Self::SampleTable { .. } | Self::SetDirectiveParameters { .. } | Self::PopSection + | Self::Startpos | Self::StartNamespace { .. } | Self::EndNamespace | Self::Org(_) @@ -615,6 +624,7 @@ impl ReferenceResolvable for DirectiveValue { | Self::End | Self::PushSection | Self::PopSection + | Self::Startpos | Self::StartNamespace { .. } | Self::EndNamespace | Self::Org(_) => Ok(()), diff --git a/src/elf.rs b/src/elf.rs index 1e2c038a..958db80b 100644 --- a/src/elf.rs +++ b/src/elf.rs @@ -11,6 +11,7 @@ use object::elf::{ELFOSABI_STANDALONE, EM_PDSP, ET_EXEC, PT_LOAD, SHF_ALLOC, SHF use object::write::elf::{FileHeader, ProgramHeader, SectionHeader, SectionIndex}; use object::write::StringId; +use crate::sema::instruction::MemoryAddress; use crate::Segments; /// Save all the metadata since object is too dumb to do this itself. @@ -29,7 +30,11 @@ struct SegmentMetadata { /// # Errors /// I/O errors. #[allow(clippy::missing_panics_doc, clippy::cast_sign_loss, clippy::cast_possible_truncation, clippy::cast_lossless)] -pub fn write_to_elf(output_stream: &mut impl Write, data: Segments) -> Result<(), std::io::Error> { +pub fn write_to_elf( + output_stream: &mut impl Write, + data: Segments, + entry_point: MemoryAddress, +) -> Result<(), std::io::Error> { // FIXME: This appears to be a bug with object; it can't write past a Vec's capacity though it has a mutable // reference and can totally do it. Therefore, preallocate a gigantic buffer, which is inefficient but works. let mut buffer = Vec::with_capacity(65536); @@ -97,7 +102,7 @@ pub fn write_to_elf(output_stream: &mut impl Write, data: Segments) -> Resul // "Sony DSP processor", It might be us? :^) e_machine: EM_PDSP, // Doesn't really matter for the ROM, but in practice this is the reset address. - e_entry: 0xFFC0, + e_entry: entry_point.try_into().expect("entry point value out of range???"), e_flags: 0, }) .map_err(|_| std::io::Error::from(std::io::ErrorKind::Other))?; diff --git a/src/error.rs b/src/error.rs index dd7ab7fc..9aff3d5a 100644 --- a/src/error.rs +++ b/src/error.rs @@ -50,23 +50,36 @@ pub enum AssemblyError { location: SourceSpan, }, - #[error("startpos directive ignored")] + #[error("Duplicate startpos directive")] #[diagnostic( - code(spcasm::startpos_ignored), - severity(Advice), + code(spcasm::directive::duplicate_startpos), + severity(Error), help( - "spcasm supports `startpos` directives for compatibility with the `spc700-inline` mode of the Asar \ - multi-architecture assembler. This directive instructs Asar to insert special loader commands on the \ - SNES side, but since spcasm does not concern itself with those, they are ignored." + "the `startpos` directive defines the execution entry point of the ROM after it was loaded. There can \ + only be one entry point." ) )] - StartposDirectiveIgnored { + DuplicateStartpos { #[source_code] src: Arc, #[label("`startpos` directive")] location: SourceSpan, }, + #[error("Missing startpos directive")] + #[diagnostic( + code(spcasm::directive::missing_startpos), + severity(Error), + help( + "the `startpos` directive defines the execution entry point of the ROM after it was loaded. This is \ + required for ELF binary output." + ) + )] + MissingStartpos { + #[source_code] + src: Arc, + }, + #[error("Unknown architecture `{arch}` specified")] #[diagnostic( code(spcasm::arch::invalid), diff --git a/src/parser/asm.lalrpop b/src/parser/asm.lalrpop index 8735cdc2..f9dd78d6 100644 --- a/src/parser/asm.lalrpop +++ b/src/parser/asm.lalrpop @@ -199,7 +199,11 @@ Directive: Directive = { }).map_err(|error| ParseError::User { error }) }, ArchDirective, - StartposDirective, + => Directive { + value: DirectiveValue::Startpos, + span: directive, + expected_value: None, + }, FillAlignDirective, FillAmountDirective, PadDirective, @@ -271,14 +275,6 @@ ArchDirective: Directive = =>? { } }; -StartposDirective: Directive = AssemblyTimeValue => { - environment.read_recursive().options.report_diagnostic(AssemblyError::StartposDirectiveIgnored { - src: source_code.clone(), - location: directive, - }); - Directive::default() -}; - FillAlignDirective: Directive = => { let location = source_range(directive.into(), offset.clone().map(|o| o.1.into()).unwrap_or(align_keyword.into())); Directive { @@ -626,7 +622,7 @@ extern { "arch" => Token::Directive(DirectiveSymbol::Arch, ), "offset" => Token::SpecialIdentifier("offset", ), "align" => Token::SpecialIdentifier("align", ), - "startpos" => Token::SpecialIdentifier("startpos", ), + "startpos" => Token::Directive(DirectiveSymbol::Startpos, ), "fill" => Token::Directive(DirectiveSymbol::Fill, ), "fillbyte" => Token::Directive(DirectiveSymbol::FillByte, ), "fillword" => Token::Directive(DirectiveSymbol::FillWord, ), diff --git a/src/parser/token.rs b/src/parser/token.rs index fb116a4a..3515f61a 100644 --- a/src/parser/token.rs +++ b/src/parser/token.rs @@ -218,7 +218,6 @@ impl Token { match identifier { "offset" => Ok("offset"), "align" => Ok("align"), - "startpos" => Ok("startpos"), _ => Err(AssemblyError::ExpectedToken { expected: shared_str!("identifier"), actual: Self::Identifier(identifier.into(), span), diff --git a/src/spcasm.rs b/src/spcasm.rs index 46b512b8..5b6b83c8 100644 --- a/src/spcasm.rs +++ b/src/spcasm.rs @@ -72,9 +72,14 @@ pub fn main() -> miette::Result<()> { }; match args.output_format { // TODO: Don't do double work assembling here. - cli::OutputFormat::Elf => - elf::write_to_elf(&mut outfile, run_assembler_into_segments(&code, options).unwrap().1) - .map_err(AssemblyError::from)?, + cli::OutputFormat::Elf => { + let (_, output, maybe_entry_point) = run_assembler_into_segments(&code, options).unwrap(); + if let Some(entry_point) = maybe_entry_point { + elf::write_to_elf(&mut outfile, output, entry_point).map_err(AssemblyError::from)?; + } else { + Err(AssemblyError::MissingStartpos { src: code.clone() })?; + } + }, cli::OutputFormat::Plain => outfile.write_all(&assembled).map_err(AssemblyError::from)?, cli::OutputFormat::HexDump => outfile .write_fmt(format_args!("{}", crate::pretty_hex(&assembled, None))) diff --git a/src/test.rs b/src/test.rs index 664d3050..73b5e564 100644 --- a/src/test.rs +++ b/src/test.rs @@ -22,6 +22,17 @@ fn boot_rom() { test_file("include/bootrom.s"); } +#[test] +fn entry_point() { + let code = crate::AssemblyCode::from_file_or_assembly_error("tests/entrypoint.s").unwrap(); + let (_, _, entry_point) = super::run_assembler_into_segments(&code, default_backend_options()).unwrap(); + assert_eq!(entry_point, Some(0xFF00)); + + let code = crate::AssemblyCode::from_file_or_assembly_error("tests/references.spcasmtest").unwrap(); + let (_, _, entry_point) = super::run_assembler_into_segments(&code, default_backend_options()).unwrap(); + assert_eq!(entry_point, None); +} + #[test] fn assembler() { #[cfg(miri)] @@ -114,7 +125,7 @@ fn asar_opcode_test() -> Result<(), Box> { let maybe_test_file: Result<_, reqwest::Error> = try { reqwest::blocking::get(test_file_url)?.text()? }; match maybe_test_file { Ok(test_file) => { - let (_, mut assembled) = super::run_assembler_into_segments( + let (_, mut assembled, _) = super::run_assembler_into_segments( &Arc::new(crate::AssemblyCode { name: file_name.into(), text: test_file.clone().into(), @@ -135,7 +146,7 @@ fn asar_opcode_test() -> Result<(), Box> { fn test_file(file: &str) { let code = crate::AssemblyCode::from_file_or_assembly_error(file).unwrap(); - let (parsed, assembled) = super::run_assembler_into_segments(&code, default_backend_options()).unwrap(); + let (parsed, assembled, _) = super::run_assembler_into_segments(&code, default_backend_options()).unwrap(); let (environment, _) = super::run_assembler_with_default_options(file).unwrap(); dump_reference_tree(&environment.read_recursive().globals.values().cloned().collect::>()); diff --git a/tests/cli/debug.trycmd b/tests/cli/debug.trycmd index ef93b2f0..8f166390 100644 --- a/tests/cli/debug.trycmd +++ b/tests/cli/debug.trycmd @@ -16,259 +16,260 @@ $ spcasm -w all -a tests/opcodes.s AST: (0 -15 ) [placeholder] (16 -21 ) org 0000 -(22 -27 ) [label] start = $0 -(45 -67 ) MOV A , #$10 -(71 -90 ) MOV A , (X) -(94 -113 ) MOV A , (X)+ -(117 -139 ) MOV A , $32 -(143 -165 ) MOV A , $A1+X -(169 -194 ) MOV A , $4502 -(198 -223 ) MOV A , $3320+X -(227 -252 ) MOV A , $FF00+Y -(256 -278 ) MOV A , ($40+X) -(279 -283 ) [label] data = $13 -(303 -331 ) MOV A , ($20)+Y -(335 -357 ) MOV X , #$60 -(361 -383 ) MOV X , $9A -(387 -409 ) MOV X , $2E+Y -(413 -438 ) MOV X , $2F00 -(442 -464 ) MOV Y , #$0F -(468 -490 ) MOV Y , $48 -(494 -516 ) MOV Y , $01+X -(520 -545 ) MOV Y , $2100 -(550 -574 ) MOV A , #$13 -(578 -602 ) MOV A , $0013 -(606 -630 ) MOV A , $0013+X -(634 -661 ) MOV A , $0013+Y -(665 -689 ) MOV A , ($13+X) -(693 -717 ) MOV A , ($13)+Y -(721 -745 ) MOV X , #$13 -(749 -773 ) MOV X , $0013 -(777 -801 ) MOV Y , #$13 -(805 -829 ) MOV Y , $0013 -(834 -855 ) MOV (X) , A -(859 -880 ) MOV (X)+ , A -(884 -908 ) MOV $50 , A -(912 -936 ) MOV $11+X , A -(940 -967 ) MOV $2290 , A -(971 -998 ) MOV $2294+X , A -(1002-1029) MOV $2295+Y , A -(1033-1057) MOV ($98+X) , A -(1061-1085) MOV ($F7)+Y , A -(1089-1113) MOV $1E , X -(1117-1141) MOV $17+Y , X -(1145-1172) MOV $1E00 , X -(1176-1200) MOV $1A , Y -(1204-1228) MOV $18+X , Y -(1232-1259) MOV $1F00 , Y -(1264-1285) MOV A , X -(1289-1310) MOV A , Y -(1314-1335) MOV X , A -(1339-1360) MOV Y , A -(1364-1385) MOV X , SP -(1389-1410) MOV SP , X -(1414-1441) MOV $A3 , $2D -(1445-1472) MOV $88 , #$09 -(1477-1501) ADC A , #$04 -(1505-1526) ADC A , (X) -(1530-1554) ADC A , $60 -(1558-1582) ADC A , $61+X -(1586-1613) ADC A , $8086 -(1617-1644) ADC A , $8087+X -(1648-1675) ADC A , $8088+Y -(1679-1703) ADC A , ($62+X) -(1707-1731) ADC A , ($63)+Y -(1735-1756) ADC (X) , (Y) -(1760-1787) ADC $70 , $71 -(1791-1818) ADC $73 , #$0D -(1823-1844) SBC A , #$04 -(1848-1864) SBC A , (X) -(1868-1887) SBC A , $60 -(1891-1912) SBC A , $61+X -(1916-1940) SBC A , $8086 -(1944-1970) SBC A , $8087+X -(1974-2000) SBC A , $8088+Y -(2004-2027) SBC A , ($62+X) -(2031-2054) SBC A , ($63)+Y -(2058-2076) SBC (X) , (Y) -(2080-2104) SBC $70 , $71 -(2108-2133) SBC $73 , #$0D -(2138-2159) AND A , #$04 -(2163-2179) AND A , (X) -(2183-2202) AND A , $60 -(2206-2227) AND A , $61+X -(2231-2255) AND A , $8086 -(2259-2285) AND A , $8087+X -(2289-2315) AND A , $8088+Y -(2319-2343) AND A , ($62+X) -(2347-2371) AND A , ($63)+Y -(2375-2393) AND (X) , (Y) -(2397-2421) AND $70 , $71 -(2425-2450) AND $73 , #$0D -(2455-2476) OR A , #$04 -(2480-2496) OR A , (X) -(2500-2519) OR A , $60 -(2523-2544) OR A , $61+X -(2548-2572) OR A , $8086 -(2576-2602) OR A , $8087+X -(2606-2632) OR A , $8088+Y -(2636-2659) OR A , ($62+X) -(2663-2686) OR A , ($63)+Y -(2690-2708) OR (X) , (Y) -(2712-2736) OR $70 , $71 -(2740-2765) OR $73 , #$0D -(2770-2792) EOR A , #$04 -(2796-2813) EOR A , (X) -(2817-2837) EOR A , $60 -(2841-2863) EOR A , $61+X -(2867-2892) EOR A , $8086 -(2896-2923) EOR A , $8087+X -(2927-2954) EOR A , $8088+Y -(2958-2982) EOR A , ($62+X) -(2986-3010) EOR A , ($63)+Y -(3014-3033) EOR (X) , (Y) -(3037-3062) EOR $70 , $71 -(3066-3092) EOR $73 , #$0D -(3097-3119) CMP A , #$04 -(3123-3140) CMP A , (X) -(3144-3164) CMP A , $60 -(3168-3190) CMP A , $61+X -(3194-3219) CMP A , $8086 -(3223-3250) CMP A , $8087+X -(3254-3281) CMP A , $8088+Y -(3285-3309) CMP A , ($62+X) -(3313-3337) CMP A , ($63)+Y -(3341-3360) CMP (X) , (Y) -(3364-3389) CMP $70 , $71 -(3393-3419) CMP $73 , #$0D -(3423-3446) CMP X , #$76 -(3450-3473) CMP X , $74 -(3477-3503) CMP X , $7500 -(3507-3530) CMP Y , #$76 -(3534-3557) CMP Y , $74 -(3561-3587) CMP Y , $7500 -(3592-3608) INC A , [none] -(3612-3631) INC $01 , [none] -(3635-3654) INC $02+X , [none] -(3658-3680) INC $0304 , [none] -(3684-3700) INC X , [none] -(3704-3720) INC Y , [none] -(3725-3741) DEC A , [none] -(3745-3764) DEC $01 , [none] -(3768-3787) DEC $02+X , [none] -(3791-3813) DEC $0304 , [none] -(3817-3833) DEC X , [none] -(3837-3853) DEC Y , [none] -(3858-3873) ASL A , [none] -(3877-3895) ASL $05 , [none] -(3899-3917) ASL $06+X , [none] -(3921-3942) ASL $0708 , [none] -(3947-3962) LSR A , [none] -(3966-3984) LSR $05 , [none] -(3988-4006) LSR $06+X , [none] -(4010-4031) LSR $0708 , [none] -(4036-4051) ROL A , [none] -(4055-4073) ROL $05 , [none] -(4077-4095) ROL $06+X , [none] -(4099-4120) ROL $0708 , [none] -(4125-4140) ROR A , [none] -(4144-4162) ROR $05 , [none] -(4166-4184) ROR $06+X , [none] -(4188-4209) ROR $0708 , [none] -(4214-4229) XCN A , [none] -(4234-4254) MOVW YA , $09 -(4258-4278) MOVW $0A , YA -(4282-4302) INCW $0B , [none] -(4306-4326) DECW $0C , [none] -(4330-4350) ADDW YA , $0D -(4354-4374) SUBW YA , $0E -(4378-4398) CMPW YA , $0F -(4403-4417) MUL YA , [none] -(4421-4435) DIV YA , X -(4437-4446) [label] reltarget = $15E -(4464-4475) DAA A , [none] -(4477-4486) [label] .subtarget = $15F -(4503-4514) DAS A , [none] -(4519-4542) BRA $0100 , [none] -(4584-4609) BEQ $015E , [none] -(4613-4638) BNE $015E , [none] -(4642-4667) BCS ( $015E + $0002 ) , [none] -(4671-4696) BCC ( $015E + $0004 ) , [none] -(4700-4725) BVS ( $015E + $0006 ) , [none] -(4729-4754) BVC ( $015E + $0008 ) , [none] -(4758-4783) BMI ( $015E + $000A ) , [none] -(4787-4812) BPL ( $015E + $000C ) , [none] -(4816-4841) CBNE $2B , $2C -(4845-4870) CBNE $2D+X , $2E -(4874-4899) DBNZ $2F , $30 -(4903-4925) DBNZ Y , $31 -(4929-4954) JMP $2122 , [none] -(4958-4987) JMP ($2324+X) , [none] -(4992-5019) JMP $015F , [none] -(5023-5050) JMP $015E , [none] -(5051-5065) [label] another_global = $189 -(5080-5101) NOP [none] , [none] -(5103-5112) [label] .subtarget = $18A -(5131-5152) NOP [none] , [none] -(5156-5183) JMP $018A , [none] -(5186-5196) [label] .selftarget = $18E -(5201-5231) BNE $018E , [none] -(5232-5249) [label] global_selftarget = $190 -(5254-5284) BNE $0190 , [none] -(5289-5315) BBS $0013.0 , $F9 -(5319-5344) BBS $30.1 , $F9 -(5348-5373) BBS $30.2 , $F9 -(5377-5402) BBS $30.3 , $F9 -(5406-5431) BBS $30.4 , $F9 -(5435-5460) BBS $30.5 , $F9 -(5464-5489) BBS $30.6 , $F9 -(5493-5518) BBS $30.7 , $F9 -(5522-5549) BBC $0000.0 , $05 -(5553-5578) BBC $31.1 , $05 -(5582-5607) BBC $31.2 , $05 -(5611-5636) BBC $31.3 , $05 -(5640-5665) BBC $31.4 , $05 -(5669-5694) BBC $31.5 , $05 -(5698-5723) BBC $31.6 , $05 -(5727-5752) BBC $31.7 , $05 -(5757-5779) CALL $5060 , [none] -(5783-5802) PCALL $02 , [none] -(5806-5822) TCALL $05 , [none] -(5826-5842) TCALL $08 , [none] -(5846-5862) TCALL $0F , [none] -(5866-5882) BRK [none] , [none] -(5886-5902) RET [none] , [none] -(5906-5922) RET1 [none] , [none] -(5927-5942) PUSH A , [none] -(5946-5961) PUSH X , [none] -(5965-5980) PUSH Y , [none] -(5984-5997) PUSH PSW , [none] -(6002-6016) POP A , [none] -(6020-6034) POP X , [none] -(6038-6052) POP Y , [none] -(6056-6068) POP PSW , [none] -(6073-6092) SET $50.5 , [none] -(6096-6115) CLR $51.7 , [none] -(6120-6144) TSET1 $5060 , A -(6148-6172) TCLR1 $1011 , A -(6177-6205) AND1 C , $1010.0 -(6209-6236) AND1 C , /$1020.3 -(6240-6267) OR1 C , $1030.7 -(6271-6298) OR1 C , /$1040.6 -(6302-6329) EOR1 C , $1070.2 -(6333-6360) NOT1 $1080.5 , [none] -(6364-6391) MOV1 C , $1090.4 -(6395-6422) MOV1 $10A0.1 , C -(6427-6438) CLRC [none] , [none] -(6442-6453) SETC [none] , [none] -(6457-6468) NOTC [none] , [none] -(6472-6483) CLRV [none] , [none] -(6487-6498) CLRP [none] , [none] -(6502-6513) SETP [none] , [none] -(6517-6526) EI [none] , [none] -(6530-6539) DI [none] , [none] -(6544-6554) NOP [none] , [none] -(6558-6570) SLEEP [none] , [none] -(6574-6585) STOP [none] , [none] +(22 -30 ) startpos +(31 -36 ) [label] start = $0 +(54 -76 ) MOV A , #$10 +(80 -99 ) MOV A , (X) +(103 -122 ) MOV A , (X)+ +(126 -148 ) MOV A , $32 +(152 -174 ) MOV A , $A1+X +(178 -203 ) MOV A , $4502 +(207 -232 ) MOV A , $3320+X +(236 -261 ) MOV A , $FF00+Y +(265 -287 ) MOV A , ($40+X) +(288 -292 ) [label] data = $13 +(312 -340 ) MOV A , ($20)+Y +(344 -366 ) MOV X , #$60 +(370 -392 ) MOV X , $9A +(396 -418 ) MOV X , $2E+Y +(422 -447 ) MOV X , $2F00 +(451 -473 ) MOV Y , #$0F +(477 -499 ) MOV Y , $48 +(503 -525 ) MOV Y , $01+X +(529 -554 ) MOV Y , $2100 +(559 -583 ) MOV A , #$13 +(587 -611 ) MOV A , $0013 +(615 -639 ) MOV A , $0013+X +(643 -670 ) MOV A , $0013+Y +(674 -698 ) MOV A , ($13+X) +(702 -726 ) MOV A , ($13)+Y +(730 -754 ) MOV X , #$13 +(758 -782 ) MOV X , $0013 +(786 -810 ) MOV Y , #$13 +(814 -838 ) MOV Y , $0013 +(843 -864 ) MOV (X) , A +(868 -889 ) MOV (X)+ , A +(893 -917 ) MOV $50 , A +(921 -945 ) MOV $11+X , A +(949 -976 ) MOV $2290 , A +(980 -1007) MOV $2294+X , A +(1011-1038) MOV $2295+Y , A +(1042-1066) MOV ($98+X) , A +(1070-1094) MOV ($F7)+Y , A +(1098-1122) MOV $1E , X +(1126-1150) MOV $17+Y , X +(1154-1181) MOV $1E00 , X +(1185-1209) MOV $1A , Y +(1213-1237) MOV $18+X , Y +(1241-1268) MOV $1F00 , Y +(1273-1294) MOV A , X +(1298-1319) MOV A , Y +(1323-1344) MOV X , A +(1348-1369) MOV Y , A +(1373-1394) MOV X , SP +(1398-1419) MOV SP , X +(1423-1450) MOV $A3 , $2D +(1454-1481) MOV $88 , #$09 +(1486-1510) ADC A , #$04 +(1514-1535) ADC A , (X) +(1539-1563) ADC A , $60 +(1567-1591) ADC A , $61+X +(1595-1622) ADC A , $8086 +(1626-1653) ADC A , $8087+X +(1657-1684) ADC A , $8088+Y +(1688-1712) ADC A , ($62+X) +(1716-1740) ADC A , ($63)+Y +(1744-1765) ADC (X) , (Y) +(1769-1796) ADC $70 , $71 +(1800-1827) ADC $73 , #$0D +(1832-1853) SBC A , #$04 +(1857-1873) SBC A , (X) +(1877-1896) SBC A , $60 +(1900-1921) SBC A , $61+X +(1925-1949) SBC A , $8086 +(1953-1979) SBC A , $8087+X +(1983-2009) SBC A , $8088+Y +(2013-2036) SBC A , ($62+X) +(2040-2063) SBC A , ($63)+Y +(2067-2085) SBC (X) , (Y) +(2089-2113) SBC $70 , $71 +(2117-2142) SBC $73 , #$0D +(2147-2168) AND A , #$04 +(2172-2188) AND A , (X) +(2192-2211) AND A , $60 +(2215-2236) AND A , $61+X +(2240-2264) AND A , $8086 +(2268-2294) AND A , $8087+X +(2298-2324) AND A , $8088+Y +(2328-2352) AND A , ($62+X) +(2356-2380) AND A , ($63)+Y +(2384-2402) AND (X) , (Y) +(2406-2430) AND $70 , $71 +(2434-2459) AND $73 , #$0D +(2464-2485) OR A , #$04 +(2489-2505) OR A , (X) +(2509-2528) OR A , $60 +(2532-2553) OR A , $61+X +(2557-2581) OR A , $8086 +(2585-2611) OR A , $8087+X +(2615-2641) OR A , $8088+Y +(2645-2668) OR A , ($62+X) +(2672-2695) OR A , ($63)+Y +(2699-2717) OR (X) , (Y) +(2721-2745) OR $70 , $71 +(2749-2774) OR $73 , #$0D +(2779-2801) EOR A , #$04 +(2805-2822) EOR A , (X) +(2826-2846) EOR A , $60 +(2850-2872) EOR A , $61+X +(2876-2901) EOR A , $8086 +(2905-2932) EOR A , $8087+X +(2936-2963) EOR A , $8088+Y +(2967-2991) EOR A , ($62+X) +(2995-3019) EOR A , ($63)+Y +(3023-3042) EOR (X) , (Y) +(3046-3071) EOR $70 , $71 +(3075-3101) EOR $73 , #$0D +(3106-3128) CMP A , #$04 +(3132-3149) CMP A , (X) +(3153-3173) CMP A , $60 +(3177-3199) CMP A , $61+X +(3203-3228) CMP A , $8086 +(3232-3259) CMP A , $8087+X +(3263-3290) CMP A , $8088+Y +(3294-3318) CMP A , ($62+X) +(3322-3346) CMP A , ($63)+Y +(3350-3369) CMP (X) , (Y) +(3373-3398) CMP $70 , $71 +(3402-3428) CMP $73 , #$0D +(3432-3455) CMP X , #$76 +(3459-3482) CMP X , $74 +(3486-3512) CMP X , $7500 +(3516-3539) CMP Y , #$76 +(3543-3566) CMP Y , $74 +(3570-3596) CMP Y , $7500 +(3601-3617) INC A , [none] +(3621-3640) INC $01 , [none] +(3644-3663) INC $02+X , [none] +(3667-3689) INC $0304 , [none] +(3693-3709) INC X , [none] +(3713-3729) INC Y , [none] +(3734-3750) DEC A , [none] +(3754-3773) DEC $01 , [none] +(3777-3796) DEC $02+X , [none] +(3800-3822) DEC $0304 , [none] +(3826-3842) DEC X , [none] +(3846-3862) DEC Y , [none] +(3867-3882) ASL A , [none] +(3886-3904) ASL $05 , [none] +(3908-3926) ASL $06+X , [none] +(3930-3951) ASL $0708 , [none] +(3956-3971) LSR A , [none] +(3975-3993) LSR $05 , [none] +(3997-4015) LSR $06+X , [none] +(4019-4040) LSR $0708 , [none] +(4045-4060) ROL A , [none] +(4064-4082) ROL $05 , [none] +(4086-4104) ROL $06+X , [none] +(4108-4129) ROL $0708 , [none] +(4134-4149) ROR A , [none] +(4153-4171) ROR $05 , [none] +(4175-4193) ROR $06+X , [none] +(4197-4218) ROR $0708 , [none] +(4223-4238) XCN A , [none] +(4243-4263) MOVW YA , $09 +(4267-4287) MOVW $0A , YA +(4291-4311) INCW $0B , [none] +(4315-4335) DECW $0C , [none] +(4339-4359) ADDW YA , $0D +(4363-4383) SUBW YA , $0E +(4387-4407) CMPW YA , $0F +(4412-4426) MUL YA , [none] +(4430-4444) DIV YA , X +(4446-4455) [label] reltarget = $15E +(4473-4484) DAA A , [none] +(4486-4495) [label] .subtarget = $15F +(4512-4523) DAS A , [none] +(4528-4551) BRA $0100 , [none] +(4593-4618) BEQ $015E , [none] +(4622-4647) BNE $015E , [none] +(4651-4676) BCS ( $015E + $0002 ) , [none] +(4680-4705) BCC ( $015E + $0004 ) , [none] +(4709-4734) BVS ( $015E + $0006 ) , [none] +(4738-4763) BVC ( $015E + $0008 ) , [none] +(4767-4792) BMI ( $015E + $000A ) , [none] +(4796-4821) BPL ( $015E + $000C ) , [none] +(4825-4850) CBNE $2B , $2C +(4854-4879) CBNE $2D+X , $2E +(4883-4908) DBNZ $2F , $30 +(4912-4934) DBNZ Y , $31 +(4938-4963) JMP $2122 , [none] +(4967-4996) JMP ($2324+X) , [none] +(5001-5028) JMP $015F , [none] +(5032-5059) JMP $015E , [none] +(5060-5074) [label] another_global = $189 +(5089-5110) NOP [none] , [none] +(5112-5121) [label] .subtarget = $18A +(5140-5161) NOP [none] , [none] +(5165-5192) JMP $018A , [none] +(5195-5205) [label] .selftarget = $18E +(5210-5240) BNE $018E , [none] +(5241-5258) [label] global_selftarget = $190 +(5263-5293) BNE $0190 , [none] +(5298-5324) BBS $0013.0 , $F9 +(5328-5353) BBS $30.1 , $F9 +(5357-5382) BBS $30.2 , $F9 +(5386-5411) BBS $30.3 , $F9 +(5415-5440) BBS $30.4 , $F9 +(5444-5469) BBS $30.5 , $F9 +(5473-5498) BBS $30.6 , $F9 +(5502-5527) BBS $30.7 , $F9 +(5531-5558) BBC $0000.0 , $05 +(5562-5587) BBC $31.1 , $05 +(5591-5616) BBC $31.2 , $05 +(5620-5645) BBC $31.3 , $05 +(5649-5674) BBC $31.4 , $05 +(5678-5703) BBC $31.5 , $05 +(5707-5732) BBC $31.6 , $05 +(5736-5761) BBC $31.7 , $05 +(5766-5788) CALL $5060 , [none] +(5792-5811) PCALL $02 , [none] +(5815-5831) TCALL $05 , [none] +(5835-5851) TCALL $08 , [none] +(5855-5871) TCALL $0F , [none] +(5875-5891) BRK [none] , [none] +(5895-5911) RET [none] , [none] +(5915-5931) RET1 [none] , [none] +(5936-5951) PUSH A , [none] +(5955-5970) PUSH X , [none] +(5974-5989) PUSH Y , [none] +(5993-6006) PUSH PSW , [none] +(6011-6025) POP A , [none] +(6029-6043) POP X , [none] +(6047-6061) POP Y , [none] +(6065-6077) POP PSW , [none] +(6082-6101) SET $50.5 , [none] +(6105-6124) CLR $51.7 , [none] +(6129-6153) TSET1 $5060 , A +(6157-6181) TCLR1 $1011 , A +(6186-6214) AND1 C , $1010.0 +(6218-6245) AND1 C , /$1020.3 +(6249-6276) OR1 C , $1030.7 +(6280-6307) OR1 C , /$1040.6 +(6311-6338) EOR1 C , $1070.2 +(6342-6369) NOT1 $1080.5 , [none] +(6373-6400) MOV1 C , $1090.4 +(6404-6431) MOV1 $10A0.1 , C +(6436-6447) CLRC [none] , [none] +(6451-6462) SETC [none] , [none] +(6466-6477) NOTC [none] , [none] +(6481-6492) CLRV [none] , [none] +(6496-6507) CLRP [none] , [none] +(6511-6522) SETP [none] , [none] +(6526-6535) EI [none] , [none] +(6539-6548) DI [none] , [none] +(6553-6563) NOP [none] , [none] +(6567-6579) SLEEP [none] , [none] +(6583-6594) STOP [none] , [none] ``` diff --git a/tests/cli/limits.trycmd b/tests/cli/limits.trycmd index 45568c92..df05d699 100644 --- a/tests/cli/limits.trycmd +++ b/tests/cli/limits.trycmd @@ -69,29 +69,29 @@ $ spcasm -w all -l 0 tests/opcodes.s spcasm::reference::unresolved × Reference 'data' can not be resolved to a value - ╭─[tests/opcodes.s:13:1] - 10 │ MOV A,$3320+X ;= F5 20 33 - 11 │ MOV A,$FF00+Y ;= F6 00 FF - 12 │ MOV A,($40+X) ;= E7 40 - 13 │ data: ; @ 13 + ╭─[tests/opcodes.s:14:1] + 11 │ MOV A,$3320+X ;= F5 20 33 + 12 │ MOV A,$FF00+Y ;= F6 00 FF + 13 │ MOV A,($40+X) ;= E7 40 + 14 │ data: ; @ 13 · ──┬─ · ╰── 'data' defined here - 14 │ MOV A,(%00100000)+Y ;= F7 20 - 15 │ MOV X,#$60 ;= CD 60 - 16 │ MOV X,$9A ;= F8 9A - 17 │ MOV X,$2E+Y ;= F9 2E - 18 │ MOV X,$2F00 ;= E9 00 2F - 19 │ MOV Y,#$0F ;= 8D 0F - 20 │ MOV Y,$48 ;= EB 48 - 21 │ MOV Y,%01+X ;= FB 01 - 22 │ MOV Y,$2100 ;= EC 00 21 - 23 │ - 24 │ MOV A,#data ;= E8 13 + 15 │ MOV A,(%00100000)+Y ;= F7 20 + 16 │ MOV X,#$60 ;= CD 60 + 17 │ MOV X,$9A ;= F8 9A + 18 │ MOV X,$2E+Y ;= F9 2E + 19 │ MOV X,$2F00 ;= E9 00 2F + 20 │ MOV Y,#$0F ;= 8D 0F + 21 │ MOV Y,$48 ;= EB 48 + 22 │ MOV Y,%01+X ;= FB 01 + 23 │ MOV Y,$2100 ;= EC 00 21 + 24 │ + 25 │ MOV A,#data ;= E8 13 · ────────────┬─────────── · ╰── Used here - 25 │ MOV A,data ;= E4 13 - 26 │ MOV A,data+X ;= F4 13 - 27 │ MOV A,data+Y ;= F6 13 00 + 26 │ MOV A,data ;= E4 13 + 27 │ MOV A,data+X ;= F4 13 + 28 │ MOV A,data+Y ;= F6 13 00 ╰──── help: Any symbolic reference must be defined somewhere. Did you misspell the reference's name? diff --git a/tests/cli/warnings.trycmd b/tests/cli/warnings.trycmd index fc9f0278..c5111c93 100644 --- a/tests/cli/warnings.trycmd +++ b/tests/cli/warnings.trycmd @@ -8,8 +8,8 @@ spcasm::arch::valid · ───────┬─────── · ╰── `arch` directive 2 │ org 0 - 3 │ start: ; @ 0 - 4 │ MOV A,#$10 ;= E8 10 + 3 │ startpos + 4 │ start: ; @ 0 ╰──── help: spcasm supports `arch` directives for compatibility with the Asar multi-architecture assembler. This arch directive points to the @@ -19,16 +19,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `002C` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:206:13] - 203 │ bvc reltarget+8 ;= 50 F8 - 204 │ bmi reltarget+10 ;= 30 F8 - 205 │ bpl reltarget+12 ;= 10 F8 - 206 │ cbne $2B,$2C ;= 2E 2B B7 + ╭─[tests/opcodes.s:207:13] + 204 │ bvc reltarget+8 ;= 50 F8 + 205 │ bmi reltarget+10 ;= 30 F8 + 206 │ bpl reltarget+12 ;= 10 F8 + 207 │ cbne $2B,$2C ;= 2E 2B B7 · ─┬─ · ╰── Difference of -329 to current address - 207 │ cbne $2D+X,$2E;= DE 2D B6 - 208 │ dbnz $2F,$30 ;= 6E 2F B5 - 209 │ dbnz Y,$31 ;= FE B4 + 208 │ cbne $2D+X,$2E;= DE 2D B6 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 + 210 │ dbnz Y,$31 ;= FE B4 ╰──── help: The current address is `0174` and therefore the difference is -329. This difference exceeds the range [-128, 127] and will wrap around, @@ -39,16 +39,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `002E` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:207:15] - 204 │ bmi reltarget+10 ;= 30 F8 - 205 │ bpl reltarget+12 ;= 10 F8 - 206 │ cbne $2B,$2C ;= 2E 2B B7 - 207 │ cbne $2D+X,$2E;= DE 2D B6 + ╭─[tests/opcodes.s:208:15] + 205 │ bmi reltarget+10 ;= 30 F8 + 206 │ bpl reltarget+12 ;= 10 F8 + 207 │ cbne $2B,$2C ;= 2E 2B B7 + 208 │ cbne $2D+X,$2E;= DE 2D B6 · ─┬─ · ╰── Difference of -330 to current address - 208 │ dbnz $2F,$30 ;= 6E 2F B5 - 209 │ dbnz Y,$31 ;= FE B4 - 210 │ jmp $2122 ;= 5F 22 21 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 + 210 │ dbnz Y,$31 ;= FE B4 + 211 │ jmp $2122 ;= 5F 22 21 ╰──── help: The current address is `0177` and therefore the difference is -330. This difference exceeds the range [-128, 127] and will wrap around, @@ -59,16 +59,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0030` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:208:13] - 205 │ bpl reltarget+12 ;= 10 F8 - 206 │ cbne $2B,$2C ;= 2E 2B B7 - 207 │ cbne $2D+X,$2E;= DE 2D B6 - 208 │ dbnz $2F,$30 ;= 6E 2F B5 + ╭─[tests/opcodes.s:209:13] + 206 │ bpl reltarget+12 ;= 10 F8 + 207 │ cbne $2B,$2C ;= 2E 2B B7 + 208 │ cbne $2D+X,$2E;= DE 2D B6 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 · ─┬─ · ╰── Difference of -331 to current address - 209 │ dbnz Y,$31 ;= FE B4 - 210 │ jmp $2122 ;= 5F 22 21 - 211 │ jmp ($2324+X) ;= 1F 24 23 + 210 │ dbnz Y,$31 ;= FE B4 + 211 │ jmp $2122 ;= 5F 22 21 + 212 │ jmp ($2324+X) ;= 1F 24 23 ╰──── help: The current address is `017A` and therefore the difference is -331. This difference exceeds the range [-128, 127] and will wrap around, @@ -79,16 +79,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0031` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:209:11] - 206 │ cbne $2B,$2C ;= 2E 2B B7 - 207 │ cbne $2D+X,$2E;= DE 2D B6 - 208 │ dbnz $2F,$30 ;= 6E 2F B5 - 209 │ dbnz Y,$31 ;= FE B4 + ╭─[tests/opcodes.s:210:11] + 207 │ cbne $2B,$2C ;= 2E 2B B7 + 208 │ cbne $2D+X,$2E;= DE 2D B6 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 + 210 │ dbnz Y,$31 ;= FE B4 · ─┬─ · ╰── Difference of -332 to current address - 210 │ jmp $2122 ;= 5F 22 21 - 211 │ jmp ($2324+X) ;= 1F 24 23 - 212 │ + 211 │ jmp $2122 ;= 5F 22 21 + 212 │ jmp ($2324+X) ;= 1F 24 23 + 213 │ ╰──── help: The current address is `017C` and therefore the difference is -332. This difference exceeds the range [-128, 127] and will wrap around, @@ -99,16 +99,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:226:15] - 223 │ global_selftarget: - 224 │ bne global_selftarget ;= D0 FE - 225 │ - 226 │ bbs data.0,$F9 ;= 03 13 64 + ╭─[tests/opcodes.s:227:15] + 224 │ global_selftarget: + 225 │ bne global_selftarget ;= D0 FE + 226 │ + 227 │ bbs data.0,$F9 ;= 03 13 64 · ─┬─ · ╰── Difference of -156 to current address - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B ╰──── help: The current address is `0194` and therefore the difference is -156. This difference exceeds the range [-128, 127] and will wrap around, @@ -119,16 +119,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:227:14] - 224 │ bne global_selftarget ;= D0 FE - 225 │ - 226 │ bbs data.0,$F9 ;= 03 13 64 - 227 │ bbs $30.1,$F9 ;= 23 30 61 + ╭─[tests/opcodes.s:228:14] + 225 │ bne global_selftarget ;= D0 FE + 226 │ + 227 │ bbs data.0,$F9 ;= 03 13 64 + 228 │ bbs $30.1,$F9 ;= 23 30 61 · ─┬─ · ╰── Difference of -159 to current address - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 ╰──── help: The current address is `0197` and therefore the difference is -159. This difference exceeds the range [-128, 127] and will wrap around, @@ -139,16 +139,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:228:14] - 225 │ - 226 │ bbs data.0,$F9 ;= 03 13 64 - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E + ╭─[tests/opcodes.s:229:14] + 226 │ + 227 │ bbs data.0,$F9 ;= 03 13 64 + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E · ─┬─ · ╰── Difference of -162 to current address - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 ╰──── help: The current address is `019A` and therefore the difference is -162. This difference exceeds the range [-128, 127] and will wrap around, @@ -159,16 +159,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:229:14] - 226 │ bbs data.0,$F9 ;= 03 13 64 - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B + ╭─[tests/opcodes.s:230:14] + 227 │ bbs data.0,$F9 ;= 03 13 64 + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B · ─┬─ · ╰── Difference of -165 to current address - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 ╰──── help: The current address is `019D` and therefore the difference is -165. This difference exceeds the range [-128, 127] and will wrap around, @@ -179,16 +179,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:230:14] - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 + ╭─[tests/opcodes.s:231:14] + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 · ─┬─ · ╰── Difference of -168 to current address - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F ╰──── help: The current address is `01A0` and therefore the difference is -168. This difference exceeds the range [-128, 127] and will wrap around, @@ -199,16 +199,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:231:14] - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 + ╭─[tests/opcodes.s:232:14] + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 · ─┬─ · ╰── Difference of -171 to current address - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 ╰──── help: The current address is `01A3` and therefore the difference is -171. This difference exceeds the range [-128, 127] and will wrap around, @@ -219,16 +219,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:232:14] - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 + ╭─[tests/opcodes.s:233:14] + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 · ─┬─ · ╰── Difference of -174 to current address - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 ╰──── help: The current address is `01A6` and therefore the difference is -174. This difference exceeds the range [-128, 127] and will wrap around, @@ -239,16 +239,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:233:14] - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F + ╭─[tests/opcodes.s:234:14] + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F · ─┬─ · ╰── Difference of -177 to current address - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 ╰──── help: The current address is `01A9` and therefore the difference is -177. This difference exceeds the range [-128, 127] and will wrap around, @@ -259,16 +259,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:234:16] - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 + ╭─[tests/opcodes.s:235:16] + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 · ─┬─ · ╰── Difference of -424 to current address - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F ╰──── help: The current address is `01AC` and therefore the difference is -424. This difference exceeds the range [-128, 127] and will wrap around, @@ -279,16 +279,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:235:14] - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 + ╭─[tests/opcodes.s:236:14] + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 · ─┬─ · ╰── Difference of -427 to current address - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C ╰──── help: The current address is `01AF` and therefore the difference is -427. This difference exceeds the range [-128, 127] and will wrap around, @@ -299,16 +299,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:236:14] - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 + ╭─[tests/opcodes.s:237:14] + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 · ─┬─ · ╰── Difference of -430 to current address - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 ╰──── help: The current address is `01B2` and therefore the difference is -430. This difference exceeds the range [-128, 127] and will wrap around, @@ -319,16 +319,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:237:14] - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F + ╭─[tests/opcodes.s:238:14] + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F · ─┬─ · ╰── Difference of -433 to current address - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 ╰──── help: The current address is `01B5` and therefore the difference is -433. This difference exceeds the range [-128, 127] and will wrap around, @@ -339,16 +339,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:238:14] - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C + ╭─[tests/opcodes.s:239:14] + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C · ─┬─ · ╰── Difference of -436 to current address - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 - 241 │ bbc $31.7,$05 ;= F3 31 43 + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 + 242 │ bbc $31.7,$05 ;= F3 31 43 ╰──── help: The current address is `01B8` and therefore the difference is -436. This difference exceeds the range [-128, 127] and will wrap around, @@ -359,16 +359,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:239:14] - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 + ╭─[tests/opcodes.s:240:14] + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 · ─┬─ · ╰── Difference of -439 to current address - 240 │ bbc $31.6,$05 ;= D3 31 46 - 241 │ bbc $31.7,$05 ;= F3 31 43 - 242 │ + 241 │ bbc $31.6,$05 ;= D3 31 46 + 242 │ bbc $31.7,$05 ;= F3 31 43 + 243 │ ╰──── help: The current address is `01BB` and therefore the difference is -439. This difference exceeds the range [-128, 127] and will wrap around, @@ -379,16 +379,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:240:14] - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 + ╭─[tests/opcodes.s:241:14] + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 · ─┬─ · ╰── Difference of -442 to current address - 241 │ bbc $31.7,$05 ;= F3 31 43 - 242 │ - 243 │ call $5060 ;= 3F 60 50 + 242 │ bbc $31.7,$05 ;= F3 31 43 + 243 │ + 244 │ call $5060 ;= 3F 60 50 ╰──── help: The current address is `01BE` and therefore the difference is -442. This difference exceeds the range [-128, 127] and will wrap around, @@ -399,16 +399,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:241:14] - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 - 241 │ bbc $31.7,$05 ;= F3 31 43 + ╭─[tests/opcodes.s:242:14] + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 + 242 │ bbc $31.7,$05 ;= F3 31 43 · ─┬─ · ╰── Difference of -445 to current address - 242 │ - 243 │ call $5060 ;= 3F 60 50 - 244 │ pcall $02 ;= 4F 02 + 243 │ + 244 │ call $5060 ;= 3F 60 50 + 245 │ pcall $02 ;= 4F 02 ╰──── help: The current address is `01C1` and therefore the difference is -445. This difference exceeds the range [-128, 127] and will wrap around, @@ -434,8 +434,8 @@ spcasm::arch::valid · ───────┬─────── · ╰── `arch` directive 2 │ org 0 - 3 │ start: ; @ 0 - 4 │ MOV A,#$10 ;= E8 10 + 3 │ startpos + 4 │ start: ; @ 0 ╰──── help: spcasm supports `arch` directives for compatibility with the Asar multi-architecture assembler. This arch directive points to the @@ -445,16 +445,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `002C` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:206:13] - 203 │ bvc reltarget+8 ;= 50 F8 - 204 │ bmi reltarget+10 ;= 30 F8 - 205 │ bpl reltarget+12 ;= 10 F8 - 206 │ cbne $2B,$2C ;= 2E 2B B7 + ╭─[tests/opcodes.s:207:13] + 204 │ bvc reltarget+8 ;= 50 F8 + 205 │ bmi reltarget+10 ;= 30 F8 + 206 │ bpl reltarget+12 ;= 10 F8 + 207 │ cbne $2B,$2C ;= 2E 2B B7 · ─┬─ · ╰── Difference of -329 to current address - 207 │ cbne $2D+X,$2E;= DE 2D B6 - 208 │ dbnz $2F,$30 ;= 6E 2F B5 - 209 │ dbnz Y,$31 ;= FE B4 + 208 │ cbne $2D+X,$2E;= DE 2D B6 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 + 210 │ dbnz Y,$31 ;= FE B4 ╰──── help: The current address is `0174` and therefore the difference is -329. This difference exceeds the range [-128, 127] and will wrap around, @@ -465,16 +465,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `002E` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:207:15] - 204 │ bmi reltarget+10 ;= 30 F8 - 205 │ bpl reltarget+12 ;= 10 F8 - 206 │ cbne $2B,$2C ;= 2E 2B B7 - 207 │ cbne $2D+X,$2E;= DE 2D B6 + ╭─[tests/opcodes.s:208:15] + 205 │ bmi reltarget+10 ;= 30 F8 + 206 │ bpl reltarget+12 ;= 10 F8 + 207 │ cbne $2B,$2C ;= 2E 2B B7 + 208 │ cbne $2D+X,$2E;= DE 2D B6 · ─┬─ · ╰── Difference of -330 to current address - 208 │ dbnz $2F,$30 ;= 6E 2F B5 - 209 │ dbnz Y,$31 ;= FE B4 - 210 │ jmp $2122 ;= 5F 22 21 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 + 210 │ dbnz Y,$31 ;= FE B4 + 211 │ jmp $2122 ;= 5F 22 21 ╰──── help: The current address is `0177` and therefore the difference is -330. This difference exceeds the range [-128, 127] and will wrap around, @@ -485,16 +485,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0030` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:208:13] - 205 │ bpl reltarget+12 ;= 10 F8 - 206 │ cbne $2B,$2C ;= 2E 2B B7 - 207 │ cbne $2D+X,$2E;= DE 2D B6 - 208 │ dbnz $2F,$30 ;= 6E 2F B5 + ╭─[tests/opcodes.s:209:13] + 206 │ bpl reltarget+12 ;= 10 F8 + 207 │ cbne $2B,$2C ;= 2E 2B B7 + 208 │ cbne $2D+X,$2E;= DE 2D B6 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 · ─┬─ · ╰── Difference of -331 to current address - 209 │ dbnz Y,$31 ;= FE B4 - 210 │ jmp $2122 ;= 5F 22 21 - 211 │ jmp ($2324+X) ;= 1F 24 23 + 210 │ dbnz Y,$31 ;= FE B4 + 211 │ jmp $2122 ;= 5F 22 21 + 212 │ jmp ($2324+X) ;= 1F 24 23 ╰──── help: The current address is `017A` and therefore the difference is -331. This difference exceeds the range [-128, 127] and will wrap around, @@ -505,16 +505,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0031` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:209:11] - 206 │ cbne $2B,$2C ;= 2E 2B B7 - 207 │ cbne $2D+X,$2E;= DE 2D B6 - 208 │ dbnz $2F,$30 ;= 6E 2F B5 - 209 │ dbnz Y,$31 ;= FE B4 + ╭─[tests/opcodes.s:210:11] + 207 │ cbne $2B,$2C ;= 2E 2B B7 + 208 │ cbne $2D+X,$2E;= DE 2D B6 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 + 210 │ dbnz Y,$31 ;= FE B4 · ─┬─ · ╰── Difference of -332 to current address - 210 │ jmp $2122 ;= 5F 22 21 - 211 │ jmp ($2324+X) ;= 1F 24 23 - 212 │ + 211 │ jmp $2122 ;= 5F 22 21 + 212 │ jmp ($2324+X) ;= 1F 24 23 + 213 │ ╰──── help: The current address is `017C` and therefore the difference is -332. This difference exceeds the range [-128, 127] and will wrap around, @@ -525,16 +525,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:226:15] - 223 │ global_selftarget: - 224 │ bne global_selftarget ;= D0 FE - 225 │ - 226 │ bbs data.0,$F9 ;= 03 13 64 + ╭─[tests/opcodes.s:227:15] + 224 │ global_selftarget: + 225 │ bne global_selftarget ;= D0 FE + 226 │ + 227 │ bbs data.0,$F9 ;= 03 13 64 · ─┬─ · ╰── Difference of -156 to current address - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B ╰──── help: The current address is `0194` and therefore the difference is -156. This difference exceeds the range [-128, 127] and will wrap around, @@ -545,16 +545,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:227:14] - 224 │ bne global_selftarget ;= D0 FE - 225 │ - 226 │ bbs data.0,$F9 ;= 03 13 64 - 227 │ bbs $30.1,$F9 ;= 23 30 61 + ╭─[tests/opcodes.s:228:14] + 225 │ bne global_selftarget ;= D0 FE + 226 │ + 227 │ bbs data.0,$F9 ;= 03 13 64 + 228 │ bbs $30.1,$F9 ;= 23 30 61 · ─┬─ · ╰── Difference of -159 to current address - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 ╰──── help: The current address is `0197` and therefore the difference is -159. This difference exceeds the range [-128, 127] and will wrap around, @@ -565,16 +565,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:228:14] - 225 │ - 226 │ bbs data.0,$F9 ;= 03 13 64 - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E + ╭─[tests/opcodes.s:229:14] + 226 │ + 227 │ bbs data.0,$F9 ;= 03 13 64 + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E · ─┬─ · ╰── Difference of -162 to current address - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 ╰──── help: The current address is `019A` and therefore the difference is -162. This difference exceeds the range [-128, 127] and will wrap around, @@ -585,16 +585,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:229:14] - 226 │ bbs data.0,$F9 ;= 03 13 64 - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B + ╭─[tests/opcodes.s:230:14] + 227 │ bbs data.0,$F9 ;= 03 13 64 + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B · ─┬─ · ╰── Difference of -165 to current address - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 ╰──── help: The current address is `019D` and therefore the difference is -165. This difference exceeds the range [-128, 127] and will wrap around, @@ -605,16 +605,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:230:14] - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 + ╭─[tests/opcodes.s:231:14] + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 · ─┬─ · ╰── Difference of -168 to current address - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F ╰──── help: The current address is `01A0` and therefore the difference is -168. This difference exceeds the range [-128, 127] and will wrap around, @@ -625,16 +625,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:231:14] - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 + ╭─[tests/opcodes.s:232:14] + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 · ─┬─ · ╰── Difference of -171 to current address - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 ╰──── help: The current address is `01A3` and therefore the difference is -171. This difference exceeds the range [-128, 127] and will wrap around, @@ -645,16 +645,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:232:14] - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 + ╭─[tests/opcodes.s:233:14] + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 · ─┬─ · ╰── Difference of -174 to current address - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 ╰──── help: The current address is `01A6` and therefore the difference is -174. This difference exceeds the range [-128, 127] and will wrap around, @@ -665,16 +665,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:233:14] - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F + ╭─[tests/opcodes.s:234:14] + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F · ─┬─ · ╰── Difference of -177 to current address - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 ╰──── help: The current address is `01A9` and therefore the difference is -177. This difference exceeds the range [-128, 127] and will wrap around, @@ -685,16 +685,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:234:16] - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 + ╭─[tests/opcodes.s:235:16] + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 · ─┬─ · ╰── Difference of -424 to current address - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F ╰──── help: The current address is `01AC` and therefore the difference is -424. This difference exceeds the range [-128, 127] and will wrap around, @@ -705,16 +705,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:235:14] - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 + ╭─[tests/opcodes.s:236:14] + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 · ─┬─ · ╰── Difference of -427 to current address - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C ╰──── help: The current address is `01AF` and therefore the difference is -427. This difference exceeds the range [-128, 127] and will wrap around, @@ -725,16 +725,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:236:14] - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 + ╭─[tests/opcodes.s:237:14] + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 · ─┬─ · ╰── Difference of -430 to current address - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 ╰──── help: The current address is `01B2` and therefore the difference is -430. This difference exceeds the range [-128, 127] and will wrap around, @@ -745,16 +745,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:237:14] - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F + ╭─[tests/opcodes.s:238:14] + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F · ─┬─ · ╰── Difference of -433 to current address - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 ╰──── help: The current address is `01B5` and therefore the difference is -433. This difference exceeds the range [-128, 127] and will wrap around, @@ -765,16 +765,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:238:14] - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C + ╭─[tests/opcodes.s:239:14] + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C · ─┬─ · ╰── Difference of -436 to current address - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 - 241 │ bbc $31.7,$05 ;= F3 31 43 + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 + 242 │ bbc $31.7,$05 ;= F3 31 43 ╰──── help: The current address is `01B8` and therefore the difference is -436. This difference exceeds the range [-128, 127] and will wrap around, @@ -785,16 +785,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:239:14] - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 + ╭─[tests/opcodes.s:240:14] + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 · ─┬─ · ╰── Difference of -439 to current address - 240 │ bbc $31.6,$05 ;= D3 31 46 - 241 │ bbc $31.7,$05 ;= F3 31 43 - 242 │ + 241 │ bbc $31.6,$05 ;= D3 31 46 + 242 │ bbc $31.7,$05 ;= F3 31 43 + 243 │ ╰──── help: The current address is `01BB` and therefore the difference is -439. This difference exceeds the range [-128, 127] and will wrap around, @@ -805,16 +805,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:240:14] - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 + ╭─[tests/opcodes.s:241:14] + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 · ─┬─ · ╰── Difference of -442 to current address - 241 │ bbc $31.7,$05 ;= F3 31 43 - 242 │ - 243 │ call $5060 ;= 3F 60 50 + 242 │ bbc $31.7,$05 ;= F3 31 43 + 243 │ + 244 │ call $5060 ;= 3F 60 50 ╰──── help: The current address is `01BE` and therefore the difference is -442. This difference exceeds the range [-128, 127] and will wrap around, @@ -825,16 +825,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:241:14] - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 - 241 │ bbc $31.7,$05 ;= F3 31 43 + ╭─[tests/opcodes.s:242:14] + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 + 242 │ bbc $31.7,$05 ;= F3 31 43 · ─┬─ · ╰── Difference of -445 to current address - 242 │ - 243 │ call $5060 ;= 3F 60 50 - 244 │ pcall $02 ;= 4F 02 + 243 │ + 244 │ call $5060 ;= 3F 60 50 + 245 │ pcall $02 ;= 4F 02 ╰──── help: The current address is `01C1` and therefore the difference is -445. This difference exceeds the range [-128, 127] and will wrap around, @@ -854,8 +854,8 @@ spcasm::arch::valid · ───────┬─────── · ╰── `arch` directive 2 │ org 0 - 3 │ start: ; @ 0 - 4 │ MOV A,#$10 ;= E8 10 + 3 │ startpos + 4 │ start: ; @ 0 ╰──── help: spcasm supports `arch` directives for compatibility with the Asar multi-architecture assembler. This arch directive points to the @@ -865,16 +865,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `002C` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:206:13] - 203 │ bvc reltarget+8 ;= 50 F8 - 204 │ bmi reltarget+10 ;= 30 F8 - 205 │ bpl reltarget+12 ;= 10 F8 - 206 │ cbne $2B,$2C ;= 2E 2B B7 + ╭─[tests/opcodes.s:207:13] + 204 │ bvc reltarget+8 ;= 50 F8 + 205 │ bmi reltarget+10 ;= 30 F8 + 206 │ bpl reltarget+12 ;= 10 F8 + 207 │ cbne $2B,$2C ;= 2E 2B B7 · ─┬─ · ╰── Difference of -329 to current address - 207 │ cbne $2D+X,$2E;= DE 2D B6 - 208 │ dbnz $2F,$30 ;= 6E 2F B5 - 209 │ dbnz Y,$31 ;= FE B4 + 208 │ cbne $2D+X,$2E;= DE 2D B6 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 + 210 │ dbnz Y,$31 ;= FE B4 ╰──── help: The current address is `0174` and therefore the difference is -329. This difference exceeds the range [-128, 127] and will wrap around, @@ -885,16 +885,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `002E` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:207:15] - 204 │ bmi reltarget+10 ;= 30 F8 - 205 │ bpl reltarget+12 ;= 10 F8 - 206 │ cbne $2B,$2C ;= 2E 2B B7 - 207 │ cbne $2D+X,$2E;= DE 2D B6 + ╭─[tests/opcodes.s:208:15] + 205 │ bmi reltarget+10 ;= 30 F8 + 206 │ bpl reltarget+12 ;= 10 F8 + 207 │ cbne $2B,$2C ;= 2E 2B B7 + 208 │ cbne $2D+X,$2E;= DE 2D B6 · ─┬─ · ╰── Difference of -330 to current address - 208 │ dbnz $2F,$30 ;= 6E 2F B5 - 209 │ dbnz Y,$31 ;= FE B4 - 210 │ jmp $2122 ;= 5F 22 21 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 + 210 │ dbnz Y,$31 ;= FE B4 + 211 │ jmp $2122 ;= 5F 22 21 ╰──── help: The current address is `0177` and therefore the difference is -330. This difference exceeds the range [-128, 127] and will wrap around, @@ -905,16 +905,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0030` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:208:13] - 205 │ bpl reltarget+12 ;= 10 F8 - 206 │ cbne $2B,$2C ;= 2E 2B B7 - 207 │ cbne $2D+X,$2E;= DE 2D B6 - 208 │ dbnz $2F,$30 ;= 6E 2F B5 + ╭─[tests/opcodes.s:209:13] + 206 │ bpl reltarget+12 ;= 10 F8 + 207 │ cbne $2B,$2C ;= 2E 2B B7 + 208 │ cbne $2D+X,$2E;= DE 2D B6 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 · ─┬─ · ╰── Difference of -331 to current address - 209 │ dbnz Y,$31 ;= FE B4 - 210 │ jmp $2122 ;= 5F 22 21 - 211 │ jmp ($2324+X) ;= 1F 24 23 + 210 │ dbnz Y,$31 ;= FE B4 + 211 │ jmp $2122 ;= 5F 22 21 + 212 │ jmp ($2324+X) ;= 1F 24 23 ╰──── help: The current address is `017A` and therefore the difference is -331. This difference exceeds the range [-128, 127] and will wrap around, @@ -925,16 +925,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0031` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:209:11] - 206 │ cbne $2B,$2C ;= 2E 2B B7 - 207 │ cbne $2D+X,$2E;= DE 2D B6 - 208 │ dbnz $2F,$30 ;= 6E 2F B5 - 209 │ dbnz Y,$31 ;= FE B4 + ╭─[tests/opcodes.s:210:11] + 207 │ cbne $2B,$2C ;= 2E 2B B7 + 208 │ cbne $2D+X,$2E;= DE 2D B6 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 + 210 │ dbnz Y,$31 ;= FE B4 · ─┬─ · ╰── Difference of -332 to current address - 210 │ jmp $2122 ;= 5F 22 21 - 211 │ jmp ($2324+X) ;= 1F 24 23 - 212 │ + 211 │ jmp $2122 ;= 5F 22 21 + 212 │ jmp ($2324+X) ;= 1F 24 23 + 213 │ ╰──── help: The current address is `017C` and therefore the difference is -332. This difference exceeds the range [-128, 127] and will wrap around, @@ -945,16 +945,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:226:15] - 223 │ global_selftarget: - 224 │ bne global_selftarget ;= D0 FE - 225 │ - 226 │ bbs data.0,$F9 ;= 03 13 64 + ╭─[tests/opcodes.s:227:15] + 224 │ global_selftarget: + 225 │ bne global_selftarget ;= D0 FE + 226 │ + 227 │ bbs data.0,$F9 ;= 03 13 64 · ─┬─ · ╰── Difference of -156 to current address - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B ╰──── help: The current address is `0194` and therefore the difference is -156. This difference exceeds the range [-128, 127] and will wrap around, @@ -965,16 +965,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:227:14] - 224 │ bne global_selftarget ;= D0 FE - 225 │ - 226 │ bbs data.0,$F9 ;= 03 13 64 - 227 │ bbs $30.1,$F9 ;= 23 30 61 + ╭─[tests/opcodes.s:228:14] + 225 │ bne global_selftarget ;= D0 FE + 226 │ + 227 │ bbs data.0,$F9 ;= 03 13 64 + 228 │ bbs $30.1,$F9 ;= 23 30 61 · ─┬─ · ╰── Difference of -159 to current address - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 ╰──── help: The current address is `0197` and therefore the difference is -159. This difference exceeds the range [-128, 127] and will wrap around, @@ -985,16 +985,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:228:14] - 225 │ - 226 │ bbs data.0,$F9 ;= 03 13 64 - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E + ╭─[tests/opcodes.s:229:14] + 226 │ + 227 │ bbs data.0,$F9 ;= 03 13 64 + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E · ─┬─ · ╰── Difference of -162 to current address - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 ╰──── help: The current address is `019A` and therefore the difference is -162. This difference exceeds the range [-128, 127] and will wrap around, @@ -1005,16 +1005,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:229:14] - 226 │ bbs data.0,$F9 ;= 03 13 64 - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B + ╭─[tests/opcodes.s:230:14] + 227 │ bbs data.0,$F9 ;= 03 13 64 + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B · ─┬─ · ╰── Difference of -165 to current address - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 ╰──── help: The current address is `019D` and therefore the difference is -165. This difference exceeds the range [-128, 127] and will wrap around, @@ -1025,16 +1025,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:230:14] - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 + ╭─[tests/opcodes.s:231:14] + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 · ─┬─ · ╰── Difference of -168 to current address - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F ╰──── help: The current address is `01A0` and therefore the difference is -168. This difference exceeds the range [-128, 127] and will wrap around, @@ -1045,16 +1045,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:231:14] - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 + ╭─[tests/opcodes.s:232:14] + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 · ─┬─ · ╰── Difference of -171 to current address - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 ╰──── help: The current address is `01A3` and therefore the difference is -171. This difference exceeds the range [-128, 127] and will wrap around, @@ -1065,16 +1065,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:232:14] - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 + ╭─[tests/opcodes.s:233:14] + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 · ─┬─ · ╰── Difference of -174 to current address - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 ╰──── help: The current address is `01A6` and therefore the difference is -174. This difference exceeds the range [-128, 127] and will wrap around, @@ -1085,16 +1085,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:233:14] - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F + ╭─[tests/opcodes.s:234:14] + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F · ─┬─ · ╰── Difference of -177 to current address - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 ╰──── help: The current address is `01A9` and therefore the difference is -177. This difference exceeds the range [-128, 127] and will wrap around, @@ -1105,16 +1105,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:234:16] - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 + ╭─[tests/opcodes.s:235:16] + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 · ─┬─ · ╰── Difference of -424 to current address - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F ╰──── help: The current address is `01AC` and therefore the difference is -424. This difference exceeds the range [-128, 127] and will wrap around, @@ -1125,16 +1125,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:235:14] - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 + ╭─[tests/opcodes.s:236:14] + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 · ─┬─ · ╰── Difference of -427 to current address - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C ╰──── help: The current address is `01AF` and therefore the difference is -427. This difference exceeds the range [-128, 127] and will wrap around, @@ -1145,16 +1145,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:236:14] - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 + ╭─[tests/opcodes.s:237:14] + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 · ─┬─ · ╰── Difference of -430 to current address - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 ╰──── help: The current address is `01B2` and therefore the difference is -430. This difference exceeds the range [-128, 127] and will wrap around, @@ -1165,16 +1165,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:237:14] - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F + ╭─[tests/opcodes.s:238:14] + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F · ─┬─ · ╰── Difference of -433 to current address - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 ╰──── help: The current address is `01B5` and therefore the difference is -433. This difference exceeds the range [-128, 127] and will wrap around, @@ -1185,16 +1185,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:238:14] - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C + ╭─[tests/opcodes.s:239:14] + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C · ─┬─ · ╰── Difference of -436 to current address - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 - 241 │ bbc $31.7,$05 ;= F3 31 43 + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 + 242 │ bbc $31.7,$05 ;= F3 31 43 ╰──── help: The current address is `01B8` and therefore the difference is -436. This difference exceeds the range [-128, 127] and will wrap around, @@ -1205,16 +1205,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:239:14] - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 + ╭─[tests/opcodes.s:240:14] + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 · ─┬─ · ╰── Difference of -439 to current address - 240 │ bbc $31.6,$05 ;= D3 31 46 - 241 │ bbc $31.7,$05 ;= F3 31 43 - 242 │ + 241 │ bbc $31.6,$05 ;= D3 31 46 + 242 │ bbc $31.7,$05 ;= F3 31 43 + 243 │ ╰──── help: The current address is `01BB` and therefore the difference is -439. This difference exceeds the range [-128, 127] and will wrap around, @@ -1225,16 +1225,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:240:14] - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 + ╭─[tests/opcodes.s:241:14] + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 · ─┬─ · ╰── Difference of -442 to current address - 241 │ bbc $31.7,$05 ;= F3 31 43 - 242 │ - 243 │ call $5060 ;= 3F 60 50 + 242 │ bbc $31.7,$05 ;= F3 31 43 + 243 │ + 244 │ call $5060 ;= 3F 60 50 ╰──── help: The current address is `01BE` and therefore the difference is -442. This difference exceeds the range [-128, 127] and will wrap around, @@ -1245,16 +1245,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:241:14] - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 - 241 │ bbc $31.7,$05 ;= F3 31 43 + ╭─[tests/opcodes.s:242:14] + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 + 242 │ bbc $31.7,$05 ;= F3 31 43 · ─┬─ · ╰── Difference of -445 to current address - 242 │ - 243 │ call $5060 ;= 3F 60 50 - 244 │ pcall $02 ;= 4F 02 + 243 │ + 244 │ call $5060 ;= 3F 60 50 + 245 │ pcall $02 ;= 4F 02 ╰──── help: The current address is `01C1` and therefore the difference is -445. This difference exceeds the range [-128, 127] and will wrap around, @@ -1274,8 +1274,8 @@ spcasm::arch::valid · ───────┬─────── · ╰── `arch` directive 2 │ org 0 - 3 │ start: ; @ 0 - 4 │ MOV A,#$10 ;= E8 10 + 3 │ startpos + 4 │ start: ; @ 0 ╰──── help: spcasm supports `arch` directives for compatibility with the Asar multi-architecture assembler. This arch directive points to the @@ -1285,16 +1285,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `002C` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:206:13] - 203 │ bvc reltarget+8 ;= 50 F8 - 204 │ bmi reltarget+10 ;= 30 F8 - 205 │ bpl reltarget+12 ;= 10 F8 - 206 │ cbne $2B,$2C ;= 2E 2B B7 + ╭─[tests/opcodes.s:207:13] + 204 │ bvc reltarget+8 ;= 50 F8 + 205 │ bmi reltarget+10 ;= 30 F8 + 206 │ bpl reltarget+12 ;= 10 F8 + 207 │ cbne $2B,$2C ;= 2E 2B B7 · ─┬─ · ╰── Difference of -329 to current address - 207 │ cbne $2D+X,$2E;= DE 2D B6 - 208 │ dbnz $2F,$30 ;= 6E 2F B5 - 209 │ dbnz Y,$31 ;= FE B4 + 208 │ cbne $2D+X,$2E;= DE 2D B6 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 + 210 │ dbnz Y,$31 ;= FE B4 ╰──── help: The current address is `0174` and therefore the difference is -329. This difference exceeds the range [-128, 127] and will wrap around, @@ -1305,16 +1305,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `002E` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:207:15] - 204 │ bmi reltarget+10 ;= 30 F8 - 205 │ bpl reltarget+12 ;= 10 F8 - 206 │ cbne $2B,$2C ;= 2E 2B B7 - 207 │ cbne $2D+X,$2E;= DE 2D B6 + ╭─[tests/opcodes.s:208:15] + 205 │ bmi reltarget+10 ;= 30 F8 + 206 │ bpl reltarget+12 ;= 10 F8 + 207 │ cbne $2B,$2C ;= 2E 2B B7 + 208 │ cbne $2D+X,$2E;= DE 2D B6 · ─┬─ · ╰── Difference of -330 to current address - 208 │ dbnz $2F,$30 ;= 6E 2F B5 - 209 │ dbnz Y,$31 ;= FE B4 - 210 │ jmp $2122 ;= 5F 22 21 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 + 210 │ dbnz Y,$31 ;= FE B4 + 211 │ jmp $2122 ;= 5F 22 21 ╰──── help: The current address is `0177` and therefore the difference is -330. This difference exceeds the range [-128, 127] and will wrap around, @@ -1325,16 +1325,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0030` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:208:13] - 205 │ bpl reltarget+12 ;= 10 F8 - 206 │ cbne $2B,$2C ;= 2E 2B B7 - 207 │ cbne $2D+X,$2E;= DE 2D B6 - 208 │ dbnz $2F,$30 ;= 6E 2F B5 + ╭─[tests/opcodes.s:209:13] + 206 │ bpl reltarget+12 ;= 10 F8 + 207 │ cbne $2B,$2C ;= 2E 2B B7 + 208 │ cbne $2D+X,$2E;= DE 2D B6 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 · ─┬─ · ╰── Difference of -331 to current address - 209 │ dbnz Y,$31 ;= FE B4 - 210 │ jmp $2122 ;= 5F 22 21 - 211 │ jmp ($2324+X) ;= 1F 24 23 + 210 │ dbnz Y,$31 ;= FE B4 + 211 │ jmp $2122 ;= 5F 22 21 + 212 │ jmp ($2324+X) ;= 1F 24 23 ╰──── help: The current address is `017A` and therefore the difference is -331. This difference exceeds the range [-128, 127] and will wrap around, @@ -1345,16 +1345,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0031` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:209:11] - 206 │ cbne $2B,$2C ;= 2E 2B B7 - 207 │ cbne $2D+X,$2E;= DE 2D B6 - 208 │ dbnz $2F,$30 ;= 6E 2F B5 - 209 │ dbnz Y,$31 ;= FE B4 + ╭─[tests/opcodes.s:210:11] + 207 │ cbne $2B,$2C ;= 2E 2B B7 + 208 │ cbne $2D+X,$2E;= DE 2D B6 + 209 │ dbnz $2F,$30 ;= 6E 2F B5 + 210 │ dbnz Y,$31 ;= FE B4 · ─┬─ · ╰── Difference of -332 to current address - 210 │ jmp $2122 ;= 5F 22 21 - 211 │ jmp ($2324+X) ;= 1F 24 23 - 212 │ + 211 │ jmp $2122 ;= 5F 22 21 + 212 │ jmp ($2324+X) ;= 1F 24 23 + 213 │ ╰──── help: The current address is `017C` and therefore the difference is -332. This difference exceeds the range [-128, 127] and will wrap around, @@ -1365,16 +1365,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:226:15] - 223 │ global_selftarget: - 224 │ bne global_selftarget ;= D0 FE - 225 │ - 226 │ bbs data.0,$F9 ;= 03 13 64 + ╭─[tests/opcodes.s:227:15] + 224 │ global_selftarget: + 225 │ bne global_selftarget ;= D0 FE + 226 │ + 227 │ bbs data.0,$F9 ;= 03 13 64 · ─┬─ · ╰── Difference of -156 to current address - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B ╰──── help: The current address is `0194` and therefore the difference is -156. This difference exceeds the range [-128, 127] and will wrap around, @@ -1385,16 +1385,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:227:14] - 224 │ bne global_selftarget ;= D0 FE - 225 │ - 226 │ bbs data.0,$F9 ;= 03 13 64 - 227 │ bbs $30.1,$F9 ;= 23 30 61 + ╭─[tests/opcodes.s:228:14] + 225 │ bne global_selftarget ;= D0 FE + 226 │ + 227 │ bbs data.0,$F9 ;= 03 13 64 + 228 │ bbs $30.1,$F9 ;= 23 30 61 · ─┬─ · ╰── Difference of -159 to current address - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 ╰──── help: The current address is `0197` and therefore the difference is -159. This difference exceeds the range [-128, 127] and will wrap around, @@ -1405,16 +1405,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:228:14] - 225 │ - 226 │ bbs data.0,$F9 ;= 03 13 64 - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E + ╭─[tests/opcodes.s:229:14] + 226 │ + 227 │ bbs data.0,$F9 ;= 03 13 64 + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E · ─┬─ · ╰── Difference of -162 to current address - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 ╰──── help: The current address is `019A` and therefore the difference is -162. This difference exceeds the range [-128, 127] and will wrap around, @@ -1425,16 +1425,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:229:14] - 226 │ bbs data.0,$F9 ;= 03 13 64 - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B + ╭─[tests/opcodes.s:230:14] + 227 │ bbs data.0,$F9 ;= 03 13 64 + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B · ─┬─ · ╰── Difference of -165 to current address - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 ╰──── help: The current address is `019D` and therefore the difference is -165. This difference exceeds the range [-128, 127] and will wrap around, @@ -1445,16 +1445,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:230:14] - 227 │ bbs $30.1,$F9 ;= 23 30 61 - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 + ╭─[tests/opcodes.s:231:14] + 228 │ bbs $30.1,$F9 ;= 23 30 61 + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 · ─┬─ · ╰── Difference of -168 to current address - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F ╰──── help: The current address is `01A0` and therefore the difference is -168. This difference exceeds the range [-128, 127] and will wrap around, @@ -1465,16 +1465,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:231:14] - 228 │ bbs $30.2,$F9 ;= 43 30 5E - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 + ╭─[tests/opcodes.s:232:14] + 229 │ bbs $30.2,$F9 ;= 43 30 5E + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 · ─┬─ · ╰── Difference of -171 to current address - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 ╰──── help: The current address is `01A3` and therefore the difference is -171. This difference exceeds the range [-128, 127] and will wrap around, @@ -1485,16 +1485,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:232:14] - 229 │ bbs $30.3,$F9 ;= 63 30 5B - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 + ╭─[tests/opcodes.s:233:14] + 230 │ bbs $30.3,$F9 ;= 63 30 5B + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 · ─┬─ · ╰── Difference of -174 to current address - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 ╰──── help: The current address is `01A6` and therefore the difference is -174. This difference exceeds the range [-128, 127] and will wrap around, @@ -1505,16 +1505,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `00F9` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:233:14] - 230 │ bbs $30.4,$F9 ;= 83 30 58 - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F + ╭─[tests/opcodes.s:234:14] + 231 │ bbs $30.4,$F9 ;= 83 30 58 + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F · ─┬─ · ╰── Difference of -177 to current address - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 ╰──── help: The current address is `01A9` and therefore the difference is -177. This difference exceeds the range [-128, 127] and will wrap around, @@ -1525,16 +1525,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:234:16] - 231 │ bbs $30.5,$F9 ;= A3 30 55 - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 + ╭─[tests/opcodes.s:235:16] + 232 │ bbs $30.5,$F9 ;= A3 30 55 + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 · ─┬─ · ╰── Difference of -424 to current address - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F ╰──── help: The current address is `01AC` and therefore the difference is -424. This difference exceeds the range [-128, 127] and will wrap around, @@ -1545,16 +1545,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:235:14] - 232 │ bbs $30.6,$F9 ;= C3 30 52 - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 + ╭─[tests/opcodes.s:236:14] + 233 │ bbs $30.6,$F9 ;= C3 30 52 + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 · ─┬─ · ╰── Difference of -427 to current address - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C ╰──── help: The current address is `01AF` and therefore the difference is -427. This difference exceeds the range [-128, 127] and will wrap around, @@ -1565,16 +1565,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:236:14] - 233 │ bbs $30.7,$F9 ;= E3 30 4F - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 + ╭─[tests/opcodes.s:237:14] + 234 │ bbs $30.7,$F9 ;= E3 30 4F + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 · ─┬─ · ╰── Difference of -430 to current address - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 ╰──── help: The current address is `01B2` and therefore the difference is -430. This difference exceeds the range [-128, 127] and will wrap around, @@ -1585,16 +1585,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:237:14] - 234 │ bbc start.0,$05 ;= 13 00 58 - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F + ╭─[tests/opcodes.s:238:14] + 235 │ bbc start.0,$05 ;= 13 00 58 + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F · ─┬─ · ╰── Difference of -433 to current address - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 ╰──── help: The current address is `01B5` and therefore the difference is -433. This difference exceeds the range [-128, 127] and will wrap around, @@ -1605,16 +1605,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:238:14] - 235 │ bbc $31.1,$05 ;= 33 31 55 - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C + ╭─[tests/opcodes.s:239:14] + 236 │ bbc $31.1,$05 ;= 33 31 55 + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C · ─┬─ · ╰── Difference of -436 to current address - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 - 241 │ bbc $31.7,$05 ;= F3 31 43 + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 + 242 │ bbc $31.7,$05 ;= F3 31 43 ╰──── help: The current address is `01B8` and therefore the difference is -436. This difference exceeds the range [-128, 127] and will wrap around, @@ -1625,16 +1625,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:239:14] - 236 │ bbc $31.2,$05 ;= 53 31 52 - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 + ╭─[tests/opcodes.s:240:14] + 237 │ bbc $31.2,$05 ;= 53 31 52 + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 · ─┬─ · ╰── Difference of -439 to current address - 240 │ bbc $31.6,$05 ;= D3 31 46 - 241 │ bbc $31.7,$05 ;= F3 31 43 - 242 │ + 241 │ bbc $31.6,$05 ;= D3 31 46 + 242 │ bbc $31.7,$05 ;= F3 31 43 + 243 │ ╰──── help: The current address is `01BB` and therefore the difference is -439. This difference exceeds the range [-128, 127] and will wrap around, @@ -1645,16 +1645,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:240:14] - 237 │ bbc $31.3,$05 ;= 73 31 4F - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 + ╭─[tests/opcodes.s:241:14] + 238 │ bbc $31.3,$05 ;= 73 31 4F + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 · ─┬─ · ╰── Difference of -442 to current address - 241 │ bbc $31.7,$05 ;= F3 31 43 - 242 │ - 243 │ call $5060 ;= 3F 60 50 + 242 │ bbc $31.7,$05 ;= F3 31 43 + 243 │ + 244 │ call $5060 ;= 3F 60 50 ╰──── help: The current address is `01BE` and therefore the difference is -442. This difference exceeds the range [-128, 127] and will wrap around, @@ -1665,16 +1665,16 @@ spcasm::relative_offset_too_large ⚠ The relative offset to address `0005` is out of range, the result will │ be wrong. - ╭─[tests/opcodes.s:241:14] - 238 │ bbc $31.4,$05 ;= 93 31 4C - 239 │ bbc $31.5,$05 ;= B3 31 49 - 240 │ bbc $31.6,$05 ;= D3 31 46 - 241 │ bbc $31.7,$05 ;= F3 31 43 + ╭─[tests/opcodes.s:242:14] + 239 │ bbc $31.4,$05 ;= 93 31 4C + 240 │ bbc $31.5,$05 ;= B3 31 49 + 241 │ bbc $31.6,$05 ;= D3 31 46 + 242 │ bbc $31.7,$05 ;= F3 31 43 · ─┬─ · ╰── Difference of -445 to current address - 242 │ - 243 │ call $5060 ;= 3F 60 50 - 244 │ pcall $02 ;= 4F 02 + 243 │ + 244 │ call $5060 ;= 3F 60 50 + 245 │ pcall $02 ;= 4F 02 ╰──── help: The current address is `01C1` and therefore the difference is -445. This difference exceeds the range [-128, 127] and will wrap around, diff --git a/tests/entrypoint.s b/tests/entrypoint.s new file mode 100644 index 00000000..fe30d834 --- /dev/null +++ b/tests/entrypoint.s @@ -0,0 +1,9 @@ +org $200 +loop: + nop + jmp loop + nop + +org $FF00 +startpos + jmp loop diff --git a/tests/errors/duplicate-startpos.spcasmtest b/tests/errors/duplicate-startpos.spcasmtest new file mode 100644 index 00000000..6d1e46b0 --- /dev/null +++ b/tests/errors/duplicate-startpos.spcasmtest @@ -0,0 +1,7 @@ +org $200 +startpos +nop + +org $300 +startpos +nop diff --git a/tests/opcodes.s b/tests/opcodes.s index ba8e606a..f4def6e6 100644 --- a/tests/opcodes.s +++ b/tests/opcodes.s @@ -1,5 +1,6 @@ arch spc700-raw org 0 +startpos start: ; @ 0 MOV A,#$10 ;= E8 10 MOV A,(X) ;= E6