Subject: pkg/12197: Incorrect srecord format from 8031/8051 assembler
To: None <gnats-bugs@gnats.netbsd.org>
From: Per Amund Amundsen <pa@bsd-amundsen.ux.his.no>
List: netbsd-bugs
Date: 02/12/2001 15:59:32
>Number: 12197
>Category: pkg
>Synopsis: 8031/8051 assembler generates incorrect srecord format
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Feb 12 07:00:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Per Amund Amundsen
>Release: Package as31-19900126
>Organization:
Per Amund Amundsen per-am@ux.his.no
School of Science and Technology per.a.amundsen@tn.his.no
Stavanger University College Tlf: (+47) 51 83 18 77
PO Box 2557 Ullandhaug, N-4091 Stavanger Fax: (+47) 51 83 17 50
>Environment:
System: NetBSD bsd-amundsen 1.5 NetBSD 1.5 (BSDA2) #11: Mon Feb 5 16:40:24 MET 2001 pa@bsd-amundsen:/usr/src/sys/arch/i386/compile/BSDA2 i386
>Description:
The as31 assembler from the as31-19900126 (yes, the source
code is from 1990!) package produces output in srecord format
differing from that of my own old as31 assembler. The latter
agrees with the one produced by the as31 maintained at
<http://www.pjrc.com/tech/8051/>.
>How-To-Repeat:
$cat tst.asm
.ORG 0x0000
mov A, R0
ret
$/usr/pkg/bin/as31 -Fsrec2 tst.asm
$cat tst.obj
S0030000FC
S1050000E822F0
S9030000FC
$/usr/local/bin/as31 -Fsrec2 tst.asm
$cat tst.srec
S0030000FC
S1060000E822EF
S9030000FC
Although the actual code generated is the same (this is
generally so), the record length information in the lines
starting with S1 is different (05 vs 06 in the second byte),
as is the checksum (F0 vs EF in the last byte). This breaks
applications.
>Fix:
Replace as31 by the one maintained by PJRC.COM at
<http://www.pjrc.com/tech/8051/>.
This also gets us new and improved features, and even the
possibility of a GTK interface (which should be packaged
separately, if adopted!). I found the Beta 2.1 version to be
stable, but Beta 2.2 dumps core assembling the test programs
included with the package (srecord 2 format). They compile out
of the box.
>Release-Note:
>Audit-Trail:
>Unformatted: