beebasm

changeset 26:d5660d5def2a

Bugfix to CLEAR when start==end. Improved documentation in Makefile.inc. Fixed DiscImage writes so that they are written to the correct DFS directory.
author RichTW <richtw1@gmail.com>
date Sun Feb 27 14:01:30 2011 +0100
parents 33bd79335c1e
children 4a2c231c59ff
files src/Makefile.inc src/discimage.cpp src/objectcode.cpp
diffstat 3 files changed, 17 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- a/src/Makefile.inc	Sun Feb 27 13:50:29 2011 +0100
     1.2 +++ b/src/Makefile.inc	Sun Feb 27 14:01:30 2011 +0100
     1.3 @@ -61,7 +61,8 @@
     1.4  
     1.5  ifndef PLATFORM
     1.6  # Do checks with $(shell uname -s) and/or $(OSTYPE) here to try to automatically determine
     1.7 -# the appropriate platform type
     1.8 +# the appropriate platform type.  Ultimately, the goal is to automatically set the make
     1.9 +# variable $(PLATFORM) to one of the values in PLATFORM_LIST, above.
    1.10  endif
    1.11  
    1.12  
     2.1 --- a/src/discimage.cpp	Sun Feb 27 13:50:29 2011 +0100
     2.2 +++ b/src/discimage.cpp	Sun Feb 27 14:01:30 2011 +0100
     2.3 @@ -168,7 +168,13 @@
     2.4  /*************************************************************************************************/
     2.5  void DiscImage::AddFile( const char* pName, const unsigned char* pAddr, int load, int exec, int len )
     2.6  {
     2.7 -	(void)pAddr;
     2.8 +	char dirName = '$';
     2.9 +
    2.10 +	if ( strlen( pName ) > 2 && pName[ 1 ] == '.' )
    2.11 +	{
    2.12 +		dirName = pName[ 0 ];
    2.13 +		pName += 2;
    2.14 +	}
    2.15  
    2.16  	if ( strlen( pName ) > 7 )
    2.17  	{
    2.18 @@ -256,7 +262,7 @@
    2.19  
    2.20  	// Write directory name
    2.21  
    2.22 -	m_aCatalog[ 15 ] = '$';
    2.23 +	m_aCatalog[ 15 ] = dirName;
    2.24  
    2.25  	// Write load address
    2.26  
     3.1 --- a/src/objectcode.cpp	Sun Feb 27 13:50:29 2011 +0100
     3.2 +++ b/src/objectcode.cpp	Sun Feb 27 14:01:30 2011 +0100
     3.3 @@ -304,10 +304,16 @@
     3.4  /*************************************************************************************************/
     3.5  void ObjectCode::Clear( int start, int end, bool bAll )
     3.6  {
     3.7 -	assert( start < end );
     3.8 +	assert( start <= end );
     3.9  	assert( start >= 0 && start < 0x10000 );
    3.10  	assert( end > 0 && end <= 0x10000 );
    3.11  
    3.12 +	// Nothing to do if start == end
    3.13 +	if ( start == end )
    3.14 +	{
    3.15 +		return;
    3.16 +	}
    3.17 +
    3.18  	if ( bAll )
    3.19  	{
    3.20  		// via CLEAR command