Kieran D

Setting Origin using C using HC(S)08 on the MC9S08GB60A

Discussion created by Kieran D on Dec 1, 2009
Latest reply on Dec 2, 2009 by bigmac

We have a program which downloads data via serial comms in to RAM. Which is then executed. For easy coding we are using C to code the block of code which is uploaded to the micro's RAM. This block of code changes depending on what is sent down the serial.

 

In asm instructions we would do the following

 

ASM: 

;[use serial to download set of opcodes into $0100]

;then once download is complete

ORG $0100

;[code stored in memory now runs.]

 

 

How would one do this in C? We are having trouble figuring out how to define an 'origin' in C so that this new code that is downloaded into RAM can be run. 

 

We are using a MC9S08GB60A.

 

Any help will be awesome! 

 

 

Outcomes