1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-26 08:32:00 +00:00
cc65/libsrc/geos-common/dlgbox/dlgboxfileselect.s
ol.sc 2bf9cd2ee1 Moved the first couple of files from 'geos-cbm' to 'geos-common' which are believed to work as-is on Apple GEOS too.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5435 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-04 13:47:31 +00:00

60 lines
974 B
ArmAsm

;
; Maciej 'YTM/Elysium' Witkowiak
;
; 25.12.99
; char DlgBoxFileSelect (char *class, char ftype, char *fname);
.export _DlgBoxFileSelect
.import popa, popax
.import _DoDlgBox
.include "jumptab.inc"
.include "geossym.inc"
.include "const.inc"
.include "geosmac.ca65.inc"
.code
_DlgBoxFileSelect:
sta tmp_r5
stx tmp_r5+1
jsr popa
sta tmp_r7L
jsr popax
sta tmp_r10
stx tmp_r10+1
DB_FS_reload:
MoveW tmp_r5, r5
MoveW tmp_r10, r10
MoveB tmp_r7L, r7L
lda #<paramStrFileSelect
ldx #>paramStrFileSelect
jsr _DoDlgBox
cmp #DISK
bne DB_FS_Fin
jsr OpenDisk
txa
beq DB_FS_reload
DB_FS_Fin: rts
.rodata
paramStrFileSelect:
.byte DEF_DB_POS | 1
.byte DBGETFILES, 4, 4
.byte OPEN, DBI_X_2, DBI_Y_0+16
.byte DISK, DBI_X_2, DBI_Y_0+32+1
.byte CANCEL, DBI_X_2, DBI_Y_0+64+3
.byte NULL
.bss
tmp_r5: .res 2
tmp_r7L: .res 1
tmp_r10: .res 2