Re: [cc65] Raster interrupts on Plus/4

From: Janne Peräaho <janne.peraaho1suomi24.fi>
Date: 2015-08-21 23:01:40
Hello,

I wrote the following short program to test interrupts on Plus/4:

#include <6502.h>
#include <plus4.h>

#define TEMP_STACK_SIZE 2048

void main ( void );
unsigned char f_IntRoutine ( void );

unsigned char aucTempStack [ TEMP_STACK_SIZE ];

void main ( void ) {
     SEI ();
     set_irq (
         &f_IntRoutine,
         aucTempStack, TEMP_STACK_SIZE
     );
     CLI ();

     for ( ;; ) { }
}

unsigned char f_IntRoutine ( void ) {
     ++TED.bordercolor;

     return ( IRQ_NOT_HANDLED );
}

When I compile and link the program with cl65, I get these two warnings:

d65: Warning: cc65:cfg/plus4.cfg(22): Segment `BSS' with type `bss' 
contains initialized data

ld65: Warning: Address size mismatch for `__ZP_START__': Exported from 
cc65:cfg/plus4.cfg(7) as `absolute', import in interrupt.o, 
common/interrupt.s(11) as `zeropage'

If I run the program, it doesn't work: Plus/4 encounters a break 
instruction which stops the execution.

The target system is 'plus4' and I'm using the default linker 
configuration file for the Plus/4.

Is there something wrong with my set_irq call? I was unsure what the 
stack size should be.

-- 
Janne Peräaho
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Aug 21 23:11:09 2015

This archive was generated by hypermail 2.1.8 : 2015-08-21 23:11:12 CEST