Forum > Other OS

Atari m68k inline assembler error: encoding absolute displacement directly

(1/1)

Cigydd:
Hello folks,

I am trying to compile a Motorola 68000 Assembler source in an inline block (asm … end;).

I have such an instruction:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---    move.w    -48(pc,d0.w),d0    // 303B 00D0
Getting the following error:


--- Code: ---Error: warning 2069 in line 475 of "<path>/<file>.s": encoding absolute displacement directly

--- End code ---

As you can see, it's originally a warning from the assembler layer but it becomes and error on the compiler level.

What could I do to get rid of this warning/error? I know what displacement is but in this case I think that the D0 register used (-48(pc,d0.w)) makes the displacement relative (unless its content is somehow known to the assembler?).

How do I make the displacement absolute? Or is there an error on the inline assembler side?

Tried this:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---    move.w    H544(pc,d0.w),d0    // 303B 00D0
where H544 is a label but that kind of syntax doesn’t seem to be supported. Getting an Assembler syntax error.

Cigydd:
Tried with a simple sample project and noticed that it actually compiles, even though it complains about an error.

But the question remains because in the original project, I get spammed with these messages and hardly get to the actual errors that block the compilation.

PascalDragon:

--- Quote from: Cigydd on October 13, 2022, 12:08:49 am ---I have such an instruction:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---    move.w    -48(pc,d0.w),d0    // 303B 00D0
Getting the following error:


--- Code: ---Error: warning 2069 in line 475 of "<path>/<file>.s": encoding absolute displacement directly

--- End code ---

As you can see, it's originally a warning from the assembler layer but it becomes and error on the compiler level.
--- End quote ---

What version of the compiler do you use? And what is your assembler? How does the assembly generated by the compiler look like (the assembly files are kept if you use the option -al for example).

Cigydd:

--- Quote from: PascalDragon on October 13, 2022, 07:26:06 am ---What version of the compiler do you use? And what is your assembler? How does the assembly generated by the compiler look like (the assembly files are kept if you use the option -al for example).

--- End quote ---

Created a repository with the sample project: https://gitlab.com/pavel.reznicek/displacement-test/

I use vasm and vlink.

As for the compiler version, I have compiled it from the main/trunk git branch, commit 2b63c02bc503dc1b1081c90dec770bf78473ecbd.

All other information you requested is included in the repository. See the bash build script and the build.log file.

Navigation

[0] Message Index

Go to full version