The kernel works only a rom. The code must be done in assembly only with XA. Variables can be used in RAM.

The source code is here :

There is 3 banks

src/bank7.asm is the primitive bank, each time a BRK is called, it switch to this bank
src/bank6.asm contains a modifyied atmos rom (some bytes are changed, and there is not test rom)
src/bank5.asm contains functions and interpreter

6502 & 65C02

for specific 65C02 code, please use #ifdef CPU_65C02

example :

#ifdef CPU_65C02
    bra next
    ; 6502 only
    jmp next

Optimizing code

use 'jsr' when you are in 7th bank (main bank) instead of BRK

new hardware

If you implement new hardware in the kernel, please use #ifdef WITH_XXX

If you manage FDC :

#ifdef WITH_FDC1793