Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #6053

cc65 / apple2 HGR2 linker configuration

From Colin Leroy-Mira <colin@colino.net>
Newsgroups comp.sys.apple2.programmer
Subject cc65 / apple2 HGR2 linker configuration
Date 2023-07-28 21:53 +0200
Organization A noiseless patient Spider
Message-ID <20230728215344.0522a00e@laptop-sigfox> (permalink)

Show all headers | View raw


Hi there,

I'm hoping Oliver will see this message :) I've worked a bit on a
linker configuration allowing my program to live from $803 to $3FFF and
use the HGR2 page. The program worked well using HGR1, but its code
can't live entirely between $803 and $1FFF, so it's much bigger than
needed on disk, having 8kB of zeroes on HGR1.

I've managed to make this linker config:
https://github.com/colinleroy/a2tools/blob/master/config/apple2enh-hgr2.cfg

It seems to work good and safe. I checked that the linker errors out if
I put too much code and it crosses the $4000 boundary; I've also
checked that malloc() does the right thing, not touching HGR
page 2 (it starts allocating at $6000 + BSS size + stack size).

I'd love a second opinion though :)

Thanks!
-- 
Colin
https://www.colino.net/

Back to comp.sys.apple2.programmer | Previous | NextNext in thread | Find similar


Thread

cc65 / apple2 HGR2 linker configuration Colin Leroy-Mira <colin@colino.net> - 2023-07-28 21:53 +0200
  Re: cc65 / apple2 HGR2 linker configuration ol.sc@web.de (Oliver Schmidt) - 2023-07-29 15:22 +0000
    Re: cc65 / apple2 HGR2 linker configuration Colin Leroy-Mira <colin@colino.net> - 2023-07-30 15:13 +0200
      Re: cc65 / apple2 HGR2 linker configuration Colin Leroy-Mira <colin@colino.net> - 2023-07-30 16:24 +0200
        Re: cc65 / apple2 HGR2 linker configuration Oliver Schmidt <ol.sc@web.de> - 2023-07-31 17:59 +0000

csiph-web