[cc65] Error in cbm_load - first 2 bytes missing

From: Andreas Koch <email1kochandreas.com>
Date: 2007-09-02 16:31:49
Hi all,

while debugging my project ( too bad that those type infos are missing), 
i noticed that cbm_load seems to omit the first two bytes of the file
loaded. I couldn't find that in the known bugs section, so i'll post
it here.
To reproduce the bug,cut the following section and save as "error.c". 
Compile with 2.11.0 to prg in same directory, start vice 1.16 on winXP 
with the prg as command line parameter.

The program should print its first 40 chars, "/*demo for ...".
Unfortunately it only prints "demo for ...", the first two bytes
are missing.

***file start***
/*demo for cbm_load error */

#include <stdio.h>
#include <time.h>
#include <conio.h>
#include <cbm.h>
#include <dbg.h>
#include <stdlib.h>
#include "cbm.h"

unsigned char memory[1024];

int main()
{
   unsigned char drive = 8;

   cbm_load("ERROR.C",drive,memory);
   memory[40]=0;
   printf("Result:\n%s",memory);	
   cgetc();
}
***file end****






----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Sep 2 16:30:56 2007

This archive was generated by hypermail 2.1.8 : 2007-09-02 16:30:59 CEST