EASy68K  
It is currently Tue Sep 24, 2019 9:44 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: New File
PostPosted: Thu Jul 30, 2009 9:48 am 
Offline

Joined: Wed Jul 29, 2009 5:36 pm
Posts: 9
Location: Ptolemaios
Why does a new easy68k file always comes preloaded with these lines of code?
Code:
   ORG   $1000
START:            ; first instruction of program



   MOVE.B   #9,D0
   TRAP   #15      ; halt simulator

* Variables and Strings



   END   START      ; last line of source

Question:
Why is 9 put into D0 before using trap? What does it do?
Code:
Line 1111 Emulator exception occurred at location   78. Execution halted

I get this by removing it.

_________________
Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 30, 2009 2:43 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1102
Check out the "Quick Start" guide in EASy68K help under Editor/Assembler Operation.
Code:
ORG $1000
START:
The ORG directive tells the assembler the memory location of the following code. The START: label is the location of the first instruction of your program.
Code:
MOVE.B #9,D0
TRAP #15

This is a trap task that halts the simulator. EASy68K includes many trap tasks that may be used in your programs. See Simulator I/O in EASy68K Help. If there is no command to halt the simulator it will continue to read data from memory and interpret it as instructions. The results are unpredictable.

_________________
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