Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addressing mode PC with displacement broken? #3

Open
RebeccaRGB opened this issue Aug 20, 2022 · 3 comments
Open

Addressing mode PC with displacement broken? #3

RebeccaRGB opened this issue Aug 20, 2022 · 3 comments

Comments

@RebeccaRGB
Copy link

I don't think these are all supposed to assemble to the same thing:

00001000 Starting Address
Assembler used: EASy68K Editor/Assembler v5.16.01
Created On: 8/20/2022 12:12:22 AM

00000000                             1  *-----------------------------------------------------------
00000000                             2  * Title      :
00000000                             3  * Written by :
00000000                             4  * Date       :
00000000                             5  * Description:
00000000                             6  *-----------------------------------------------------------
00001000                             7      ORG    $1000
00001000                             8  START:                  ; first instruction of program
00001000                             9  
00001000                            10  * Put program code here
00001000                            11  
00001000  203B 00FE                 12      move.l (0, pc, d0.w), d0
00001004  203B 00FE                 13      move.l (1, pc, d0.w), d0
00001008  203B 00FE                 14      move.l (2, pc, d0.w), d0
0000100C  203B 00FE                 15      move.l (44, pc, d0.w), d0
00001010  203B 00FE                 16      move.l (-12, pc, d0.w), d0
00001014  203B 00FE                 17      move.l (666, pc, d0.w), d0
00001018  203B 00FE                 18      move.l (13, pc, d0.w), d0
0000101C  203B 00FE                 19      move.l (-42, pc, d0.w), d0
00001020  FFFF FFFF                 20      SIMHALT             ; halt simulator
00001024                            21  
00001024                            22  * Put variables and constants here
00001024                            23  
00001024                            24      END    START        ; last line of source

No errors detected
No warnings generated


SYMBOL TABLE INFORMATION
Symbol-name         Value
-------------------------
START               1000
@vhelin
Copy link

vhelin commented Dec 8, 2022

I just encountered the ~same weirdness:

image

VASM says this should be D6 3B 20 02

@xahon
Copy link

xahon commented Feb 14, 2023

shouldn't it be move.l 0(pc,d0.w), d0, move.l -12(pc,d0.w), d0?
I also noticed that extra space within the parenthesis considered as a syntax error

@protonwrangler
Copy link

xahon, with the '020 Motorola changed the assembler syntax from the form d(An) to (d,An) -- putting everything including the constant offset inside the parens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants