7 example of instruction buffer usage, 2 bootloader flowchart, Example of instruction buffer usage -6 – Motorola MC68VZ328 User Manual

Page 312: Bootloader flowchart -6, Example 17-3 using instruction buffers -6

Advertising
background image

17-6

MC68VZ328 User’s Manual

Bootloader Flowchart

17.1.7

Example of Instruction Buffer Usage

Example 17-3 demonstrates how to run a 68000 instruction using the instruction buffer.

Example 17-3. Using Instruction Buffers

ORG.L

$FFFFFFC0

; instruction buffer location

move.w #$55,D0

; 4-byte long instruction(303C0055)

nop

; fill the rest of IBUFF

nop

nop
nop

end

After the data is assembled and converted to b-record format, it appears as in the following lines (where
FFFFFFC0 is the IBUFF address location):

FFFFFFC00C303C00554E714E714E714E71
FFFFFFC000

The first b-record loads the instruction buffer. The second b-record tells the bootloader to run the
instruction in the instruction buffer. When the execution is complete, it accepts new b-record transfers. The
CPU registers D0–D6 and A0 are used by the bootloader program. Writing to these registers may corrupt
the bootloader program.

17.2

Bootloader Flowchart

The following flowchart illustrates how the bootloader program operates inside the MC68VZ328. The
bootloader starts when the MC68VZ328 enters bootstrap mode.

Advertising