1 /***************************************************************************
2 * Copyright (C) 2010 by Spencer Oliver *
3 * spen@spen-soft.co.uk *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
19 ***************************************************************************/
27 r0 source address (in)
28 r1 target address (in)
34 bic r4, r1, #3 /* word address */
35 mov r3, #0x40 /* write command */
37 ldrh r3, [r0], #2 /* read data */
38 strh r3, [r1], #2 /* write data */
39 mov r3, #0x70 /* status command */
42 ldrb r3, [r4, #0] /* status */
45 mov r5, #0x50 /* clear status command */
47 mov r5, #0xFF /* read array */
51 subs r2, r2, #1 /* decrement word count */