]> git.sur5r.net Git - cc65/blob - libsrc/geos/dlgbox/dlgboxfileselect.s
This commit was generated by cvs2svn to compensate for changes in r2,
[cc65] / libsrc / geos / dlgbox / dlgboxfileselect.s
1
2 ;
3 ; Maciej 'YTM/Alliance' Witkowiak
4 ;
5 ; 25.12.99
6
7 ; char DlgBoxFileSelect       (char *class, char ftype, char *fname);
8
9                 .export _DlgBoxFileSelect
10                 .import popa, popax
11
12                 .include "../inc/jumptab.inc"
13                 .include "../inc/geossym.inc"
14                 .include "../inc/const.inc"
15                 .include "../inc/geosmac.ca65.inc"
16
17 _DlgBoxFileSelect:
18 ;           sta r5L
19 ;           stx r5H
20 ;           jsr popa
21 ;           sta r7L
22 ;           jsr popax
23 ;           sta r10L
24 ;           stx r10H
25
26                 sta tmp_r5
27                 stx tmp_r5+1
28                 jsr popa
29                 sta tmp_r7L
30                 jsr popax
31                 sta tmp_r10
32                 stx tmp_r10+1
33
34 DB_FS_reload:
35                 MoveW tmp_r5, r5
36                 MoveW tmp_r10, r10
37                 MoveB tmp_r7L, r7L
38
39                 lda #<paramStrFileSelect
40                 ldx #>paramStrFileSelect
41                 sta r0L
42                 stx r0H
43                 jsr DoDlgBox
44                 lda r0L
45                 cmp #DISK
46                 bne DB_FS_Fin
47                 jsr OpenDisk
48                 txa
49                 beq DB_FS_reload
50 DB_FS_Fin:      rts
51
52 paramStrFileSelect:
53                 .byte DEF_DB_POS | 1
54                 .byte DBGETFILES, 4, 4
55                 .byte OPEN, DBI_X_2, DBI_Y_0+16
56                 .byte DISK, DBI_X_2, DBI_Y_0+32+1
57                 .byte CANCEL, DBI_X_2, DBI_Y_0+64+3
58                 .byte NULL
59
60 tmp_r5:         .word 0
61 tmp_r7L:        .byte 0
62 tmp_r10:        .word 0