EASy68K  
It is currently Tue Apr 25, 2017 2:30 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun Oct 11, 2009 10:42 pm 
Offline

Joined: Mon Apr 17, 2006 8:45 pm
Posts: 10
Location: England
This works with devpac and vasm http://sun.hasenbraten.de/vasm/

Code:

   list

** Ram and Rom size definitions

RAM_SIZE   equ   16   18 bits of address - 2x 128K x 8 SRAMs
ROM_SIZE   equ   18   18 bits of address - 2x 128K x 8 Flashroms


** Define memory segment size

MEMB_SIZE   equ   ROM_SIZE   18 bits = set to size of rom

** Define macros

MSTART   MACRO      ;size of block, start block
MSTEP   set   \1
MOFFSET   set   \2
   ENDM

MBLOCK   MACRO   ;label
\1   equ   MOFFSET<<MSTEP   0<<18, 1<<18, 2<<18, 3<<18 etc...
MOFFSET   set   MOFFSET+1
   ENDM

** Memory map - 8 decoded segments

   MSTART   MEMB_SIZE,0
   MBLOCK   ROM_BLK
   MBLOCK   NULL1_BLK
   MBLOCK   RAM_BLK
   MBLOCK   NULL3_BLK
   MBLOCK   DUART_BLK
   MBLOCK   NULL5_BLK
   MBLOCK   NULL6_BLK
   MBLOCK   NULL7_BLK

   ORG   $1000
START:            ; first instruction of program


   lea   ROM_BLK,a0
   lea   RAM_BLK,a1
   
   MOVE.B   #9,D0
   TRAP   #15      ; halt simulator

* Variables and Strings

   END   START      ; last line of source


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 12, 2009 2:12 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1036
Location: Monroe County Community College, Monroe Michigan, U.S.A.
Corrected in v4.8.1

_________________
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 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