I'm currently trying to perform maintenance on a bunch of code that to me was completely unknow until a few days ago. While looking around I think the code corresponds to a 65816 machine (which is part of the 6502 family right).
The code was developed by a third party company which has been dissolved and my client is asking me to alter some parts of that code. I have been unable to locate the developers in order to determine what specific platform and compiler they were using,
I compared the assembler instructions in my code against the instructions provided in the 6502 family and I'm pretty sure that this is the correct processor (besides, there are a few C files called XXX65816.c, that gives you a hint
).
So far so good now the problem becomes how do I compile the code? The original developers used a lot of assembler code inside C files, for instance:
.asm
INCLUDE 4205ADD.ASM
INCLUDE 4205RAM.ASM
EXTERNAL SMALLCHARMAP,MEDIUMCHARMAP,LARGECHARMAP
EXTERNAL TILES,ICONS,PALTABLE
external c65816rt_startup
external _deltatotalin
; some more code
;********************************************************
;Macros section
;********************************************************
MEM16 EQU $20
IND16 EQU $10
;----------------------------------------------------------------
16BIT_ACCA .MACRO
LONGA ON
REP #BIT_5
ENDM
8BIT_ACCA .MACRO
LONGA OFF
SEP #BIT_5
ENDM
;----------------------------------------------------------------
ON16MEM .MACRO
; some more code
INIT_CLK:
8BIT_ACCA
LDA #1 ;TEST=0,24/12=0,STOP=0,RESET=1
STA CLKF
LDA #7 ;T1 T0=1 (1SECOND), INTRPT/STND=0 (INT)
STA CLKE ;MASK=1 (IRQ OUTPUT)
LDA #0 ;30S=0,IRQF=X,BUSY=X,HOLD=0
STA CLKD
STA SHCLKCD ;STORE SHADOW OF CLKCD
LDA #4 ;TURN RESET OFF
STA CLKF
stz SETCLFLAG
16BIT_ACCA
RTS
I also found several references to "4205"; they had a file called 4205kern.c I don't if it could be related to a specific machine that uses a 65816.
Any hints about the possible compilers are appreciated