]> git.sur5r.net Git - cc65/blob - libsrc/geos-cbm/dlgbox/dlgboxfileselect.s
4e34f10454c69e05fb09639f1b9fa9b48291017f
[cc65] / libsrc / geos-cbm / dlgbox / dlgboxfileselect.s
1
2 ;
3 ; Maciej 'YTM/Elysium' 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                 .import _DoDlgBox
12
13                 .include "jumptab.inc"
14                 .include "geossym.inc"
15                 .include "const.inc"
16                 .include "geosmac.ca65.inc"
17
18 .code
19
20 _DlgBoxFileSelect:
21
22                 sta tmp_r5
23                 stx tmp_r5+1
24                 jsr popa
25                 sta tmp_r7L
26                 jsr popax
27                 sta tmp_r10
28                 stx tmp_r10+1
29
30 DB_FS_reload:
31                 MoveW tmp_r5, r5
32                 MoveW tmp_r10, r10
33                 MoveB tmp_r7L, r7L
34
35                 lda #<paramStrFileSelect
36                 ldx #>paramStrFileSelect
37                 jsr _DoDlgBox
38                 cmp #DISK
39                 bne DB_FS_Fin
40                 jsr OpenDisk
41                 txa
42                 beq DB_FS_reload
43 DB_FS_Fin:      rts
44
45 .rodata
46
47 paramStrFileSelect:
48                 .byte DEF_DB_POS | 1
49                 .byte DBGETFILES, 4, 4
50                 .byte OPEN, DBI_X_2, DBI_Y_0+16
51                 .byte DISK, DBI_X_2, DBI_Y_0+32+1
52                 .byte CANCEL, DBI_X_2, DBI_Y_0+64+3
53                 .byte NULL
54
55 .bss
56
57 tmp_r5:         .res 2
58 tmp_r7L:        .res 1
59 tmp_r10:        .res 2