llvm-mos / llvm-mos-sdk

SDK for developing with the llvm-mos compiler
https://www.llvm-mos.org
Other
258 stars 52 forks source link

cx16 kernal name confusion: cx16_k_savehl vs cbm_k_savehl #242

Closed bcampbell closed 8 months ago

bcampbell commented 8 months ago

cx16_k_savehl is declared in cx16.h and implemented in mos-platform/cx16/cx16_k_savehl.s.

cx16_k_savehl is exported, but the actual label used on the routine is cbm_k_savehl. So when you try and link, it can't find it.

Also, the cx16 kernal docs use the name BSAVE instead (same entry address as SAVEHL: $FEBA). The cx16 kernal docs claim BSAVE is a cx16-specific routine, but now I'm wondering if other commodore kernals (128/+4/etc) had it as SAVEHL?

mysterymath commented 8 months ago

@XarkLabs

XarkLabs commented 8 months ago

I will look into this. This HL is like BSAVE, but without a two byte header IIRC...

XarkLabs commented 8 months ago

This cx16 call was previously undocumented and I was using internal name "savehl", now it is properly documented as BSAVE, so #243 renames llvm-mos-sdk cx16 function and vector to use documented name.

bcampbell commented 8 months ago

Ahh, thanks for that! Both for the fix and for casting some light on the history of it! Much appreciated.

XarkLabs commented 8 months ago

My pleasure. Thanks for mentioning it (and also pointing out my "typo" in the older version).