On 22.05.2016 00:11, Andreas Kohlbach wrote:
On Sat, 21 May 2016 08:38:06 +0000 (UTC), qsdf88 wrote:
On Tue, 17 May 2016 15:17:56 -0400, Andreas Kohlbach wrote:
I was trying to code some 6510 assembler using the monitor
program of VICE. Besides I don't get it to work at this point I
wonder what medium type I did create when using the save function
of the monitor to write it to the file system of the host (not to
the C64). I gave it a .prg extension.
The program "file" in Linux just says it would be "data". I can
use "smart attach" in VICE to load it into the C64. But I can not
attach it as floppy image, tape image or cartridge. I always get
"invalid image".
What kind of file does the monitor program of VICE create?
It does not have a file type. Machine code is saved as raw data, it
does not have any header at all. It contains nothing but the code
you
entered,
and that can be anything.
I saw in the logging messages from VICE now it is a p00 file.
For example, this small program at $C000:
C000 INC $D020 C003 JMP $C000
can be saved as just six bytes. The created file will only be six
bytes long and contain nothing but the numeric value of the
instructions of your program. In this case, this would be:
EE, 20 DO, 4C, 00, C0.
Later you can load these instructions back into memory using the L
command.
I seem to also be able to save the program from within VICE to for
example a file on a 1541 floppy drive.
But if it's saved using device "0" to the file system of the host
from inside the monitor program it's a p00 file.
If you create a commodore file, from for example program on top, it
should contain following bytes:
00 C0 EE 20 D0 4C 00 C0
The first two is the loading address. Then comes the actual code in hex
bytes. If the two first bytes are missing, then commodore loads the file
as default to $20EE that is not desired nor working. So the .prg program
format is:
<load addr lo><load addr hi><code>
If you want it to be basic LOADable on a commodore computer, be it a
VIC, C64, Pet, C128 or anything made by commodore, the file format is
always that. Geos file format is different.
If you want to make programs by cross-compiling for c64, get cc65
package or acme 65816 compiler. I have used acme 65816 compiler and have
found it being good for developing for c64. It is able to output
directly loadable program code for VICE or c64.
---
news://freenews.netfront.net/ - complaints:
[email protected] ---
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)