68000 Motherboard User’s Manual
Rev. A
Page 47 of 54
8.1.2
EASy68K
This educational development tool by Chuck Kelly is an excellent environment for
development and simulation of 68000 assembly code. It requires a Windows platform
computer. Its tools allow for the generation of Motorola S-Record output files. These
files may then be used to generate split binary files for the even and odd program
memory ROMs. Even ROMs store the upper bytes and have the suffix “_0.” These are
referred to as “Hi.” Odd ROMs store the lower bytes and have the suffix “_1.” These are
“Lo.” Visit www.easy68k.com.
8.2
MB68k-100 Software Examples
The following pair of programming examples demonstrates the same function: to fill a
continuous block of memory with a specified byte value. The first is implemented with a
simple structure for ease of readability. The second is implemented to complement the
68000’s architecture for optimum speed.
********************************************************************************
* BlockFillB (trival version)
* Implements memory fill function with a byte value
*
* Input:
*
D0.L - Block length to fill
*
D1.B - Byte fill value
*
A0.L - Target block base address
*
* Output:
*
None
*
* Registers Destroyed:
*
A0, D0.L, D1.L
*
********************************************************************************
BLOCKFILLB:
Label to indicate the start of the
BLOCKFILLB
routine.
; return if fill length is
zero
SUB.L
#1, D0
Subtract one from the fill space byte count because
DBF
loop control instruction terminates on occurrence of -1.
BCS
BLOCKFILLB_RTS
If the length of memory space to fill is specified as zero, go
to the exit of the routine.
BLOCKFILLB_LONGLOOP:
Label for internal fill loop.
; fill one byte at a time
(trival strategy)
MOVE.B
D1, (A0)+
Write one byte location at a time, and advance the byte
location position pointer by one byte.
DBF
D0,
BLOCKFILLB_LONGLOOP
Subtract one from the fill length counter for the byte
transferred. Loop again if the fill length has not yet been
reached, inspecting only the lower 16-bits of the 32-bit
length counter.
SUB.L
#$10000, D0
Subtract one from the upper 16-bits of the fill length
counter for the 65536 byte transfers by the lower 16-bit
count loop.
Summary of Contents for MB68k-100
Page 1: ...Rev A Grant K c 2011 ...