News:

;) This forum is the property of Proton software developers

Main Menu

How to alter starting address?

Started by PicNoob, May 25, 2022, 08:38 PM

Previous topic - Next topic

PicNoob

Hi,

I'm migrating my code from an older version of proton to the newest version. One command I used in the old version was:

Declare PROTON_START_ADDRESS = 0x400

I do this because the first 0x400 bytes are used for a boot loader. And then I have the boot loader set to redirect interrupts with:

On_Hardware_Interrupt GoTo vector_remap ; RE-MAP INT VECTORS

Org $0x404
vector_remap:

Anyway, this PROTON_START_ADDRESS is no longer defined in the new compiler. Any ideas on what it was replaced with?

Also just to check, did the interrupt wrapper functions remain the same? I use:

High_Int_Sub_Start
HIGH_INTERRUPT_ROUTINE:
Context Save

Context Restore             'Exit ISR and re-enable interrupts
High_Int_Sub_End
 
Thanks!

Mapo

Hello PicNoob
use this

Declare COMPILER_START_ADDRESS = $400

PicNoob

Perfect, that worked!

The last broken commands (I think) are the interrupt wrapper:

High_Int_Sub_Start
HIGH_INTERRUPT_ROUTINE:
Context Save

Context Restore             'Exit ISR and re-enable interrupts
High_Int_Sub_End

At compile time it gives the following error: High_Int_Sub_Start or Int_Sub_Start directive has not been issued. But the Start command is there above the interrupt. Maybe the context of how to implement similarly changed?

top204

#3
They are no longer needed.

The compiler automatically wraps the interrupt when it sees the Context Save/Restore, and knows which ones are for High and Low priority interrupts.

PicNoob