]> git.sur5r.net Git - cc65/blob - libsrc/apple2/mli.s
Fixed gcc compiler warning (#867)
[cc65] / libsrc / apple2 / mli.s
1 ;
2 ; Oliver Schmidt, 30.12.2004
3 ;
4 ; Apple ProDOS 8 MLI
5 ;
6
7         .import         __dos_type
8
9         .include        "apple2.inc"
10         .include        "mli.inc"
11
12         .bss
13
14 mliparam:.tag   MLI
15
16         .data
17
18 callmli:
19         ; Store parameters
20         sta     call
21         stx     mliparam
22
23         ; Check for ProDOS 8
24         lda     __dos_type
25         beq     oserr
26
27         ; Save random counter
28         lda     RNDL
29         pha
30         lda     RNDH
31         pha
32
33         ; Call MLI
34         jsr     $BF00           ; MLI call entry point
35 call:   .byte   $00
36         .addr   mliparam
37
38         ; Restore random counter and return
39         tax
40         pla
41         sta     RNDH
42         pla
43         sta     RNDL
44         txa
45         rts
46
47         ; Load oserror code and return
48 oserr:  lda     #$01            ; "Bad system call number"
49         sec
50         rts