EASy68K  
It is currently Tue Jun 27, 2017 3:44 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Jan 31, 2015 7:08 pm 
Offline

Joined: Sat Jan 31, 2015 7:04 pm
Posts: 1
ORG $1000
START: ; first instruction of program


MOVE.B #14,D0
LEA EM,A1
TRAP #15

; halt simulator

MOVE.B #3,D0
MOVE.B N1,D1
ADD.B N2,D1
TRAP #15

N1 DC.B 4
N2 DC.B 5

EM DC.W 'The Number Added ',0

END START ; last line of source


Top
 Profile  
 
PostPosted: Sun Feb 01, 2015 1:21 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1039
The simulator is continuing to execute instructions beyond the end of your code. Add a SIMHALT instruction to halt the simulator.
Code:
*-----------------------------------------------------------
* Title      :
* Written by :
* Date       :
* Description:
*-----------------------------------------------------------
    ORG $1000
START: ; first instruction of program

    MOVE.B #14,D0   ; Display string task
    LEA EM,A1       ; Location of string
    TRAP #15        ; Execute task

    MOVE.B #3,D0    ; Display number in D1 task
    MOVE.B N1,D1    ; Get number in N1
    ADD.B N2,D1     ; D1 = D1 + N2
    TRAP #15        ; Execute task

; halt simulator
    SIMHALT

N1 DC.B 4
N2 DC.B 5

EM DC.W 'The Number Added ',0

    END START ; last line of source

_________________
Prof. Kelly


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


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