CCS64 Forum

A forum to discuss issues about CCS64!
It is currently Mon Dec 11, 2017 5:53 am

All times are UTC + 2 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Tue Aug 08, 2006 11:47 am 
Offline

Joined: Tue Aug 08, 2006 11:43 am
Posts: 3
Suppose I use the save command in the monitor like this:
s "filename.bin" 2000 2200

It saves 0x200 bytes, not 0x201.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 09, 2006 4:22 am 
Offline

Joined: Wed Aug 25, 2004 11:57 pm
Posts: 5
That seems to me like correct behavior. Traditionally, C= MLMs have the following S command:

S "FILENAME" <start> <end+1>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 10, 2006 9:34 am 
Offline

Joined: Thu Aug 21, 2003 4:58 pm
Posts: 22
:shock: I tried it out by saving block C000-CFFF expecting the save to be 4096 bytes. However, it did not. There were only 4095 bytes. Apparently the last byte at CFFF is missing.

However, it al depends on the command specifications which I don't have at hand. If it reads Til then all is well, if it reads Until then one byte is missing.

I tried saving the entire ram (0000-FFFF).
It contains 65535 bytes (0-65534).
Where is the missing byte?
:lol:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 10, 2006 5:42 pm 
Offline
Site Co-Admin

Joined: Wed Aug 20, 2003 2:46 pm
Posts: 786
Location: East Yorkshire, England
I have passed this on to Hakan for investigation.

_________________
Kind regards,

Stuart Toomer.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 10, 2006 8:02 pm 
Offline

Joined: Thu Jun 22, 2006 2:39 pm
Posts: 11
Location: Michigan
RFBcsa wrote:
:shock: I tried it out by saving block C000-CFFF expecting the save to be 4096 bytes. However, it did not. There were only 4095 bytes. Apparently the last byte at CFFF is missing.

However, it al depends on the command specifications which I don't have at hand. If it reads Til then all is well, if it reads Until then one byte is missing.

I tried saving the entire ram (0000-FFFF).
It contains 65535 bytes (0-65534).
Where is the missing byte?
:lol:

Again, as localh has stated, that's normal. In all the machine language monitors for the Commodore I've used, including the one I wrote, the end address is always +1. When you wish to save C000-CFFF, you use C000-D000. It's simply because that's the way the CBM Kernal was written. It saves a byte, increases the register, compares the register to the end, and when it's equal then it quits before it saves another byte. If it were to save another byte as you expected, then they would've had to specially add that into the program. Learn to deal with it.

_________________
Anything is possible, when you don't know what you're talking about.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 10, 2006 10:36 pm 
Offline
Site Co-Admin

Joined: Wed Aug 20, 2003 2:46 pm
Posts: 786
Location: East Yorkshire, England
Reply from Hakan:

This is not a bug, it is working like it should. In CCS64, as well as in the majority of all C64 native machine code monitors (e.g. Hes-mon), all end-addresses are specified as non-inclusive (up to address but not including). To save entire C64 RAM, “s filename 0000 0000” is correct syntax.

_________________
Kind regards,

Stuart Toomer.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 24, 2006 6:11 am 
Offline

Joined: Thu Aug 21, 2003 4:58 pm
Posts: 22
Thanks for the information Donski, Stuart.
I've learned something today.

In 'those days' I used the Power Cartridge's build in monitor to go into the memory. Just as an extra I looked up the Save command in the manual but there wasn't anything mentioned about the issue. It only states S "filename",[device],[begin address],[end address]. So I tested it with the Cartridge Rom I have and I can say that it also output without the 1 byte. I guess this is something that completely slipped by me when I was using the monitor at the time.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 15, 2006 2:08 pm 
Offline

Joined: Sun Oct 15, 2006 1:51 pm
Posts: 10
RFBcsa wrote:
I tried saving the entire ram (0000-FFFF).
It contains 65535 bytes (0-65534).
Where is the missing byte?

To get the missing byte use '10000' as end address! :P

Ciao,
Michael


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 15, 2006 4:22 pm 
Offline

Joined: Thu Jun 22, 2006 2:39 pm
Posts: 11
Location: Michigan
Michael Plate wrote:
RFBcsa wrote:
I tried saving the entire ram (0000-FFFF).
It contains 65535 bytes (0-65534).
Where is the missing byte?

To get the missing byte use '10000' as end address! :P

Ciao,
Michael

I can't say about the CCS64 monitor as I haven't tried that yet, but I know that in some machine language monitors it wouldn't work. The reason is that they will use the 1st 4 characters, so 10000 would be the same as 1000.

Oh yeah, just in case anyone is checking, these numbers are wrong,,,
Quote:
It contains 65535 bytes (0-65534).

it should read,,,
It contains 65536 bytes (0-65535).
Even the numbers you typed were missing a byte.

_________________
Anything is possible, when you don't know what you're talking about.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 15, 2006 9:52 pm 
Offline

Joined: Thu Aug 21, 2003 4:58 pm
Posts: 22
Just my point, it didn't save the entire memory.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group