4 ; Originally by Bastian Schick
5 ; http://www.geocities.com/SiliconValley/Byte/4242/lynx/
7 ; Ported to cc65 (http://www.cc65.org) by
8 ; Shawn Jefferson, June 2004
12 ; void __fastcall__ read_cart_block(unsigned char block, char *dest)
14 ; Reads an entire block (1024 bytes) from the cartridge into the buffer
18 .export _read_cart_block
19 .import FileSelectBlock, FileReadBytes
27 ;*******************************************
28 ; void read_cart_block (unsigned char block, char *dest);
29 ; loads one Block (1024 bytes) to pDest
33 stx _FileDestPtr+1 ; hi
38 jsr FileSelectBlock ; select block# (Accu)
40 lda #<1024 ; load a whole block (1024 bytes)