1 /*******************************************************
3 * a56 - a DSP56001 assembler
5 * Written by Quinn C. Jensen
8 *******************************************************\
11 * Copyright (C) 2012 Thorsten Alteholz <debian@alteholz.de>
13 * This file is free software: you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published
15 * by the Free Software Foundation, either version 3 of the License,
16 * or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program. If not, see
25 * <http://www.gnu.org/licenses/>.
27 * This file incorporates work covered by the following copyright and
30 * Copyright (C) 1990-1994 Quinn C. Jensen
32 * Permission to use, copy, modify, distribute, and sell this software
33 * and its documentation for any purpose is hereby granted without fee,
34 * provided that the above copyright notice appear in all copies and
35 * that both that copyright notice and this permission notice appear
36 * in supporting documentation. The author makes no representations
37 * about the suitability of this software for any purpose. It is
38 * provided "as is" without express or implied warranty.
41 static char *Copyright = "Copyright (C) 1990-1994 Quinn C. Jensen";
46 * This small program converts the a56.out file from the assembler
47 * into a file suitable for loading into 56001 memory via the
48 * SLOADER.ASM serial loader program provided on the Motorola
69 if(sscanf(buf, "%c%x%x", &seg, &addr, &data) == 3) {
70 if(seg == 'I' || seg == 'F') break;
71 if(seg != curseg || curaddr != addr) {
72 printf("\n_DATA %c %04X\n", curseg = seg, curaddr = addr);
74 if(startaddr == -1 && seg == 'P')
76 printf("%06X ", data & 0xFFFFFF);
80 printf("\n_END %04X\n", startaddr);