EASy68K  
It is currently Sat Oct 21, 2017 2:56 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon May 23, 2016 3:39 pm 
Offline

Joined: Mon May 23, 2016 3:33 pm
Posts: 2
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?


Top
 Profile  
 
PostPosted: Tue May 24, 2016 2:19 pm 
Offline

Joined: Mon May 23, 2016 3:33 pm
Posts: 2
I already found out that indentation is very very important: aligning the code fixes the problem. Thank you anyway.


Top
 Profile  
 
PostPosted: Tue May 24, 2016 2:25 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1048
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.

_________________
Prof. Kelly


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group