]> git.sur5r.net Git - cc65/blob - libsrc/apple2/diocommon.s
Adds test code for the Atari (xex) linker file format.
[cc65] / libsrc / apple2 / diocommon.s
1 ;
2 ; Oliver Schmidt, 24.03.2005
3 ;
4
5         .export         dioprolog, diocommon, dioepilog
6         .import         popax
7
8         .include        "errno.inc"
9         .include        "mli.inc"
10
11 dioprolog:
12         ; Set buffer
13         sta     mliparam + MLI::RW_BLOCK::DATA_BUFFER
14         stx     mliparam + MLI::RW_BLOCK::DATA_BUFFER+1
15
16         ; Get and set sect_num
17         jsr     popax
18         sta     mliparam + MLI::RW_BLOCK::BLOCK_NUM
19         stx     mliparam + MLI::RW_BLOCK::BLOCK_NUM+1
20
21         ; Get and set handle
22         jsr     popax
23         sta     mliparam + MLI::RW_BLOCK::UNIT_NUM
24         rts
25
26 diocommon:
27         ; Call read_block or write_block
28         ldx     #RW_BLOCK_COUNT
29         jsr     callmli
30
31 dioepilog:
32         ; Return success or error
33         sta     __oserror
34         ldx     #$00
35         rts