www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/06/13/08:05:13

Date: Fri, 13 Jun 2003 15:02:01 +0300 (EET DST)
From: Esa A E Peuha <peuha AT cc DOT helsinki DOT fi>
Sender: peuha AT sirppi DOT helsinki DOT fi
To: djgpp-workers AT delorie DOT com
Subject: Slight bug in djasm
Message-ID: <Pine.OSF.4.51.0306131453080.10989@sirppi.helsinki.fi>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

The following input to djasm

	.db	0x8000 .dup 0
	.stack
	.start
	mov	ax, 0x4c00
	int	0x21

produces the following map file

0x8005 bytes generated, 0x8005 bytes in file, 0x8005 bytes total, 1 symbols

Start Stop  Length Name Class
0000H 8004H 8005H  code code

Address    Symbols by Name

0000:0000  __zero__ (?)

Address    Symbols by Value

0000:0000  __zero__ (?)


Line numbers for (djasmbug)
    1 0000:0000     4 0000:FFFF8000     5 0000:FFFF8003

The addresses on the last line are printed improperly.  I suggest the
following patch to fix this (which will also allow up to 65535 lines
per file):

Index: djasm.y
===================================================================
RCS file: /cvs/djgpp/djgpp/src/djasm/djasm.y,v
retrieving revision 1.1
diff -u -r1.1 djasm.y
--- djasm.y	24 Feb 2003 16:54:21 -0000	1.1
+++ djasm.y	13 Jun 2003 12:00:55 -0000
@@ -81,8 +81,8 @@
 int strbuflen;

 typedef struct {
-  short line;
-  short addr;
+  unsigned short line;
+  unsigned short addr;
   char *name;
 } lineaddr_s;


-- 
Esa Peuha
student of mathematics at the University of Helsinki
http://www.helsinki.fi/~peuha/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019