]> git.sur5r.net Git - cc65/blob - libsrc/atari/dioread.s
Updated (and sorted) sample program info.
[cc65] / libsrc / atari / dioread.s
1 ;
2 ; Christian Groessler, October 2000
3 ;
4 ; this file provides the _dio_read function
5 ;
6 ; unsigned char __fastcall__ dio_read(dhandle_t handle,sectnum_t sect_num,void *buffer);
7 ; dhandle_t - 16bit (ptr)
8 ; sectnum_t - 16bit
9 ;
10
11         .import         __sio_call,pushax
12         .export         _dio_read
13         .include        "atari.inc"
14
15 .proc   _dio_read
16
17         jsr     pushax          ; push buffer address
18         ldx     #%01000000      ; direction value
19         lda     #SIO_READ       ; read sector command
20         jmp     __sio_call      ; do the call and return to the user
21
22 .endproc
23