diff --git a/linker.conf b/linker.conf index 2855668..bcc4c99 100644 --- a/linker.conf +++ b/linker.conf @@ -1,8 +1,12 @@ MEMORY { - ROM: start = $8000, size = $8000, type = ro, file = %O, fill = yes; - RAM: start = $0000, size = $5fff, type = rw, file = "", fill = yes; + RAM_ZP: start = $0000, size = $100, type = rw, file = "", fill = yes; + RAM: start = $0100, size = $5eff, type = rw, file = "", fill = yes; + VIA1: start = $6000, size = $600f, type = rw, file = "", fill = yes; + VIA2: start = $7000, size = $700f, type = rw, file = "", fill = yes; + ROM: start = $8000, size = $8000, type = ro, file = %O, fill = yes; } SEGMENTS { + ZP: load = RAM_ZP, type = bss, start = $0; RAM: load = RAM, type = bss; CODE: load = ROM, type = ro; RODATA: load = ROM, type = ro; diff --git a/system/ram.s65 b/system/ram.s65 new file mode 100644 index 0000000..39f9a19 --- /dev/null +++ b/system/ram.s65 @@ -0,0 +1,31 @@ + + +.segment "ZP" + .org 0 + .byte NULL + .org $10 + .byte ARG0 + .byte ARG1 + .byte ARG2 + .byte ARG3 + .byte ARG4 + .byte ARG5 + .byte ARG6 + .byte ARG7 + .byte ARG8 + .byte ARG9 + .byte ARG10 + .byte ARG11 + .byte ARG12 + .byte ARG13 + .byte ARG14 + .byte ARG15 + + + +.segment "RAM" + +.segment "SPI" + .byte SPI_BYTES_WRITTEN + .byte SPI_PAGES_WRITTEN + .byte