1
0
mirror of https://github.com/cc65/cc65.git synced 2025-04-06 20:37:16 +00:00

Apple II: Document BLTU alternative

This commit is contained in:
Colin Leroy-Mira 2025-03-06 17:20:23 +01:00 committed by Oliver Schmidt
parent 020fe4028a
commit c8eb6e2dd5
3 changed files with 22 additions and 1 deletions

View File

@ -92,7 +92,28 @@ several useful settings:
</descrip><p>
<descrip>
<tag/Installing your code in the Language Card/
The code in the LC segment will automatically be copied from the end of the
binary into the Language Card at startup, even if the segment is empty (a
0-byte copy). This allows for tighter code. This code will be copied using the
Applesoft BLTU2 function that is available starting with the Apple ][+,
but not in the original Apple ][ with an Integer BASIC ROM. This shows as
a "RANGE ERROR. STOPPING AT ..." message on startup.
If you want to target the Integer BASIC original Apple ][, you can link in an
alternative implementation of the LC segment loading, at the cost of linking
in memcpy (60 bytes):
Using <tt/apple2-integer-basic-compat.o/ is as simple as placing it on the linker
command line like this:
<tscreen><verb>
cl65 -t apple2 myprog.c apple2-integer-basic-compat.o
</verb></tscreen>
</descrip>
<sect>Linker configurations<label id="link-configs"><p>

View File

@ -122,7 +122,7 @@ basic: lda HIMEM
; Call into Applesoft Block Transfer Up -- which handles zero-
; sized blocks well -- to move the content of the LC memory area.
jsr bltu2 ; BLTU2
jsr bltu2
; Switch in LC bank 2 for R/O and return.
bit $C080