]> git.sur5r.net Git - cc65/blob - libsrc/apple2/sysremove.s
Adds test code for the Atari (xex) linker file format.
[cc65] / libsrc / apple2 / sysremove.s
1 ;
2 ; Oliver Schmidt, 15.04.2005
3 ;
4 ; unsigned char __fastcall__ _sysremove (const char* name);
5 ;
6
7         .export         __sysremove
8         .import         pushname, popname
9
10         .include        "zeropage.inc"
11         .include        "mli.inc"
12
13 __sysremove:
14         ; Push name
15         jsr     pushname
16         bne     oserr
17
18         ; Set pushed name
19         lda     sp
20         ldx     sp+1
21         sta     mliparam + MLI::DESTROY::PATHNAME
22         stx     mliparam + MLI::DESTROY::PATHNAME+1
23
24         ; Remove file
25         lda     #DESTROY_CALL
26         ldx     #DESTROY_COUNT
27         jsr     callmli
28
29         ; Cleanup name
30         jsr     popname         ; Preserves A
31
32 oserr:  rts