EASy68K
http://www.easy68k.com/EASy68Kforum/

ERROR: Invalid syntax with simple program
http://www.easy68k.com/EASy68Kforum/viewtopic.php?f=5&t=1552
Page 1 of 1

Author:  Rapper_skull [ Mon May 23, 2016 3:39 pm ]
Post subject:  ERROR: Invalid syntax with simple program

Hello, I'm new to EASy68k, and I have a big problem: I can't assembly even the simplest program, because I always get the invalid syntax error. Here's the code:

Code:
*-----------------------------------------------------------
* Title      :
* Written by :
* Date       :
* Description:
*-----------------------------------------------------------
    ORG    $1000
START:                  ; first instruction of program
MOVE.B #1,D0

* Put program code here

    SIMHALT             ; halt simulator

* Put variables and constants here

    END    START        ; last line of source


I get the error on line 9 MOVE.B #1,D0. I don't see where's the problem with the code, can you help me?

Author:  Rapper_skull [ Tue May 24, 2016 2:19 pm ]
Post subject:  Re: ERROR: Invalid syntax with simple program

I already found out that indentation is very very important: aligning the code fixes the problem. Thank you anyway.

Author:  profkelly [ Tue May 24, 2016 2:25 pm ]
Post subject:  Re: ERROR: Invalid syntax with simple program

Spacing is important in assembly language. Instruction must be proceeded by at least one white space character.

Code:
MOVE.B #1,D0    ; Invalid, no leading white space
    MOVE.B #1,D0    ; This should work.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/