]> git.sur5r.net Git - cc65/blob - libsrc/geos/dlgbox/dlgboxfileselect.s
errno/oserrno stuff is cleaned up, saved some bytes in dialog box functions
[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                 .import _DoDlgBox
12
13                 .include "../inc/jumptab.inc"
14                 .include "../inc/geossym.inc"
15                 .include "../inc/const.inc"
16                 .include "../inc/geosmac.ca65.inc"
17
18 _DlgBoxFileSelect:
19
20                 sta tmp_r5
21                 stx tmp_r5+1
22                 jsr popa
23                 sta tmp_r7L
24                 jsr popax
25                 sta tmp_r10
26                 stx tmp_r10+1
27
28 DB_FS_reload:
29                 MoveW tmp_r5, r5
30                 MoveW tmp_r10, r10
31                 MoveB tmp_r7L, r7L
32
33                 lda #<paramStrFileSelect
34                 ldx #>paramStrFileSelect
35                 jsr _DoDlgBox
36                 cmp #DISK
37                 bne DB_FS_Fin
38                 jsr OpenDisk
39                 txa
40                 beq DB_FS_reload
41 DB_FS_Fin:      rts
42
43 paramStrFileSelect:
44                 .byte DEF_DB_POS | 1
45                 .byte DBGETFILES, 4, 4
46                 .byte OPEN, DBI_X_2, DBI_Y_0+16
47                 .byte DISK, DBI_X_2, DBI_Y_0+32+1
48                 .byte CANCEL, DBI_X_2, DBI_Y_0+64+3
49                 .byte NULL
50
51 tmp_r5:         .word 0
52 tmp_r7L:        .byte 0
53 tmp_r10:        .word 0