Re: [cc65] C64 fast-loader suggestion?

From: <silverdr1wfmh.org.pl>
Date: 2011-12-12 15:24:23
On 2011-12-12, at 14:46, Oliver Schmidt wrote:

> Hi,
> 
>> I guess it is because fopen()/fread() most probably uses "CHRIN" KERNAL calls while cbm_load uses "LOAD" KERNAL call. When doing I/O on a 64 LOAD was always preferred whenever possible due to being exactly much faster and not requiring "babysitting" ;-) Only when portions of the data had to be parsed or otherwise taken care of on the fly, CHRIN was used. OTOH while good speeders help speeding both LOAD and CHRIN operations, yet LOAD remains faster in any case.
> 
> Ah, thanks for providing that background - which most likely is
> evident for about everybody else following this thread :-)
> 
> BTW: It actually calls BASIN (at $FFCF).

It's the same call :-) I use what my best resource ("Mapping The Commodore 64") used:

65487 ($FFCF) CHRIN  (via 804 ($324) to 61783, $F157) input a character
65490 ($FFD2) CHROUT (via 806 ($326) to 61898, $F1CA) output a character

"BAS"IN makes me believe it is BASIC related call or something ;-) "Mapping" uses (logical for me) CHRIN/CHROUT.

> Obviously the next naive question is why the C library then doesn't
> use LOAD to implement read(). Usually read() is implemented based on
> rather "direct" "low level" APIs. Even if that means that
> stdin/console input must explicitly dispatched at C library level. The
> Apple II implementation of read() is an example for that...

Well - this one need to be answered by someone else ...

-- 
SD!


----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Dec 12 15:24:30 2011

This archive was generated by hypermail 2.1.8 : 2011-12-12 15:24:33 CET