├── dz.vcxproj ├── history.txt ├── license.txt ├── makefile ├── readme.md └── src ├── 7za.asm ├── CaptureScreen.asm ├── cmattrib.asm ├── cmcalendar.asm ├── cmchdrv.asm ├── cmclrcmdl.asm ├── cmcompare.asm ├── cmcompress.asm ├── cmcompsub.asm ├── cmcopy.asm ├── cmcopycell.asm ├── cmdelete.asm ├── cmdetail.asm ├── cmedit.asm ├── cmegaline.asm ├── cmenviron.asm ├── cmexit.asm ├── cmfilter.asm ├── cmhelp.asm ├── cmhidden.asm ├── cmhomedir.asm ├── cmlong.asm ├── cmmini.asm ├── cmmkdir.asm ├── cmmklist.asm ├── cmmkzip.asm ├── cmmove.asm ├── cmpath.asm ├── cmpfilter.asm ├── cmpsize.asm ├── cmquicksearch.asm ├── cmsavesetup.asm ├── cmsearch.asm ├── cmsearchidd.asm ├── cmselect.asm ├── cmsetup.asm ├── cmsort.asm ├── cmsubdir.asm ├── cmsubinfo.asm ├── cmswap.asm ├── cmsysteminfo.asm ├── cmtoggle.asm ├── cmupdate.asm ├── cmupdir.asm ├── cmuserscreen.asm ├── cmview.asm ├── cmwideview.asm ├── command.asm ├── config.asm ├── confirm.asm ├── conio.asm ├── deflate.asm ├── direct.asm ├── dos ├── alloc.asm ├── clip.asm ├── cmattrib.asm ├── cmcompar.asm ├── cmcopy.asm ├── cmdelete.asm ├── cmedit.asm ├── cmexit.asm ├── cmfilter.asm ├── cmhelp.asm ├── cmmemory.asm ├── cmmkdir.asm ├── cmmklist.asm ├── cmmkzip.asm ├── cmmove.asm ├── cmpanel.asm ├── cmquicks.asm ├── cmsubinf.asm ├── cmview.asm ├── com.asm ├── config.asm ├── confirm.asm ├── conio.asm ├── console.asm ├── crt.asm ├── ctype.asm ├── cursor.asm ├── dialog.asm ├── dir.asm ├── dos.asm ├── dzapi.asm ├── dzmain.asm ├── dzmodal.asm ├── dzzip.asm ├── emm.asm ├── errno.asm ├── fblk.asm ├── ff.asm ├── filter.asm ├── inc │ ├── alloc.inc │ ├── clip.inc │ ├── confirm.inc │ ├── conio.inc │ ├── ctype.inc │ ├── dir.inc │ ├── dos.inc │ ├── doserrls.inc │ ├── doszip.inc │ ├── dz.inc │ ├── dz.ini │ ├── dz.txt │ ├── dzidd.inc │ ├── dztiny.ini │ ├── dzzip.inc │ ├── errno.inc │ ├── fblk.inc │ ├── fcntl.inc │ ├── ff.inc │ ├── filter.inc │ ├── helpid.inc │ ├── ini.inc │ ├── io.inc │ ├── iost.inc │ ├── keyb.inc │ ├── libc.inc │ ├── macro.inc │ ├── math.inc │ ├── mouse.inc │ ├── progress.inc │ ├── share.inc │ ├── stat.inc │ ├── stdio.inc │ ├── stdlib.inc │ ├── string.inc │ ├── syserrls.inc │ ├── time.inc │ ├── tinfo.inc │ ├── tview.inc │ └── wsub.inc ├── ini.asm ├── io.asm ├── iost.asm ├── keyb.asm ├── main.asm ├── math.asm ├── menus.asm ├── mouse.asm ├── msgbox.asm ├── nalloc.asm ├── opfilter.asm ├── pal.asm ├── panel.asm ├── prect.asm ├── process.asm ├── progress.asm ├── res │ ├── ClipboardWarning.IDD │ ├── ConfirmContinue.IDD │ ├── ConfirmDelete.IDD │ ├── DZCompression.IDD │ ├── DZConfiguration.IDD │ ├── DZConfirmations.IDD │ ├── DZCopy.IDD │ ├── DZDecompress.IDD │ ├── DZDefaultColor.IDD │ ├── DZExit.IDD │ ├── DZFileAttributes.IDD │ ├── DZFindFile.IDD │ ├── DZHelp.IDD │ ├── DZHistory.IDD │ ├── DZMKList.IDD │ ├── DZMemory.IDD │ ├── DZMenuEdit.IDD │ ├── DZMenuFile.IDD │ ├── DZMenuHelp.IDD │ ├── DZMenuPanel.IDD │ ├── DZMenuSetup.IDD │ ├── DZMenuTools.IDD │ ├── DZMove.IDD │ ├── DZPanelFilter.IDD │ ├── DZPanelOptions.IDD │ ├── DZSaveSetup.IDD │ ├── DZScreenOptions.IDD │ ├── DZSubInfo.IDD │ ├── DZSystemOptions.IDD │ ├── DZZipAttributes.IDD │ ├── DirectoryNotFound.IDD │ ├── DriveNotReady.IDD │ ├── EditColor.IDD │ ├── OperationFilters.IDD │ ├── Replace.IDD │ ├── ReplacePrompt.IDD │ ├── Search.IDD │ ├── SystemError.IDD │ ├── TEOpenFiles.IDD │ ├── TEOptions.IDD │ ├── TEReload.IDD │ ├── TEReload2.IDD │ ├── TESave.IDD │ ├── TESeek.IDD │ ├── TVCopy.IDD │ ├── TVHelp.IDD │ ├── TVMenusline.IDD │ ├── TVSeek.IDD │ ├── TVStatusline.IDD │ ├── UnzipCRCError.IDD │ └── WOpenFile.IDD ├── setup.asm ├── shortkey.asm ├── stdio.asm ├── stdlib.asm ├── string.asm ├── tedit.asm ├── time.asm ├── tinfo.asm ├── tistyle.asm ├── tools.asm ├── tview.asm └── wsub.asm ├── dz.asm ├── dzmain.asm ├── dzmodal.asm ├── editattrib.asm ├── filter.asm ├── hedit.asm ├── inc ├── FileSearch.inc ├── config.inc ├── confirm.inc ├── conio.inc ├── doszip.inc ├── dz.ini ├── dz.txt ├── dzstr.inc ├── filter.inc ├── helpid.inc ├── idd.inc ├── keyb.inc ├── oldapi.inc ├── panel.inc ├── process.inc ├── progress.inc ├── tview.inc ├── wsub.inc └── zip.inc ├── inflate.asm ├── io.asm ├── menus.asm ├── panel.asm ├── process.asm ├── progress.asm ├── res ├── CalHelp.idd ├── Calendar.idd ├── Commandline.idd ├── CompareOptions.idd ├── ConfirmAddFiles.idd ├── ConfirmContinue.idd ├── ConfirmDelete.idd ├── ConsoleSize.idd ├── DZCompareDirectories.idd ├── DZCompression.idd ├── DZConfiguration.idd ├── DZConfirmations.idd ├── DZCopy.idd ├── DZDecompress.idd ├── DZDefaultColor.idd ├── DZEnviron.idd ├── DZExit.idd ├── DZFFHelp.idd ├── DZFileAttributes.idd ├── DZFindFile.idd ├── DZHelp.idd ├── DZHistory.idd ├── DZMKList.idd ├── DZMenuEdit.idd ├── DZMenuFile.idd ├── DZMenuHelp.idd ├── DZMenuPanel.idd ├── DZMenuSetup.idd ├── DZMenuTools.idd ├── DZMove.idd ├── DZPanelFilter.idd ├── DZPanelOptions.idd ├── DZRecursiveCompare.idd ├── DZSaveSetup.idd ├── DZScreenOptions.idd ├── DZSubInfo.idd ├── DZSystemInfo.idd ├── DZSystemOptions.idd ├── DZTransfer.idd ├── DZZipAttributes.idd ├── Deflate64.idd ├── DriveNotReady.idd ├── EditColor.idd ├── FFReplace.idd ├── HEFormat.idd ├── HELine.idd ├── HEMenusline.idd ├── HEStatusline.idd ├── Menusline.idd ├── OperationFilters.idd ├── Replace.idd ├── ReplacePrompt.idd ├── SaveScreen.idd ├── Search.idd ├── Statusline.idd ├── TEOptions.idd ├── TEQuickMenu.idd ├── TEReload.idd ├── TEReload2.idd ├── TESave.idd ├── TESeek.idd ├── TEWindows.idd ├── TVCopy.idd ├── TVHelp.idd ├── TVMenusline.idd ├── TVQuickMenu.idd ├── TVSeek.idd ├── TVStatusline.idd ├── UnzipCRCError.idd ├── WOpenFile.idd ├── dz.ico └── dz.rc ├── st ├── asm.ini ├── bas.ini ├── bat.ini ├── cpp.ini ├── mak.ini └── pas.ini ├── stdlib.asm ├── string.asm ├── stub ├── dz.asm └── mkdz.asm ├── tedit.asm ├── transfer.asm ├── tsession.asm ├── tview.asm └── wsub.asm /license.txt: -------------------------------------------------------------------------------- 1 | Doszip source code 2 | 3 | License for use and distribution 4 | 5 | Copyright (C) 1999-2025 The Doszip Contributors. 6 | 7 | The license for files are GNU General Public License. 8 | 9 | GNU GPL information: 10 | 11 | This program is free software; you can redistribute it and/or modify 12 | it under the terms of the GNU General Public License as published by 13 | the Free Software Foundation; either version 2 of the License, or 14 | (at your option) any later version. 15 | 16 | This program is distributed in the hope that it will be useful, 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License along 22 | with this program; if not, you can get a copy of the GNU General Public 23 | License from http://www.gnu.org/ 24 | 25 | -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for Doszip 16/32/64 3 | # 4 | 5 | watc = \watcom 6 | ifndef dosver 7 | dosver = 268 8 | endif 9 | ifndef winver 10 | winver = 389 11 | endif 12 | dosmin = 253 13 | winmin = 349 14 | 15 | all: DZ16 DZ32 DZ64 16 | 17 | DZ16: 18 | asmc -pe -DVERSION=$(dosver) -DSRCFILE=src\dos\inc\dz.txt -DOUTPATH=$@ src\stub\mkdz.asm 19 | mkdz 20 | asmc -DVERSION=$(dosver) -mz -Fo $@\dz\dz.exe -q src\stub\dz.asm 21 | asmc -idd -ml src\dos\res\*.idd 22 | asmc -Isrc\dos\inc -DVERSION=$(dosver) -DMINVERS=$(dosmin) -D__LARGE__ -D__DZ__ src\dos\*.asm 23 | linkw system dos name $@\dz\dz.dos file *.obj 24 | del *.obj 25 | del *.s 26 | del mkdz.exe 27 | 28 | DZ32: 29 | asmc -pe -DVERSION=$(winver) -DSRCFILE=src\inc\dz.txt -DOUTPATH=$@ src\stub\mkdz.asm 30 | mkdz 31 | asmc -DVERSION=$(dosver) -mz -Fo dz.bin -q -Isrc\dos\inc src\stub\dz.asm 32 | asmc -c -DVERSION=$(winver) -DMINVERS=$(winmin) -MT -coff -Zp4 -Cs -D__BMP__ -Isrc\inc src\*.asm 33 | asmc -c -MT -coff -Zp4 -mf -Gd -idd src\res\*.idd 34 | $(watc)\binnt\rc.exe -nologo -fodz.res -I$(watc)\h\win src\res\dz.rc 35 | linkw name $@\dz\dz.exe symt _nofloat op stub=dz.bin, resource=dz.res, stack=0x300000 com stack=0x200000 file *.obj 36 | del *.obj 37 | del *.s 38 | del dz.bin 39 | del mkdz.exe 40 | 41 | DZ64: 42 | asmc -pe -DVERSION=$(winver) -DSRCFILE=src\inc\dz.txt -DOUTPATH=$@ src\stub\mkdz.asm 43 | mkdz 44 | asmc -DVERSION=$(dosver) -mz -Fo dz.bin -q src\stub\dz.asm 45 | asmc -c -DVERSION=$(winver) -DMINVERS=$(winmin) -MT -win64 -frame -Zp8 -Cs -D__BMP__ -Isrc\inc src\*.asm 46 | asmc -c -MT -win64 -Zp8 -idd src\res\*.idd 47 | $(watc)\binnt\rc.exe -nologo -fodz.res -I$(watc)\h\win src\res\dz.rc 48 | linkw name $@\dz\dz.exe symt _nofloat op stub=dz.bin, resource=dz.res, stack=0x300000 com stack=0x200000 file *.obj 49 | del *.obj 50 | del *.s 51 | del dz.res 52 | del dz.bin 53 | del mkdz.exe 54 | 55 | clean: 56 | del /Q DZ16\*.* 57 | del /Q DZ32\*.* 58 | del /Q DZ64\*.* 59 | del /Q DZ16\dz\*.* 60 | del /Q DZ32\dz\*.* 61 | del /Q DZ64\dz\*.* 62 | rd DZ16\dz 63 | rd DZ32\dz 64 | rd DZ64\dz 65 | rd DZ16 66 | rd DZ32 67 | rd DZ64 68 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Doszip 2 | 3 | The Doszip Commander is an LFN-aware TUI file manager (NC clone) with built-in Zip and UnZip for DOS and Windows. 4 | -------------------------------------------------------------------------------- /src/cmchdrv.asm: -------------------------------------------------------------------------------- 1 | ; CMCHDRV.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include errno.inc 6 | 7 | .data 8 | 9 | cp_selectdrv db 'Select disk Panel ' 10 | cp_selectdrv_X db 'A',0 11 | 12 | .code 13 | 14 | cmchdrv proc private uses rsi rdi 15 | 16 | mov rsi,rax 17 | .if panel_state(rax) 18 | 19 | mov errno,0 20 | .ifd _disk_select(addr cp_selectdrv) 21 | 22 | mov edi,eax 23 | panel_sethdd(rsi, eax) 24 | msloop() 25 | mov eax,edi 26 | .endif 27 | .endif 28 | ret 29 | 30 | cmchdrv endp 31 | 32 | cmachdrv proc 33 | 34 | mov rax,panela 35 | mov cp_selectdrv_X,'A' 36 | cmchdrv() 37 | ret 38 | 39 | cmachdrv endp 40 | 41 | cmbchdrv proc 42 | 43 | mov rax,panelb 44 | mov cp_selectdrv_X,'B' 45 | cmchdrv() 46 | ret 47 | 48 | cmbchdrv endp 49 | 50 | END 51 | -------------------------------------------------------------------------------- /src/cmclrcmdl.asm: -------------------------------------------------------------------------------- 1 | ; CMCLRCMDL.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | 6 | .code 7 | 8 | cmclrcmdl proc 9 | 10 | .if cflag & _C_ESCUSERSCR 11 | cmtoggleon() 12 | .endif 13 | clrcmdl() 14 | ret 15 | 16 | cmclrcmdl endp 17 | 18 | END 19 | -------------------------------------------------------------------------------- /src/cmcopycell.asm: -------------------------------------------------------------------------------- 1 | ; CMCOPYCELL.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include string.inc 6 | include stdlib.inc 7 | include io.inc 8 | 9 | .code 10 | 11 | ccedit proc private uses rsi rdi copy:int_t ; rename or copy current file to a new name 12 | 13 | .if panel_curobj(cpanel) 14 | 15 | mov rdi,rdx 16 | .if !( ecx & _FB_UPDIR or _FB_ROOTDIR ) 17 | 18 | .if ( ecx & _FB_ARCHIVE ) 19 | 20 | notsup() 21 | .else 22 | 23 | 24 | strcpy(__outfile, strcpy(__srcfile, rax)) 25 | 26 | .if ( byte ptr [rax] != 0 ) 27 | 28 | mov rax,cpanel 29 | mov rsi,[rax].PANEL.xl 30 | movzx eax,[rsi].XCEL.rc.col 31 | movzx ecx,[rsi].XCEL.rc.x 32 | movzx edx,[rsi].XCEL.rc.y 33 | scputw(ecx, edx, eax, 0x00070020) 34 | 35 | .ifd dledit(__outfile, [rsi].XCEL.rc, _MAX_PATH-1, 0) != KEY_ESC 36 | 37 | .ifd strcmp(__outfile, __srcfile) 38 | 39 | mov rax,__outfile 40 | mov al,[rax] 41 | .if al 42 | .if copy 43 | 44 | mov eax,[rdi] 45 | .if !( eax & _FB_ARCHIVE ) 46 | 47 | copyfile([rdi].FBLK.size, [rdi].FBLK.time, eax) 48 | .endif 49 | 50 | .else 51 | 52 | .new wbuf[1024]:wchar_t 53 | 54 | mov rsi,wcscpy(&wbuf, _utftows(__srcfile)) 55 | mov rdi,_utftows(__outfile) 56 | _wrename(rsi, rdi) 57 | .endif 58 | .endif 59 | .endif 60 | .endif 61 | .endif 62 | mov rax,cpanel 63 | .ifd dlclose([rax].PANEL.xl) 64 | pcell_show(cpanel) 65 | .endif 66 | mov eax,1 67 | mov _diskflag,eax 68 | .endif 69 | .else 70 | xor eax,eax 71 | .endif 72 | .endif 73 | ret 74 | 75 | ccedit endp 76 | 77 | cmcopycell proc 78 | ccedit(1) 79 | ret 80 | cmcopycell endp 81 | 82 | cmrename proc 83 | ccedit(0) 84 | ret 85 | cmrename endp 86 | 87 | END 88 | -------------------------------------------------------------------------------- /src/cmdelete.asm: -------------------------------------------------------------------------------- 1 | ; CMDELETE.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include io.inc 6 | include stdlib.inc 7 | include string.inc 8 | include errno.inc 9 | include progress.inc 10 | include confirm.inc 11 | 12 | .data 13 | __spath string_t 0 14 | 15 | .code 16 | 17 | option proc:private 18 | 19 | open_progress proc 20 | 21 | setconfirmflag() 22 | progress_open("Delete", 0) 23 | ret 24 | 25 | open_progress endp 26 | 27 | 28 | remove_file proc uses rbx directory:LPSTR, filename:LPSTR, attrib:UINT 29 | 30 | .new path[2048]:char_t 31 | 32 | .ifd !progress_set(filename, directory, 0) 33 | 34 | .ifd ( confirm_delete_file(filename, attrib) && eax != -1 ) 35 | 36 | mov _diskflag,1 37 | mov rbx,_utftows(strfcat(&path, directory, filename)) 38 | 39 | .if ( attrib & _A_RDONLY ) 40 | 41 | _wsetfattr(rbx, 0) 42 | .endif 43 | 44 | _set_errno( 0 ) 45 | .ifd _wremove(rbx) 46 | 47 | erdelete(filename) 48 | .endif 49 | .endif 50 | .endif 51 | ret 52 | 53 | remove_file endp 54 | 55 | 56 | remove_directory proc directory:LPSTR 57 | 58 | local path[2048]:byte 59 | 60 | .ifd ( confirm_delete_sub(strfcat(&path, __spath, directory)) == -1 ) 61 | xor eax,eax 62 | .elseif ( eax == 1 ) 63 | scan_directory(0, &path) 64 | .endif 65 | ret 66 | 67 | remove_directory endp 68 | 69 | 70 | fp_remove_file proc directory:LPSTR, wfblock:ptr 71 | 72 | ldr rdx,wfblock 73 | remove_file(directory, &[rdx].WIN32_FIND_DATA.cFileName, [rdx].WIN32_FIND_DATA.dwFileAttributes) 74 | ret 75 | 76 | fp_remove_file endp 77 | 78 | 79 | fp_remove_directory proc uses rsi rbx directory:LPSTR 80 | 81 | ldr rbx,directory 82 | 83 | .ifd ( !progress_set(0, rbx, 1) ) 84 | 85 | mov esi,scan_files(rbx) 86 | mov rbx,_utftows(rbx) 87 | 88 | mov _diskflag,1 89 | _wsetfattr(rbx, 0) 90 | _wrmdir(rbx) 91 | mov eax,esi 92 | .endif 93 | ret 94 | 95 | fp_remove_directory endp 96 | 97 | 98 | cmdelete_remove proc name:string_t, flags:uint_t 99 | 100 | .if ( flags & _A_SUBDIR ) 101 | remove_directory(name) 102 | .else 103 | _set_errno(0) 104 | remove_file(__spath, name, flags) 105 | .endif 106 | ret 107 | 108 | cmdelete_remove endp 109 | 110 | 111 | option proc: PUBLIC 112 | 113 | cmdelete proc uses rsi rbx 114 | 115 | .if ( cpanel_findfirst() == NULL || ecx & _FB_ROOTDIR ) 116 | 117 | .return( 0 ) 118 | .endif 119 | 120 | mov rbx,rdx 121 | mov rsi,cpanel 122 | open_progress() 123 | mov ecx,[rbx].FBLK.flag 124 | 125 | .if ( ecx & _FB_ARCHEXT ) 126 | 127 | warcdelete([rsi].PANEL.wsub, rbx) 128 | 129 | .elseif ( ecx & _FB_ARCHZIP ) 130 | 131 | .repeat 132 | .break .ifd wzipdel([rsi].PANEL.wsub, rbx) 133 | and [rbx].FBLK.flag,not _FB_SELECTED 134 | panel_findnext(rsi) 135 | mov rbx,rdx 136 | .until !rax 137 | .else 138 | mov rdx,[rsi].PANEL.wsub 139 | mov rax,[rdx].WSUB.path 140 | mov __spath,rax 141 | 142 | mov fp_maskp,&cp_stdmask 143 | mov fp_fileblock,&fp_remove_file 144 | mov fp_directory,&fp_remove_directory 145 | mov rax,[rbx].FBLK.name 146 | 147 | .if !( ecx & _FB_SELECTED ) 148 | 149 | cmdelete_remove(rax, ecx) 150 | .else 151 | .repeat 152 | .break .ifd cmdelete_remove(rax, ecx) 153 | and [rbx].FBLK.flag,not _FB_SELECTED 154 | panel_findnext(rsi) 155 | mov rbx,rdx 156 | .until !rax 157 | .endif 158 | .endif 159 | mov _diskflag,1 160 | progress_close() 161 | ret 162 | 163 | cmdelete endp 164 | 165 | END 166 | -------------------------------------------------------------------------------- /src/cmdetail.asm: -------------------------------------------------------------------------------- 1 | ; CMDETAIL.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | 6 | .code 7 | 8 | cmdetail proc private 9 | 10 | mov rdx,[rcx].PANEL.wsub 11 | mov eax,[rdx].WSUB.flag 12 | and eax,not _W_WIDEVIEW 13 | xor eax,_W_DETAIL 14 | mov [rdx].WSUB.flag,eax 15 | panel_redraw(rcx) 16 | ret 17 | 18 | cmdetail endp 19 | 20 | cmadetail proc 21 | mov rcx,panela 22 | cmdetail() 23 | ret 24 | cmadetail endp 25 | 26 | cmbdetail proc 27 | mov rcx,panelb 28 | cmdetail() 29 | ret 30 | cmbdetail endp 31 | 32 | cmcdetail proc 33 | mov rcx,cpanel 34 | cmdetail() 35 | ret 36 | cmcdetail endp 37 | 38 | END 39 | -------------------------------------------------------------------------------- /src/cmedit.asm: -------------------------------------------------------------------------------- 1 | ; CMEDIT.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include io.inc 5 | include time.inc 6 | include doszip.inc 7 | include stdlib.inc 8 | include dzstr.inc 9 | 10 | .code 11 | 12 | load_tedit proc uses rsi rbx file:LPSTR, etype:int_t 13 | 14 | local path[_MAX_PATH*2]:char_t 15 | 16 | lea rsi,path 17 | .if !strchr(strcpy(rsi, file), '.') 18 | 19 | strcat(rsi, ".") 20 | .endif 21 | 22 | .if !loadiniproc("Edit", rsi, etype) 23 | 24 | clrcmdl() 25 | 26 | .if panel_findnext(cpanel) 27 | 28 | mov rbx,cpanel 29 | mov rbx,[rbx].PANEL.wsub 30 | wedit([rbx].WSUB.fcb, [rbx].WSUB.count) 31 | .else 32 | .if byte ptr [rsi] == '"' 33 | 34 | inc rsi 35 | .if strrchr(rsi,'"') 36 | 37 | mov byte ptr [rax],0 38 | .endif 39 | .endif 40 | mov rax,keyshift 41 | mov eax,[rax] 42 | .if al & KEY_CTRL ; 2 (Ctrl) 43 | hedit(rsi, 0) 44 | .else 45 | tedit(rsi, 0) 46 | .endif 47 | .endif 48 | xor eax,eax 49 | .endif 50 | ret 51 | 52 | load_tedit endp 53 | 54 | 55 | zipadd proc private uses rsi rdi rbx archive:LPSTR, path:LPSTR, file:LPSTR 56 | 57 | ldr rsi,archive 58 | ldr rdi,path 59 | ldr rbx,file 60 | 61 | strpath(strcpy(__srcpath, strcpy(__srcfile, rbx))) 62 | strcpy(__outpath, rdi) 63 | strcpy(__outfile, rsi) 64 | 65 | .ifd ( osopen(rbx, _FA_NORMAL, M_RDONLY, A_OPEN) != -1 ) 66 | 67 | mov esi,eax 68 | .ifd _filelength(eax) 69 | 70 | mov edi,eax 71 | _close(esi) 72 | 73 | clock() 74 | mov rcx,rbx 75 | mov ebx,eax 76 | getfattr(rcx) 77 | 78 | ifdef _WIN64 79 | wzipadd(rdi, ebx, eax) 80 | else 81 | xor ecx,ecx 82 | wzipadd(ecx::edi, ebx, eax) 83 | endif 84 | .else 85 | _close(esi) 86 | dec eax 87 | .endif 88 | .endif 89 | ret 90 | 91 | zipadd endp 92 | 93 | 94 | editzip proc private uses rsi rdi rbx file:LPSTR 95 | 96 | ldr rbx,file 97 | mov edi,ecx 98 | mov rcx,rdx 99 | 100 | .ifd unzip_to_temp(rcx, rbx) 101 | 102 | mov esi,_diskflag 103 | _wsetfattr(_utftows(rax), 0) 104 | mov _diskflag,0 105 | tedit(rbx, 0) 106 | mov eax,_diskflag 107 | .if eax 108 | mov rax,cpanel 109 | mov rax,[rax].PANEL.wsub 110 | mov rdx,[rax].WSUB.arch 111 | mov rax,[rax].WSUB.file 112 | zipadd(rax, rdx, rbx) 113 | .else 114 | mov _diskflag,esi 115 | .endif 116 | _wremove(_utftows(rbx)) 117 | .endif 118 | ret 119 | 120 | editzip endp 121 | 122 | 123 | cmedit proc 124 | 125 | .new fname[_MAX_PATH*2]:char_t 126 | 127 | .ifd ( TVGetCurrentFile(&fname) == 1 ) 128 | .if ecx == eax 129 | mov ecx,4 130 | .endif 131 | load_tedit(&fname, ecx) 132 | .elseif ( eax == 2 ) 133 | editzip(&fname) 134 | .endif 135 | ret 136 | 137 | cmedit endp 138 | 139 | cmhexedit proc 140 | 141 | mov rax,keyshift 142 | or byte ptr [rax],KEY_CTRL 143 | cmedit() 144 | ret 145 | 146 | cmhexedit endp 147 | 148 | 149 | cmwindowlist proc 150 | 151 | .if tdlgopen() > 2 152 | 153 | mov tinfo,rax 154 | cmtmodal() 155 | .elseif eax == 1 156 | mov tinfo,rdx 157 | tclose() 158 | .elseif eax == 2 159 | tiflush(rdx) 160 | .endif 161 | ret 162 | 163 | cmwindowlist endp 164 | 165 | cmtmodal proc 166 | 167 | .ifd tistate(tinfo) 168 | tmodal() 169 | .else 170 | topensession() 171 | .endif 172 | ret 173 | 174 | cmtmodal endp 175 | 176 | END 177 | -------------------------------------------------------------------------------- /src/cmegaline.asm: -------------------------------------------------------------------------------- 1 | ; CMEGALINE.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include config.inc 6 | include stdlib.inc 7 | 8 | .code 9 | 10 | cmegaline proc uses rsi rdi rbx 11 | 12 | .new cmin:COORD = _scrmin 13 | .new cmax:COORD = _scrmax 14 | .new rc:RECT = _scrrc 15 | 16 | doszip_hide() 17 | 18 | lea rbx,cmin 19 | .if !( cflag & _C_EGALINE ) 20 | lea rbx,cmax 21 | .endif 22 | 23 | .if CFGetSection(".consolesize") 24 | 25 | mov rsi,rax 26 | mov edi,4 27 | .if ( cflag & _C_EGALINE ) 28 | xor edi,edi 29 | .endif 30 | .if INIGetEntryID(rsi, edi) 31 | mov _scrrc.left,atol(rax) 32 | .endif 33 | .if INIGetEntryID(rsi, &[rdi+1]) 34 | mov _scrrc.top,atol(rax) 35 | .endif 36 | .if INIGetEntryID(rsi, &[rdi+2]) 37 | 38 | atol(rax) 39 | mov [rbx],ax 40 | .endif 41 | .if INIGetEntryID(rsi, &[rdi+3]) 42 | 43 | atol(rax) 44 | mov [rbx+2],ax 45 | .endif 46 | .endif 47 | conssetl([rbx]) 48 | xor cflag,_C_EGALINE 49 | mov _scrrc,rc 50 | doszip_show() 51 | ret 52 | 53 | cmegaline endp 54 | 55 | end 56 | -------------------------------------------------------------------------------- /src/cmexit.asm: -------------------------------------------------------------------------------- 1 | ; CMEXIT.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include conio.inc 6 | 7 | .code 8 | 9 | cmquit proc 10 | mov mainswitch,0 11 | mov dzexitcode,1 12 | ret 13 | cmquit endp 14 | 15 | cmexit proc 16 | .if config.c_cflag & _C_CONFEXIT 17 | .ifd !rsmodal(IDD_DZExit) 18 | .return 19 | .endif 20 | .endif 21 | cmquit() 22 | ret 23 | cmexit endp 24 | 25 | END 26 | -------------------------------------------------------------------------------- /src/cmhelp.asm: -------------------------------------------------------------------------------- 1 | ; CMHELP.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include string.inc 6 | include tview.inc 7 | include stdlib.inc 8 | 9 | %define BUILD_DATE <"&@Date"> 10 | 11 | .data 12 | 13 | DZ_TXTFILE char_t DOSZIP_TXTFILE,0 14 | 15 | Offset_README uint_t \ 16 | 0, ; DZ_TXTFILE 17 | HELPID_02, ; Compress 18 | HELPID_03, ; View 19 | HELPID_06, ; Extension 20 | HELPID_07, ; Environ 21 | HELPID_08, ; Install 22 | HELPID_09, ; Tools 23 | HELPID_10, ; FF 24 | HELPID_11, ; List 25 | HELPID_12, ; Filter 26 | HELPID_13 ; Shortkey 27 | 28 | .code 29 | 30 | view_doszip proc private file:LPSTR, offs:uint_t 31 | 32 | local path[_MAX_PATH]:byte 33 | 34 | tview(strfcat(&path, _pgmpath, file), offs) 35 | ret 36 | 37 | view_doszip endp 38 | 39 | 40 | view_readme proc offs:uint_t 41 | 42 | and tvflag,not _TV_HEXVIEW 43 | view_doszip(&DZ_TXTFILE, offs) 44 | ret 45 | 46 | view_readme endp 47 | 48 | cmabout proc 49 | 50 | stdmsg( 51 | "About", 52 | " The Doszip Commander Version %d.%02d" DOSZIP_VSTRPRE "\n" 53 | " Copyright (c) 2023 Doszip Developers\n" 54 | "\n" 55 | " Source code is available under the GNU \n" 56 | " General Public License version 2.0\n" 57 | "\n" 58 | " Build Date: " BUILD_DATE, VERSION / 100, VERSION mod 100 ) 59 | ret 60 | 61 | cmabout endp 62 | 63 | 64 | cmhelp proc uses rsi rdi 65 | 66 | .if rsopen(IDD_DZHelp) 67 | 68 | mov rdi,rax 69 | mov [rdi].TOBJ.tproc[13*TOBJ],&cmabout 70 | mov rsi,thelp 71 | mov thelp,&cmabout 72 | 73 | .while rsevent(IDD_DZHelp, rdi) 74 | 75 | dec eax 76 | lea rcx,Offset_README 77 | mov eax,[rcx+rax*4] 78 | view_readme(eax) 79 | .endw 80 | dlclose(rdi) 81 | mov thelp,rsi 82 | mov eax,1 83 | .endif 84 | ret 85 | 86 | cmhelp endp 87 | 88 | end 89 | -------------------------------------------------------------------------------- /src/cmhidden.asm: -------------------------------------------------------------------------------- 1 | ; CMHIDDEN.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | 6 | .code 7 | 8 | cmahidden proc 9 | xor config.c_apath.flag,_W_HIDDEN 10 | panel_update(panela) 11 | ret 12 | cmahidden endp 13 | 14 | cmbhidden proc 15 | xor config.c_bpath.flag,_W_HIDDEN 16 | panel_update(panelb) 17 | ret 18 | cmbhidden endp 19 | 20 | cmchidden proc 21 | .if ( cpanel == panela ) 22 | cmahidden() 23 | .else 24 | cmbhidden() 25 | .endif 26 | ret 27 | cmchidden endp 28 | 29 | END 30 | -------------------------------------------------------------------------------- /src/cmhomedir.asm: -------------------------------------------------------------------------------- 1 | ; CMHOMEDIR.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | 6 | .code 7 | 8 | cmhomedir proc ; Ctrl-Home 9 | 10 | .if panel_state(cpanel) 11 | 12 | mov rdx,[rax].PANEL.wsub 13 | mov eax,[rdx].WSUB.flag 14 | or eax,_W_ROOTDIR 15 | and eax,not _W_ARCHIVE 16 | mov [rdx].WSUB.flag,eax 17 | mov rax,[rdx].WSUB.arch 18 | mov byte ptr [rax],0 19 | 20 | panel_read(cpanel) 21 | panel_putitem(cpanel, 0) 22 | .endif 23 | ret 24 | 25 | cmhomedir endp 26 | 27 | END 28 | -------------------------------------------------------------------------------- /src/cmlong.asm: -------------------------------------------------------------------------------- 1 | ; CMLONG.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | 6 | .code 7 | 8 | cmlong proc fastcall private panel:PPANEL 9 | mov rdx,[rcx].PANEL.wsub 10 | xor [rdx].WSUB.flag,_W_LONGNAME 11 | panel_update(rcx) 12 | ret 13 | cmlong endp 14 | 15 | cmalong proc 16 | .return cmlong(panela) 17 | cmalong endp 18 | 19 | cmblong proc 20 | .return cmlong(panelb) 21 | cmblong endp 22 | 23 | cmclong proc 24 | .return cmlong(cpanel) 25 | cmclong endp 26 | 27 | END 28 | -------------------------------------------------------------------------------- /src/cmmini.asm: -------------------------------------------------------------------------------- 1 | ; CMMINI.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | 6 | .code 7 | 8 | cmamini proc 9 | panel_xormini(panela) 10 | ret 11 | cmamini endp 12 | 13 | cmbmini proc 14 | panel_xormini(panelb) 15 | ret 16 | cmbmini endp 17 | 18 | cmcmini proc 19 | panel_xormini(cpanel) 20 | ret 21 | cmcmini endp 22 | 23 | cmvolinfo proc 24 | panel_xorinfo(cpanel) 25 | ret 26 | cmvolinfo endp 27 | 28 | cmavolinfo proc 29 | panel_xorinfo(panela) 30 | ret 31 | cmavolinfo endp 32 | 33 | cmbvolinfo proc 34 | panel_xorinfo(panelb) 35 | ret 36 | cmbvolinfo endp 37 | 38 | END 39 | -------------------------------------------------------------------------------- /src/cmmkdir.asm: -------------------------------------------------------------------------------- 1 | ; CMMKDIR.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include stdlib.inc 6 | include errno.inc 7 | include winnls.inc 8 | 9 | .code 10 | 11 | cmmkdir proc uses rsi rdi rbx 12 | 13 | .new wbuf[_MAX_PATH]:wchar_t 14 | .new path[_MAX_PATH]:char_t 15 | .new size:int_t 16 | 17 | lea rbx,path 18 | mov rax,cpanel 19 | mov rsi,[rax].PANEL.wsub 20 | mov edi,[rsi].WSUB.flag 21 | 22 | .if !( edi & _W_ROOTDIR ) 23 | 24 | .if panel_state(rax) 25 | 26 | mov byte ptr [rbx],0 27 | .ifd tgetline("Make directory", rbx, 40, _MAX_PATH) 28 | 29 | .ifd strlen(rbx) 30 | 31 | inc eax 32 | mov size,eax 33 | .ifd MultiByteToWideChar(_consolecp, 0, rbx, size, &wbuf, _MAX_PATH) 34 | 35 | mov ecx,eax 36 | .ifd WideCharToMultiByte(CP_UTF8, 0, &wbuf, ecx, rbx, _MAX_PATH, NULL, NULL) 37 | 38 | mov _diskflag,1 39 | .if ( edi & _W_ARCHZIP ) 40 | wsmkzipdir(rsi, rbx) 41 | .elseifd _wmkdir(&wbuf) 42 | ermkdir(rbx) 43 | .endif 44 | .endif 45 | .endif 46 | .endif 47 | .endif 48 | .endif 49 | .endif 50 | ret 51 | 52 | cmmkdir endp 53 | 54 | end 55 | -------------------------------------------------------------------------------- /src/cmmkzip.asm: -------------------------------------------------------------------------------- 1 | ; CMMKZIP.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include io.inc 6 | include string.inc 7 | include syserr.inc 8 | include wsub.inc 9 | 10 | .data 11 | default_zip char_t "default.zip", 128-11 dup(0) 12 | 13 | .code 14 | 15 | cmmkzip proc uses rsi rdi rbx 16 | 17 | local path[_MAX_PATH]:byte 18 | 19 | mov eax,path_a.flag 20 | or eax,path_b.flag 21 | .if ( eax & _W_ARCHIVE ) 22 | .return( ermsg("Create archive", "Archive already open") ) 23 | .endif 24 | 25 | lea rdi,path 26 | .if cpanel_state() 27 | 28 | .ifd tgetline("Create archive", strcpy(rdi, &default_zip), 40, 256 or 8000h) 29 | 30 | .if byte ptr [rdi] 31 | 32 | xor ebx,ebx 33 | .if strext(rdi) 34 | mov eax,[rax] 35 | or eax,0x00200000 36 | .if ( eax == 'z7.' ) 37 | .ifd ( warctest(NULL, 0xAFBC7A37) == 0 ) 38 | .return notsup() 39 | .endif 40 | inc ebx 41 | .endif 42 | .endif 43 | 44 | .ifsd ogetouth(rdi, M_WRONLY) > 0 45 | 46 | mov esi,eax 47 | strcpy(&default_zip, rdi) 48 | 49 | mov rax,cpanel 50 | mov rdx,[rax].PANEL.wsub 51 | mov rax,[rdx].WSUB.arch 52 | mov byte ptr [rax],0 53 | mov eax,[rdx].WSUB.flag 54 | and eax,not _W_ARCHIVE 55 | .if ( ebx ) 56 | or eax,_W_ARCHEXT 57 | .else 58 | or eax,_W_ARCHZIP 59 | .endif 60 | mov [rdx].WSUB.flag,eax 61 | mov rcx,[rdx].WSUB.file 62 | strcpy(rcx, rdi) 63 | 64 | mov rdx,rdi 65 | mov eax,0x06054B50 66 | mov ecx,5 67 | .if ( ebx ) 68 | mov ecx,(32-12)/4 69 | mov eax,0xAFBC7A37 70 | stosd 71 | mov eax,0x03001C27 72 | stosd 73 | mov eax,0x0FD59B8D 74 | .endif 75 | stosd 76 | xor eax,eax 77 | rep stosd 78 | mov ecx,ZEND 79 | .if ( ebx ) 80 | mov ecx,32 81 | .endif 82 | oswrite(esi, rdx, ecx) 83 | _close(esi) 84 | mov _diskflag,1 85 | .endif 86 | .endif 87 | .endif 88 | .endif 89 | ret 90 | 91 | cmmkzip endp 92 | 93 | END 94 | -------------------------------------------------------------------------------- /src/cmpath.asm: -------------------------------------------------------------------------------- 1 | ; CMPATH.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include dzstr.inc 6 | include stdlib.inc 7 | include config.inc 8 | 9 | .code 10 | 11 | cmpath proc private id:int_t 12 | 13 | local path[_MAX_PATH]:char_t 14 | 15 | .if panel_state(cpanel) 16 | 17 | .if CFGetSectionID("Directory", id) 18 | 19 | .if ( word ptr [rax] != '><' ) 20 | 21 | .if strchr(rax, ',') 22 | 23 | mov rcx,strstart(&[rax+1]) 24 | expenviron(strnzcpy(&path, rcx, _MAX_PATH-1)) 25 | 26 | .if ( path != '[' ) 27 | 28 | cpanel_setpath(&path) 29 | .endif 30 | .endif 31 | .endif 32 | .endif 33 | .endif 34 | ret 35 | 36 | cmpath endp 37 | 38 | cmpathp macro q 39 | cmpath&q proc 40 | cmpath(q) 41 | ret 42 | cmpath&q endp 43 | endm 44 | 45 | cmpathp 0 46 | cmpathp 1 47 | cmpathp 2 48 | cmpathp 3 49 | cmpathp 4 50 | cmpathp 5 51 | cmpathp 6 52 | cmpathp 7 53 | 54 | END 55 | -------------------------------------------------------------------------------- /src/cmpfilter.asm: -------------------------------------------------------------------------------- 1 | ; CMFILTER.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include stdio.inc 6 | include stdlib.inc 7 | include string.inc 8 | 9 | .enumt DZPanelFilter:TOBJ { 10 | ID_DZPanelFilter, 11 | ID_READMASK, 12 | ID_DIRECTORY, 13 | ID_OK, 14 | ID_LOADPATH, 15 | ID_CANCEL 16 | } 17 | 18 | .data 19 | pathptr string_t 0 20 | 21 | .code 22 | 23 | event_loadpath proc private 24 | 25 | .new path[_MAX_PATH]:char_t = 0 26 | .new rc:int_t = tools_idd(_MAX_PATH, &path, "Directory") 27 | 28 | msloop() 29 | 30 | .if ( !path || !rc || rc == MOUSECMD ) 31 | 32 | mov eax,_C_NORMAL 33 | .else 34 | 35 | strcpy(pathptr, expenviron(&path)) 36 | mov eax,_C_REOPEN 37 | .endif 38 | ret 39 | 40 | event_loadpath endp 41 | 42 | 43 | PanelFilter proc private uses rsi rdi rbx panel:PPANEL, xpos:int_t 44 | 45 | ldr rbx,panel 46 | ldr eax,xpos 47 | 48 | mov rdi,IDD_DZPanelFilter 49 | mov [rdi].RIDD.rc.x,al 50 | 51 | .if rsopen(rdi) 52 | 53 | mov rdi,rax 54 | mov rsi,[rbx].PANEL.wsub 55 | mov [rdi].TOBJ.tproc[ID_LOADPATH],&event_loadpath 56 | mov pathptr,[rdi].TOBJ.data[ID_DIRECTORY] 57 | 58 | strcpy(rax, [rsi].WSUB.path) 59 | strcpy([rdi].TOBJ.data[ID_READMASK], [rsi].WSUB.mask) 60 | dlinit(rdi) 61 | 62 | .ifd dlevent(rdi) 63 | 64 | strcpy([rsi].WSUB.path, [rdi].TOBJ.data[ID_DIRECTORY]) 65 | strcpy([rsi].WSUB.mask, [rdi].TOBJ.data[ID_READMASK]) 66 | dlclose(rdi) 67 | 68 | mov rbx,panel 69 | panel_reread(rbx) 70 | 71 | .if ( rbx == cpanel ) 72 | 73 | cominit(rsi) 74 | .endif 75 | .else 76 | dlclose(rdi) 77 | .endif 78 | .endif 79 | xor eax,eax 80 | ret 81 | 82 | PanelFilter endp 83 | 84 | 85 | cmafilter proc 86 | 87 | PanelFilter(panela, 3) 88 | ret 89 | 90 | cmafilter endp 91 | 92 | 93 | cmbfilter proc 94 | 95 | PanelFilter(panelb, 42) 96 | ret 97 | 98 | cmbfilter endp 99 | 100 | 101 | cmloadpath proc uses rbx 102 | 103 | local path[_MAX_PATH]:char_t 104 | 105 | lea rbx,path 106 | mov pathptr,rbx 107 | .ifd ( event_loadpath() == _C_REOPEN ) 108 | 109 | cpanel_setpath(rbx) 110 | .endif 111 | ret 112 | 113 | cmloadpath endp 114 | 115 | END 116 | -------------------------------------------------------------------------------- /src/cmpsize.asm: -------------------------------------------------------------------------------- 1 | ; CMPSIZE.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | 6 | .code 7 | 8 | cmpsizeup proc 9 | 10 | mov rdx,panela 11 | mov rdx,[rdx].PANEL.dialog 12 | mov al,9 13 | .if cflag & _C_HORIZONTAL 14 | dec al 15 | .endif 16 | .if [rdx+7] != al 17 | 18 | inc byte ptr config.c_panelsize 19 | redraw_panels() 20 | .endif 21 | ret 22 | 23 | cmpsizeup endp 24 | 25 | cmpsizedn proc 26 | 27 | xor eax,eax 28 | .if eax != config.c_panelsize 29 | 30 | dec config.c_panelsize 31 | redraw_panels() 32 | .endif 33 | ret 34 | 35 | cmpsizedn endp 36 | 37 | END 38 | -------------------------------------------------------------------------------- /src/cmsavesetup.asm: -------------------------------------------------------------------------------- 1 | ; CMSAVESETUP.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include errno.inc 6 | 7 | .code 8 | 9 | cmsavesetup proc 10 | 11 | .ifd rsmodal(IDD_DZSaveSetup) 12 | 13 | .ifd !config_save() 14 | 15 | eropen(__srcfile) 16 | inc eax 17 | .endif 18 | .endif 19 | ret 20 | 21 | cmsavesetup endp 22 | 23 | END 24 | -------------------------------------------------------------------------------- /src/cmsearchidd.asm: -------------------------------------------------------------------------------- 1 | include wsub.inc 2 | include doszip.inc 3 | 4 | .code 5 | 6 | cmsearchidd proc uses rsi rdi rbx sflag:uint_t 7 | 8 | .if rsopen(IDD_Search) 9 | 10 | mov rdi,rax 11 | mov rbx,rax 12 | mov [rbx].TOBJ.count[1*TOBJ],256 shr 4 13 | mov [rbx].TOBJ.data[1*TOBJ],&searchstring 14 | mov eax,sflag 15 | mov dl,_O_FLAGB 16 | .if eax & IO_SEARCHCASE 17 | or [rbx+2*TOBJ],dl 18 | .endif 19 | .if eax & IO_SEARCHHEX 20 | or [rbx+3*TOBJ],dl 21 | .endif 22 | mov dl,_O_RADIO 23 | .if eax & IO_SEARCHCUR 24 | or [rbx+6*TOBJ],dl 25 | .else 26 | or [rbx+7*TOBJ],dl 27 | .endif 28 | dlinit(rdi) 29 | 30 | .ifd rsevent(IDD_Search, rdi) 31 | 32 | mov eax,sflag 33 | and eax,not IO_SEARCHMASK 34 | mov dl,_O_FLAGB 35 | .if [rbx+2*TOBJ] & dl 36 | or eax,IO_SEARCHCASE 37 | .endif 38 | .if [rbx+3*TOBJ] & dl 39 | or eax,IO_SEARCHHEX 40 | .endif 41 | .if byte ptr [rbx+6*TOBJ] & _O_RADIO 42 | or eax,IO_SEARCHCUR 43 | .else 44 | or eax,IO_SEARCHSET 45 | .endif 46 | mov edx,eax 47 | xor eax,eax 48 | .if searchstring != al 49 | inc eax 50 | .endif 51 | .endif 52 | mov ebx,eax 53 | mov esi,edx 54 | dlclose(rdi) 55 | mov eax,ebx 56 | mov edx,esi 57 | .endif 58 | ret 59 | 60 | cmsearchidd endp 61 | 62 | END 63 | -------------------------------------------------------------------------------- /src/cmselect.asm: -------------------------------------------------------------------------------- 1 | ; CMSELECT.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include string.inc 6 | 7 | .code 8 | 9 | cmselect proc uses rsi rdi 10 | 11 | .if !cp_selectmask 12 | 13 | strcpy(&cp_selectmask, &cp_stdmask) 14 | .endif 15 | 16 | .ifd tgetline("Select files", &cp_selectmask, 12, 32+8000h) 17 | 18 | .if cp_selectmask 19 | 20 | .if panel_state(cpanel) 21 | 22 | mov rdi,[rax].PANEL.wsub 23 | mov esi,[rax].PANEL.fcb_count 24 | mov rdi,[rdi].WSUB.fcb 25 | 26 | .while esi 27 | 28 | mov rax,[rdi] 29 | 30 | .ifd strwild(&cp_selectmask, [rax].FBLK.name) 31 | 32 | fblk_select([rdi]) 33 | .endif 34 | 35 | add rdi,PFBLK 36 | dec esi 37 | .endw 38 | 39 | panel_putitem(cpanel, 0) 40 | mov eax,1 41 | .endif 42 | .endif 43 | .endif 44 | ret 45 | cmselect endp 46 | 47 | cmdeselect proc uses rsi rdi 48 | 49 | .if !cp_selectmask 50 | 51 | strcpy(&cp_selectmask, &cp_stdmask) 52 | .endif 53 | 54 | .ifd tgetline("Deselect files", &cp_selectmask, 12, 32+8000h) 55 | 56 | .if cp_selectmask 57 | 58 | .if panel_state(cpanel) 59 | 60 | mov rdi,[rax].PANEL.wsub 61 | mov esi,[rax].PANEL.fcb_count 62 | mov rdi,[rdi].WSUB.fcb 63 | 64 | .while esi 65 | 66 | mov rax,[rdi] 67 | .ifd strwild(&cp_selectmask, [rax].FBLK.name) 68 | 69 | mov rax,[rdi] 70 | and [rax].FBLK.flag,not _FB_SELECTED 71 | .endif 72 | add rdi,PFBLK 73 | dec esi 74 | .endw 75 | 76 | panel_putitem(cpanel, 0) 77 | mov eax,1 78 | .endif 79 | .endif 80 | .endif 81 | ret 82 | cmdeselect endp 83 | 84 | cminvert proc uses rsi rdi 85 | 86 | .if panel_state(cpanel) 87 | 88 | mov rdi,[rax].PANEL.wsub 89 | mov esi,[rax].PANEL.fcb_count 90 | mov rdi,[rdi].WSUB.fcb 91 | 92 | .while esi 93 | 94 | fblk_invert([rdi]) 95 | add rdi,PFBLK 96 | dec esi 97 | .endw 98 | 99 | panel_putitem(cpanel, 0) 100 | mov eax,1 101 | .endif 102 | ret 103 | cminvert endp 104 | 105 | END 106 | -------------------------------------------------------------------------------- /src/cmsort.asm: -------------------------------------------------------------------------------- 1 | ; CMSORT.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include string.inc 6 | 7 | .code 8 | 9 | cmsort proc watcall private uses rsi rdi rbx panel:PPANEL, flags:uint_t 10 | 11 | local path[_MAX_PATH]:byte 12 | 13 | mov esi,edx 14 | .if panel_state(rax) 15 | 16 | mov ecx,esi 17 | mov rdi,rax 18 | mov rsi,[rax].PANEL.wsub 19 | mov eax,[rsi].WSUB.flag 20 | and eax,not (_W_SORTSIZE or _W_NOSORT) 21 | or eax,ecx 22 | mov [rsi].WSUB.flag,eax 23 | 24 | .if panel_curobj(rdi) 25 | 26 | lea rcx,path 27 | strcpy(rcx, rax) 28 | wssort(rsi) 29 | .ifd wsearch(rsi, &path) != -1 30 | 31 | mov ebx,eax 32 | dlclose([rdi].PANEL.xl) 33 | panel_setid(rdi, ebx) 34 | .if rdi == cpanel 35 | pcell_show(rdi) 36 | .endif 37 | .endif 38 | .endif 39 | panel_putitem(rdi, 0) 40 | mov eax,1 41 | .endif 42 | ret 43 | 44 | cmsort endp 45 | 46 | cmnosort proc watcall private uses rbx panel:PPANEL 47 | 48 | .if panel_state(rax) 49 | 50 | mov rbx,rax 51 | mov rdx,[rax].PANEL.wsub 52 | or [rdx].WSUB.flag,_W_NOSORT 53 | panel_read(rax) 54 | panel_putitem(rbx, 0) 55 | mov eax,1 56 | .endif 57 | ret 58 | 59 | cmnosort endp 60 | 61 | cmanosort proc 62 | .return cmnosort(panela) 63 | cmanosort endp 64 | 65 | cmbnosort proc 66 | .return cmnosort(panelb) 67 | cmbnosort endp 68 | 69 | cmcnosort proc 70 | .return cmnosort(cpanel) 71 | cmcnosort endp 72 | 73 | cmadate proc 74 | .return cmsort(panela, _W_SORTDATE) 75 | cmadate endp 76 | 77 | cmbdate proc 78 | .return cmsort(panelb, _W_SORTDATE) 79 | cmbdate endp 80 | 81 | cmcdate proc 82 | .return cmsort(cpanel, _W_SORTDATE) 83 | cmcdate endp 84 | 85 | cmatype proc 86 | .return cmsort(panela, _W_SORTTYPE) 87 | cmatype endp 88 | 89 | cmbtype proc 90 | .return cmsort(panelb, _W_SORTTYPE) 91 | cmbtype endp 92 | 93 | cmctype proc 94 | .return cmsort(cpanel, _W_SORTTYPE) 95 | cmctype endp 96 | 97 | cmasize proc 98 | .return cmsort(panela, _W_SORTSIZE) 99 | cmasize endp 100 | 101 | cmbsize proc 102 | .return cmsort(panelb, _W_SORTSIZE) 103 | cmbsize endp 104 | 105 | cmcsize proc 106 | .return cmsort(cpanel, _W_SORTSIZE) 107 | cmcsize endp 108 | 109 | cmaname proc 110 | .return cmsort(panela, _W_SORTNAME) 111 | cmaname endp 112 | 113 | cmbname proc 114 | .return cmsort(panelb, _W_SORTNAME) 115 | cmbname endp 116 | 117 | cmcname proc 118 | .return cmsort(cpanel, _W_SORTNAME) 119 | cmcname endp 120 | 121 | END 122 | -------------------------------------------------------------------------------- /src/cmsubdir.asm: -------------------------------------------------------------------------------- 1 | ; CMSUBDIR.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include io.inc 6 | 7 | .code 8 | 9 | cmsubdir proc 10 | 11 | .if panel_curobj(cpanel) 12 | 13 | .if ecx & _A_SUBDIR 14 | 15 | panel_event(cpanel, KEY_ENTER) 16 | .endif 17 | .endif 18 | ret 19 | 20 | cmsubdir endp 21 | 22 | END 23 | -------------------------------------------------------------------------------- /src/cmswap.asm: -------------------------------------------------------------------------------- 1 | ; CMSWAP.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include string.inc 6 | 7 | .code 8 | 9 | cmswap proc uses rsi rdi 10 | 11 | .if panel_stateab() 12 | 13 | mov esi,config.c_apath.flag 14 | mov edi,config.c_bpath.flag 15 | panel_hide(panela) 16 | panel_hide(panelb) 17 | memxchg(&config.c_fcb_indexa, &config.c_fcb_indexb, 8) 18 | memxchg(&spanela.fcb_index, &spanelb.fcb_index, 8) 19 | memxchg(&config.c_apath, &config.c_bpath, WSUB) 20 | xor esi,_W_PANELID 21 | xor edi,_W_PANELID 22 | mov config.c_apath.flag,edi 23 | mov config.c_bpath.flag,esi 24 | xor config.c_cflag,_C_PANELID 25 | panel_show(panela) 26 | panel_show(panelb) 27 | mov eax,1 28 | .endif 29 | ret 30 | 31 | cmswap endp 32 | 33 | END 34 | -------------------------------------------------------------------------------- /src/cmtoggle.asm: -------------------------------------------------------------------------------- 1 | ; CMTOGGLE.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | 6 | .code 7 | 8 | cmatoggle proc 9 | panel_toggle(panela) 10 | ret 11 | cmatoggle endp 12 | 13 | cmbtoggle proc 14 | panel_toggle(panelb) 15 | ret 16 | cmbtoggle endp 17 | 18 | cmtoggleon proc uses rsi rdi 19 | 20 | mov esi,panel_state(panela) 21 | mov edi,panel_state(panelb) 22 | .if !edi && esi 23 | cmatoggle() 24 | .elseif edi && !esi 25 | cmbtoggle() 26 | .elseif edi 27 | mov rsi,cpanel 28 | mov rdi,panela 29 | .if rsi == rdi 30 | mov rdi,panelb 31 | .endif 32 | panel_hide(rsi) 33 | panel_hide(rdi) 34 | .else 35 | comhide() 36 | mov rsi,cpanel 37 | mov rdi,panela 38 | .if rsi == rdi 39 | mov rdi,panelb 40 | .endif 41 | panel_show(rdi) 42 | panel_show(rsi) 43 | panel_setactive(rsi) 44 | .endif 45 | xor eax,eax 46 | ret 47 | cmtoggleon endp 48 | 49 | cmtogglehz proc 50 | mov eax,config.c_panelsize 51 | mov ecx,cflag 52 | .if ecx & _C_WIDEVIEW && ecx & _C_HORIZONTAL 53 | and ecx,not _C_WIDEVIEW 54 | shl al,1 55 | .elseif ecx & _C_HORIZONTAL 56 | and ecx,not _C_HORIZONTAL 57 | shl al,1 58 | .else 59 | or ecx,_C_WIDEVIEW or _C_HORIZONTAL 60 | .endif 61 | mov cflag,ecx 62 | mov config.c_panelsize,eax 63 | redraw_panels() 64 | ret 65 | cmtogglehz endp 66 | 67 | cmtogglesz proc 68 | xor eax,eax 69 | .if eax == config.c_panelsize 70 | mov eax,_scrrow 71 | shr eax,1 72 | dec eax 73 | .endif 74 | mov config.c_panelsize,eax 75 | redraw_panels() 76 | ret 77 | cmtogglesz endp 78 | 79 | cmxorcmdline proc 80 | xor cflag,_C_COMMANDLINE 81 | apiupdate() 82 | ret 83 | cmxorcmdline endp 84 | 85 | cmxorkeybar proc 86 | xor cflag,_C_STATUSLINE 87 | apiupdate() 88 | ret 89 | cmxorkeybar endp 90 | 91 | cmxormenubar proc 92 | xor cflag,_C_MENUSLINE 93 | apiupdate() 94 | ret 95 | cmxormenubar endp 96 | 97 | END 98 | -------------------------------------------------------------------------------- /src/cmupdate.asm: -------------------------------------------------------------------------------- 1 | ; CMUPDATE.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | 6 | .code 7 | 8 | cmaupdate proc 9 | panel_reread(panela) 10 | ret 11 | cmaupdate endp 12 | 13 | cmbupdate proc 14 | panel_reread(panelb) 15 | ret 16 | cmbupdate endp 17 | 18 | cmcupdate proc 19 | panel_reread(cpanel) 20 | ret 21 | cmcupdate endp 22 | 23 | END 24 | -------------------------------------------------------------------------------- /src/cmupdir.asm: -------------------------------------------------------------------------------- 1 | ; CMUPDIR.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | 6 | .code 7 | 8 | cmupdir proc 9 | 10 | .ifd panel_event(cpanel, KEY_HOME) 11 | panel_event(cpanel, KEY_ENTER) 12 | .endif 13 | ret 14 | 15 | cmupdir endp 16 | 17 | END 18 | -------------------------------------------------------------------------------- /src/cmuserscreen.asm: -------------------------------------------------------------------------------- 1 | ; CMUSERSCREEN.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | 6 | .code 7 | 8 | cmuserscreen proc 9 | consuser() 10 | ret 11 | cmuserscreen endp 12 | 13 | END 14 | -------------------------------------------------------------------------------- /src/cmwideview.asm: -------------------------------------------------------------------------------- 1 | ; CMWIDEVIEW.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | 6 | .code 7 | 8 | cmwideview proc fastcall private panel:PPANEL 9 | 10 | mov rdx,[rcx].PANEL.wsub 11 | mov eax,[rdx].WSUB.flag 12 | and eax,not _W_DETAIL 13 | xor eax,_W_WIDEVIEW 14 | mov [rdx].WSUB.flag,eax 15 | panel_redraw(rcx) 16 | ret 17 | 18 | cmwideview endp 19 | 20 | cmawideview proc 21 | .return cmwideview(panela) 22 | cmawideview endp 23 | 24 | cmbwideview proc 25 | .return cmwideview(panelb) 26 | cmbwideview endp 27 | 28 | cmcwideview proc 29 | .return cmwideview(cpanel) 30 | cmcwideview endp 31 | 32 | END 33 | -------------------------------------------------------------------------------- /src/config.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/config.asm -------------------------------------------------------------------------------- /src/confirm.asm: -------------------------------------------------------------------------------- 1 | include io.inc 2 | include confirm.inc 3 | include conio.inc 4 | 5 | .data 6 | confirmflag uint_t -1 7 | 8 | .code 9 | 10 | confirm_continue proc uses rbx msg:LPSTR 11 | 12 | .if rsopen(IDD_ConfirmContinue) 13 | mov rbx,rax 14 | dlshow(rax) 15 | mov rax,msg 16 | .if rax 17 | mov cx,[rbx+4] 18 | add cx,0204h 19 | mov dl,ch 20 | scpath(ecx, edx, 34, rax) 21 | .endif 22 | dlmodal(rbx) 23 | .endif 24 | ret 25 | 26 | confirm_continue endp 27 | 28 | ; 29 | ; ret: 0 Cancel 30 | ; 1 Delete 31 | ; 2 Delete All 32 | ; 3 Jump 33 | ; 34 | confirm_delete proc uses rbx info:LPSTR, selected:dword 35 | 36 | .if rsopen(IDD_ConfirmDelete) 37 | 38 | mov rbx,rax 39 | dlshow(rax) 40 | mov cl,[rbx].DOBJ.rc.x 41 | mov dl,[rbx].DOBJ.rc.y 42 | add dl,2 ; y 43 | add cl,12 ; x 44 | mov eax,selected 45 | 46 | .if ( eax > 1 && eax < 0x8000 ) 47 | 48 | scputf(ecx, edx, 0, 0, 49 | " You have selected %d file(s)\nDo you want to delete all the files", eax) 50 | .else 51 | .if eax == -2 52 | scputf(ecx, edx, 0, 0, 53 | "The following file is marked System.\n\n%s", 54 | " Do you still wish to delete it?") 55 | .elseif eax == -1 56 | sub ecx,2 57 | scputf(ecx, edx, 0, 0, 58 | "The following file is marked Read only.\n\n %s", 59 | " Do you still wish to delete it?") 60 | .else 61 | add ecx,6 62 | scputf(ecx, edx, 0, 0, "Do you wish to delete") 63 | .endif 64 | 65 | mov cl,[rbx].DOBJ.rc.x 66 | add cl,3 67 | mov dl,[rbx].DOBJ.rc.y 68 | add dl,3 69 | scenter(ecx, edx, 53, info) 70 | .endif 71 | ; beep( 50, 6 ) 72 | rsevent(IDD_ConfirmDelete, rbx) 73 | xchg rbx,rax 74 | dlclose(rax) 75 | mov eax,ebx 76 | .endif 77 | ret 78 | 79 | confirm_delete endp 80 | 81 | confirm_delete_file proc uses rsi fname:LPSTR, flag:dword 82 | 83 | mov eax,flag 84 | mov edx,confirmflag 85 | .switch 86 | .case al & _A_RDONLY && dl & CFREADONY 87 | mov eax,-1 88 | mov esi,not (CFREADONY or CFDELETEALL) 89 | .endc 90 | .case al & _A_SYSTEM && dl & CFSYSTEM 91 | mov eax,-2 92 | mov esi,not (CFSYSTEM or CFDELETEALL) 93 | .endc 94 | .case dl & CFDELETEALL 95 | xor eax,eax 96 | mov esi,not CFDELETEALL 97 | .endc 98 | .default 99 | .return 1 100 | .endsw 101 | .switch confirm_delete(fname, eax) 102 | .case CONFIRM_DELETEALL 103 | and confirmflag,esi 104 | mov eax,1 105 | .endc 106 | .case CONFIRM_JUMP 107 | xor eax,eax 108 | .case CONFIRM_DELETE 109 | .endc 110 | .default 111 | mov eax,-1 112 | .endsw 113 | ret 114 | 115 | confirm_delete_file endp 116 | 117 | confirm_delete_sub proc path:LPSTR 118 | 119 | mov eax,1 120 | .if confirmflag & CFDIRECTORY 121 | .if confirm_delete(path, 1) == CONFIRM_DELETEALL 122 | and confirmflag,not (CFDIRECTORY or CFDELETEALL) 123 | mov eax,1 124 | .elseif eax == CONFIRM_JUMP 125 | mov eax,-1 126 | .elseif eax != CONFIRM_DELETE 127 | xor eax,eax 128 | .endif 129 | .endif 130 | ret 131 | 132 | confirm_delete_sub endp 133 | 134 | END 135 | -------------------------------------------------------------------------------- /src/dos/clip.asm: -------------------------------------------------------------------------------- 1 | ; CLIP.ASM-- 2 | ; Copyright (C) 2015 Doszip Developers 3 | 4 | include clip.inc 5 | include string.inc 6 | include conio.inc 7 | include alloc.inc 8 | 9 | .data 10 | winoldap dw ? 11 | clipbsize dw ? 12 | clipboard dd ? 13 | 14 | .code 15 | 16 | OpenClipboard PROC PRIVATE 17 | sub ax,ax 18 | .if winoldap != ax 19 | mov ax,1701h ; OPEN CLIPBOARD 20 | int 2Fh ; nonzero success, else already open 21 | inc ax 22 | .endif 23 | ret 24 | OpenClipboard ENDP 25 | 26 | CloseClipboard PROC PRIVATE 27 | push dx 28 | push ax 29 | mov ax,1708h ; INT 2F - MS Windows - CloseClipboard 30 | int 2Fh 31 | pop ax 32 | pop dx 33 | ret 34 | CloseClipboard ENDP 35 | 36 | ClearClipboard PROC PRIVATE 37 | invoke free,clipboard 38 | sub ax,ax 39 | mov clipbsize,ax 40 | mov dx,ax 41 | stom clipboard 42 | ret 43 | ClearClipboard ENDP 44 | 45 | ClipboardFree PROC _CType PUBLIC 46 | invoke ClearClipboard 47 | ret 48 | ClipboardFree ENDP 49 | 50 | ClipboardCopy PROC _CType PUBLIC USES si di bx string:DWORD, len:size_t 51 | mov di,len 52 | call ClearClipboard 53 | .if console & CON_CLIPB 54 | call OpenClipboard 55 | .if !ZERO? 56 | mov ax,1702h ; EMPTY CLIPBOARD 57 | int 2Fh ; AX nonzero clipboard has been emptied 58 | mov dx,1 ; set type to text 59 | mov cx,di ; SI:CX = size of data 60 | xor si,si ; HSIZE = 0 61 | les bx,string ; ES:BX = data 62 | mov ax,1703h ; SET CLIPBOARD DATA 63 | int 2Fh 64 | call CloseClipboard 65 | test ax,ax ; nonzero data copied into the Clipboard 66 | mov ax,di 67 | jnz @F 68 | .endif 69 | mov ax,di 70 | inc ax 71 | .if malloc(ax) 72 | stom clipboard 73 | mov clipbsize,di 74 | mov es,dx 75 | mov bx,ax 76 | add bx,di 77 | mov BYTE PTR es:[bx],0 78 | invoke memcpy,dx::ax,string,di 79 | mov ax,di 80 | .endif 81 | .endif 82 | @@: 83 | ret 84 | ClipboardCopy ENDP 85 | 86 | ClipboardPaste PROC _CType PUBLIC USES bx 87 | .if (console & CON_CLIPB) 88 | mov ax,1701h ; OPEN CLIPBOARD 89 | int 2Fh ; nonzero success, else already open 90 | mov ax,1704h ; GET CLIPBOARD DATA SIZE 91 | mov dx,1 ; DX = clipboard format supported 92 | int 2Fh ; DX:AX = size of data in bytes 93 | .if dx 94 | sub ax,ax ; to big.. 95 | .endif 96 | call CloseClipboard 97 | .if !ax || ax >= MAXCLIPSIZE 98 | sub ax,ax 99 | .if clipbsize != ax 100 | lodm clipboard 101 | .endif 102 | .else 103 | push ax 104 | push ax 105 | call ClearClipboard 106 | call malloc 107 | pop cx 108 | .if ax 109 | mov clipbsize,cx 110 | stom clipboard 111 | invoke memzero,dx::ax,cx 112 | mov ax,1701h 113 | int 2Fh 114 | mov dx,1 115 | les bx,clipboard 116 | mov ax,1705h 117 | int 2Fh 118 | call CloseClipboard 119 | lodm clipboard 120 | .endif 121 | .endif 122 | .else 123 | .if clipbsize 124 | lodm clipboard 125 | .else 126 | sub ax,ax 127 | cwd 128 | .endif 129 | .endif 130 | test ax,ax 131 | ret 132 | ClipboardPaste ENDP 133 | 134 | Install: 135 | .if console & CON_CLIPB 136 | mov ax,1700h 137 | int 2Fh 138 | mov dx,ax 139 | xor ax,ax ; AX <> 1700h 140 | .if dx != 1700h ; - AL = WINOLDAP major version 141 | inc ax ; - AH = WINOLDAP minor version 142 | .endif 143 | mov winoldap,ax 144 | .endif 145 | ret 146 | 147 | _TEXT ENDS 148 | 149 | pragma_init Install,12 150 | 151 | END 152 | -------------------------------------------------------------------------------- /src/dos/cmexit.asm: -------------------------------------------------------------------------------- 1 | ; CMEXIT.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include conio.inc 6 | 7 | _DZIP segment 8 | 9 | cmexit PROC _CType PUBLIC 10 | test BYTE PTR config.c_confirm,_C_CONFEXIT 11 | jz cmquit 12 | invoke rsmodal,IDD_DZExit 13 | test ax,ax 14 | jnz cmquit 15 | ret 16 | cmexit ENDP 17 | 18 | cmquit PROC _CType PUBLIC 19 | mov ax,1 20 | mov mainswitch,ax 21 | ret 22 | cmquit ENDP 23 | 24 | _DZIP ENDS 25 | 26 | END 27 | -------------------------------------------------------------------------------- /src/dos/cmhelp.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/cmhelp.asm -------------------------------------------------------------------------------- /src/dos/cmmkdir.asm: -------------------------------------------------------------------------------- 1 | ; CMMKDIR.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include conio.inc 6 | include errno.inc 7 | ifdef __ZIP__ 8 | include dzzip.inc 9 | endif 10 | 11 | extrn cp_mkdir:BYTE 12 | 13 | _DZIP segment 14 | 15 | cmmkdir PROC _CType PUBLIC 16 | local path[WMAXPATH]:BYTE 17 | ifdef __ROT__ 18 | mov bx,cpanel 19 | mov bx,[bx] 20 | test [bx].S_PATH.wp_flag,_W_ROOTDIR 21 | jnz toend 22 | endif 23 | mov ax,cpanel 24 | call panel_state 25 | jz toend 26 | mov path,0 27 | invoke tgetline,addr cp_mkdir,addr path,0028h,0104h 28 | or ax,ax 29 | jz toend 30 | xor ax,ax 31 | cmp path,al 32 | je toend 33 | mov bx,cpanel 34 | ifdef __ZIP__ 35 | push bx 36 | mov bx,[bx] 37 | test [bx].S_PATH.wp_flag,_W_ARCHZIP 38 | pop bx 39 | jz @F 40 | invoke wzipmkdir,[bx].S_PANEL.pn_wsub,addr path 41 | jmp update 42 | @@: 43 | endif 44 | .if mkdir(addr path) 45 | invoke ermkdir,addr path 46 | .endif 47 | update: 48 | call ret_update_AB 49 | toend: 50 | ret 51 | cmmkdir ENDP 52 | 53 | _DZIP ENDS 54 | 55 | END 56 | -------------------------------------------------------------------------------- /src/dos/com.asm: -------------------------------------------------------------------------------- 1 | ; COM.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include string.inc 6 | include conio.inc 7 | include tinfo.inc 8 | include keyb.inc 9 | 10 | PUBLIC com_base 11 | PUBLIC com_wsub 12 | PUBLIC com_info 13 | 14 | tihndlevent PROTO _CType :WORD, :WORD 15 | 16 | .data 17 | com_push db 1 18 | com_base db WMAXPATH dup(?) 19 | com_info S_TINFO > 21 | com_wsub dw offset wspanela 22 | dw SEG _DATA 23 | 24 | _DZIP segment 25 | 26 | comhndlevent PROC PRIVATE 27 | .if cflag & _C_COMMANDLINE 28 | push offset com_info 29 | push ax 30 | call cursoron 31 | call tihndlevent 32 | .else 33 | xor ax,ax 34 | .endif 35 | ret 36 | comhndlevent ENDP 37 | 38 | comevent PROC pascal PUBLIC USES si event:WORD 39 | mov ax,event 40 | mov si,1 41 | .if ax == KEY_UP 42 | call cpanel_state 43 | .if !ZERO? 44 | dec si 45 | .else 46 | call cmdoskey_up 47 | .endif 48 | .elseif ax == KEY_DOWN 49 | call cpanel_state 50 | .if !ZERO? 51 | dec si 52 | .else 53 | call cmdoskey_dn 54 | .endif 55 | .elseif ax == KEY_ALTRIGHT 56 | call cmpathright 57 | .elseif ax == KEY_ALTLEFT 58 | call cmpathleft 59 | .else 60 | .if !ax || ax == KEY_CTRLX 61 | dec si 62 | .elseif comhndlevent() 63 | dec si 64 | .endif 65 | .endif 66 | mov ax,si 67 | ret 68 | comevent ENDP 69 | 70 | comhide PROC PUBLIC 71 | invoke dlhide,DLG_Commandline 72 | call cursoroff 73 | ret 74 | comhide ENDP 75 | 76 | comshow PROC PUBLIC 77 | mov ax,com_info.ti_ypos 78 | xor bx,bx 79 | .if BYTE PTR prect_b & _D_ONSCR 80 | mov bx,offset prect_b 81 | .elseif BYTE PTR prect_a & _D_ONSCR 82 | mov bx,offset prect_a 83 | .endif 84 | .if bx 85 | mov dl,[bx].S_DOBJ.dl_rect.S_RECT.rc_y 86 | add dl,[bx].S_DOBJ.dl_rect.S_RECT.rc_row 87 | .if dl > al 88 | mov al,dl 89 | .endif 90 | .endif 91 | .if !al && cflag & _C_MENUSLINE 92 | inc al 93 | .endif 94 | .if al >= _scrrow && cflag & _C_STATUSLINE 95 | dec al 96 | .endif 97 | .if al > _scrrow 98 | mov al,_scrrow 99 | .endif 100 | mov BYTE PTR com_info.ti_ypos,al 101 | les bx,DLG_Commandline 102 | mov es:[bx+5],al 103 | .if cflag & _C_COMMANDLINE 104 | invoke gotoxy,0,ax 105 | call cursoron 106 | invoke dlshow,DLG_Commandline 107 | call cominitline 108 | .endif 109 | ret 110 | comshow ENDP 111 | 112 | cominitline PROC PRIVATE 113 | les bx,DLG_Commandline 114 | .if BYTE PTR es:[bx] & _D_ONSCR 115 | mov ax,es:[bx+4] 116 | mov com_info.ti_cursor.cr_xy,ax 117 | mov BYTE PTR com_info.ti_ypos,ah 118 | mov BYTE PTR com_info.ti_xpos,al 119 | mov bx,com_wsub 120 | invoke strlen,[bx].S_WSUB.ws_path 121 | inc ax 122 | .if ax > 51 123 | mov ax,51 124 | .endif 125 | mov com_info.ti_xpos,ax 126 | mov dl,80 127 | sub dl,al 128 | mov BYTE PTR com_info.ti_cols,dl 129 | mov dx,com_info.ti_ypos 130 | invoke scputw,0,dx,80,' ' 131 | mov bx,com_wsub 132 | invoke scpath,0,dx,50,[bx].S_WSUB.ws_path 133 | mov bl,BYTE PTR com_info.ti_xpos 134 | dec bl 135 | invoke scputw,bx,dx,1,62 ; '>' 136 | inc bl 137 | invoke gotoxy,bx,dx 138 | mov ax,KEY_PGUP 139 | call comhndlevent 140 | .endif 141 | ret 142 | cominitline ENDP 143 | 144 | cominit PROC pascal PUBLIC wsub:DWORD 145 | movmm com_wsub,wsub 146 | invoke wsinit,dx::ax 147 | call cominitline 148 | mov ax,1 149 | ret 150 | cominit ENDP 151 | 152 | cmclrcmdl PROC _CType PUBLIC 153 | .if cflag & _C_ESCUSERSCR 154 | call cmtoggleon 155 | .endif 156 | cmclrcmdl ENDP 157 | 158 | clrcmdl PROC _CType PUBLIC 159 | invoke comevent, KEY_HOME 160 | mov com_base,0 161 | call cominitline 162 | ret 163 | clrcmdl ENDP 164 | 165 | _DZIP ENDS 166 | 167 | END 168 | -------------------------------------------------------------------------------- /src/dos/confirm.asm: -------------------------------------------------------------------------------- 1 | ; CONFIRM.ASM-- 2 | ; Copyright (C) 2015 Doszip Developers 3 | 4 | include dos.inc 5 | include conio.inc 6 | include confirm.inc 7 | 8 | ID_DELETE equ 1 ; return 1 9 | ID_DELETEALL equ 2 ; return 1 + update confirmflag 10 | ID_SKIPFILE equ 3 ; return 0 11 | ID_CANCEL equ 0 ; return -1 12 | 13 | extrn IDD_ConfirmContinue:DWORD 14 | extrn IDD_ConfirmDelete:DWORD 15 | 16 | PUBLIC confirmflag 17 | 18 | .data 19 | confirmflag dw -1 20 | cp_delselected db " You have selected %d file(s)",10 21 | db "Do you want to delete all the files",0 22 | cp_delflag db " Do you still wish to delete it?",0 23 | 24 | .code 25 | 26 | confirm_continue PROC _CType PUBLIC msg:PTR BYTE 27 | local dialog:DWORD 28 | .if rsopen(IDD_ConfirmContinue) 29 | stom dialog 30 | invoke dlshow,dx::ax 31 | lodm msg 32 | .if ax 33 | push bx 34 | les bx,dialog 35 | mov cl,es:[bx][5] 36 | mov bl,es:[bx][4] 37 | add cl,02h 38 | add bl,04h 39 | invoke scpath,bx,cx,34,dx::ax 40 | pop bx 41 | .endif 42 | invoke dlmodal,dialog 43 | .endif 44 | ret 45 | confirm_continue ENDP 46 | 47 | ; 48 | ; ret: 0 Cancel 49 | ; 1 Delete 50 | ; 2 Delete All 51 | ; 3 Jump 52 | ; 53 | confirm_delete PROC _CType PUBLIC USES bx info:PTR BYTE, selected:size_t 54 | local DLG_ConfirmDelete:DWORD 55 | .if rsopen(IDD_ConfirmDelete) 56 | stom DLG_ConfirmDelete 57 | invoke dlshow,dx::ax 58 | les bx,DLG_ConfirmDelete 59 | sub ax,ax 60 | mov al,es:[bx][4] 61 | mov dx,ax 62 | mov al,es:[bx][5] 63 | mov bx,ax 64 | add bx,2 ; y 65 | add dx,12 ; x 66 | mov ax,selected 67 | .if ax > 1 && ax < 8000h 68 | invoke scputf,dx,bx,0,0,addr cp_delselected,ax 69 | .else 70 | push dx 71 | .if ax == -2 72 | scputf(dx,bx,0,0, 73 | "The following file is marked System.\n\n%s", 74 | addr cp_delflag) 75 | .elseif ax == -1 76 | sub dx,2 77 | scputf(dx,bx,0,0, 78 | "The following file is marked Read only.\n\n %s", 79 | addr cp_delflag) 80 | .else 81 | add dx,6 82 | scputf(dx,bx,0,0,"Do you wish to delete") 83 | .endif 84 | pop dx 85 | inc bx 86 | sub dx,9 87 | invoke scenter,dx,bx,53,info 88 | .endif 89 | invoke beep,50,6 90 | invoke rsevent,IDD_ConfirmDelete,DLG_ConfirmDelete 91 | invoke dlclose,DLG_ConfirmDelete 92 | mov ax,dx 93 | .endif 94 | ret 95 | confirm_delete ENDP 96 | 97 | confirm_delete_file PROC _CType PUBLIC USES si fname:PTR BYTE, flag:size_t 98 | mov ax,flag 99 | mov dx,confirmflag 100 | .if al & _A_RDONLY && dl & CFREADONY 101 | mov ax,-1 102 | mov si,not (CFREADONY or CFDELETEALL) 103 | .elseif al & _A_SYSTEM && dl & CFSYSTEM 104 | mov ax,-2 105 | mov si,not (CFSYSTEM or CFDELETEALL) 106 | .elseif dl & CFDELETEALL 107 | xor ax,ax 108 | mov si,not CFDELETEALL 109 | .else 110 | mov ax,1 111 | jmp @F 112 | .endif 113 | .if confirm_delete(fname,ax) == ID_DELETEALL 114 | and confirmflag,si 115 | mov ax,1 116 | .elseif ax == ID_SKIPFILE 117 | xor ax,ax 118 | .elseif ax != ID_DELETE 119 | mov ax,-1 120 | .endif 121 | @@: 122 | ret 123 | confirm_delete_file ENDP 124 | 125 | confirm_delete_sub PROC _CType PUBLIC path:PTR BYTE 126 | mov ax,1 127 | .if confirmflag & CFDIRECTORY 128 | .if confirm_delete(path,1) == ID_DELETEALL 129 | and confirmflag,not (CFDIRECTORY or CFDELETEALL) 130 | mov ax,1 131 | .elseif ax == ID_SKIPFILE 132 | mov ax,-1 133 | .elseif ax != ID_DELETE 134 | xor ax,ax 135 | .endif 136 | .endif 137 | ret 138 | confirm_delete_sub ENDP 139 | 140 | END 141 | -------------------------------------------------------------------------------- /src/dos/conio.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/conio.asm -------------------------------------------------------------------------------- /src/dos/cursor.asm: -------------------------------------------------------------------------------- 1 | ; CURSOR.ASM-- 2 | ; Copyright (C) 2015 Doszip Developers 3 | 4 | include conio.inc 5 | 6 | .code 7 | 8 | cursoroff PROC _CType PUBLIC 9 | push ax 10 | push cx 11 | mov cx,CURSOR_HIDDEN 12 | mov ax,0103h 13 | int 10h 14 | pop cx 15 | pop ax 16 | ret 17 | cursoroff ENDP 18 | 19 | cursoron PROC _CType PUBLIC 20 | push ax 21 | push cx 22 | mov cx,CURSOR_NORMAL 23 | mov ah,1 24 | int 10h 25 | pop cx 26 | pop ax 27 | ret 28 | cursoron ENDP 29 | 30 | cursorx PROC _CType PUBLIC 31 | push bx 32 | mov bh,0 33 | mov ah,3 34 | int 10h 35 | xor ax,ax 36 | mov al,dl 37 | mov dl,dh 38 | mov dh,0 39 | pop bx 40 | ret 41 | cursorx ENDP 42 | 43 | cursory PROC _CType PUBLIC 44 | push bx 45 | mov bh,0 46 | mov ah,3 47 | int 10h 48 | xor ax,ax 49 | mov al,dh 50 | pop bx 51 | ret 52 | cursory ENDP 53 | 54 | gotoxy PROC _CType PUBLIC x:size_t, y:size_t 55 | push bx 56 | mov dh,BYTE PTR y 57 | mov dl,BYTE PTR x 58 | mov bh,0 59 | mov ah,2 60 | int 10h 61 | pop bx 62 | ret 63 | gotoxy ENDP 64 | 65 | cursorget PROC _CType PUBLIC USES bx cursor:DWORD 66 | mov ah,3 67 | mov bh,0 68 | int 10h 69 | xor ax,ax 70 | les bx,cursor 71 | mov es:[bx],dx 72 | mov es:[bx+2],cx 73 | cmp cx,CURSOR_HIDDEN 74 | je @F 75 | inc ax 76 | @@: 77 | ret 78 | cursorget ENDP 79 | 80 | cursorset PROC _CType PUBLIC USES ax cursor:DWORD 81 | push bx 82 | push cx 83 | push dx 84 | les bx,cursor 85 | mov cx,es:[bx].S_CURSOR.cr_type 86 | push es:[bx].S_CURSOR.cr_xy 87 | mov ah,1 88 | mov bh,0 89 | int 10h 90 | pop dx 91 | mov ah,2 92 | int 10h 93 | pop dx 94 | pop cx 95 | pop bx 96 | ret 97 | cursorset ENDP 98 | 99 | END 100 | -------------------------------------------------------------------------------- /src/dos/emm.asm: -------------------------------------------------------------------------------- 1 | ; EMM.ASM-- 2 | ; Copyright (C) 2015 Doszip Developers 3 | 4 | include alloc.inc 5 | include string.inc 6 | 7 | PUBLIC dzemm 8 | 9 | conventional equ 0 10 | expanded equ 1 11 | emmpage equ 4000h 12 | 13 | S_EMM STRUC 14 | dlength dd ? ; region length in bytes 15 | src_type db ? ; source memory type 16 | src_handle dw ? ; 0000h if conventional memory 17 | src_off dw ? ; within page if EMS, segment if convent 18 | src_seg dw ? ; segment or logical page (EMS) 19 | des_type db ? ; destination memory type 20 | des_handle dw ? ; 21 | des_off dw ? ; in page 22 | des_seg dw ? ; or page 23 | S_EMM ENDS 24 | 25 | .data 26 | 27 | emmstate db 0 28 | dzemm db 0 29 | 30 | .code 31 | 32 | emmalloc PROC _CType PUBLIC pages:word 33 | push bx 34 | mov bx,pages 35 | mov ah,43h 36 | int 67h 37 | pop bx 38 | test ah,ah 39 | jz @F 40 | mov dx,-1 41 | @@: 42 | mov ax,dx 43 | ret 44 | emmalloc ENDP 45 | 46 | emmfree PROC _CType PUBLIC handle 47 | mov dx,handle ; DX EMM handle 48 | mov ah,45h ; RELEASE HANDLE AND MEMORY 49 | int 67h 50 | test ah,ah 51 | mov ax,0 52 | jz @F 53 | dec ax 54 | @@: 55 | ret 56 | emmfree ENDP 57 | 58 | emmversion PROC _CType PUBLIC 59 | sub ax,ax 60 | .if emmstate != al 61 | mov ah,46h 62 | int 67h 63 | .if ah 64 | sub ax,ax 65 | .endif 66 | .endif 67 | ret 68 | emmversion ENDP 69 | 70 | emmnumfreep PROC _CType PUBLIC 71 | push bx 72 | .if emmversion() 73 | .if dzemm 74 | mov ax,1024 75 | .else 76 | mov ah,42h ; BX = number of unallocated pages 77 | int 67h ; DX = total number of pages 78 | .if ah 79 | sub ax,ax 80 | .else 81 | mov ax,bx 82 | .endif 83 | .endif 84 | .endif 85 | pop bx 86 | ret 87 | emmnumfreep ENDP 88 | 89 | emmread PROC _CType PUBLIC dest:DWORD, emhnd:size_t, wpage:size_t 90 | local emm:S_EMM 91 | push si 92 | mov WORD PTR emm.dlength+2,0 93 | mov WORD PTR emm.dlength,emmpage 94 | mov emm.des_type,conventional 95 | mov emm.des_handle,0 96 | mov ax,WORD PTR dest 97 | mov emm.des_off,ax 98 | mov ax,WORD PTR dest+2 99 | mov emm.des_seg,ax 100 | mov emm.src_type,expanded 101 | mov ax,emhnd 102 | mov emm.src_handle,ax 103 | mov emm.src_off,0 104 | mov ax,wpage 105 | mov emm.src_seg,ax 106 | mov ax,5700h 107 | lea si,emm 108 | int 67h 109 | mov al,ah 110 | mov ah,0 111 | pop si 112 | ret 113 | emmread ENDP 114 | 115 | emmwrite PROC _CType PUBLIC src:DWORD, emhnd:size_t, wpage:size_t 116 | local emm:S_EMM 117 | push si 118 | mov WORD PTR emm.dlength+2,0 119 | mov WORD PTR emm.dlength,emmpage 120 | mov emm.src_type,conventional 121 | mov emm.src_handle,0 122 | mov ax,WORD PTR src 123 | mov emm.src_off,ax 124 | mov ax,WORD PTR src+2 125 | mov emm.src_seg,ax 126 | mov emm.des_type,expanded 127 | mov ax,emhnd 128 | mov emm.des_handle,ax 129 | mov emm.des_off,0 130 | mov ax,wpage 131 | mov emm.des_seg,ax 132 | mov ax,5700h 133 | lea si,emm 134 | int 67h 135 | mov al,ah 136 | mov ah,0 137 | pop si 138 | ret 139 | emmwrite ENDP 140 | 141 | emminit: 142 | mov ah,35h 143 | mov al,67h 144 | int 21h 145 | mov bx,10 146 | mov ax,es:[bx] 147 | cmp ax,'ME' 148 | jne @F 149 | mov ax,es:[bx+2] 150 | cmp ax,'XM' 151 | jne @F 152 | mov ah,46h ; get EMM version 153 | int 67h 154 | test ah,ah 155 | jnz @F 156 | cmp al,40h ; 4.0 157 | jb @F 158 | inc emmstate 159 | mov ax,4000h ; get DZEMM state 160 | int 67h ; return AX = 0001 161 | dec ax 162 | jnz @F 163 | inc dzemm 164 | @@: 165 | ret 166 | 167 | pragma_init emminit, 6 168 | 169 | END 170 | -------------------------------------------------------------------------------- /src/dos/fblk.asm: -------------------------------------------------------------------------------- 1 | ; CPDATEFR.ASM-- 2 | ; Copyright (C) 2015 Doszip Developers 3 | 4 | include dos.inc 5 | include time.inc 6 | include alloc.inc 7 | include string.inc 8 | include conio.inc 9 | include wsub.inc 10 | include fblk.inc 11 | 12 | PUBLIC cp_datefrm 13 | PUBLIC cp_dotdot 14 | PUBLIC cp_timefrm 15 | PUBLIC fbcolor 16 | 17 | .data 18 | cp_datefrm db "%2u.%02u.%02u",0 19 | cp_dotdot db "..",0 20 | cp_timefrm db "%2u:%02u",0 21 | 22 | .code 23 | 24 | fbcolor PROC _CType 25 | .if ax & _A_SELECTED 26 | mov al,at_foreground[F_Panel] 27 | .elseif ax & _A_UPDIR 28 | mov al,at_foreground[F_Desktop] 29 | .elseif ax & _A_SYSTEM 30 | mov al,at_foreground[F_System] 31 | .elseif ax & _A_HIDDEN 32 | mov al,at_foreground[F_Hidden] 33 | .elseif ax & _A_SUBDIR 34 | mov al,at_foreground[F_Subdir] 35 | .else 36 | mov al,at_foreground[F_Files] 37 | .endif 38 | or al,at_background[B_Panel] 39 | ret 40 | fbcolor ENDP 41 | 42 | fbffirst PROC _CType PUBLIC fcb:DWORD, count:size_t 43 | xor dx,dx 44 | jmp fbffirst_init 45 | fbffirst_loop: 46 | mov ax,dx 47 | shl ax,2 48 | push bx 49 | les bx,fcb 50 | add bx,ax 51 | les bx,es:[bx] 52 | mov cx,es:[bx] 53 | mov ax,bx 54 | pop bx 55 | test cx,_A_SELECTED 56 | jz fbffirst_next 57 | mov dx,es 58 | jmp fbffirst_end 59 | fbffirst_next: 60 | inc dx 61 | fbffirst_init: 62 | cmp count,dx 63 | jg fbffirst_loop 64 | xor ax,ax 65 | mov dx,ax 66 | fbffirst_end: 67 | ret 68 | fbffirst ENDP 69 | 70 | fbinvert PROC _CType PUBLIC fblk:DWORD 71 | sub ax,ax 72 | les bx,fblk 73 | .if !es:[bx].S_FBLK.fb_flag & _A_UPDIR 74 | xor es:[bx].S_FBLK.fb_flag,_A_SELECTED 75 | inc ax 76 | .endif 77 | ret 78 | fbinvert ENDP 79 | 80 | fbselect PROC _CType PUBLIC fblk:DWORD 81 | sub ax,ax 82 | les bx,fblk 83 | .if !es:[bx].S_FBLK.fb_flag & _A_UPDIR 84 | or es:[bx].S_FBLK.fb_flag,_A_SELECTED 85 | inc ax 86 | .endif 87 | ret 88 | fbselect ENDP 89 | 90 | fballoc PROC _CType PUBLIC USES bx fname:PTR BYTE, ftime:DWORD, fsize:DWORD, flag:size_t 91 | invoke strlen,fname 92 | add ax,S_FBLK 93 | .if malloc(ax) 94 | add ax,S_FBLK.fb_name 95 | invoke strcpy,dx::ax,fname 96 | sub ax,S_FBLK.fb_name 97 | mov bx,ax 98 | mov cx,flag 99 | mov es:[bx].S_FBLK.fb_flag,cx 100 | movmx es:[bx].S_FBLK.fb_time,ftime 101 | movmx es:[bx].S_FBLK.fb_size,fsize 102 | mov ax,bx 103 | .endif 104 | ret 105 | fballoc ENDP 106 | 107 | fballocff PROC _CType PUBLIC USES bx ffblk:DWORD, flag:size_t 108 | les bx,ffblk 109 | sub cx,cx 110 | mov cl,BYTE PTR es:[bx].S_FFBLK.ff_attrib 111 | or cx,flag 112 | .if fballoc(addr es:[bx].S_FFBLK.ff_name,DWORD PTR es:[bx].S_FFBLK.ff_ftime, 113 | es:[bx].S_FFBLK.ff_fsize,cx) 114 | mov bx,ax 115 | .if WORD PTR es:[bx].S_FBLK.fb_name == '..' && es:[bx].S_FBLK.fb_name[2] == 0 116 | or es:[bx].S_FBLK.fb_flag,_A_UPDIR 117 | .endif 118 | .if !(cl & _A_SUBDIR) 119 | add ax,S_FBLK.fb_name 120 | .if cl & _A_SYSTEM or _A_HIDDEN 121 | inc ax 122 | .endif 123 | invoke strlwr,dx::ax 124 | mov ax,bx 125 | .endif 126 | .endif 127 | ret 128 | fballocff ENDP 129 | 130 | fballocwf PROC _CType PUBLIC USES di bx wfblk:DWORD, flag:size_t 131 | les bx,wfblk 132 | mov di,bx 133 | mov ax,flag 134 | or al,es:[bx] 135 | and al,_A_FATTRIB 136 | mov cx,ax 137 | add bx,S_WFBLK.wf_name 138 | lodm es:[di].S_WFBLK.wf_time 139 | .if cl & _A_SUBDIR 140 | lodm es:[di].S_WFBLK.wf_timecreate 141 | .endif 142 | .if fballoc(es::bx,dx::ax,es:[di].S_WFBLK.wf_sizeax,cx) 143 | .if cl & _A_SUBDIR && \ 144 | WORD PTR es:[bx].S_FBLK.fb_name == '..' && \ 145 | BYTE PTR es:[bx].S_FBLK.fb_name[2] == 0 146 | or es:[bx].S_FBLK.fb_flag,_A_UPDIR 147 | .endif 148 | .endif 149 | ret 150 | fballocwf ENDP 151 | 152 | fbupdir PROC _CType PUBLIC flag:size_t 153 | call dostime 154 | mov cx,flag 155 | or cx,_A_UPDIR or _A_SUBDIR 156 | invoke fballoc,addr cp_dotdot,dx::ax,0,cx 157 | ret 158 | fbupdir ENDP 159 | 160 | END 161 | -------------------------------------------------------------------------------- /src/dos/filter.asm: -------------------------------------------------------------------------------- 1 | ; FILTER.ASM-- 2 | ; Copyright (C) 2015 Doszip Developers 3 | 4 | include dos.inc 5 | include fblk.inc 6 | include string.inc 7 | include filter.inc 8 | 9 | PUBLIC filter 10 | PUBLIC filter_fblk 11 | PUBLIC filter_wblk 12 | 13 | .data 14 | filter dd ? 15 | 16 | .code 17 | 18 | binary: ; CX = flag, AX = date, BX:DX = size 19 | mov si,WORD PTR filter 20 | test si,si 21 | jz binary_ok 22 | cmp ax,[si].S_FILT.of_min_date 23 | jb binary_fail 24 | cmp [si].S_FILT.of_max_date,0 25 | je binary_min 26 | cmp ax,[si].S_FILT.of_max_date 27 | ja binary_fail 28 | binary_min: 29 | ifdef __3__ 30 | cmp edx,[si].S_FILT.of_min_size 31 | else 32 | cmp bx,WORD PTR [si].S_FILT.of_min_size[2] 33 | jb binary_fail 34 | ja binary_max 35 | mov ax,dx 36 | cmp ax,WORD PTR [si].S_FILT.of_min_size 37 | endif 38 | jb binary_fail 39 | binary_max: 40 | ifndef __16__ 41 | mov eax,[si].S_FILT.of_max_size 42 | test eax,eax 43 | jz binary_03 44 | cmp edx,eax 45 | else 46 | mov ax,WORD PTR [si].S_FILT.of_max_size[2] 47 | test ax,ax 48 | jz @F 49 | cmp bx,ax 50 | ja binary_fail 51 | jb binary_03 52 | @@: 53 | mov ax,WORD PTR [si].S_FILT.of_max_size 54 | test ax,ax 55 | jz binary_03 56 | cmp dx,ax 57 | endif 58 | ja binary_fail 59 | binary_03: 60 | mov ax,cx 61 | and ax,[si] 62 | cmp ax,cx 63 | jne binary_fail 64 | binary_ok: 65 | xor ax,ax 66 | inc ax 67 | binary_end: 68 | ret 69 | binary_fail: 70 | xor ax,ax 71 | jmp binary_end 72 | 73 | string: 74 | xor ax,ax 75 | cmp al,[si].S_FILT.of_include 76 | je string_01 77 | push es 78 | invoke cmpwargs,es::bx,addr [si].S_FILT.of_include 79 | pop es 80 | jz string_02 81 | xor ax,ax 82 | string_01: 83 | cmp al,[si].S_FILT.of_exclude 84 | je string_03 85 | invoke cmpwargs,es::bx,addr [si].S_FILT.of_exclude 86 | jz string_03 87 | string_02: 88 | xor ax,ax 89 | ret 90 | string_03: 91 | xor ax,ax 92 | inc ax 93 | ret 94 | 95 | filter_fblk PROC _CType PUBLIC USES si bx fb:DWORD 96 | les bx,fb 97 | mov ax,WORD PTR es:[bx].S_FBLK.fb_time+2 98 | mov cx,WORD PTR es:[bx].S_FBLK.fb_flag 99 | ifndef __16__ 100 | mov edx,es:[bx].S_FBLK.fb_size 101 | else 102 | mov dx,WORD PTR es:[bx].S_FBLK.fb_size 103 | mov bx,WORD PTR es:[bx].S_FBLK.fb_size+2 104 | endif 105 | call binary 106 | jz @F 107 | test si,si 108 | jz @F 109 | les bx,fb 110 | add bx,S_FBLK.fb_name 111 | call string 112 | @@: 113 | test ax,ax 114 | ret 115 | filter_fblk ENDP 116 | 117 | filter_wblk PROC _CType PUBLIC USES si bx wf:DWORD 118 | les bx,wf 119 | mov ax,WORD PTR es:[bx].S_WFBLK.wf_time 120 | mov cx,WORD PTR es:[bx].S_WFBLK.wf_attrib 121 | ifdef __3__ 122 | mov edx,es:[bx].S_WFBLK.wf_sizeax 123 | else 124 | mov dx,WORD PTR es:[bx].S_WFBLK.wf_sizeax 125 | mov bx,WORD PTR es:[bx].S_WFBLK.wf_sizeax[2] 126 | endif 127 | call binary 128 | jz filter_wblk_00 129 | test si,si 130 | jz filter_wblk_00 131 | les bx,wf 132 | add bx,S_WFBLK.wf_name 133 | call string 134 | filter_wblk_00: 135 | test ax,ax 136 | ret 137 | filter_wblk ENDP 138 | 139 | END 140 | -------------------------------------------------------------------------------- /src/dos/inc/alloc.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | palloc PROTO _CType ; <-- ax size in para 8 | malloc PROTO _CType :WORD 9 | free PROTO _CType :DWORD 10 | coreleft PROTO _CType 11 | nalloc PROTO _CType :WORD 12 | nfree PROTO _CType :WORD 13 | 14 | EMMPAGE equ 4000h 15 | 16 | externdef dzemm:BYTE ; dzemm.dll 17 | 18 | emmcoreleft PROTO _CType ; dx:ax core left : NULL 19 | emmalloc PROTO _CType :WORD ; (pages) ax handle : -1 20 | emmfree PROTO _CType :WORD ; (handle) ax 0 : ? 21 | emmread PROTO _CType :DWORD, :WORD, :WORD ; (void *, handle, page) ax 0 : ? 22 | emmwrite PROTO _CType :DWORD, :WORD, :WORD ; (void *, handle, page) ax 0 : ? 23 | emmversion PROTO _CType ; ax version : 0 24 | emmnumfreep PROTO _CType ; ax unallocated page count : 0 25 | 26 | .list 27 | 28 | -------------------------------------------------------------------------------- /src/dos/inc/clip.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | MAXCLIPSIZE equ 64000 8 | 9 | externdef clipboard: DWORD 10 | externdef clipbsize: WORD 11 | 12 | ClipboardCopy PROTO _CType :DWORD, :WORD 13 | ClipboardPaste PROTO _CType 14 | ClipboardFree PROTO _CType 15 | 16 | .list 17 | -------------------------------------------------------------------------------- /src/dos/inc/confirm.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | 3 | CFREADONY equ 0001h 4 | CFSYSTEM equ 0002h 5 | CFDIRECTORY equ 0004h 6 | CFSELECTED equ 0008h 7 | CFDELETEALL equ 0010h 8 | 9 | externdef confirmflag:WORD 10 | 11 | confirm_continue PROTO _CType :PTR BYTE 12 | confirm_delete PROTO _CType :PTR BYTE, :WORD 13 | confirm_delete_file PROTO _CType :PTR BYTE, :WORD 14 | confirm_delete_sub PROTO _CType :PTR BYTE 15 | 16 | .list 17 | 18 | -------------------------------------------------------------------------------- /src/dos/inc/ctype.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | _UPPER equ 01h ; upper case letter 8 | _LOWER equ 02h ; lower case letter 9 | _DIGIT equ 04h ; digit[0-9] 10 | _SPACE equ 08h ; tab, carriage return, newline, vertical tab or form feed 11 | _PUNCT equ 10h ; punctuation character 12 | _CONTROL equ 20h ; control character 13 | _BLANK equ 40h ; space char 14 | _HEX equ 80h ; hexadecimal digit 15 | 16 | 17 | externdef __ctype: BYTE ; 257 18 | getctype PROTO ; arg: AL, return AH 19 | 20 | ; arg: AL, return ZF 21 | isspace PROTO ; space, tab, carriage return, new line, vertical tab, 22 | ; or formfeed (0x09 to 0x0D, 0x20) 23 | isupper PROTO ; uppercase letter (A to Z) 24 | islabel PROTO ; lower | upper | digit | '_' 25 | 26 | isalpha PROTO ; letter (A to Z or a to z) 27 | isascii PROTO ; the low order byte of c is in the range 0 to 127 28 | ; (0x00--0x7F) 29 | iscntrl PROTO ; delete character or ordinary control character 30 | ; (0x7F or 0x00 to 0x1F) 31 | isdigit PROTO ; digit (0 to 9) 32 | isprint PROTO ; printing character 33 | isgraph PROTO ; printing character, like isprint, except that 34 | ; a space character is excluded 35 | islower PROTO ; lowercase letter (a to z) 36 | isprint PROTO ; printing character (0x20 to 0x7E) 37 | ispunct PROTO ; punctuation character (iscntrl or isspace) 38 | isxdigit PROTO ; hexadecimal digit (0 to 9, A to F, a to f) 39 | 40 | .list 41 | -------------------------------------------------------------------------------- /src/dos/inc/dir.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | WMAXPATH equ 260 8 | WMAXDRIVE equ 3 9 | MAXDRIVES equ 27 10 | WMAXDIR equ 256 11 | WMAXFILE equ 256 12 | WMAXEXT equ 256 13 | MAXPATH equ 80 14 | MAXDRIVE equ 3 15 | MAXDIR equ 66 16 | MAXFILE equ 9 17 | MAXEXT equ 5 18 | SIZEWFBLK equ 318 19 | 20 | MAXDRIVES equ 27 21 | 22 | _DISK_LOCAL equ 0001h ; _dos_remotedevice() 23 | _DISK_FLOPPY equ 0100h 24 | _DISK_NETWORK equ 0200h 25 | _DISK_SUBST equ 0400h 26 | _DISK_CDROOM equ 0800h 27 | 28 | _DISK_NOSUCHDRIVE equ 0 ; _bios_disktype() 29 | _DISK_FLOPPYNOCHAIN equ 1 30 | _DISK_FLOPPYWIDTHCHAIN equ 2 31 | _DISK_HARDDRIVE equ 3 32 | 33 | externdef cp_stdpath: BYTE 34 | externdef cp_stdmask: BYTE 35 | externdef fp_maskp: DWORD 36 | externdef fp_directory: size_p ; int (*fp_directory)(char *); 37 | externdef fp_fileblock: size_p ; int (*fp_fileblock)(char *, wfblk *); 38 | 39 | getdrv PROTO _CType 40 | chdrv PROTO _CType :WORD 41 | chdir PROTO _CType :DWORD 42 | mkdir PROTO _CType :DWORD 43 | rmdir PROTO _CType :DWORD 44 | getcwd PROTO _CType :DWORD, :WORD 45 | getcwdd PROTO _CType :DWORD, :WORD 46 | fullpath PROTO _CType :DWORD, :WORD 47 | scansub PROTO _CType :DWORD, :DWORD, :WORD 48 | scan_files PROTO _CType :PTR BYTE 49 | scan_directory PROTO _CType :WORD, :PTR BYTE 50 | recursive PROTO _CType :DWORD, :DWORD, :DWORD 51 | 52 | _disk_exist PROTO _CType :WORD 53 | _disk_init PROTO _CType :WORD 54 | _disk_type PROTO _CType :WORD 55 | _disk_test PROTO _CType :WORD 56 | _disk_ready PROTO _CType :WORD 57 | _disk_retry PROTO _CType :WORD 58 | _disk_select PROTO _CType :DWORD 59 | 60 | .list 61 | -------------------------------------------------------------------------------- /src/dos/inc/dos.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | SEEK_CUR equ 1 8 | SEEK_END equ 2 9 | SEEK_SET equ 0 10 | 11 | _A_NORMAL equ 00h 12 | _A_RDONLY equ 01h 13 | _A_HIDDEN equ 02h 14 | _A_SYSTEM equ 04h 15 | _A_VOLID equ 08h 16 | _A_SUBDIR equ 10h 17 | _A_ARCH equ 20h 18 | _A_STDFILES equ _A_ARCH or _A_RDONLY or _A_SYSTEM or _A_SUBDIR 19 | _A_ALLFILES equ _A_STDFILES or _A_HIDDEN 20 | 21 | S_DISKFREE STRUC 22 | df_size dw ? 23 | df_version dw ? 24 | df_sclus dd ? 25 | df_bsec dd ? 26 | df_avail dd ? 27 | df_total dd ? 28 | df_phavail dd ? 29 | df_phtotal dd ? 30 | df_alavail dd ? 31 | df_altotal dd ? 32 | df_reserved db 8 dup(?) 33 | S_DISKFREE ENDS 34 | 35 | S_FFBLK STRUC 36 | ff_reserved db 21 dup(?) 37 | ff_attrib db ? 38 | ff_ftime dw ? 39 | ff_fdate dw ? 40 | ff_fsize dd ? 41 | ff_name db 13 dup(?) 42 | S_FFBLK ENDS 43 | 44 | ifdef __LFN__ 45 | externdef _ifsmgr:BYTE 46 | endif 47 | externdef _osversion:WORD 48 | externdef _osminor:BYTE 49 | externdef _osmajor:BYTE 50 | externdef _psp:WORD 51 | externdef envseg:WORD 52 | 53 | findfirst PROTO _CType :DWORD, :DWORD, :WORD 54 | findnext PROTO _CType :DWORD 55 | beep PROTO _CType :WORD, :WORD 56 | 57 | externdef _argc:WORD 58 | externdef _argv:DWORD 59 | 60 | osmaperr PROTO 61 | externdef errno:WORD 62 | externdef doserrno:WORD 63 | 64 | S_FTIME STRUC 65 | ft_time dw ? 66 | ft_date dw ? 67 | ft_high dd ? 68 | S_FTIME ENDS 69 | 70 | S_WFBLK STRUC 71 | wf_attrib dd ? ; DWORD File attributes 72 | wf_timecreate S_FTIME <> ; QWORD File creation time 73 | wf_timeaccess S_FTIME <> ; QWORD Last access time 74 | wf_time S_FTIME <> ; QWORD Last modification time 75 | wf_sizedx dd ? ; QWORD File size 76 | wf_sizeax dd ? ; - low DWORD 77 | wf_reserved db 8 dup(?) 78 | wf_name db 260 dup(?) 79 | wf_shortname db 14 dup(?) 80 | S_WFBLK ENDS ; 318 byte 81 | 82 | delay PROTO _CType :WORD 83 | dosdate PROTO _CType 84 | dostime PROTO _CType 85 | getday PROTO _CType 86 | getsec PROTO _CType 87 | getmin PROTO _CType 88 | gethour PROTO _CType 89 | getmnd PROTO _CType 90 | getyear PROTO _CType 91 | getdatew PROTO _CType 92 | 93 | remove PROTO _CType :DWORD 94 | rename PROTO _CType :DWORD, :DWORD 95 | 96 | setftime PROTO _CType :WORD, :PTR S_FTIME 97 | _dos_setftime PROTO _CType :WORD, :WORD, :WORD 98 | setftime_create PROTO _CType :WORD, :PTR S_FTIME 99 | _dos_setftime_create PROTO _CType :WORD, :WORD, :WORD 100 | 101 | getftime PROTO _CType :WORD, :PTR S_FTIME 102 | getftime_access PROTO _CType :WORD, :PTR S_FTIME 103 | getftime_create PROTO _CType :WORD, :PTR S_FTIME 104 | _dos_getftime PROTO _CType :WORD, :DWORD, :DWORD 105 | _dos_getftime_access PROTO _CType :WORD, :DWORD, :DWORD 106 | _dos_getftime_create PROTO _CType :WORD, :DWORD, :DWORD 107 | 108 | _dos_setfileattr PROTO _CType :DWORD, :WORD 109 | _dos_getfileattr PROTO _CType :DWORD, :DWORD 110 | 111 | getfattr PROTO _CType :DWORD 112 | filexist PROTO _CType :DWORD 113 | wfindfirst PROTO _CType :DWORD, :DWORD, attrib:WORD 114 | wfindnext PROTO _CType :DWORD, :WORD 115 | wcloseff PROTO _CType :WORD 116 | 117 | ifdef __LFN__ 118 | wsetfattr PROTO _CType :DWORD, :WORD 119 | wgetfattr PROTO _CType :DWORD 120 | wsetacdate PROTO _CType :DWORD, :WORD 121 | wsetwrdate PROTO _CType :DWORD, :WORD, :WORD 122 | wsetcrdate PROTO _CType :DWORD, :WORD, :WORD 123 | wgetacdate PROTO _CType :DWORD 124 | wgetwrdate PROTO _CType :DWORD 125 | wgetcrdate PROTO _CType :DWORD 126 | wfullpath PROTO _CType :DWORD, :WORD 127 | wvolinfo PROTO _CType :PTR BYTE, :PTR BYTE 128 | endif 129 | 130 | wgetcwd PROTO _CType :DWORD, :WORD 131 | wlongname PROTO _CType :DWORD, :DWORD 132 | wlongpath PROTO _CType :DWORD, :DWORD 133 | wshortname PROTO _CType :DWORD 134 | removefile PROTO _CType :DWORD 135 | removetemp PROTO _CType :DWORD 136 | 137 | GetTickCount PROTO _CType 138 | 139 | .list 140 | -------------------------------------------------------------------------------- /src/dos/inc/doserrls.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | 3 | externdef CP_DOSER00: BYTE ; "Write-protection violation attempted" 4 | externdef CP_DOSER01: BYTE ; "Unknown unit for driver" 5 | externdef CP_DOSER02: BYTE ; "Drive not ready" 6 | externdef CP_DOSER03: BYTE ; "Unknown command given to driver" 7 | externdef CP_DOSER04: BYTE ; "Data error (bad CRC)" 8 | externdef CP_DOSER05: BYTE ; "Bad device driver request structure length" 9 | externdef CP_DOSER06: BYTE ; "Seek error" 10 | externdef CP_DOSER07: BYTE ; "Unknown media type" 11 | externdef CP_DOSER08: BYTE ; "Sector not found" 12 | externdef CP_DOSER09: BYTE ; "Printer out of paper.." 13 | externdef CP_DOSER10: BYTE ; "Write fault" 14 | externdef CP_DOSER11: BYTE ; "Read fault" 15 | externdef CP_DOSER12: BYTE ; "General failure" 16 | externdef CP_DOSER13: BYTE ; "Sharing violation" 17 | externdef CP_DOSER14: BYTE ; "Lock violation" 18 | externdef CP_DOSER15: BYTE ; "Invalid disk change" 19 | externdef CP_DOSER16: BYTE ; "FCB unavailable" 20 | externdef CP_DOSER17: BYTE ; "Sharing buffer overflow" 21 | externdef CP_DOSER18: BYTE ; "Code page mismatch" 22 | externdef CP_DOSER19: BYTE ; "Out of input" 23 | externdef CP_DOSER20: BYTE ; "Insufficient disk space" 24 | 25 | .list 26 | -------------------------------------------------------------------------------- /src/dos/inc/dz.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | 3 | S_DZDS STRUC 4 | dz_envlen dw ? 5 | dz_envseg dw ? 6 | dz_command dw 2 dup(?) 7 | dz_fcb_0P dw 2 dup(?) 8 | dz_fcb_1P dw 2 dup(?) 9 | dz_dzmain db 80 dup(?) 10 | dz_dzcommand db 128 dup(?) 11 | dz_fcb_160 db 16 dup(?) 12 | dz_fcb_161 db 16 dup(?) 13 | dz_exeproc db 80 dup(?) 14 | dz_execommand db 128 dup(?) 15 | dz_errno dw ? 16 | dz_eflag dw ? 17 | dz_count dw ? 18 | dz_exename dw ? 19 | dz_oldintF1 dd ? 20 | S_DZDS ENDS ; 474 byte 21 | 22 | .list 23 | -------------------------------------------------------------------------------- /src/dos/inc/dz.ini: -------------------------------------------------------------------------------- 1 | [Filetype] 2 | txt=%edit% 3 | asm=%edit% 4 | inc=%edit% 5 | vbs=%edit% 6 | ini=%edit% 7 | h=%edit% 8 | c=%edit% 9 | mak=wmake -a -f 10 | makefile=wmake -a -f 11 | 12 | [View] 13 | ;F3= 14 | ;Alt= 15 | ;Ctrl= 16 | ;Shift= 17 | 18 | [Edit] 19 | ;F3= 20 | ;Alt= 21 | ;Ctrl= 22 | ;Shift= 23 | 24 | [Directory] 25 | 0=Doszip &Directory,%doszip% 26 | 1=<> 27 | 2=&Temp Directory,%TEMP% 28 | 29 | [Tools] 30 | 0=&Add tool,%edit% %dz%\dz.ini 31 | 1=<> 32 | 2=View &DOSZIP.TXT,%view% %dz%\dz.txt 33 | 34 | [Filter] 35 | 0=&Executable,*.exe *.com *.bat 36 | 1=&Compressed,*.lzh *.zoo *.zip *.arj *.pak *.arc *.7z *.bz2 *.tar 37 | 2=&Source code,*.asm *.inc *.c *.h 38 | 39 | [Load] 40 | ;0=mode con lines=25 41 | 42 | [MKList] 43 | 0=Delete .err files,err.bat@del %f\n 44 | 1=Object list1,objects1.mif@%n.obj \\\n 45 | 2=Object list2,objects2.mif@%n.obj &\n 46 | 47 | [Comspec] 48 | ;0=%SYSTEMROOT%\SYSTEM32\CMD.EXE 49 | ;1=/S /C 50 | 51 | [Compress] 52 | 0=ARJ (C) Robert K. Jung 53 | 1=RAR (C) E. Roshal 54 | [ARJ (C) Robert K. Jung] 55 | 0=arj u -jm -y 56 | 1=! 57 | 2=.arj 58 | [RAR (C) E. Roshal] 59 | 0=rar u -y 60 | 2=.rar 61 | 62 | [Decompress] 63 | 0=.ARJ 64 | 1=.RAR 65 | [.ARJ] 66 | 0=arj x -y 67 | [.RAR] 68 | 0=rar x -y 69 | 70 | [Style] 71 | asm=style_asm 72 | inc=style_asm 73 | c=style_c 74 | h=style_c 75 | 76 | [style_default] 77 | 0=.control 78 | 1=.quote 79 | 2=.number 80 | 3=.$ 81 | 4=.operator 82 | 83 | [.control] 84 | 0=O 40 85 | [.quote] 86 | 0=Q XB 87 | [.number] 88 | 0=D XB 89 | [.$] 90 | 0=C XB $\ 91 | [.operator] 92 | 0=C XF .:!|/<[{()}]>,-*+?%&=^~";" 93 | 94 | [style_asm] 95 | 0=.asm_color 96 | 1=[style_default] 97 | 2=.regs 98 | 3=.cs 99 | 4=.acc 100 | 5=.base 101 | 6=.seg 102 | 7=.call 103 | 8=.jmp 104 | 9=.dir 105 | 10=.x86 106 | 11=.32 107 | 12=.if 108 | 13=.include 109 | 14=.comment 110 | 111 | [.asm_color] 112 | 0=A 07 113 | [.if] 114 | 0=W X2 if ifdef ifndef else elseif endif while break endw 115 | [.comment] 116 | 0=B X8 ";" 117 | [.include] 118 | 0=B X2 include 119 | [.cs] 120 | 0=W X5 cs ds es ss 121 | [.base] 122 | 0=W X6 ebp esi edi ebx bp si di bx bh bl 123 | [.acc] 124 | 0=W X4 eax ax ah al 125 | [.regs] 126 | 0=W X2 ecx edx esp cx dx sp cl dl ch dh 127 | [.jmp] 128 | 0=W X9 jmp ja jb jc jz jna jnb jnc jnz jna jnz je jne jae jbe jl jg jle jge js jns 129 | [.call] 130 | 0=W X6 call invoke int ret iret 131 | [.dir] 132 | 0=W XF public local extrn label proto proc near far endp ends size struc 133 | 1=segment seg offset ptr byte word dword db dw dd equ textequ 134 | 2=pascal c stdcall end externdef model compact large macro endm 135 | [.seg] 136 | 0=W XF code data stack _text _data flat 137 | [.x86] 138 | 0=W X3 139 | 1=mov movzx movsx xchg cwb cbw lodsb stosb lodsw stosw movsb movsw 140 | 2=push pop popa pusha lea les lds 141 | 3=and or xor not neg add adc sub sbb shl shr dec inc 142 | 4=cmp test cld std clc stc mul div imul idiv 143 | 5=rep repe repne repz repnz in out aam org 144 | [.32] 145 | 0=W XB 146 | 1=lodsd stosd movsd 147 | 148 | [style_c] 149 | 0=[style_default] 150 | 1=.c.words 151 | 2=.# 152 | 3=.// 153 | 4=./**/ 154 | 155 | [.#] 156 | 0=B X2 # 157 | [.//] 158 | 0=B X8 // 159 | [./**/] 160 | 0=N X8 /* */ 161 | [.c.words] 162 | 0=W XF const operator char int long void typedef struct 163 | 1=if else for do while break continue goto return 164 | 2=switch case default public extern 165 | -------------------------------------------------------------------------------- /src/dos/inc/dzidd.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | 3 | externdef IDD_DZCompression: DWORD 4 | externdef IDD_DZConfiguration: DWORD 5 | externdef IDD_DZConfirmations: DWORD 6 | externdef IDD_DZCopy: DWORD 7 | externdef IDD_DZDefaultColor: DWORD 8 | externdef IDD_DZExit: DWORD 9 | externdef IDD_DZFileAttributes: DWORD 10 | externdef IDD_DZFindFile: DWORD 11 | externdef IDD_DZHelp: DWORD 12 | externdef IDD_DZHistory: DWORD 13 | externdef IDD_DZMemory: DWORD 14 | externdef IDD_DZMenuEdit: DWORD 15 | externdef IDD_DZMenuFile: DWORD 16 | externdef IDD_DZMenuHelp: DWORD 17 | externdef IDD_DZMenuPanel: DWORD 18 | externdef IDD_DZMenuSetup: DWORD 19 | externdef IDD_DZMenusline: DWORD 20 | externdef IDD_DZMenuTools: DWORD 21 | externdef IDD_DZMKList: DWORD 22 | externdef IDD_DZMove: DWORD 23 | externdef IDD_DZPanelFilter: DWORD 24 | externdef IDD_DZPanelOptions: DWORD 25 | externdef IDD_DZSaveSetup: DWORD 26 | externdef IDD_DZScreenOptions: DWORD 27 | externdef IDD_DZSubInfo: DWORD 28 | externdef IDD_DZSystemOptions: DWORD 29 | externdef IDD_DZZipAttributes: DWORD 30 | 31 | .list 32 | -------------------------------------------------------------------------------- /src/dos/inc/dztiny.ini: -------------------------------------------------------------------------------- 1 | ; DZ.INI - DOSZIP Configuration file 2 | ; 3 | ; This file contains all the variables that "customize" 4 | ; DOSZIP to your particular needs. 5 | ; 6 | ; The entries have the following format: 7 | ; 8 | ; [
] 9 | ; = 10 | ; 11 | ; Space and tabs may appear before or after the equal sign. 12 | ; 13 | ; Last Updated: 19 May 2012 14 | ; 15 | [View] 16 | F3 = tv 17 | Alt = ; Viewer for Alt+F3 18 | Ctrl = ; 19 | Shift = ; 20 | 21 | [Edit] 22 | F4 = edit 23 | Alt = notepad 24 | Ctrl = ; Editor for Ctrl+F4 25 | Shift = ; Editor for Shift+F4 26 | 27 | [Filetype] 28 | cmd = cmd /c 29 | pdf = cmd /c !.! 30 | chm = hh 31 | idd = rc 32 | mak = wmake -a -f 33 | makefile= wmake -a -f 34 | rar = rar32 x !.! 35 | ; 36 | ; Directories for Ctrl-[0..9] and Alt-P 37 | ; 38 | [Directory] 39 | 0=Doszip &Directory Ctrl-0, %doszip% 40 | 1=<> 41 | 2=System &Root Ctrl-2, %SYSTEMROOT% 42 | 3=&Program Files Ctrl-3, %PROGRAMFILES% 43 | 4=&Home Path Ctrl-4, %HOMEDRIVE%%HOMEPATH% 44 | 5=&User Profile Ctrl-5, %USERPROFILE% 45 | 6=<> 46 | 7=&Temp Directory Ctrl-7, %TEMP% 47 | 48 | ; Tools [0..9] use key Alt-[0..9] 49 | [Tools] 50 | 0=&Add tool (Alt-0), %edit% %dz%\dz.ini 51 | 1=<> 52 | 2=View &DOSZIP.TXT (Alt-2), %view% %dz%\doszip.txt 53 | 54 | [Filter] 55 | 0=&Executable, *.exe *.com *.bat 56 | 1=&Compressed, *.lzh *.zoo *.zip *.arj *.pak *.arc *.7z *.bz2 *.tar 57 | 2=&Source code, *.asm *.inc *.c *.h 58 | 59 | ; Program(s) to load on startup 60 | [Load] 61 | 0=;mode con lines=25 62 | ; Program(s) to call on exit 63 | [Exit] 64 | 0=;echo Goodbye 65 | 66 | [MKList] 67 | 0=Delete .err files,err.bat@del %f\n 68 | 1=Object list1,objects1.mif@%n.obj \\\n 69 | 2=Object list2,objects2.mif@%n.obj &\n 70 | 71 | [Comspec] 72 | ;0=%SYSTEMROOT%\SYSTEM32\CMD.EXE 73 | ;1=/S /C 74 | -------------------------------------------------------------------------------- /src/dos/inc/dzzip.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | ZIPHEADERID equ 4B50h ; two-byte zip lead-in 8 | ZIPLOCALID equ 0403h ; signature local file 9 | ZIPCENTRALID equ 0201h ; signature central file 10 | ZIPDIGITALID equ 0505h ; digital signature 11 | ZIPENDSENTRID equ 0605h ; signature end central 12 | 13 | _A_ZENCRYPTED equ 0200h 14 | _A_ZEXTLOCHD equ 0400h 15 | 16 | S_LZIP STRUC ; Local file header: 30 byte 17 | lz_pkzip DW ? ; local file header signature 18 | lz_zipid DW ? 19 | lz_version DW ? ; version needed to extract 20 | lz_flag DW ? ; general purpose bit flag 21 | lz_method DW ? ; compression method 22 | lz_time DW ? ; last mod file time 23 | lz_date DW ? ; last mod file date 24 | lz_crc DD ? ; crc-32 25 | lz_csize DD ? ; compressed size 26 | lz_fsize DD ? ; uncompressed size 27 | lz_fnsize DW ? ; file name length 28 | lz_extsize DW ? ; extra field length 29 | S_LZIP ENDS 30 | 31 | S_CZIP STRUC ; Central directory structure: 46 byte 32 | cz_pkzip DW ? ; central file header signature 33 | cz_zipid DW ? 34 | cz_version_made DW ? ; version made by 35 | cz_version_need DW ? ; version needed to extract 36 | cz_bitflag DW ? ; general purpose bit flag 37 | cz_method DW ? ; compression method 38 | cz_time DW ? ; last mod file time 39 | cz_date DW ? ; last mod file date 40 | cz_crc DD ? ; crc-32 41 | cz_csize DD ? ; compressed size 42 | cz_fsize DD ? ; uncompressed size 43 | cz_fnsize DW ? ; file name length 44 | cz_extsize DW ? ; extra field length 45 | cz_cmtsize DW ? ; file comment length 46 | cz_disk DW ? ; disk number start 47 | cz_int_attrib DW ? ; internal file attributes 48 | cz_ext_attrib DW ? ; external file attributes 49 | cz_ext_attribdx DW ? 50 | cz_off_local DD ? ; relative offset of local header 51 | S_CZIP ENDS 52 | 53 | S_ZEND STRUC ; End of central directory record: 22 byte 54 | ze_pkzip DW ? ; end of central dir signature 55 | ze_zipid DW ? 56 | ze_disk_cur DW ? ; number of this disk 57 | ze_disk_one DW ? ; number at start of the central directory 58 | ze_entry_cur DW ? ; central directory on this disk 59 | ze_entry_dir DW ? ; total entries in the central directory 60 | ze_size_cent DD ? ; size central directory 61 | ze_off_cent DD ? ; offset central directory 62 | ze_comment_size DW ? ; .ZIP file comment length 63 | S_ZEND ENDS 64 | 65 | wsdecomp proto _CType wsub:dword, fblk:dword, out_path:dword 66 | wzipcopy proto _CType wsub:dword, fblk:dword, out_path:dword 67 | wzipadd proto _CType fsize:dword, ftime:dword, fattrib:size_t 68 | wzipmkdir proto _CType wsub:dword, directory:ptr byte 69 | cmzipattrib proto _CType wsub:word 70 | wsdeletearc proto _CType 71 | 72 | .list 73 | -------------------------------------------------------------------------------- /src/dos/inc/errno.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | ENOERR equ 0 8 | EPERM equ 1 9 | ENOENT equ 2 10 | ESRCH equ 3 11 | EINTR equ 4 12 | EIO equ 5 13 | ENXIO equ 6 14 | E2BIG equ 7 15 | ENOEXEC equ 8 16 | EBADF equ 9 17 | ECHILD equ 10 18 | EAGAIN equ 11 19 | ENOMEM equ 12 20 | EACCES equ 13 21 | EFAULT equ 14 22 | ENOTBLK equ 15 23 | EBUSY equ 16 24 | EEXIST equ 17 25 | EXDEV equ 18 26 | ENODEV equ 19 27 | ENOTDIR equ 20 28 | EISDIR equ 21 29 | EINVAL equ 22 30 | ENFILE equ 23 31 | EMFILE equ 24 32 | ENOTTY equ 25 33 | ETXTBSY equ 26 34 | EFBIG equ 27 35 | ENOSPC equ 28 36 | ESPIPE equ 29 37 | EROFS equ 30 38 | EMLINK equ 31 39 | EPIPE equ 32 40 | EDOM equ 33 41 | ERANGE equ 34 42 | EUCLEAN equ 35 43 | EDEADLK equ 36 44 | EUNKNOWN equ 37 45 | ENAMETOOLONG equ 38 46 | ENOLCK equ 39 47 | ENOSYS equ 40 48 | ENOTEMPTY equ 41 49 | EILSEQ equ 42 50 | 51 | ER_ZIP equ 2 52 | ER_BADERR equ 3 53 | ER_MEM equ 4 54 | ER_CRCERR equ 5 55 | ER_NOZIP equ 9 56 | ER_FIND equ 11 57 | ER_OPEN equ 12 58 | ER_DISK equ 50 59 | ER_USERABORT equ 66 60 | ER_READARCH equ -2 61 | ER_DISK_FULL equ 112 62 | ER_NEGATIVE_SEEK equ 131 63 | 64 | __ISWRITE equ 01h 65 | __DISKAREA equ 06h 66 | __FAILALLOWED equ 08h 67 | __RETRYALLOWED equ 10h 68 | __IGNOREALLOWED equ 20h 69 | __ISDEVICE equ 80h 70 | 71 | externdef errno: WORD 72 | externdef doserrno: WORD 73 | externdef sys_errlist: DWORD 74 | externdef dos_errlist: DWORD 75 | 76 | externdef sys_erdevice: DWORD 77 | externdef sys_ercode: WORD 78 | externdef sys_erflag: BYTE 79 | externdef sys_erdrive: BYTE 80 | externdef sys_erproc: size_p 81 | 82 | trace PROTO _CType 83 | osmaperr PROTO 84 | notsup PROTO _CType 85 | eropen PROTO _CType :DWORD 86 | ermkdir PROTO _CType :DWORD 87 | erdelete PROTO _CType :DWORD 88 | errnomsg PROTO _CType :DWORD, :DWORD, :DWORD 89 | ermsg PROTO _CDecl :DWORD, :DWORD, :VARARG 90 | 91 | .list 92 | -------------------------------------------------------------------------------- /src/dos/inc/fblk.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | _A_FATTRIB equ 003Fh 8 | _A_SELECTED equ 0040h 9 | _A_UPDIR equ 0080h 10 | ;_A_CDROOM equ 0100h ; _A_TEMPORARY 11 | _A_ZENCRYPTED equ 0200h ; _A_SPARSE_FILE 12 | _A_ZEXTLOCHD equ 0400h ; _A_REPARSEPOINT 13 | ;_A_COMPRESSED equ 0800h ; _A_COMPRESSED 14 | ;_A_OFFLINE equ 1000h ; _A_OFFLINE 15 | _A_ROOTDIR equ 2000h ; _A_NOT_INDEXED 16 | _A_ARCHEXT equ 4000h ; _A_ENCRYPTED 17 | _A_ARCHZIP equ 8000h 18 | _A_ARCHIVE equ 0C000h 19 | 20 | S_FBLK STRUC 21 | fb_flag dw ? 22 | fb_time dd ? 23 | fb_size dd ? 24 | fb_name db 4 dup(?) 25 | S_FBLK ENDS 26 | 27 | externdef cp_dotdot: BYTE ; ".." 28 | externdef cp_datefrm: BYTE ; "%2u.%02u.%02u" 29 | externdef cp_timefrm: BYTE ; "%2u:%02u" 30 | 31 | fballoc PROTO _CType :PTR BYTE, :DWORD, :DWORD, :WORD 32 | fballocwf PROTO _CType :DWORD, :WORD 33 | fbupdir PROTO _CType :WORD 34 | fbinvert PROTO _CType :DWORD 35 | fbselect PROTO _CType :DWORD 36 | fbffirst PROTO _CType :DWORD, :WORD 37 | fballocff PROTO _CType :DWORD, :WORD 38 | 39 | fbcolor PROTO _CType 40 | fbputsl PROTO pascal :DWORD, :WORD, :WORD 41 | fbputsd PROTO pascal :DWORD, :WORD, :WORD 42 | ifdef __LFN__ 43 | fbputll PROTO pascal :DWORD, :WORD, :WORD 44 | fbputld PROTO pascal :DWORD, :WORD, :WORD 45 | endif 46 | fbputfile PROTO pascal :DWORD, :WORD, :WORD 47 | 48 | .list 49 | -------------------------------------------------------------------------------- /src/dos/inc/fcntl.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | 3 | O_RDONLY equ 0000h 4 | O_WRONLY equ 0001h 5 | O_RDWR equ 0002h 6 | O_APPEND equ 0008h 7 | O_RANDOM equ 0010h 8 | O_SEQUENTIAL equ 0020h 9 | O_TEMPORARY equ 0040h 10 | O_NOINHERIT equ 0080h 11 | O_CREAT equ 0100h 12 | O_TRUNC equ 0200h 13 | O_EXCL equ 0400h 14 | O_SHORT_LIVED equ 1000h 15 | O_TEXT equ 4000h 16 | O_BINARY equ 8000h 17 | 18 | .list 19 | -------------------------------------------------------------------------------- /src/dos/inc/ff.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | 3 | MAXHIT equ 999 4 | 5 | S_SBLK STRUC 6 | sb_flag DW ? 7 | sb_size DW ? 8 | sb_line DW ? 9 | sb_offs DD ? 10 | sb_file DB 2 dup(?) 11 | S_SBLK ENDS 12 | 13 | INFOSIZE equ 38 14 | BLOCKSIZE equ S_SBLK + INFOSIZE 15 | 16 | ;externdef DLG_FindFile:DWORD 17 | ;externdef FCB_FindFile:WORD 18 | 19 | ifndef __TVEXE__ 20 | FindFile PROTO _CType :dword, :word 21 | endif 22 | 23 | .list 24 | -------------------------------------------------------------------------------- /src/dos/inc/filter.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | 3 | FILT_MAXSTRING equ 128 4 | 5 | S_FILT STRUC 6 | of_flag dw ? 7 | of_max_date dw ? 8 | of_min_date dw ? 9 | of_max_size dd ? 10 | of_min_size dd ? 11 | of_include db FILT_MAXSTRING dup(?) 12 | of_exclude db FILT_MAXSTRING dup(?) 13 | S_FILT ENDS 14 | 15 | externdef filter:DWORD 16 | filter_fblk PROTO _CType :DWORD 17 | filter_wblk PROTO _CType :DWORD 18 | filter_edit PROTO _CType :DWORD, :DWORD 19 | 20 | .list 21 | -------------------------------------------------------------------------------- /src/dos/inc/helpid.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | HELPID_01 equ 04CEh ; <> Memory Requirements 3 | HELPID_02 equ 0963h ; <> Compressed File Support 4 | HELPID_03 equ 0AE2h ; <> Viewer Support 5 | HELPID_04 equ 0CB8h ; <> Editor Support 6 | HELPID_05 equ 0E05h ; <> Internal Editor 7 | HELPID_06 equ 19FEh ; <> Extension and Filename Support 8 | HELPID_07 equ 1DDEh ; <> Doszip Commander Environment Variables 9 | HELPID_08 equ 2329h ; <> Installing Commander under Windows 10 | HELPID_09 equ 246Ch ; <> Creating a tools menu 11 | HELPID_10 equ 29C3h ; <> The File Search utility 12 | HELPID_11 equ 2F98h ; <> Create List File 13 | HELPID_12 equ 319Fh ; <> Operation Filter 14 | HELPID_13 equ 341Ah ; <> Shortcut keys 15 | HELPID_14 equ 2CACh ; <> Compare Directories 16 | .list 17 | -------------------------------------------------------------------------------- /src/dos/inc/ini.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | inientry PROTO _CType :DWORD, :DWORD, :DWORD 8 | inientryid PROTO _CType :DWORD, :WORD 9 | inierror PROTO _CType :DWORD, :DWORD 10 | iniidtostr PROTO _CType 11 | 12 | .list 13 | -------------------------------------------------------------------------------- /src/dos/inc/io.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | _NFILE_ equ 20 8 | _A_NORMAL equ 00h 9 | _A_RDONLY equ 01h 10 | _A_HIDDEN equ 02h 11 | _A_SYSTEM equ 04h 12 | _A_SUBDIR equ 10h 13 | _A_ARCH equ 20h 14 | 15 | _A_TEMPORARY equ 0100h 16 | _A_DELETE equ 0400h 17 | _A_SEQSCAN equ 0800h 18 | _A_RANDOM equ 1000h 19 | 20 | FH_OPEN equ 01h 21 | FH_EOF equ 02h 22 | FH_CRLF equ 04h 23 | FH_PIPE equ 08h 24 | FH_APPEND equ 20h 25 | FH_DEVICE equ 40h 26 | FH_TEXT equ 80h 27 | 28 | SEEK_SET equ 0 29 | SEEK_CUR equ 1 30 | SEEK_END equ 2 31 | 32 | DEV_UNKNOWN equ 0000h 33 | DEV_DISK equ 0001h 34 | DEV_CHAR equ 0002h 35 | DEV_PIPE equ 0003h 36 | DEV_REMOTE equ 8000h 37 | 38 | externdef _osfile:BYTE 39 | externdef _nfile:WORD 40 | 41 | A_OPEN equ 0001h 42 | A_TRUNC equ 0002h 43 | A_CREATE equ 0010h 44 | A_CREATETRUNC equ A_CREATE or A_TRUNC 45 | A_OPENCREATE equ A_OPEN or A_CREATE 46 | M_RDONLY equ 0000h 47 | M_WRONLY equ 0001h 48 | M_RDWR equ 0002h 49 | 50 | close PROTO _CType :WORD 51 | lseek PROTO _CType :WORD, :DWORD, :WORD 52 | write PROTO _CType :WORD, :DWORD, :WORD 53 | access PROTO _CType :DWORD, :WORD 54 | readword PROTO _CType :DWORD 55 | osopen PROTO _CType :DWORD, :WORD, :WORD, :WORD 56 | osread PROTO _CType :WORD, :DWORD, :WORD 57 | oswrite PROTO _CType :WORD, :DWORD, :WORD 58 | removefile PROTO _CType :DWORD 59 | isatty PROTO _CType :WORD 60 | osmaperr PROTO 61 | remove PROTO _CType :DWORD 62 | rename PROTO _CType :DWORD, :DWORD 63 | _dos_setfileattr PROTO _CType :DWORD, :WORD 64 | dosmaperr PROTO _CType :WORD 65 | 66 | open PROTO _CDecl :DWORD, :WORD, :VARARG 67 | sopen PROTO _CDecl :DWORD, :WORD, :WORD, :VARARG 68 | read PROTO _CType :WORD, :DWORD, :WORD 69 | creat PROTO _CType :DWORD, :WORD 70 | osfiletype PROTO _CType :WORD 71 | chsize PROTO _CType :WORD, :DWORD 72 | filelength PROTO _CType :WORD 73 | tell PROTO _CType :WORD 74 | 75 | .list 76 | -------------------------------------------------------------------------------- /src/dos/inc/iost.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | _A_NORMAL equ 00h 8 | _A_RDONLY equ 01h 9 | _A_HIDDEN equ 02h 10 | _A_SYSTEM equ 04h 11 | _A_SUBDIR equ 10h 12 | _A_ARCH equ 20h 13 | 14 | SEEK_SET equ 0 15 | SEEK_CUR equ 1 16 | SEEK_END equ 2 17 | 18 | IO_SEARCHCASE equ 0001h 19 | IO_SEARCHHEX equ 0002h 20 | IO_SEARCHSET equ 0004h 21 | IO_SEARCHCUR equ 0008h 22 | IO_SEARCHMASK equ 000Fh 23 | IO_SEARCHSUB equ 0020h 24 | 25 | IO_LINEBUF equ 0040h ; Line buffer 26 | IO_STRINGB equ 0080h ; String buffer 27 | IO_CRYPT equ 0100h ; Crypted file 28 | IO_USEUPD equ 0200h ; Progress 29 | IO_UPDTOTAL equ 0400h ; Add Read/Write size to total 30 | IO_USECRC equ 0800h ; Update CRC on read/write 31 | IO_USEBITS equ 1000h ; Align bits on read/write 32 | IO_CLIPBOARD equ 2000h ; Flush to clipboard 33 | IO_MEMREAD equ 4000h ; View memory area 34 | IO_ERROR equ 8000h ; Write fault 35 | 36 | S_IOST STRUC 37 | ios_bp dd ? 38 | ios_i dw ? 39 | ios_c dw ? 40 | ios_size dw ? 41 | ios_flag dw ? 42 | ios_file dw ? 43 | ios_l dw ? 44 | ios_bb dd ? 45 | ios_total dd ? 46 | ios_offset dd ? 47 | S_IOST ENDS 48 | 49 | externdef STDI:S_IOST 50 | externdef STDO:S_IOST 51 | externdef crctab:DWORD 52 | externdef oupdate:size_p 53 | externdef tinfo:WORD 54 | 55 | OSTDI equ offset STDI 56 | OSTDO equ offset STDO 57 | 58 | oupdcrc PROTO 59 | otell PROTO 60 | owrite PROTO 61 | oopenst PROTO 62 | oopencl PROTO 63 | 64 | oread PROTO 65 | oputc PROTO 66 | ogetc PROTO 67 | 68 | oclose PROTO _CType :DWORD 69 | oinitst PROTO _CType :DWORD, :WORD 70 | ofreest PROTO _CType :DWORD 71 | continuesearch PROTO _CType 72 | oflush PROTO _CType 73 | ofread PROTO _CType 74 | oungetc PROTO _CType 75 | 76 | ogetl PROTO _CType :DWORD, :DWORD, :WORD 77 | ogets PROTO _CType 78 | oopen PROTO _CType :DWORD, :WORD 79 | oopens PROTO _CType :DWORD, :WORD 80 | iopens PROTO _CType :DWORD, :WORD 81 | close PROTO _CType :WORD 82 | ogetouth PROTO _CType :DWORD 83 | openfile PROTO _CType :DWORD, :WORD, :WORD 84 | ogetouth PROTO _CType :DWORD 85 | oseek PROTO _CType :DWORD, :WORD 86 | oseekl PROTO _CType :DWORD, :WORD 87 | ocopy PROTO _CType :DWORD 88 | osearch PROTO _CType :WORD, :DWORD, :DWORD, :WORD, :WORD 89 | cmdsearch PROTO _CType :DWORD 90 | oprintf PROTO _CDecl :DWORD, :VARARG 91 | 92 | ugetc PROTO _CType 93 | uputc PROTO _CType :WORD 94 | 95 | .list 96 | -------------------------------------------------------------------------------- /src/dos/inc/keyb.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | KEY_ALT equ 08h 8 | KEY_CTRL equ 04h 9 | KEY_SHIFT equ 03h 10 | 11 | KEY_ESC equ 011Bh 12 | KEY_BKSP equ 0E08h 13 | KEY_TAB equ 0F09h 14 | KEY_ENTER equ 1C0Dh 15 | KEY_SPACE equ 3920h 16 | KEY_HOME equ 4700h 17 | KEY_UP equ 4800h 18 | KEY_PGUP equ 4900h 19 | KEY_LEFT equ 4B00h 20 | KEY_RIGHT equ 4D00h 21 | KEY_END equ 4F00h 22 | KEY_DOWN equ 5000h 23 | KEY_PGDN equ 5100h 24 | KEY_INS equ 5200h 25 | KEY_DEL equ 5300h 26 | 27 | KEY_F1 equ 3B00h 28 | KEY_F2 equ 3C00h 29 | KEY_F3 equ 3D00h 30 | KEY_F4 equ 3E00h 31 | KEY_F5 equ 3F00h 32 | KEY_F6 equ 4000h 33 | KEY_F7 equ 4100h 34 | KEY_F8 equ 4200h 35 | KEY_F9 equ 4300h 36 | KEY_F10 equ 4400h 37 | KEY_F11 equ 8500h 38 | KEY_F12 equ 8600h 39 | 40 | KEY_KPSTAR equ 372Ah 41 | KEY_KPPLUS equ 4E2Bh 42 | KEY_KPMIN equ 4A2Dh 43 | KEY_KPENTER equ 0E00Dh 44 | 45 | KEY_CTRLF1 equ 5E00h 46 | KEY_CTRLF2 equ 5F00h 47 | KEY_CTRLF3 equ 6000h 48 | KEY_CTRLF4 equ 6100h 49 | KEY_CTRLF5 equ 6200h 50 | KEY_CTRLF6 equ 6300h 51 | KEY_CTRLF7 equ 6400h 52 | KEY_CTRLF8 equ 6500h 53 | KEY_CTRLF9 equ 6600h 54 | 55 | KEY_CTRL0 equ 0BFFh 56 | KEY_CTRL1 equ 02FFh 57 | KEY_CTRL2 equ 0300h 58 | KEY_CTRL3 equ 04FFh 59 | KEY_CTRL4 equ 05FFh 60 | KEY_CTRL5 equ 06FFh 61 | KEY_CTRL6 equ 071Eh 62 | KEY_CTRL7 equ 08FFh 63 | KEY_CTRL8 equ 091Bh 64 | KEY_CTRL9 equ 0A1Dh 65 | 66 | KEY_CTRLA equ 1E01h 67 | KEY_CTRLB equ 3002h 68 | KEY_CTRLC equ 2E03h 69 | KEY_CTRLD equ 2004h 70 | KEY_CTRLE equ 1205h 71 | KEY_CTRLF equ 2106h 72 | KEY_CTRLG equ 2207h 73 | KEY_CTRLH equ 2308h 74 | KEY_CTRLI equ 1709h 75 | KEY_CTRLJ equ 240Ah 76 | KEY_CTRLK equ 250Bh 77 | KEY_CTRLL equ 260Ch 78 | KEY_CTRLM equ 320Dh 79 | KEY_CTRLN equ 310Eh 80 | KEY_CTRLO equ 180Fh 81 | KEY_CTRLP equ 1910h 82 | KEY_CTRLQ equ 1011h 83 | KEY_CTRLR equ 1312h 84 | KEY_CTRLS equ 1F13h 85 | KEY_CTRLT equ 1414h 86 | KEY_CTRLU equ 1615h 87 | KEY_CTRLV equ 2F16h 88 | KEY_CTRLW equ 1117h 89 | KEY_CTRLX equ 2D18h 90 | KEY_CTRLY equ 1519h 91 | KEY_CTRLZ equ 2C1Ah 92 | 93 | KEY_CTRLINS equ 9200h 94 | KEY_CTRLDEL equ 9300h 95 | KEY_CTRLLEFT equ 7300h 96 | KEY_CTRLRIGHT equ 7400h 97 | KEY_CTRLUP equ 8D00h 98 | KEY_CTRLDN equ 9100h 99 | KEY_CTRLEND equ 7500h 100 | KEY_CTRLHOME equ 7700h 101 | KEY_CTRLPGUP equ 8400h 102 | KEY_CTRLPGDN equ 7600h 103 | KEY_CTRLTAB equ 9400h 104 | KEY_CTRLENTER equ 1C0Ah 105 | KEY_CTRLBKSP equ 0E7Fh 106 | 107 | KEY_ALTF1 equ 6800h 108 | KEY_ALTF2 equ 6900h 109 | KEY_ALTF3 equ 6A00h 110 | KEY_ALTF4 equ 6B00h 111 | KEY_ALTF5 equ 6C00h 112 | KEY_ALTF6 equ 6D00h 113 | KEY_ALTF7 equ 6E00h 114 | KEY_ALTF8 equ 6F00h 115 | KEY_ALTF9 equ 7000h 116 | 117 | KEY_ALT0 equ 8100h 118 | KEY_ALT1 equ 7800h 119 | KEY_ALT2 equ 7900h 120 | KEY_ALT3 equ 7A00h 121 | KEY_ALT4 equ 7B00h 122 | KEY_ALT5 equ 7C00h 123 | KEY_ALT6 equ 7D00h 124 | KEY_ALT7 equ 7E00h 125 | KEY_ALT8 equ 7F00h 126 | KEY_ALT9 equ 8000h 127 | 128 | KEY_ALTUP equ 9800h 129 | KEY_ALTDN equ 0A000h 130 | KEY_ALTLEFT equ 9B00h 131 | KEY_ALTRIGHT equ 9D00h 132 | KEY_ALTC equ 2E00h 133 | KEY_ALTL equ 2600h 134 | KEY_ALTM equ 3200h 135 | KEY_ALTP equ 1900h 136 | KEY_ALTR equ 1300h 137 | KEY_ALTS equ 1F00h 138 | KEY_ALTW equ 1100h 139 | KEY_ALTX equ 2D00h 140 | 141 | KEY_SHIFTF1 equ 5400h 142 | KEY_SHIFTF2 equ 5500h 143 | KEY_SHIFTF3 equ 5600h 144 | KEY_SHIFTF4 equ 5700h 145 | KEY_SHIFTF5 equ 5800h 146 | KEY_SHIFTF6 equ 5900h 147 | KEY_SHIFTF7 equ 5A00h 148 | KEY_SHIFTF8 equ 5B00h 149 | KEY_SHIFTF9 equ 5C00h 150 | KEY_SHIFTF10 equ 5D00h 151 | 152 | getkey PROTO _CType 153 | getesc PROTO _CType 154 | externdef keyshift:DWORD 155 | 156 | .list 157 | -------------------------------------------------------------------------------- /src/dos/inc/libc.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | 3 | __LIBC_INC equ 1 4 | 5 | ifndef __COMPACT__ 6 | ifndef __LARGE__ 7 | .err 8 | endif 9 | endif 10 | 11 | ifdef __LARGE__ 12 | _CDecl equ 13 | _CType equ 14 | _CFast equ 15 | else 16 | _CDecl equ 17 | _CType equ 18 | _CFast equ 19 | endif 20 | 21 | ifdef __COMPACT__ 22 | p? equ ; Proc Pointer 23 | size_p equ ; - as Parameter 24 | else 25 | p? equ
26 | size_p equ 27 | endif 28 | 29 | size_l equ <2> 30 | size_t equ 31 | ;__3__ equ 1 ; remove this to create the .186 version 32 | 33 | .model compact 34 | ifdef __3__ 35 | .386 36 | else 37 | .186 38 | __16__ equ 1 39 | endif 40 | 41 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 42 | 43 | cld? equ <> 44 | ifdef __LARGE__ 45 | movl equ 46 | pushl equ 47 | popl equ 48 | retx equ 49 | else 50 | movl macro v:VARARG 51 | endm 52 | pushl macro v:VARARG 53 | endm 54 | popl macro v:VARARG 55 | endm 56 | retx equ 57 | endif 58 | 59 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 60 | 61 | lodm macro m,s,o 62 | ifnb 63 | mov o,WORD PTR m 64 | mov s,WORD PTR m+2 65 | else 66 | mov ax,WORD PTR m 67 | mov dx,WORD PTR m+2 68 | endif 69 | endm 70 | 71 | stom macro m,s,o 72 | ifnb 73 | mov WORD PTR m,o 74 | mov WORD PTR m+2,s 75 | else 76 | mov WORD PTR m,ax 77 | mov WORD PTR m+2,dx 78 | endif 79 | endm 80 | 81 | pushm macro v:VARARG 82 | ifdef __16__ 83 | push WORD PTR v+2 84 | push WORD PTR v 85 | else 86 | push DWORD PTR v 87 | endif 88 | endm 89 | 90 | movmx macro m1,m2 91 | ifdef __16__ 92 | mov ax,WORD PTR m2+2 93 | mov WORD PTR m1+2,ax 94 | mov ax,WORD PTR m2 95 | mov WORD PTR m1,ax 96 | else 97 | mov eax,DWORD PTR m2 98 | mov DWORD PTR m1,eax 99 | endif 100 | endm 101 | 102 | movp macro fp,lp 103 | ifdef __LARGE__ 104 | mov WORD PTR fp+2,cs 105 | endif 106 | mov WORD PTR fp,offset lp 107 | endm 108 | 109 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 110 | 111 | ifdef __DZ__ 112 | __ROT__ equ 1 113 | __ZIP__ equ 1 ; ZIP 114 | __TE__ equ 1 ; Text Edit 115 | __MEMVIEW__ equ 1 116 | endif 117 | ifndef __X__ 118 | __CLIP__ equ 1 119 | __MOUSE__ equ 1 120 | __LFN__ equ 1 121 | endif 122 | 123 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 124 | 125 | pragma_init macro pp, priority 126 | _INIT segment WORD PUBLIC 'INIT' 127 | dw pp 128 | dw priority 129 | _INIT ENDS 130 | endm 131 | 132 | pragma_exit macro pp, priority 133 | _EXIT segment WORD PUBLIC 'EXIT' 134 | dw pp 135 | dw priority 136 | _EXIT ENDS 137 | endm 138 | 139 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 140 | ; 141 | ; Debug macros 142 | ; 143 | ifdef DEBUG 144 | assert_exit PROTO _CType 145 | DADD equ 146 | DSUB equ 147 | DMOV equ 148 | DPUSH equ 149 | DPOP equ 150 | else 151 | DADD macro v:VARARG 152 | endm 153 | DSUB macro v:VARARG 154 | endm 155 | DMOV macro v:VARARG 156 | endm 157 | DPUSH macro v:VARARG 158 | endm 159 | DPOP macro v:VARARG 160 | endm 161 | endif 162 | 163 | assert macro A,B,J,message 164 | local @@ 165 | ifdef DEBUG 166 | pushf 167 | cmp &A,&B 168 | &J @@ 169 | popf 170 | call assert_exit 171 | % db "cmp &A&,&B& (&J&) -: ",message,0 172 | @@: 173 | popf 174 | endif 175 | endm 176 | 177 | assertf macro J,message 178 | local @@ 179 | ifdef DEBUG 180 | &J @@ 181 | call assert_exit 182 | db "flag (&J&) - ",message,0 183 | @@: 184 | endif 185 | endm 186 | 187 | .list 188 | -------------------------------------------------------------------------------- /src/dos/inc/macro.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | 3 | cmprm macro src 4 | local @@ 5 | cmp dx,word ptr src+2 6 | jne @@ 7 | cmp ax,word ptr src 8 | @@: 9 | endm 10 | 11 | cmpmm macro des,src 12 | ifdef __3__ 13 | mov eax,des 14 | cmp eax,src 15 | else 16 | lodm des 17 | cmprm src 18 | endif 19 | endm 20 | 21 | movmm macro m1,m2 22 | lodm m2 23 | stom m1 24 | endm 25 | 26 | movmw macro m1,m2 27 | mov ax,word ptr m2 28 | mov word ptr m1,ax 29 | endm 30 | 31 | incm macro src 32 | ifndef __16__ 33 | inc dword ptr src 34 | else 35 | add word ptr src,1 36 | adc word ptr src+2,0 37 | endif 38 | endm 39 | 40 | decm macro src 41 | ifdef __3__ 42 | dec dword ptr src 43 | else 44 | sub word ptr src,1 45 | sbb word ptr src+2,0 46 | endif 47 | endm 48 | 49 | .list 50 | -------------------------------------------------------------------------------- /src/dos/inc/math.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | 3 | _mul10 PROTO _CType ; (e)dx:(e)ax * 10 --> dx:ax 4 | _mul32 PROTO _CType ; dx:ax * cx:bx --> cx:bx:dx:ax 5 | _div32 PROTO _CType ; dx:ax / cx:bx --> dx:ax.cx 6 | _shl32 PROTO ; dx:ax << cl --> dx:ax 7 | _shr32 PROTO ; dx:ax >> cl --> dx:ax 8 | _div64 PROTO ; edx:eax / ecx --> edx:eax.ecx 9 | _mul64 PROTO ; edx:eax * ecx:ebx --> ecx:ebx:edx:eax 10 | _shl64 PROTO ; edx:eax << cl --> edx:eax 11 | _shr64 PROTO ; edx:eax >> cl --> edx:eax 12 | 13 | .list 14 | -------------------------------------------------------------------------------- /src/dos/inc/mouse.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | MOUSECMD equ -1 8 | KEY_MSLEFT equ 1 9 | KEY_MSRIGTH equ 2 10 | KEY_MOUSEPRESS equ KEY_MSLEFT or KEY_MSRIGTH 11 | 12 | mousehide PROTO _CType 13 | mouseshow PROTO _CType 14 | mouseset PROTO _CType 15 | mouseget PROTO _CType 16 | mouseon PROTO _CType 17 | mouseoff PROTO _CType 18 | mousep PROTO _CType 19 | mousey PROTO _CType 20 | mousex PROTO _CType 21 | msloop PROTO _CType 22 | mousewait PROTO _CType :WORD, :WORD, :WORD 23 | 24 | HideMouseCursor macro 25 | ifdef __MOUSE__ 26 | call mousehide 27 | endif 28 | endm 29 | 30 | ShowMouseCursor macro 31 | ifdef __MOUSE__ 32 | call mouseshow 33 | endif 34 | endm 35 | 36 | .list 37 | -------------------------------------------------------------------------------- /src/dos/inc/progress.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | 3 | externdef progress_dobj:WORD 4 | externdef progress_size:DWORD 5 | 6 | progress_open PROTO _CType :DWORD, :DWORD 7 | progress_close PROTO _CType 8 | progress_set PROTO _CType :DWORD, :DWORD, :DWORD 9 | progress_update PROTO _CType :DWORD 10 | 11 | .list 12 | -------------------------------------------------------------------------------- /src/dos/inc/share.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | 3 | SH_COMPAT equ 0000h 4 | SH_DENYRW equ 0010h 5 | SH_DENYWR equ 0020h 6 | SH_DENYRD equ 0030h 7 | SH_DENYNONE equ 0040h 8 | SH_DENYNO equ SH_DENYNONE ; MS documentation uses both 9 | 10 | .list 11 | -------------------------------------------------------------------------------- /src/dos/inc/stat.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | 3 | S_IFMT equ 0F000h 4 | S_IFDIR equ 4000h 5 | S_IFIFO equ 1000h 6 | S_IFCHR equ 2000h 7 | S_IFBLK equ 3000h 8 | S_IFREG equ 8000h 9 | S_IREAD equ 0100h 10 | S_IWRITE equ 0080h 11 | S_IEXEC equ 0040h 12 | 13 | .list 14 | -------------------------------------------------------------------------------- /src/dos/inc/stdio.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | SEEK_CUR equ 1 8 | SEEK_END equ 2 9 | SEEK_SET equ 0 10 | 11 | INT_MAX equ 7FFFh 12 | 13 | _NSTREAM_ equ 10 14 | _MAXIOBUF equ 4000h 15 | _INTIOBUF equ 1000h 16 | _MINIOBUF equ 0200h 17 | 18 | _IOFBF equ 0000h 19 | _IOREAD equ 0001h 20 | _IOWRT equ 0002h 21 | _IONBF equ 0004h 22 | _IOMYBUF equ 0008h 23 | _IOEOF equ 0010h 24 | _IOERR equ 0020h 25 | _IOSTRG equ 0040h 26 | _IOLBF equ 0040h 27 | _IORW equ 0080h 28 | _IOYOURBUF equ 0100h 29 | _IOSETVBUF equ 0400h 30 | _IOFEOF equ 0800h 31 | _IOFLRTN equ 1000h 32 | _IOCTRLZ equ 2000h 33 | _IOCOMMIT equ 4000h 34 | 35 | S_FILE STRUC 36 | iob_bp dd ? 37 | iob_cnt dw ? 38 | iob_base dd ? 39 | iob_flag dw ? 40 | iob_file dw ? 41 | iob_bufsize dw ? 42 | iob_charbuf dw ? 43 | S_FILE ENDS 44 | 45 | externdef _bufin: BYTE 46 | externdef _iob: S_FILE 47 | externdef stdout: S_FILE 48 | externdef stderr: S_FILE 49 | 50 | _print PROTO _CDecl :DWORD, :VARARG 51 | sprintf PROTO _CDecl :DWORD, :DWORD, :VARARG 52 | _output PROTO _CType :DWORD, :DWORD, :DWORD 53 | ftobufin PROTO _CDecl :DWORD, :VARARG 54 | 55 | printf PROTO _CDecl :DWORD, :VARARG 56 | fprintf PROTO _CDecl :DWORD, :DWORD, :VARARG 57 | puts PROTO _CType :DWORD 58 | fopen PROTO _CType :DWORD, :DWORD 59 | fclose PROTO _CType :DWORD 60 | fgetc PROTO _CType :DWORD 61 | vsprintf PROTO _CType :DWORD, :DWORD, :DWORD 62 | fread PROTO _CType :DWORD, :WORD, :WORD, :DWORD 63 | fwrite PROTO _CType :DWORD, :WORD, :WORD, :DWORD 64 | fseek PROTO _CType :DWORD, :DWORD, :WORD 65 | fgets PROTO _CType :DWORD, :WORD, :DWORD 66 | fputs PROTO _CType :DWORD, :DWORD 67 | ftell PROTO _CType :DWORD 68 | perror PROTO _CType :DWORD 69 | fflush PROTO _CType :DWORD 70 | _flush PROTO _CType :DWORD 71 | _flsbuf PROTO _CType :WORD, :DWORD 72 | _freebuf PROTO _CType :DWORD 73 | _filebuf PROTO _CType :DWORD 74 | _openfile PROTO _CType :DWORD 75 | _getst PROTO _CType 76 | _ftbuf PROTO _CType :WORD, :DWORD 77 | _stbuf PROTO _CType :DWORD 78 | _getbuf PROTO _CType :DWORD 79 | setvbuf PROTO _CType :DWORD, :DWORD, :WORD, :WORD 80 | setbuf PROTO _CType :DWORD, :DWORD 81 | 82 | .list 83 | -------------------------------------------------------------------------------- /src/dos/inc/stdlib.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | exit PROTO _CType :WORD 8 | abort PROTO _CType 9 | terminate PROTO _CType :WORD 10 | atol PROTO _CType :PTR BYTE 11 | xtol PROTO _CType :PTR BYTE 12 | strtol PROTO _CType :PTR BYTE 13 | qsort PROTO _CType :DWORD, :WORD, :WORD, :DWORD 14 | qwtostr PROTO _CType :DWORD, :DWORD 15 | qwtobstr PROTO _CType :DWORD, :DWORD 16 | mkbstring PROTO _CType :PTR BYTE, :DWORD, :DWORD 17 | searchp PROTO _CType :PTR BYTE 18 | getenvp PROTO _CType :PTR BYTE 19 | getenval PROTO _CType :PTR BYTE, :PTR BYTE 20 | expenviron PROTO _CType :PTR BYTE 21 | isexec PROTO _CType 22 | rand PROTO _CType 23 | srand PROTO _CType :WORD 24 | random PROTO _CType :WORD 25 | randomize PROTO _CType 26 | 27 | .list 28 | -------------------------------------------------------------------------------- /src/dos/inc/string.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | ; Inline compare case - uses DX 8 | 9 | cmpaxi macro 10 | mov dx,ax 11 | sub al,'A' 12 | sub ah,'A' 13 | cmp al,'Z' - 'A' + 1 14 | sbb al,al 15 | cmp ah,'Z' - 'A' + 1 16 | sbb ah,ah 17 | and ax,2020h 18 | xor ax,dx 19 | cmp ah,al 20 | endm 21 | 22 | 23 | memcmp PROTO _CType :PTR BYTE, :PTR BYTE, :WORD 24 | memcpyw PROTO _CType :PTR BYTE, :PTR BYTE, :WORD 25 | memcpyd PROTO _CType :PTR BYTE, :PTR BYTE, :WORD 26 | memmovw PROTO _CType :PTR BYTE, :PTR BYTE, :WORD 27 | memmovd PROTO _CType :PTR BYTE, :PTR BYTE, :WORD 28 | strncat PROTO _CType :PTR BYTE, :PTR BYTE, :WORD 29 | memcpy PROTO _CType :PTR BYTE, :PTR BYTE, :WORD 30 | memmove PROTO _CType :PTR BYTE, :PTR BYTE, :WORD 31 | memset PROTO _CType :PTR BYTE, :WORD, :WORD 32 | strlen PROTO _CType :PTR BYTE 33 | strcpy PROTO _CType :PTR BYTE, :PTR BYTE 34 | strncpy PROTO _CType :PTR BYTE, :PTR BYTE, :WORD 35 | strnzcpy PROTO _CType :PTR BYTE, :PTR BYTE, :WORD 36 | strcat PROTO _CType :PTR BYTE, :PTR BYTE 37 | strcmp PROTO _CType :PTR BYTE, :PTR BYTE 38 | strncmp PROTO _CType :PTR BYTE, :PTR BYTE, :WORD 39 | stricmp PROTO _CType :PTR BYTE, :PTR BYTE 40 | strnicmp PROTO _CType :PTR BYTE, :PTR BYTE, :WORD 41 | strchr PROTO _CType :PTR BYTE, :WORD 42 | strrchr PROTO _CType :PTR BYTE, :WORD 43 | strstr PROTO _CType :PTR BYTE, :PTR BYTE 44 | strlwr PROTO _CType :PTR BYTE 45 | strrev PROTO _CType :PTR BYTE 46 | strupr PROTO _CType :PTR BYTE 47 | 48 | memzero PROTO _CType :PTR BYTE, :WORD 49 | memxchg PROTO _CType :PTR BYTE, :PTR BYTE, :WORD 50 | 51 | strcmpi PROTO 52 | strstart PROTO _CType :PTR BYTE 53 | strtrim PROTO _CType :PTR BYTE 54 | strfn PROTO _CType :PTR BYTE 55 | strpath PROTO _CType :PTR BYTE 56 | strfcat PROTO _CType :PTR BYTE, :PTR BYTE, :PTR BYTE 57 | cmpwarg PROTO _CType :PTR BYTE, :PTR BYTE 58 | cmpwargs PROTO _CType :PTR BYTE, :PTR BYTE 59 | strxchg PROTO _CType :PTR BYTE, :PTR BYTE, :PTR BYTE, :WORD 60 | dostounix PROTO _CType :PTR BYTE 61 | unixtodos PROTO _CType :PTR BYTE 62 | atohex PROTO _CType :PTR BYTE 63 | hextoa PROTO _CType :PTR BYTE 64 | strext PROTO _CType :PTR BYTE 65 | setfext PROTO _CType :PTR BYTE, :PTR BYTE 66 | ftolower PROTO _CType 67 | 68 | .list 69 | -------------------------------------------------------------------------------- /src/dos/inc/syserrls.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | externdef CP_NOERROR: BYTE ; 'No ' 3 | externdef CP_ERROR: BYTE ; 'Error' 4 | externdef CP_EPERM: BYTE ; "Operation not permitted" 5 | externdef CP_ENOENT: BYTE ; "No such file or directory" 6 | externdef CP_ESRCH: BYTE ; "No such process" 7 | externdef CP_EINTR: BYTE ; "Interrupted function call" 8 | externdef CP_EIO: BYTE ; "Input/output error" 9 | externdef CP_ENXIO: BYTE ; "No such device or address" 10 | externdef CP_E2BIG: BYTE ; "Arg list too long" 11 | externdef CP_ENOEXEC: BYTE ; "Exec format error" 12 | externdef CP_EBADF: BYTE ; "Bad file descriptor" 13 | externdef CP_ECHILD: BYTE ; "No child processes" 14 | externdef CP_EAGAIN: BYTE ; "Resource temporarily unavailable" 15 | externdef CP_ENOMEM: BYTE ; "Not enough space" 16 | externdef CP_EACCES: BYTE ; "Permission denied" 17 | externdef CP_EFAULT: BYTE ; "Bad address" 18 | externdef CP_EBUSY: BYTE ; "Resource device" 19 | externdef CP_EEXIST: BYTE ; "File exists" 20 | externdef CP_EXDEV: BYTE ; "Improper link" 21 | externdef CP_ENODEV: BYTE ; "No such device" 22 | externdef CP_ENOTDIR: BYTE ; "Not a directory" 23 | externdef CP_EISDIR: BYTE ; "Is a directory" 24 | externdef CP_EINVAL: BYTE ; "Invalid argument" 25 | externdef CP_ENFILE: BYTE ; "Too many open files in system" 26 | externdef CP_EMFILE: BYTE ; "Too many open files" 27 | externdef CP_ENOTTY: BYTE ; "Inappropriate I/O control operation" 28 | externdef CP_EFBIG: BYTE ; "File too large" 29 | externdef CP_ENOSPC: BYTE ; "No space left on device" 30 | externdef CP_ESPIPE: BYTE ; "Invalid seek" 31 | externdef CP_EROFS: BYTE ; "Read-only file system" 32 | externdef CP_EMLINK: BYTE ; "Too many links" 33 | externdef CP_EPIPE: BYTE ; "Broken pipe" 34 | externdef CP_EDOM: BYTE ; "Domain error" 35 | externdef CP_ERANGE: BYTE ; "Result too large" 36 | externdef CP_EDEADLK: BYTE ; "Resource deadlock avoided" 37 | externdef CP_ENAMETOOLONG: BYTE ; "Filename too long" 38 | externdef CP_ENOLCK: BYTE ; "No locks available" 39 | externdef CP_ENOSYS: BYTE ; "Function not implemented" 40 | externdef CP_ENOTEMPTY: BYTE ; "Directory not empty" 41 | externdef CP_EILSEQ: BYTE ; "Illegal byte sequence" 42 | externdef CP_UNKNOWN: BYTE ; "Unknown error" 43 | .list 44 | -------------------------------------------------------------------------------- /src/dos/inc/time.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | DT_BASEYEAR equ 1980 8 | 9 | DFORMAT_USA equ 0 10 | DFORMAT_EUROPE equ 1 11 | DFORMAT_JAPAN equ 2 12 | externdef dos_dateformat:BYTE 13 | externdef date_separator:BYTE 14 | externdef time_separator:BYTE 15 | 16 | putedxal PROTO 17 | wcputnum PROTO 18 | 19 | dosdate PROTO _CType 20 | dostime PROTO _CType 21 | 22 | getyear PROTO _CType 23 | getmnd PROTO _CType 24 | getday PROTO _CType 25 | gethour PROTO _CType 26 | getmin PROTO _CType 27 | getsec PROTO _CType 28 | 29 | dwexpand PROTO _CType ; ax to ax:dx:cx -- dd:mm:yyyy 30 | dwtolstr PROTO _CType :DWORD, :WORD 31 | dwtostr PROTO _CType :DWORD, :WORD 32 | strtodw PROTO _CType :DWORD 33 | strtotw PROTO _CType :DWORD 34 | twtostr PROTO _CType :DWORD, :WORD 35 | 36 | tupdtime PROTO _CType 37 | tupddate PROTO _CType 38 | 39 | .list 40 | -------------------------------------------------------------------------------- /src/dos/inc/tinfo.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | 3 | _T_MALLOC equ 0001h 4 | _T_EMMBUF equ 0002h 5 | _T_LINEBUF equ 0003h 6 | _T_FILE equ 0004h 7 | _T_MODIFIED equ 0008h 8 | _T_USECONTROL equ 0010h ; default 9 | _T_USEMENUS equ 0020h ;*[x] Ctrl-M (F11) 10 | _T_OPTIMALFILL equ 0040h ;*[x] Ctrl-F 11 | _T_OVERWRITE equ 0080h ;*[x] 12 | _T_USEINDENT equ 0100h ;*[x] Ctrl-I 13 | _T_USESTYLE equ 0200h ;*[x] Ctrl-S 14 | _T_USETABS equ 0400h ;*[x] 15 | _T_USEBAKFILE equ 0800h ;*[x] 16 | _T_USECRLF equ 1000h ;*[x] 17 | _T_PROMPTONREP equ 2000h ; [x] 18 | _T_SHOWTABS equ 4000h 19 | _T_TEDEFAULT equ 3FE0h 20 | _T_TECFGMASK equ 3FE0h 21 | 22 | _TI_CONTINUE equ 0 ; continue edit 23 | _TI_RETEVENT equ 1 ; return current event (keystroke) 24 | _TI_CMFAILED equ 2 ; operation fail (end of line/buffer) 25 | 26 | S_TINFO STRUC 27 | ti_bp dd ? ; base pointer 28 | ti_flag dw ? ; config 29 | ti_xpos dw ? ; text window x,y 30 | ti_ypos dw ? 31 | ti_cols dw ? ; size of screen-line 32 | ti_bcol dw ? ; size of buffer-line 33 | ti_xoff dw ? ; x offset on screen 34 | ti_boff dw ? ; base offset - start of screen-line 35 | ti_clat db ? ; clear attrib 36 | ti_clch db ? ; clear char 37 | ti_cursor S_CURSOR 38 | ti_bcnt dw ? ; byte count in line 39 | ti_clso dw ? ; Clipboard start offset 40 | ti_cleo dw ? ; Clipboard end offset 41 | ti_clsl dw ? ; Clipboard start line 42 | ti_clel dw ? ; Clipboard end line 43 | ti_brow dw ? ; number of lines in buffer 44 | ti_rows dw ? ; number of lines on screen 45 | ti_loff dw ? ; line offset in buffer 46 | ti_yoff dw ? ; y offset on screen 47 | S_TINFO ENDS ; 42 byte 48 | 49 | externdef tinfo: WORD ; offset SS/DS 50 | 51 | TITABCHAR equ 0Bh ; expand/trunc tabs with this char (Vertical Tab) 52 | TIMAXSCRLINE equ 128 53 | TIMAXTABSIZE equ 64 54 | 55 | ifdef __TE__ 56 | 57 | TIMAXFILES equ 100 58 | TIMINLINE equ 128 59 | TIMAXLINE equ 1024 60 | STYLESIZE equ 4096 61 | EMSMINPAGES equ 4 62 | WMAXPATH equ 260 63 | 64 | S_TEDIT STRUC 65 | te_info S_TINFO 66 | ti_stat db ? ; style attrib 67 | ti_stch db ? ; style char 68 | ti_lcnt dw ? ; line count in file 69 | ti_emmh dw ? ; EMM handle 70 | ti_emmp dw ? ; EMM page 71 | ti_file dd ? ; file name 72 | ti_time dw ? ; file time 73 | ti_date dw ? ; file date 74 | ti_size dd ? ; file size 75 | ti_next dw ? ; next file 76 | ti_prev dw ? ; prev file 77 | ti_style dd ? 78 | ti_DOBJ S_DOBJ 79 | S_TEDIT ENDS ; 86 byte 80 | 81 | externdef teflag:WORD 82 | externdef tepages:WORD 83 | externdef telsize:WORD 84 | externdef tetabsize:WORD 85 | externdef fsflag:WORD 86 | externdef searchstring:BYTE 87 | externdef replacestring:BYTE 88 | 89 | tistate PROTO _CType ; AX tinfo 90 | tigetfile PROTO _CType 91 | topen PROTO _CType :DWORD 92 | tclose PROTO _CType 93 | tcloseall PROTO _CType 94 | tmodal PROTO _CType 95 | tdlgopen PROTO _CType 96 | teoption PROTO _CType 97 | 98 | endif 99 | 100 | .list 101 | -------------------------------------------------------------------------------- /src/dos/inc/tview.inc: -------------------------------------------------------------------------------- 1 | .xlist 2 | 3 | _TV_USEMLINE equ 01h 4 | _TV_USESLINE equ 02h 5 | _TV_HEXVIEW equ 04h 6 | _TV_WRAPLINES equ 08h 7 | _TV_HEXOFFSET equ 10h 8 | _TV_HIGHCOLOR equ 20h 9 | _TV_BINVIEW equ 40h 10 | _TV_CLASSVIEW equ 80h 11 | 12 | IO_MEMREAD equ 4000h ; View memory area 13 | 14 | ifdef __CLASSVIEW__ 15 | 16 | CLVERSION equ 0206h 17 | CLCOUNT equ 23 18 | 19 | S_CLASS STRUC 20 | cl_name db 28 dup(?) 21 | cl_size dw ? 22 | cl_type db ? 23 | cl_format db ? 24 | S_CLASS ENDS 25 | 26 | TCLSIZE equ (CLCOUNT*S_CLASS) + 6 27 | CLFLAGS equ _D_DOPEN or _D_ONSCR or _D_MYBUF 28 | 29 | CLTYPE_CHAR equ 0 30 | CLTYPE_BYTE equ 1 31 | CLTYPE_WORD equ 2 32 | CLTYPE_DWORD equ 3 33 | CLTYPE_QWORD equ 4 34 | 35 | CLFORM_SIGNED equ 0 36 | CLFORM_UNSIGNED equ 1 37 | CLFORM_HEX equ 2 38 | CLFORM_BINARY equ 3 39 | 40 | externdef tv_clversion: WORD 41 | externdef tv_classsize: WORD 42 | externdef tv_classrow: WORD 43 | externdef tv_class: S_CLASS 44 | externdef IDD_TVClass: DWORD 45 | externdef IDD_TVSaveClass: DWORD 46 | externdef IDD_TVClassFormat: DWORD 47 | wgetfile proto _CType :dword, :word 48 | 49 | endif 50 | 51 | ifdef __MEMVIEW__ 52 | tview proto _CType :dword, :dword, :dword, :dword 53 | else 54 | tview proto _CType :dword, :dword 55 | endif 56 | 57 | .list 58 | -------------------------------------------------------------------------------- /src/dos/inc/wsub.inc: -------------------------------------------------------------------------------- 1 | ifndef __LIBC_INC 2 | include libc.inc 3 | endif 4 | 5 | .xlist 6 | 7 | WMAXPATH equ 260 8 | MAXFBLOCK equ 3000 9 | WMAXFBLOCK equ 3FFFh 10 | 11 | _W_ROOTDIR equ 0001h 12 | _W_LONGNAME equ 0010h 13 | _W_HIDDEN equ 0040h 14 | _W_FLOPPY equ 0080h ; wsetflag -- not used 15 | _W_CDROOM equ 0100h 16 | _W_NETWORK equ 0180h 17 | _W_SORTNAME equ 0000h 18 | _W_SORTTYPE equ 0200h 19 | _W_SORTDATE equ 0400h 20 | _W_SORTSIZE equ 0600h 21 | _W_NOSORT equ 0800h 22 | _W_SORTSUB equ 1000h 23 | _W_ARCHEXT equ 4000h 24 | _W_ARCHZIP equ 8000h 25 | _W_ARCHIVE equ _W_ARCHZIP or _W_ARCHEXT 26 | 27 | S_PATH STRUC 28 | wp_flag dw ? 29 | wp_mask db 32 dup(?) 30 | wp_file db 260 dup(?) 31 | wp_arch db 260 dup(?) 32 | wp_path db 260 dup(?) 33 | S_PATH ENDS ; 816 byte 34 | 35 | S_WSUB STRUC 36 | ws_count dw ? 37 | ws_maxfb dw ? 38 | ws_flag dd ? 39 | ws_mask dd ? 40 | ws_file dd ? 41 | ws_arch dd ? 42 | ws_path dd ? 43 | ws_fcb dd ? 44 | S_WSUB ENDS ; 28 byte 45 | 46 | S_DISK STRUC 47 | di_flag dw ? ; align FBLK 48 | di_time dd ? 49 | di_sizeax dd ? 50 | di_sizedx dd ? 51 | di_name db 16 dup(?) 52 | S_DISK ENDS 53 | 54 | externdef drvinfo:S_DISK 55 | externdef cp_stdmask:BYTE 56 | externdef cp_warning:BYTE 57 | externdef cp_emaxfb:BYTE 58 | externdef cp_einitsub:BYTE 59 | externdef __srcpath:BYTE 60 | externdef __outpath:BYTE 61 | externdef __srcfile:BYTE 62 | externdef __outfile:BYTE 63 | 64 | wsopen PROTO _CType :DWORD 65 | wsclose PROTO _CType :DWORD 66 | wsinit PROTO _CType :DWORD 67 | wsfree PROTO _CType :DWORD 68 | wsread PROTO _CType :DWORD 69 | wssort PROTO _CType :DWORD 70 | wssetflag PROTO _CType :DWORD 71 | wslocal PROTO _CType :DWORD 72 | wschdrv PROTO _CType :DWORD, :WORD 73 | wsearch PROTO _CType :DWORD, :PTR BYTE 74 | wsfblk PROTO _CType :DWORD, :WORD 75 | wsffirst PROTO _CType :DWORD 76 | wsmkdir PROTO _CType :PTR BYTE 77 | wsetprogress PROTO _CType 78 | wdlgopen PROTO _CType :PTR BYTE, :PTR BYTE, :WORD 79 | wgetfile PROTO _CType :PTR BYTE, :WORD 80 | wscopy_open PROTO _CType ; eax, edx (__srcfile, __outfile) 81 | wscopy_remove PROTO _CType ; eax (__outfile) 82 | 83 | ifdef __ZIP__ 84 | externdef entryname: BYTE 85 | wsopenarch PROTO _CType :DWORD 86 | wzipread PROTO _CType :DWORD 87 | wzipopen PROTO _CType 88 | wzipclose PROTO _CType 89 | wsdecomp PROTO _CType :DWORD, :DWORD, :DWORD 90 | wzipadd PROTO _CType :DWORD, :DWORD, :WORD 91 | wzipcopy PROTO _CType :DWORD, :DWORD, :DWORD 92 | wzipcopypath PROTO _CType :DWORD, :DWORD, :DWORD 93 | wzipcopyfile PROTO _CType :DWORD, :DWORD, :DWORD 94 | wzipfindentry PROTO _CType :DWORD, :WORD 95 | endif 96 | 97 | .list 98 | -------------------------------------------------------------------------------- /src/dos/ini.asm: -------------------------------------------------------------------------------- 1 | ; INI.ASM-- 2 | ; Copyright (C) 2015 Doszip Developers 3 | 4 | include dir.inc 5 | include string.inc 6 | include stdio.inc 7 | include iost.inc 8 | include conio.inc 9 | 10 | extrn _argv:DWORD 11 | extrn configfile:BYTE 12 | 13 | .data 14 | cp_badentry db "Bad or missing Entry in DZ.INI",0 15 | cp_badentrymsg db "Section: [%s]",10,"Entry: [%s]",10,0 16 | entryid db 0,0,0,0 17 | extini db ".ini",0 18 | 19 | .code 20 | 21 | inierror PROC _CType PUBLIC section:DWORD, entry:DWORD 22 | invoke ermsg,addr cp_badentry,addr cp_badentrymsg,section,entry 23 | test ax,ax 24 | ret 25 | inierror ENDP 26 | 27 | next_word: 28 | inc di 29 | first_word: 30 | mov al,[di] 31 | cmp al,' ' 32 | je next_word 33 | cmp al,9 34 | je next_word 35 | ret 36 | 37 | inientry PROC _CType PUBLIC USES si di bx section:DWORD, entry:DWORD, inifile:DWORD 38 | local quote:BYTE 39 | local lbuf[WMAXPATH]:BYTE 40 | .if WORD PTR inifile 41 | invoke strcpy,addr lbuf,inifile 42 | .else 43 | les bx,_argv ; assume .ini 44 | invoke strcpy,addr lbuf,es:[bx] 45 | invoke setfext,dx::ax,addr extini 46 | .endif 47 | lea di,lbuf 48 | invoke strlen,section 49 | mov si,ax 50 | .if ogetl(ss::di,ss::di,WMAXPATH-1) 51 | .repeat 52 | call ogets 53 | .break .if ZERO? 54 | mov bx,si 55 | inc di 56 | .if lbuf == '[' && BYTE PTR [di+bx] == ']' 57 | mov BYTE PTR [di+bx],0 58 | .if !stricmp(section,ss::di) 59 | inc ax 60 | .break 61 | .endif 62 | .endif 63 | dec di 64 | .until 0 65 | mov si,ax 66 | .if ax 67 | sub si,si ; Result 68 | .repeat ; Section found, read entries 69 | call ogets 70 | .break .if !ax 71 | lea di,lbuf 72 | call first_word 73 | .break .if al == '[' 74 | .continue .if !al || al == ';' 75 | invoke strchr,ss::di,'=' 76 | .continue .if !ax 77 | mov bx,ax 78 | mov BYTE PTR [bx],0 79 | invoke strtrim,ss::di 80 | .continue .if !ax 81 | invoke stricmp,ss::di,entry 82 | .continue .if ax 83 | mov di,bx 84 | inc di 85 | call first_word 86 | invoke strtrim,ss::di 87 | .break .if !ax 88 | mov quote,0 89 | mov si,di 90 | cld? 91 | .repeat 92 | lodsb 93 | .break .if !al 94 | .if al == '"' 95 | xor quote,1 96 | .endif 97 | .break .if al == ';' && !quote 98 | .until 0 99 | sub ax,ax 100 | mov [si-1],al 101 | .if [di] == al 102 | sub si,si 103 | .endif 104 | .break 105 | .until 0 106 | .endif 107 | invoke oclose,addr STDI 108 | .if si 109 | invoke strcpy,addr _bufin,ss::di 110 | .else 111 | sub ax,ax 112 | mov dx,ax 113 | .endif 114 | .endif 115 | ret 116 | inientry ENDP 117 | 118 | iniidtostr PROC _CType 119 | @@: 120 | cmp al,10 121 | jb @F 122 | inc ah 123 | sub al,10 124 | jmp @B 125 | @@: 126 | test ah,ah 127 | jz @F 128 | xchg al,ah 129 | or ah,'0' 130 | @@: 131 | or al,'0' 132 | mov entryid[0],al 133 | mov entryid[1],ah 134 | mov entryid[2],0 135 | mov ax,offset entryid 136 | mov dx,ds 137 | ret 138 | iniidtostr ENDP 139 | 140 | inientryid PROC _CType PUBLIC section:DWORD, entry:size_t 141 | mov ax,entry 142 | call iniidtostr 143 | invoke inientry,section,dx::ax,addr configfile 144 | ret 145 | inientryid ENDP 146 | 147 | END 148 | -------------------------------------------------------------------------------- /src/dos/keyb.asm: -------------------------------------------------------------------------------- 1 | ; KEYB.ASM-- 2 | ; Copyright (C) 2015 Doszip Developers 3 | 4 | include keyb.inc 5 | include conio.inc 6 | 7 | PUBLIC keyshift 8 | 9 | .data 10 | keyshift dd 00400017h 11 | keyboard dw 1 12 | 13 | .code 14 | 15 | InstallKeyboard: 16 | sub ax,ax 17 | mov es,ax 18 | mov ah,12h ; GET EXTENDED SHIFT STATES 19 | int 16h ; (enh kbd support only) 20 | mov bx,0417h ; 0040:0017 (keyshift) 21 | cmp al,es:[bx] 22 | jne @F 23 | mov ah,80h 24 | xor es:[bx],ah 25 | mov ah,12h 26 | int 16h 27 | cmp al,es:[bx] 28 | jne @F 29 | mov keyboard,1001h 30 | @@: 31 | test console,CON_INT2F 32 | jz @F 33 | and console,not CON_INT2F 34 | mov ax,1680h ; MS Windows, DPMI, various 35 | int 2Fh ; - RELEASE CURRENT VIRTUAL MACHINE TIME-SLICE 36 | test al,al ; 00h if the call is supported 37 | jnz @F ; 80h (unchanged) if the call is not supported 38 | or console,CON_INT2F 39 | @@: 40 | ret 41 | 42 | keystroke: 43 | mov ax,keyboard ; 01h: CHECK FOR KEYSTROKE 44 | inc ah ; 11h: CHECK FOR ENHANCED KEYSTROKE 45 | int 16h 46 | jz keystroke_end ; ZF clear if keystroke available 47 | mov ax,keyboard ; 00h: GET KEYSTROKE 48 | int 16h ; 10h: GET ENHANCED KEYSTROKE 49 | ;----------------------- 50 | test ah,ah ; Yury - 04 Apr 2012 51 | jz @F ; - Russian letter 224 (0xE0) discarded 52 | cmp al,0E0h 53 | jne keystroke_end 54 | sub al,al 55 | @@: 56 | test ax,ax 57 | ;------------------------ 58 | keystroke_end: 59 | ret 60 | 61 | getkey PROC _CType PUBLIC 62 | call keystroke 63 | jnz getkey_end 64 | test console,CON_INT2F 65 | jz getkey_nul 66 | mov ax,1680h; added 05/05/2008 (bttr) 67 | int 2Fh ; RELEASE CURRENT VIRTUAL MACHINE TIME-SLICE 68 | getkey_nul: 69 | xor ax,ax 70 | getkey_end: 71 | test ax,ax 72 | ret 73 | getkey ENDP 74 | 75 | getesc PROC _CType PUBLIC 76 | call keystroke 77 | jz getesc_nul 78 | cmp ax,011Bh ; ESC 79 | je getesc_end 80 | getesc_nul: 81 | xor ax,ax 82 | getesc_end: 83 | test ax,ax 84 | ret 85 | getesc ENDP 86 | 87 | pragma_init InstallKeyboard, 7 88 | 89 | END 90 | -------------------------------------------------------------------------------- /src/dos/main.asm: -------------------------------------------------------------------------------- 1 | ; MAIN.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include libc.inc 5 | 6 | dzmain PROTO _CType 7 | 8 | .code 9 | 10 | main PROC c PUBLIC 11 | call dzmain 12 | ret 13 | main ENDP 14 | 15 | END 16 | -------------------------------------------------------------------------------- /src/dos/math.asm: -------------------------------------------------------------------------------- 1 | ; MATH.ASM-- 2 | ; Copyright (C) 2015 Doszip Developers 3 | 4 | include libc.inc 5 | include math.inc 6 | 7 | PUBLIC __I4D 8 | PUBLIC __U4D 9 | PUBLIC __U4M 10 | PUBLIC __I4M 11 | 12 | .code 13 | 14 | __U4M: ; dx:ax * cx:bx 15 | __I4M: 16 | _mul32 PROC _CType PUBLIC 17 | push bp 18 | push si 19 | push di 20 | push ax 21 | push dx 22 | push dx 23 | mul bx ; 1L * 2L 24 | mov si,dx 25 | mov di,ax 26 | pop ax 27 | mul cx ; 1H * 2H 28 | mov bp,dx 29 | xchg bx,ax 30 | pop dx 31 | mul dx ; 1H * 2L 32 | add si,ax 33 | adc bx,dx 34 | pop ax 35 | mul cx ; 1L * 2H 36 | add si,ax 37 | adc bx,dx 38 | adc bp,0 39 | mov cx,bp 40 | mov dx,si 41 | mov ax,di 42 | pop di 43 | pop si 44 | pop bp 45 | ret ; cx:bx:dx:ax 46 | _mul32 ENDP 47 | 48 | __U4D: ; dx:ax / cx:bx 49 | __I4D: 50 | _div32 PROC _CType PUBLIC 51 | test cx,cx 52 | jnz DIV_01 53 | test dx,dx 54 | jz DIV_00 55 | test bx,bx 56 | jnz DIV_01 57 | DIV_00: div bx 58 | mov bx,dx 59 | xor dx,dx 60 | mov cx,dx 61 | ret 62 | DIV_01: push bp 63 | push si 64 | push di 65 | mov bp,cx 66 | mov cx,32 67 | xor si,si 68 | xor di,di 69 | DIV_02: shl ax,1 70 | rcl dx,1 71 | rcl si,1 72 | rcl di,1 73 | cmp di,bp 74 | jb DIV_04 75 | ja DIV_03 76 | cmp si,bx 77 | jb DIV_04 78 | DIV_03: sub si,bx 79 | sbb di,bp 80 | inc ax 81 | DIV_04: dec cx 82 | jnz DIV_02 83 | mov cx,di 84 | mov bx,si 85 | pop di 86 | pop si 87 | pop bp 88 | ret 89 | _div32 ENDP 90 | 91 | _shr32 proc public 92 | ; DX:AX >> CX 93 | .while dx && cx 94 | shr ax,1 95 | shr dx,1 96 | jnc @F 97 | or ah,80h 98 | @@: 99 | dec cx 100 | .endw 101 | .if cx 102 | shr ax,cl 103 | .endif 104 | ret 105 | _shr32 endp 106 | 107 | END 108 | -------------------------------------------------------------------------------- /src/dos/mouse.asm: -------------------------------------------------------------------------------- 1 | ; MOUSE.ASM-- 2 | ; Copyright (C) 2015 Doszip Developers 3 | 4 | include mouse.inc 5 | 6 | MOUSEINT equ 33h 7 | OFFSETVECTOR equ MOUSEINT*4 8 | 9 | .code 10 | 11 | ifdef __MOUSE__ 12 | 13 | __mouse db 0 ; Installed 14 | __mbool db 0 ; Visible 15 | __mflag db 0 ; Mouse State 16 | 17 | mousep PROC _CType PUBLIC 18 | xor ax,ax 19 | cmp cs:[__mouse],al 20 | je @F 21 | push bx 22 | push cx 23 | push dx 24 | mov al,6 25 | int 33h 26 | or al,al 27 | pop dx 28 | pop cx 29 | pop bx 30 | @@: 31 | ret 32 | mousep ENDP 33 | 34 | mouseon PROC _CType PUBLIC 35 | mov ax,1 36 | cmp al,cs:[__mbool] 37 | je @F 38 | cmp ah,cs:[__mouse] 39 | je @F 40 | mov cs:[__mbool],al 41 | int 33h 42 | @@: 43 | ret 44 | mouseon ENDP 45 | 46 | mouseoff PROC _CType PUBLIC 47 | xor ax,ax 48 | cmp al,cs:[__mbool] 49 | jz @F 50 | mov cs:[__mbool],al 51 | mov ax,2 52 | int 33h 53 | @@: 54 | ret 55 | mouseoff ENDP 56 | 57 | mousex PROC _CType PUBLIC 58 | push bx 59 | push cx 60 | push dx 61 | xor ax,ax 62 | cmp al,cs:[__mouse] 63 | je @F 64 | mov al,3 65 | int 33h 66 | mov ax,cx 67 | shr ax,3 68 | @@: 69 | pop dx 70 | pop cx 71 | pop bx 72 | ret 73 | mousex ENDP 74 | 75 | mousey PROC _CType PUBLIC 76 | push bx 77 | push cx 78 | push dx 79 | xor ax,ax 80 | cmp al,cs:[__mouse] 81 | je @F 82 | mov ax,3 83 | int 33h 84 | mov ax,dx 85 | shr ax,3 86 | @@: 87 | pop dx 88 | pop cx 89 | pop bx 90 | ret 91 | mousey ENDP 92 | 93 | mousehide PROC _CType PUBLIC 94 | push ax 95 | call mouseoff 96 | shr al,1 97 | mov ah,cs:[__mflag] 98 | shl ah,1 99 | or al,ah 100 | mov cs:[__mflag],al 101 | pop ax 102 | ret 103 | mousehide ENDP 104 | 105 | mouseshow PROC _CType PUBLIC 106 | push ax 107 | mov al,cs:[__mflag] 108 | shr al,1 109 | mov cs:[__mflag],al 110 | jnc @F 111 | call mouseon 112 | @@: 113 | pop ax 114 | ret 115 | mouseshow ENDP 116 | 117 | mouseset PROC _CType PUBLIC 118 | call mousehide 119 | mov cs:[__mouse],al 120 | call mouseshow 121 | ret 122 | mouseset ENDP 123 | if 0 124 | mouseget PROC _CType PUBLIC 125 | mov ah,cs:[__mouse] 126 | mov al,cs:[__mbool] 127 | mov dl,cs:[__mflag] 128 | ret 129 | mouseget ENDP 130 | endif 131 | endif 132 | 133 | msloop PROC _CType PUBLIC 134 | ifdef __MOUSE__ 135 | .repeat 136 | call mousep 137 | .until ZERO? 138 | else 139 | sub ax,ax 140 | endif 141 | ret 142 | msloop ENDP 143 | 144 | ifdef __MOUSE__ 145 | 146 | mousewait PROC _CType PUBLIC USES si x:size_t, y:size_t, l:size_t 147 | mov si,x 148 | jmp mousewait_01 149 | mousewait_00: 150 | call mousex 151 | cmp ax,si 152 | jl mousewait_end 153 | mov dx,si 154 | add dx,l 155 | cmp ax,dx 156 | jg mousewait_end 157 | call mousey 158 | cmp ax,y 159 | jne mousewait_end 160 | mousewait_01: 161 | call mousep 162 | jnz mousewait_00 163 | mousewait_end: 164 | ret 165 | mousewait ENDP 166 | 167 | Install: 168 | xor ax,ax 169 | mov cs:[__mouse],al 170 | mov es,ax 171 | cmp ax,es:[OFFSETVECTOR+2] 172 | je mouseinit_00 173 | les bx,es:[OFFSETVECTOR] 174 | cmp BYTE PTR es:[bx],0CFh 175 | je mouseinit_00 176 | int 33h 177 | test ax,ax 178 | jz mouseinit_00 179 | inc cs:[__mouse] 180 | mouseinit_00: 181 | ret 182 | 183 | pragma_init Install,10 184 | 185 | endif ; __MOUSE__ 186 | 187 | END 188 | -------------------------------------------------------------------------------- /src/dos/msgbox.asm: -------------------------------------------------------------------------------- 1 | ; MSGBOX.ASM-- 2 | ; Copyright (C) 2015 Doszip Developers 3 | 4 | include conio.inc 5 | include io.inc 6 | include stdio.inc 7 | include string.inc 8 | 9 | .data 10 | cp_ok db '&Ok',0 11 | cp_er db 'Error',0 12 | .code 13 | 14 | center_text: 15 | .if BYTE PTR [di] 16 | mul ah 17 | add ax,3 18 | add ax,ax 19 | add bx,ax 20 | sub cx,6 21 | invoke wcenter,es::bx,cx,ds::di 22 | .endif 23 | ret 24 | 25 | MAXLINES equ 17 26 | 27 | msgbox PROC _CType PRIVATE USES si di bx dname:DWORD, flag:size_t, string:DWORD 28 | local dobj:S_DOBJ 29 | local tobj:S_TOBJ 30 | local cols:size_t 31 | local lcnt:size_t 32 | local backgr:BYTE 33 | sub si,si 34 | invoke strlen,dname 35 | mov bx,ax 36 | .if !strchr(string,10) 37 | invoke strlen,string 38 | .if ax > bx 39 | mov bx,ax 40 | .endif 41 | .endif 42 | mov al,at_background[B_Title] 43 | mov backgr,al 44 | les di,string 45 | .if BYTE PTR es:[di] 46 | .repeat 47 | .break .if !strchr(es::di,10) 48 | mov dx,ax 49 | sub dx,di 50 | .if dx >= bx 51 | mov bx,dx 52 | .endif 53 | inc si 54 | inc ax 55 | mov di,ax 56 | .until si == MAXLINES 57 | .endif 58 | invoke strlen,es::di 59 | .if ax >= bx 60 | mov bx,ax 61 | .endif 62 | mov dl,2 63 | mov dh,76 64 | .if bl && bl < 70 65 | mov dh,bl 66 | add dh,8 67 | mov dl,80 68 | sub dl,dh 69 | shr dl,1 70 | .endif 71 | .if dh < 40 72 | mov dx,2814h 73 | .endif 74 | mov ax,flag 75 | mov dobj.dl_flag,ax 76 | mov dobj.dl_rect.rc_x,dl 77 | mov dobj.dl_rect.rc_y,7 78 | mov ax,si 79 | add al,6 80 | mov dobj.dl_rect.rc_row,al 81 | mov dobj.dl_rect.rc_col,dh 82 | mov dobj.dl_count,1 83 | mov dobj.dl_index,0 84 | add al,7 85 | .if al > _scrrow 86 | mov dobj.dl_rect.rc_y,1 87 | .endif 88 | lea ax,tobj 89 | mov WORD PTR dobj.dl_object,ax 90 | mov WORD PTR dobj.dl_object+2,ss 91 | mov tobj.to_flag,_O_PBUTT 92 | mov al,dh 93 | shr al,1 94 | sub al,3 95 | mov tobj.to_rect.rc_x,al 96 | mov ax,si 97 | add al,4 98 | mov tobj.to_rect.rc_y,al 99 | mov tobj.to_rect.rc_row,1 100 | mov tobj.to_rect.rc_col,6 101 | mov tobj.to_ascii,'O' 102 | mov al,at_background[B_Dialog] 103 | or al,at_foreground[F_Dialog] 104 | .if dobj.dl_flag & _D_STERR 105 | mov at_background[B_Title],70h 106 | mov al,at_background[B_Error] 107 | or al,at_foreground[F_Desktop] 108 | or tobj.to_flag,_O_DEXIT 109 | .endif 110 | mov dl,al 111 | .if dlopen(addr dobj,dx,dname) 112 | les di,string 113 | mov si,di 114 | sub ax,ax 115 | mov al,dobj.dl_rect.rc_col 116 | mov cols,ax 117 | mov lcnt,2 118 | .repeat 119 | .break .if !BYTE PTR [si] 120 | invoke strchr,ds::di,10 121 | mov si,ax 122 | .break .if !ax 123 | mov BYTE PTR [si],0 124 | inc si 125 | mov cx,cols 126 | mov al,cl 127 | mov ah,BYTE PTR lcnt 128 | les bx,dobj.dl_wp 129 | call center_text 130 | mov di,si 131 | inc lcnt 132 | .until lcnt == MAXLINES+2 133 | invoke rcbprc,DWORD PTR tobj.to_rect,dobj.dl_wp,cols 134 | sub cx,cx 135 | mov cl,tobj.to_rect.rc_col 136 | invoke wcpbutt,dx::ax,cols,cx,addr cp_ok 137 | mov al,backgr 138 | mov at_background[B_Title],al 139 | mov cx,cols 140 | mov al,cl 141 | mov ah,BYTE PTR lcnt 142 | les bx,dobj.dl_wp 143 | call center_text 144 | invoke dlmodal,addr dobj 145 | .endif 146 | ret 147 | msgbox ENDP 148 | 149 | ermsg PROC _CDecl PUBLIC USES bx wtitle:DWORD, format:DWORD, argptr:VARARG 150 | invoke ftobufin,format,addr argptr 151 | lodm wtitle 152 | .if !ax 153 | mov ax,offset cp_er 154 | mov dx,ds 155 | .endif 156 | invoke msgbox,dx::ax,_D_STDERR,addr _bufin 157 | sub ax,ax 158 | ret 159 | ermsg ENDP 160 | 161 | stdmsg PROC _CDecl PUBLIC wtitle:DWORD, format:DWORD, argptr:VARARG 162 | invoke ftobufin,format,addr argptr 163 | invoke msgbox,wtitle,_D_STDDLG,addr _bufin 164 | sub ax,ax 165 | ret 166 | stdmsg ENDP 167 | 168 | END 169 | -------------------------------------------------------------------------------- /src/dos/nalloc.asm: -------------------------------------------------------------------------------- 1 | ; NALLOC.ASM-- 2 | ; Copyright (C) 2015 Doszip Developers 3 | 4 | include alloc.inc 5 | 6 | extrn _dsstack:WORD 7 | extrn errno:WORD 8 | 9 | ENOMEM equ 12 10 | MAXHEAPLEN equ 9004 11 | 12 | mb STRUC 13 | mb_size dw ? 14 | mb_used dw ? 15 | mb ENDS 16 | 17 | .data 18 | ss_brkl dw 0 19 | ss_free dw 0 20 | ss_base equ 21 | 22 | .code 23 | 24 | create_heap: 25 | mov ax,ss_base 26 | mov bx,ax 27 | mov ss_brkl,ax 28 | mov ss_free,ax 29 | jmp extend_heap_set 30 | 31 | extend_heap: 32 | mov ax,ss_brkl 33 | add ax,mb 34 | add ax,cx 35 | sub ax,ss_base 36 | cmp ax,MAXHEAPLEN 37 | ja extend_heap_failed 38 | mov ax,ss_brkl 39 | mov bx,ax 40 | mov [bx].mb.mb_size,cx 41 | mov dx,ax 42 | add ax,cx 43 | mov ss_brkl,ax 44 | mov bx,ax 45 | extend_heap_set: 46 | sub ax,ax 47 | mov [bx].mb.mb_size,ax 48 | inc ax 49 | mov [bx].mb.mb_used,ax 50 | ret 51 | extend_heap_failed: 52 | xor ax,ax 53 | ret 54 | 55 | getmaxblock: 56 | push cx 57 | push si 58 | push di 59 | mov si,ss_base 60 | mov dx,si ; largest free block 61 | xor cx,cx ; size of largest free block 62 | getmaxblock_do: 63 | cmp [si].mb.mb_used,0 64 | jne getmaxblock_next 65 | mov di,si ; merge free block's 66 | getmaxblock_add: 67 | add si,[si].mb.mb_size 68 | mov bx,[si].mb.mb_size 69 | cmp [si].mb.mb_used,0 ; if next block is free 70 | jne getmaxblock_test 71 | add [di].mb.mb_size,bx 72 | jmp getmaxblock_add 73 | getmaxblock_test: 74 | mov si,di ; update result 75 | cmp cx,[si].mb.mb_size 76 | ja getmaxblock_next 77 | mov cx,[si].mb.mb_size 78 | mov dx,si 79 | getmaxblock_next: 80 | add si,[si].mb.mb_size 81 | cmp si,ss_brkl 82 | jb getmaxblock_do 83 | mov ax,cx ; return size in ax 84 | test ax,ax 85 | jz getmaxblock_end 86 | mov ss_free,dx 87 | getmaxblock_end: 88 | pop di 89 | pop si 90 | pop cx 91 | ret 92 | 93 | nalloc PROC _CType PUBLIC USES bx dx cx msize:WORD 94 | mov ax,msize 95 | test ax,ax 96 | jz nalloc_failed 97 | add ax,mb 98 | mov cx,ax 99 | mov ax,ss_free 100 | test ax,ax 101 | jz nalloc_create 102 | mov dx,ax 103 | mov bx,ax 104 | cmp [bx].mb.mb_used,0 105 | mov ax,[bx].mb.mb_size 106 | je nalloc_found 107 | nalloc_find: 108 | call getmaxblock 109 | jz nalloc_extend 110 | cmp ax,cx 111 | jb nalloc_extend 112 | nalloc_found: 113 | cmp ax,cx 114 | jb nalloc_find 115 | mov bx,dx 116 | mov [bx].mb.mb_used,1 117 | je nalloc_set 118 | mov [bx].mb.mb_size,cx 119 | sub ax,cx 120 | add bx,cx 121 | mov [bx].mb.mb_size,ax 122 | mov [bx].mb.mb_used,0 123 | mov bx,dx 124 | nalloc_set: 125 | mov ax,[bx].mb.mb_size 126 | add ax,dx 127 | mov ss_free,ax 128 | nalloc_seto: 129 | mov ax,dx 130 | add ax,mb 131 | nalloc_end: 132 | test ax,ax 133 | ret 134 | nalloc_create: 135 | call create_heap 136 | jz nalloc_failed 137 | nalloc_extend: 138 | call extend_heap 139 | jnz nalloc_seto 140 | nalloc_failed: 141 | mov errno,ENOMEM 142 | xor ax,ax 143 | jmp nalloc_end 144 | nalloc ENDP 145 | 146 | nfree PROC _CType PUBLIC USES ax bx maddr:WORD 147 | mov ax,maddr 148 | sub ax,mb 149 | .if ax >= ss_base && ax < ss_brkl 150 | mov bx,ax 151 | add ax,[bx].mb.mb_size 152 | mov [bx].mb.mb_used,0 153 | .if ax == ss_brkl 154 | mov [bx].mb.mb_size,0 155 | mov [bx].mb.mb_used,1 156 | mov ss_brkl,bx 157 | mov ss_free,bx 158 | .else 159 | mov ss_free,bx 160 | .endif 161 | .endif 162 | ret 163 | nfree ENDP 164 | 165 | END 166 | -------------------------------------------------------------------------------- /src/dos/opfilter.asm: -------------------------------------------------------------------------------- 1 | ; OPFILTER.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include dos.inc 5 | include fblk.inc 6 | include string.inc 7 | include filter.inc 8 | include conio.inc 9 | include time.inc 10 | include stdio.inc 11 | include stdlib.inc 12 | include helpid.inc 13 | ifdef __DZ__ 14 | view_readme PROTO _CType 15 | endif 16 | externdef format_lu:BYTE 17 | externdef cp_stdmask:BYTE 18 | externdef IDD_OperationFilters:DWORD 19 | 20 | ID_INCLUDE equ 1*16 21 | ID_EXCLUDE equ 2*16 22 | ID_MIN_DATE equ 3*16 23 | ID_MAX_DATE equ 4*16 24 | ID_MIN_SIZE equ 5*16 25 | ID_MAX_SIZE equ 6*16 26 | ID_RDONLY equ 7*16 27 | ID_HIDDEN equ 8*16 28 | ID_SYSTEM equ 9*16 29 | ID_VOLID equ 10*16 30 | ID_SUBDIR equ 11*16 31 | ID_ARCH equ 12*16 32 | ID_OK equ 13*16 33 | ID_CLEAR equ 14*16 34 | ID_CANCEL equ 15*16 35 | 36 | .code 37 | 38 | filter_edit_help: 39 | ifdef __DZ__ 40 | mov ax,HELPID_12 41 | call view_readme 42 | endif 43 | retx 44 | 45 | filter_edit_clear: 46 | mov dx,ds 47 | mov cx,si 48 | lds si,tdialog 49 | xor ax,ax 50 | mov bx,WORD PTR [si].S_TOBJ.to_data[ID_MIN_DATE] 51 | mov [bx],al 52 | mov bx,WORD PTR [si].S_TOBJ.to_data[ID_MAX_DATE] 53 | mov [bx],al 54 | mov bx,WORD PTR [si].S_TOBJ.to_data[ID_MIN_SIZE] 55 | mov [bx],al 56 | mov bx,WORD PTR [si].S_TOBJ.to_data[ID_MAX_SIZE] 57 | mov [bx],al 58 | mov ds,dx 59 | mov si,cx 60 | invoke memzero,filter,S_FILT 61 | les bx,filter 62 | invoke strcpy,addr es:[bx].S_FILT.of_include,addr cp_stdmask 63 | mov es:[bx].S_FILT.of_flag,-1 64 | lodm tdialog 65 | add ax,ID_RDONLY 66 | invoke tosetbitflag,dx::ax,6,_O_FLAGB,0FFFFFFFFh 67 | mov ax,_C_REOPEN 68 | retx 69 | 70 | filter_edit PROC _CType PUBLIC USES si di filt:DWORD, glcmd:DWORD 71 | local DLG_OperationFilters:DWORD 72 | sub ax,ax 73 | mov WORD PTR filter,ax 74 | .if rsopen(IDD_OperationFilters) 75 | stom DLG_OperationFilters 76 | mov di,ax 77 | lodm filt 78 | add ax,S_FILT.of_include 79 | stom es:[di].S_TOBJ.to_data[ID_INCLUDE] 80 | mov es:[di].S_TOBJ.to_count[ID_INCLUDE],8 81 | add ax,128 82 | stom es:[di].S_TOBJ.to_data[ID_EXCLUDE] 83 | mov es:[di].S_TOBJ.to_count[ID_EXCLUDE],8 84 | pushl cs 85 | push offset filter_edit_help 86 | call thelp_set 87 | lodm glcmd 88 | stom es:[di].S_TOBJ.to_data[ID_OK] 89 | movp es:[di].S_TOBJ.to_proc[ID_CLEAR],filter_edit_clear 90 | mov si,WORD PTR filt 91 | .if [si].S_FILT.of_min_date 92 | invoke dwtolstr,es:[di].S_TOBJ.to_data[ID_MIN_DATE],[si].S_FILT.of_min_date 93 | .endif 94 | .if [si].S_FILT.of_max_date 95 | invoke dwtolstr,es:[di].S_TOBJ.to_data[ID_MAX_DATE],[si].S_FILT.of_max_date 96 | .endif 97 | lodm [si].S_FILT.of_min_size 98 | .if ax 99 | invoke sprintf,es:[di].S_TOBJ.to_data[ID_MIN_SIZE],addr format_lu,dx::ax 100 | .endif 101 | lodm [si].S_FILT.of_max_size 102 | .if ax || dx 103 | invoke sprintf,es:[di].S_TOBJ.to_data[ID_MAX_SIZE],addr format_lu,dx::ax 104 | .endif 105 | mov bx,di 106 | add bx,ID_RDONLY 107 | mov ax,[si].S_FILT.of_flag 108 | invoke tosetbitflag,es::bx,6,_O_FLAGB,dx::ax 109 | invoke dlinit,DLG_OperationFilters 110 | movmx filter,filt 111 | .if rsevent(IDD_OperationFilters,DLG_OperationFilters) 112 | invoke togetbitflag,addr es:[di][ID_RDONLY],6,_O_FLAGB 113 | or ax,0FFC0h 114 | mov [si].S_FILT.of_flag,ax 115 | invoke strtol,es:[di].S_TOBJ.to_data[ID_MAX_SIZE] 116 | stom [si].S_FILT.of_max_size 117 | invoke strtol,es:[di].S_TOBJ.to_data[ID_MIN_SIZE] 118 | stom [si].S_FILT.of_min_size 119 | invoke strtodw,es:[di].S_TOBJ.to_data[ID_MAX_DATE] 120 | mov [si].S_FILT.of_max_date,ax 121 | invoke strtodw,es:[di].S_TOBJ.to_data[ID_MIN_DATE] 122 | mov [si].S_FILT.of_min_date,ax 123 | .else 124 | mov dx,ax 125 | stom filter 126 | .endif 127 | invoke thelp_pop 128 | invoke dlclose,DLG_OperationFilters 129 | mov ax,_C_NORMAL 130 | .endif 131 | ret 132 | filter_edit ENDP 133 | 134 | END 135 | -------------------------------------------------------------------------------- /src/dos/prect.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/prect.asm -------------------------------------------------------------------------------- /src/dos/process.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/process.asm -------------------------------------------------------------------------------- /src/dos/progress.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/progress.asm -------------------------------------------------------------------------------- /src/dos/res/ClipboardWarning.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/ClipboardWarning.IDD -------------------------------------------------------------------------------- /src/dos/res/ConfirmContinue.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/ConfirmContinue.IDD -------------------------------------------------------------------------------- /src/dos/res/ConfirmDelete.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/ConfirmDelete.IDD -------------------------------------------------------------------------------- /src/dos/res/DZCompression.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZCompression.IDD -------------------------------------------------------------------------------- /src/dos/res/DZConfiguration.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZConfiguration.IDD -------------------------------------------------------------------------------- /src/dos/res/DZConfirmations.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZConfirmations.IDD -------------------------------------------------------------------------------- /src/dos/res/DZCopy.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZCopy.IDD -------------------------------------------------------------------------------- /src/dos/res/DZDecompress.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZDecompress.IDD -------------------------------------------------------------------------------- /src/dos/res/DZDefaultColor.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZDefaultColor.IDD -------------------------------------------------------------------------------- /src/dos/res/DZExit.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZExit.IDD -------------------------------------------------------------------------------- /src/dos/res/DZFileAttributes.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZFileAttributes.IDD -------------------------------------------------------------------------------- /src/dos/res/DZFindFile.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZFindFile.IDD -------------------------------------------------------------------------------- /src/dos/res/DZHelp.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZHelp.IDD -------------------------------------------------------------------------------- /src/dos/res/DZHistory.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZHistory.IDD -------------------------------------------------------------------------------- /src/dos/res/DZMKList.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZMKList.IDD -------------------------------------------------------------------------------- /src/dos/res/DZMemory.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZMemory.IDD -------------------------------------------------------------------------------- /src/dos/res/DZMenuEdit.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZMenuEdit.IDD -------------------------------------------------------------------------------- /src/dos/res/DZMenuFile.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZMenuFile.IDD -------------------------------------------------------------------------------- /src/dos/res/DZMenuHelp.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZMenuHelp.IDD -------------------------------------------------------------------------------- /src/dos/res/DZMenuPanel.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZMenuPanel.IDD -------------------------------------------------------------------------------- /src/dos/res/DZMenuSetup.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZMenuSetup.IDD -------------------------------------------------------------------------------- /src/dos/res/DZMenuTools.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZMenuTools.IDD -------------------------------------------------------------------------------- /src/dos/res/DZMove.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZMove.IDD -------------------------------------------------------------------------------- /src/dos/res/DZPanelFilter.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZPanelFilter.IDD -------------------------------------------------------------------------------- /src/dos/res/DZPanelOptions.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZPanelOptions.IDD -------------------------------------------------------------------------------- /src/dos/res/DZSaveSetup.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZSaveSetup.IDD -------------------------------------------------------------------------------- /src/dos/res/DZScreenOptions.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZScreenOptions.IDD -------------------------------------------------------------------------------- /src/dos/res/DZSubInfo.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZSubInfo.IDD -------------------------------------------------------------------------------- /src/dos/res/DZSystemOptions.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZSystemOptions.IDD -------------------------------------------------------------------------------- /src/dos/res/DZZipAttributes.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DZZipAttributes.IDD -------------------------------------------------------------------------------- /src/dos/res/DirectoryNotFound.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DirectoryNotFound.IDD -------------------------------------------------------------------------------- /src/dos/res/DriveNotReady.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/DriveNotReady.IDD -------------------------------------------------------------------------------- /src/dos/res/EditColor.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/EditColor.IDD -------------------------------------------------------------------------------- /src/dos/res/OperationFilters.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/OperationFilters.IDD -------------------------------------------------------------------------------- /src/dos/res/Replace.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/Replace.IDD -------------------------------------------------------------------------------- /src/dos/res/ReplacePrompt.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/ReplacePrompt.IDD -------------------------------------------------------------------------------- /src/dos/res/Search.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/Search.IDD -------------------------------------------------------------------------------- /src/dos/res/SystemError.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/SystemError.IDD -------------------------------------------------------------------------------- /src/dos/res/TEOpenFiles.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/TEOpenFiles.IDD -------------------------------------------------------------------------------- /src/dos/res/TEOptions.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/TEOptions.IDD -------------------------------------------------------------------------------- /src/dos/res/TEReload.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/TEReload.IDD -------------------------------------------------------------------------------- /src/dos/res/TEReload2.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/TEReload2.IDD -------------------------------------------------------------------------------- /src/dos/res/TESave.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/TESave.IDD -------------------------------------------------------------------------------- /src/dos/res/TESeek.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/TESeek.IDD -------------------------------------------------------------------------------- /src/dos/res/TVCopy.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/TVCopy.IDD -------------------------------------------------------------------------------- /src/dos/res/TVHelp.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/TVHelp.IDD -------------------------------------------------------------------------------- /src/dos/res/TVMenusline.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/TVMenusline.IDD -------------------------------------------------------------------------------- /src/dos/res/TVSeek.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/TVSeek.IDD -------------------------------------------------------------------------------- /src/dos/res/TVStatusline.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/TVStatusline.IDD -------------------------------------------------------------------------------- /src/dos/res/UnzipCRCError.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/UnzipCRCError.IDD -------------------------------------------------------------------------------- /src/dos/res/WOpenFile.IDD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/res/WOpenFile.IDD -------------------------------------------------------------------------------- /src/dos/shortkey.asm: -------------------------------------------------------------------------------- 1 | ; SHORTKEY.ASM-- 2 | ; Copyright (C) 2016 Doszip Developers -- see LICENSE.TXT 3 | 4 | include doszip.inc 5 | include conio.inc 6 | include keyb.inc 7 | 8 | PUBLIC global_key 9 | 10 | _DATA segment 11 | 12 | global_key label WORD 13 | ifdef DEBUG 14 | GCMD 5400h, cmdebug ; Shift-F1 15 | endif 16 | GCMD KEY_ESC, cmclrcmdl 17 | GCMD KEY_F1, cmhelp 18 | GCMD KEY_F2, cmrename 19 | GCMD KEY_F3, cmview 20 | GCMD KEY_F4, cmedit 21 | GCMD KEY_F5, cmcopy 22 | GCMD KEY_F6, cmmove 23 | GCMD KEY_F7, cmmkdir 24 | GCMD KEY_F8, cmdelete 25 | ifdef __TE__ 26 | GCMD KEY_F9, cmtmodal 27 | else 28 | GCMD KEY_F9, cmlastmenu 29 | endif 30 | GCMD KEY_F10, cmexit 31 | GCMD KEY_F11, cmtogglesz 32 | GCMD KEY_F12, cmtogglehz 33 | GCMD KEY_SHIFTF2, cmcopycell 34 | GCMD KEY_SHIFTF3, cmview 35 | GCMD KEY_SHIFTF4, cmedit 36 | ifdef __ZIP__ 37 | GCMD KEY_SHIFTF7, cmmkzip 38 | endif 39 | GCMD KEY_SHIFTF9, cmsavesetup 40 | GCMD KEY_SHIFTF10, cmlastmenu 41 | GCMD KEY_ALTC, cmxorcmdline 42 | GCMD KEY_ALTL, cmmklist 43 | GCMD KEY_ALTP, cmloadpath 44 | GCMD KEY_ALTX, cmquit 45 | ifdef __TE__ 46 | GCMD KEY_ALT0, cmwindowlist 47 | endif 48 | GCMD KEY_ALT1, cmtool1 49 | GCMD KEY_ALT2, cmtool2 50 | GCMD KEY_ALT3, cmtool3 51 | GCMD KEY_ALT4, cmtool4 52 | GCMD KEY_ALT5, cmtool5 53 | GCMD KEY_ALT6, cmtool6 54 | GCMD KEY_ALT7, cmtool7 55 | GCMD KEY_ALT8, cmtool8 56 | GCMD KEY_ALT9, cmtool9 57 | GCMD KEY_ALTUP, cmpsizeup 58 | GCMD KEY_ALTDN, cmpsizedn 59 | GCMD KEY_ALTF1, cmachdrv 60 | GCMD KEY_ALTF2, cmbchdrv 61 | GCMD KEY_ALTF3, cmview 62 | GCMD KEY_ALTF4, cmedit 63 | GCMD KEY_ALTF5, cmcompress 64 | GCMD KEY_ALTF6, cmdecompress 65 | GCMD KEY_ALTF8, cmhistory 66 | GCMD KEY_ALTF9, cmegaline 67 | ifdef __FF__ 68 | GCMD KEY_ALTF7, cmsearch 69 | GCMD KEY_CTRLTAB, cmsearch 70 | endif 71 | GCMD KEY_CTRL0, cmpath0 72 | GCMD KEY_CTRL1, cmpath1 73 | GCMD KEY_CTRL2, cmpath2 74 | GCMD KEY_CTRL3, cmpath3 75 | GCMD KEY_CTRL4, cmpath4 76 | GCMD KEY_CTRL5, cmpath5 77 | GCMD KEY_CTRL6, cmpath6 78 | GCMD KEY_CTRL7, cmpath7 79 | GCMD KEY_CTRL8, cmpathatocmd 80 | GCMD KEY_CTRL9, cmpathbtocmd 81 | GCMD KEY_CTRLF1, cmatoggle 82 | GCMD KEY_CTRLF2, cmbtoggle 83 | GCMD KEY_CTRLF3, cmview 84 | GCMD KEY_CTRLF4, cmedit 85 | GCMD KEY_CTRLF5, cmcname 86 | ifdef __TE__ 87 | GCMD KEY_CTRLF6, teoption 88 | else 89 | GCMD KEY_CTRLF6, notsup 90 | endif 91 | GCMD KEY_CTRLF7, cmscreen 92 | GCMD KEY_CTRLF8, cmsystem 93 | GCMD KEY_CTRLF9, cmoptions 94 | GCMD KEY_CTRLA, cmattrib 95 | GCMD KEY_CTRLB, cmuserscreen 96 | GCMD KEY_CTRLC, cmcompare 97 | GCMD KEY_CTRLD, cmcdate 98 | GCMD KEY_CTRLE, cmctype 99 | GCMD KEY_CTRLF, cmconfirm 100 | ifdef __CAL__ 101 | GCMD KEY_CTRLG, cmcalendar 102 | endif 103 | GCMD KEY_CTRLH, cmchidden 104 | GCMD KEY_CTRLI, cmsubinfo 105 | GCMD KEY_CTRLJ, cmcompression 106 | GCMD KEY_CTRLK, cmxorkeybar 107 | GCMD KEY_CTRLL, cmclong 108 | GCMD KEY_CTRLM, cmcmini 109 | GCMD KEY_CTRLN, cmcname 110 | GCMD KEY_CTRLO, cmtoggleon 111 | GCMD KEY_CTRLP, cmpanel 112 | GCMD KEY_CTRLQ, cmquicksearch 113 | GCMD KEY_CTRLR, cmcupdate 114 | ifdef __FF__ 115 | GCMD KEY_CTRLS, cmsearch 116 | else 117 | GCMD KEY_CTRLS, cmxorkeybar 118 | endif 119 | GCMD KEY_CTRLT, cmcdetail 120 | GCMD KEY_CTRLU, cmcnosort 121 | GCMD KEY_CTRLV, cmvolinfo 122 | GCMD KEY_CTRLW, cmswap 123 | GCMD KEY_CTRLZ, cmcsize 124 | GCMD KEY_CTRLX, cmxormenubar 125 | GCMD KEY_CTRLUP, cmdoskey_up 126 | GCMD KEY_CTRLDN, cmdoskey_dn 127 | GCMD KEY_CTRLPGUP, cmupdir 128 | GCMD KEY_CTRLPGDN, cmsubdir 129 | GCMD KEY_CTRLENTER, cmcfblktocmd 130 | GCMD KEY_KPPLUS, cmselect 131 | GCMD KEY_KPMIN, cmdeselect 132 | GCMD KEY_KPSTAR, cminvert 133 | GCMD KEY_ALTW, cmcwideview 134 | GCMD KEY_ALTM, cmmemory 135 | GCMD KEY_CTRLHOME, cmhomedir 136 | dw 0 137 | 138 | _DATA ENDS 139 | 140 | END 141 | -------------------------------------------------------------------------------- /src/dos/tinfo.asm: -------------------------------------------------------------------------------- 1 | ; TINFO.ASM-- 2 | ; Copyright (C) 2015 Doszip Developers 3 | 4 | include clip.inc 5 | include conio.inc 6 | include tinfo.inc 7 | 8 | PUBLIC tinfo 9 | 10 | tiseto PROTO 11 | tiputs PROTO 12 | tievent PROTO 13 | ifdef __CLIP__ 14 | ticlipevent PROTO 15 | endif 16 | 17 | .data 18 | tinfo dw ? 19 | 20 | .code 21 | 22 | tihndlevent PROC _CType PUBLIC USES di ti:size_t, event:size_t 23 | mov di,tinfo 24 | mov ax,ti 25 | mov tinfo,ax 26 | call tiseto 27 | call tiputs 28 | mov ax,event 29 | .if !ax 30 | call tgetevent 31 | mov event,ax 32 | .endif 33 | ifdef __CLIP__ 34 | call ticlipevent 35 | endif 36 | call tievent 37 | push ax 38 | call tiseto 39 | call tiputs 40 | pop dx 41 | xor ax,ax 42 | .if dx == _TI_RETEVENT 43 | mov ax,event 44 | .endif 45 | mov tinfo,di 46 | ret 47 | tihndlevent ENDP 48 | 49 | END 50 | -------------------------------------------------------------------------------- /src/dos/tview.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/dos/tview.asm -------------------------------------------------------------------------------- /src/filter.asm: -------------------------------------------------------------------------------- 1 | include wsub.inc 2 | include string.inc 3 | include filter.inc 4 | include time.inc 5 | 6 | .data 7 | filter PFILTER 0 8 | 9 | .code 10 | 11 | binary proc watcall private date:uint_t, attrib:uint_t, size:size_t 12 | 13 | .if ( date < [rsi].FILTER.min_date || 14 | ( [rsi].FILTER.max_date && date > [rsi].FILTER.max_date ) ) 15 | .return( 0 ) 16 | .endif 17 | mov eax,attrib 18 | and ax,[rsi] 19 | .if ( eax != attrib || size < [rsi].FILTER.min_size || 20 | ( [rsi].FILTER.max_size && size > [rsi].FILTER.max_size ) ) 21 | .return( 0 ) 22 | .endif 23 | .return( 1 ) 24 | 25 | binary endp 26 | 27 | 28 | _wildcards proc private uses rdi wild:LPSTR, path:LPSTR 29 | 30 | ldr rdi,wild 31 | 32 | .repeat 33 | 34 | .if strchr(rdi, ' ') 35 | 36 | mov rdi,rax 37 | mov byte ptr [rdi],0 38 | strwild(rax, path) 39 | mov byte ptr [rdi],' ' 40 | inc rdi 41 | .else 42 | 43 | strwild(rdi, path) 44 | .break 45 | .endif 46 | .until eax 47 | ret 48 | 49 | _wildcards endp 50 | 51 | 52 | string proc private file:string_t 53 | 54 | .if ( [rsi].FILTER.minclude ) 55 | 56 | .ifd !_wildcards( &[rsi].FILTER.minclude, file ) 57 | .return 58 | .endif 59 | .endif 60 | .if ( [rsi].FILTER.mexclude ) 61 | 62 | .ifd _wildcards( &[rsi].FILTER.mexclude, file ) 63 | .return( 0 ) 64 | .endif 65 | .endif 66 | .return( 1 ) 67 | 68 | string endp 69 | 70 | 71 | filter_fblk proc uses rsi rdi rbx fb:PFBLK 72 | 73 | mov rsi,filter 74 | .if ( rsi == NULL ) 75 | .return( 1 ) 76 | .endif 77 | 78 | ldr rdi,fb 79 | mov eax,[rdi].FBLK.time 80 | and eax,0xFFFF0000 81 | .ifd ( binary(eax, [rdi].FBLK.flag, size_t ptr [rdi].FBLK.size) ) 82 | 83 | .return string([rdi].FBLK.name) 84 | .endif 85 | ret 86 | 87 | filter_fblk endp 88 | 89 | filter_wblk proc uses rsi rdi rbx wf:PTR WIN32_FIND_DATA 90 | 91 | mov rsi,filter 92 | .if ( rsi == NULL ) 93 | .return( 1 ) 94 | .endif 95 | 96 | ldr rdi,wf 97 | FileTimeToTime( &[rdi].WIN32_FIND_DATA.ftLastWriteTime ) 98 | and eax,0xFFFF0000 99 | mov edx,[rdi].WIN32_FIND_DATA.nFileSizeLow 100 | ifdef _WIN64 101 | mov ecx,[rdi].WIN32_FIND_DATA.nFileSizeHigh 102 | shl rcx,32 103 | or rdx,rcx 104 | endif 105 | .ifd ( binary(eax, [rdi].WIN32_FIND_DATA.dwFileAttributes, rdx) ) 106 | 107 | .return string(&[rdi].WIN32_FIND_DATA.cFileName) 108 | .endif 109 | ret 110 | 111 | filter_wblk endp 112 | 113 | end 114 | -------------------------------------------------------------------------------- /src/inc/FileSearch.inc: -------------------------------------------------------------------------------- 1 | ; FILESEARCH.INC-- 2 | ; 3 | ; Copyright (c) The Asmc Contributors. All rights reserved. 4 | ; Consult your license regarding permissions and restrictions. 5 | ; 6 | ifndef __FILESEARCH_INC 7 | define __FILESEARCH_INC 8 | 9 | FFMAXHIT equ 9999 10 | 11 | .class FileSearch 12 | 13 | dialog ptr_t ? 14 | basedir string_t ? 15 | cursor CURSOR <> 16 | ll LOBJ <> 17 | oldff ptr_t ? 18 | oldhelp ptr_t ? 19 | 20 | FileSearch proc :string_t 21 | Release proc 22 | WndProc proc :uint_t 23 | Find proc 24 | Modal proc 25 | PutCellId proc 26 | UpdateCell proc 27 | CurItem proc 28 | CurFile proc 29 | List proc 30 | ClearList proc 31 | Searchpath proc :string_t 32 | Replace proc :int_t, :int_t 33 | .ends 34 | 35 | endif 36 | -------------------------------------------------------------------------------- /src/inc/config.inc: -------------------------------------------------------------------------------- 1 | ifndef __CONFIG_INC 2 | define __CONFIG_INC 3 | 4 | if 0 5 | .enum EntryType { 6 | C_EMPTY, 7 | C_BASE, 8 | C_SECTION, 9 | C_ENTRY, 10 | C_COMMENT 11 | } 12 | 13 | config_t typedef ptr Config 14 | 15 | .class Config 16 | 17 | name string_t ? 18 | next config_t ? 19 | list intptr_t ? 20 | type uint_t ? 21 | 22 | Config proc 23 | Release proc 24 | Read proc :string_t 25 | Write proc :string_t 26 | Find proc :string_t 27 | GetEntry proc :string_t, :string_t 28 | Create proc :string_t, :vararg 29 | Delete proc :string_t 30 | Unlink proc :config_t 31 | .ends 32 | endif 33 | 34 | define INI_BASE 0 35 | define INI_SECTION 1 36 | define INI_ENTRY 2 37 | define INI_COMMENT 4 38 | 39 | 40 | S_INI STRUC 41 | flags UINT ? 42 | entry LPSTR ? ; [
] | 43 | value PVOID ? ; first entry | value 44 | next PVOID ? ; next section | next entry 45 | S_INI ENDS 46 | LPINI typedef ptr S_INI 47 | 48 | INIRead proto __cdecl :LPINI, :LPSTR 49 | INIWrite proto __cdecl :LPINI, :LPSTR 50 | INIClose proto __cdecl :LPINI 51 | INIAlloc proto __cdecl 52 | INIGetSection proto __cdecl :LPINI, :LPSTR 53 | INIGetEntry proto __cdecl :LPINI, :LPSTR 54 | INIGetEntryID proto __cdecl :LPINI, :UINT 55 | INIAddSection proto __cdecl :LPINI, :LPSTR 56 | INIDelSection proto __cdecl :LPINI, :LPSTR 57 | INIDelEntries proto __cdecl :LPINI 58 | INIAddEntryX proto __Cdecl :LPINI, :LPSTR, :VARARG 59 | 60 | CFRead proto __cdecl :LPSTR 61 | CFWrite proto __cdecl :LPSTR 62 | CFClose proto __cdecl 63 | CFGetSection proto __cdecl :LPSTR 64 | CFGetSectionID proto __cdecl :LPSTR, :UINT 65 | CFAddSection proto __cdecl :LPSTR 66 | CFReadFileName proto __cdecl :LPINI, :PTR, :UINT 67 | CFFindSection proto __cdecl :LPINI, :LPSTR, :LPSTR 68 | 69 | CFExecute proto __cdecl :LPINI 70 | CFExpandMac proto __cdecl :LPSTR, :LPSTR 71 | CFExpandCmd proto __cdecl :LPSTR, :LPSTR, :LPSTR 72 | CFGetComspec proto __cdecl :UINT 73 | CFError proto __cdecl :LPSTR, :LPSTR 74 | 75 | externdef __CFBase:LPINI 76 | 77 | TIOpenSession proto __cdecl :LPINI, :LPSTR 78 | TISaveSession proto __cdecl :LPINI, :LPSTR 79 | 80 | endif 81 | -------------------------------------------------------------------------------- /src/inc/confirm.inc: -------------------------------------------------------------------------------- 1 | ifndef __CONFIRM_INC 2 | define __CONFIRM_INC 3 | 4 | include libc.inc 5 | 6 | .enum 7 | CONFIRM_CANCEL, 8 | CONFIRM_DELETE, 9 | CONFIRM_DELETEALL, 10 | CONFIRM_JUMP 11 | 12 | define CFREADONY 0x0001 13 | define CFSYSTEM 0x0002 14 | define CFDIRECTORY 0x0004 15 | define CFSELECTED 0x0008 16 | define CFDELETEALL 0x0010 17 | 18 | externdef confirmflag:uint_t 19 | 20 | confirm_continue proto __cdecl :string_t 21 | confirm_delete proto __cdecl :string_t, :uint_t 22 | confirm_delete_file proto __cdecl :string_t, :uint_t 23 | confirm_delete_sub proto __cdecl :string_t 24 | 25 | endif 26 | -------------------------------------------------------------------------------- /src/inc/dz.ini: -------------------------------------------------------------------------------- 1 | ; This file contains all the variables that "customize" 2 | ; Doszip to your particular needs. 3 | ; 4 | ; The entries have the following format: 5 | ; 6 | ; [
] 7 | ; = 8 | ; 9 | ; Space and tabs may appear before or after the equal sign. 10 | ; 11 | 12 | [Environ] 13 | 0=INCLUDE=%ASMCDIR%\include;%ASMCDIR%\include\DirectX;%ASMCDIR%\include\winrt 14 | 15 | [Path] 16 | 0=%DZ% 17 | 1=%PATH% 18 | ;2=C:\\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64 19 | ;3=C:\\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x86 20 | ;4=C:\Users\\AppData\Local\GitHubDesktop\app-3.3.11\resources\app\git\cmd 21 | 22 | [Comspec] 23 | 0=%SystemRoot%\system32\cmd.exe 24 | 1=/C 25 | 26 | [Load] 27 | ;0=mode con CP SELECT=1252 28 | ;0=SUBST M: %MSVS_PATH% 29 | [Exit] 30 | ;0=SUBST M: /D 31 | 32 | [Filetype] 33 | txt=%edit% 34 | asm=%edit% 35 | inc=%edit% 36 | ini=%edit% 37 | h=%edit% 38 | c=%edit% 39 | regress=%edit% 40 | idd=idde 41 | mak=make -f 42 | makefile=make -f 43 | obj=objconv -fasm !.! _!.asm 44 | bin=objdump -M intel -b binary -D -m i386:x86-64 !.! > $!.asm 45 | 46 | [FileColor] 47 | ;exe=4 48 | ;zip=B 49 | 50 | [View] 51 | ;F3= 52 | ;Alt= 53 | ;Ctrl= 54 | ;Shift= 55 | 56 | [Edit] 57 | ;F3= 58 | ;Alt= 59 | ;Ctrl= 60 | ;Shift= 61 | 62 | [Directory] 63 | 0=Doszip &Directory,%doszip% 64 | 1=&Config Directory,%dz% 65 | 2=<> 66 | 3=System &Root,%SYSTEMROOT% 67 | 4=&Program Files,%PROGRAMFILES% 68 | 5=<> 69 | 6=&Temp Directory,%TEMP% 70 | 7=&Linux wsl,\\wsl.localhost\Ubuntu 71 | 72 | [Tools] 73 | 0=&Add tool,%edit% %dz%\dz.ini 74 | 1=<> 75 | 2=View &DZ.TXT,%view% %dz%\dz.txt 76 | 77 | [Filter] 78 | 0=&Source code,*.asm *.inc *.c *.h 79 | 80 | [MKList] 81 | 0=Default &List,filelist.bat@%f\n 82 | 1=&Obj List,obj.mif@%n.obj \\\n 83 | 84 | [AltF3] 85 | asm=asmc -c -Fl -Sg 86 | [AltF4] 87 | asm=ml -c -Fl -Sg 88 | [AltF9] 89 | inc=build 90 | asm=build 91 | makefile=build 92 | mak=make -f 93 | cmd=!.! 94 | 95 | [ShiftF1] 96 | asm=asmc64 -c -Cs -D_CRTBLD -Fl -Sg -Sx 97 | [ShiftF2] 98 | asm=asmc /c /coff /Cs /Fl /Sx /Sg !:\!\\!.! 99 | 100 | [Compress] 101 | 0=7-Zip 102 | 1=ARJ 103 | 2=RAR 104 | [7-Zip] 105 | 0=7za u -y 106 | 2=.7z 107 | [ARJ] 108 | 0=arj u -jm -y 109 | 1=! 110 | 2=.arj 111 | [RAR] 112 | 0=rar u -y 113 | 2=.rar 114 | 115 | [Decompress] 116 | 0=.7z 117 | 1=.ARJ 118 | 2=.RAR 119 | [.7z] 120 | 0=7za x -y 121 | 1=-o 122 | [.ARJ] 123 | 0=arj x -y 124 | [.RAR] 125 | 0=rar x -y 126 | 127 | [Style] 128 | asm=st_ASM 129 | inc=st_ASM 130 | ini=st_ASM 131 | inl=st_ASM 132 | regress=st_ASM 133 | cpp=st_C 134 | hpp=st_C 135 | c=st_C 136 | h=st_C 137 | pas=st_PAS 138 | bas=st_BAS 139 | mak=st_MAK 140 | makefile=st_MAK 141 | bat=st_BAT 142 | cmd=st_BAT 143 | 144 | [style_default] 145 | 0=.st_color 146 | 1=.st_quote 147 | 2=.st_control 148 | 3=.st_number 149 | 4=.st_$ 150 | 5=.st_operator 151 | 152 | [st_default] 153 | 0=.st_control 154 | 1=.st_number 155 | 2=.st_$ 156 | 3=.st_operator 157 | 158 | [st_ASM] 159 | 0=.st_color 160 | 1=[#st/asm.ini] 161 | 2=[st_default] 162 | 163 | [st_C] 164 | 0=.st_color 165 | 1=[#st/cpp.ini] 166 | 2=[st_default] 167 | 168 | [st_PAS] 169 | 0=.st_color 170 | 1=[#st/pas.ini] 171 | 2=[st_default] 172 | 173 | [st_BAS] 174 | 0=.st_color 175 | 1=[#st/bas.ini] 176 | 2=[st_default] 177 | 178 | [st_MAK] 179 | 0=.st_color 180 | 1=[#st/mak.ini] 181 | 2=[st_default] 182 | 183 | [st_BAT] 184 | 0=.st_color 185 | 1=[#st/bat.ini] 186 | 2=[st_default] 187 | 188 | [.st_color] 189 | 0=A 07 190 | 191 | [.st_control] 192 | 0=O 40 193 | 194 | [.st_number] 195 | 0=D XB 196 | 197 | [.st_$] 198 | 0=C XB $\ 199 | 200 | [.st_operator] 201 | 0=C XF .:!|/<[{()}]>,-*+?%&=^~; 202 | 203 | [.st_quote] 204 | 0=Q XB 205 | 206 | [7z.dll] 207 | ;DllFile=%DZ%\7z.dll 208 | bz2=0x02 209 | z=0x05 210 | lzh=0x06 211 | 7z=0x07 212 | cab=0x08 213 | lzma=0x0A 214 | xz=0x0C 215 | lvm=0xBF 216 | tar=0xEE 217 | gz=0xEF 218 | ;img=0xDA 219 | vhdx=0xC4 220 | -------------------------------------------------------------------------------- /src/inc/dzstr.inc: -------------------------------------------------------------------------------- 1 | ifndef __DZSTR_INC 2 | define __DZSTR_INC 3 | include string.inc 4 | 5 | memrchr proto __cdecl :string_t, :int_t, :uint_t 6 | memquote proto __cdecl :string_t, :uint_t 7 | 8 | stripend proto __cdecl :string_t 9 | 10 | strpath proto __cdecl :string_t 11 | strnzcpy proto __cdecl :string_t, :string_t, :size_t 12 | strspace proto __cdecl :string_t 13 | strtoken proto __cdecl :string_t 14 | strins proto __cdecl :string_t, :string_t 15 | strtolx proto __cdecl :string_t 16 | strchri proto __cdecl :string_t, :int_t 17 | streol proto __cdecl :string_t 18 | 19 | btohex proto __cdecl :string_t, :int_t 20 | hextob proto __cdecl :string_t 21 | 22 | endif 23 | -------------------------------------------------------------------------------- /src/inc/filter.inc: -------------------------------------------------------------------------------- 1 | ifndef __FILTER_INC 2 | define __FILTER_INC 3 | 4 | define FILT_MAXSTRING 128 5 | 6 | FILTER STRUC 7 | flag dd ? 8 | max_date dd ? 9 | min_date dd ? 10 | max_size size_t ? 11 | min_size size_t ? 12 | minclude db FILT_MAXSTRING dup(?) 13 | mexclude db FILT_MAXSTRING dup(?) 14 | FILTER ENDS 15 | PFILTER typedef ptr FILTER 16 | 17 | externdef filter:PFILTER 18 | filter_fblk PROTO :PFBLK 19 | filter_wblk PROTO :PTR WIN32_FIND_DATA 20 | 21 | endif 22 | -------------------------------------------------------------------------------- /src/inc/helpid.inc: -------------------------------------------------------------------------------- 1 | ; HELPID.INC-- 2 | ; Copyright (C) 2017 Asmc Developers 3 | ifndef __HELPID_INC 4 | define __HELPID_INC 5 | 6 | HELPID_02 equ 0643h ; <> Compressed File Support 7 | HELPID_03 equ 07C6h ; <> Viewer Support 8 | HELPID_04 equ 0A12h ; <> Editor Support 9 | HELPID_05 equ 0B61h ; <> Internal Editor 10 | HELPID_06 equ 1AE5h ; <> Extension and Filename Support 11 | HELPID_07 equ 1ECDh ; <> Doszip Commander Environment Variables 12 | HELPID_08 equ 2521h ; <> Installing Commander under Windows 13 | HELPID_09 equ 2664h ; <> Creating a tools menu 14 | HELPID_10 equ 2BB8h ; <> The File Search utility 15 | HELPID_11 equ 322Ch ; <> Create List File 16 | HELPID_12 equ 3553h ; <> Operation Filter 17 | HELPID_13 equ 37CEh ; <> Shortcut keys 18 | HELPID_14 equ 2EA3h ; <> Compare Directories 19 | HELPID_15 equ 4610h ; <> Configuration Defaults 20 | HELPID_16 equ 1891h ; <> Hex Editor 21 | 22 | view_readme proto :dword 23 | 24 | endif 25 | -------------------------------------------------------------------------------- /src/inc/idd.inc: -------------------------------------------------------------------------------- 1 | ; IDD.INC-- 2 | ; 3 | ; Copyright (c) The Asmc Contributors. All rights reserved. 4 | ; Consult your license regarding permissions and restrictions. 5 | ; 6 | ifndef __IDD_INC 7 | define __IDD_INC 8 | 9 | externdef IDD_Calendar:PIDD 10 | externdef IDD_CalHelp:PIDD 11 | ifdef __CI__ 12 | externdef IDD_CICreate:PIDD 13 | externdef IDD_CIEdit:PIDD 14 | externdef IDD_CIHelp:PIDD 15 | externdef IDD_CISetup:PIDD 16 | endif 17 | externdef IDD_Commandline:PIDD 18 | externdef IDD_CompareOptions:PIDD 19 | externdef IDD_ConfirmAddFiles:PIDD 20 | externdef IDD_ConfirmContinue:PIDD 21 | externdef IDD_ConfirmDelete:PIDD 22 | externdef IDD_ConsoleSize:PIDD 23 | externdef IDD_Deflate64:PIDD 24 | externdef IDD_DriveNotReady:PIDD 25 | externdef IDD_DZCompareDirectories:PIDD 26 | externdef IDD_DZCompression:PIDD 27 | externdef IDD_DZConfiguration:PIDD 28 | externdef IDD_DZConfirmations:PIDD 29 | externdef IDD_DZCopy:PIDD 30 | externdef IDD_DZDecompress:PIDD 31 | externdef IDD_DZDefaultColor:PIDD 32 | externdef IDD_DZEnviron:PIDD 33 | externdef IDD_DZExit:PIDD 34 | externdef IDD_DZFFHelp:PIDD 35 | externdef IDD_DZFileAttributes:PIDD 36 | externdef IDD_DZFindFile:PIDD 37 | externdef IDD_DZHelp:PIDD 38 | externdef IDD_DZHistory:PIDD 39 | externdef IDD_DZMenuEdit:PIDD 40 | externdef IDD_DZMenuFile:PIDD 41 | externdef IDD_DZMenuHelp:PIDD 42 | externdef IDD_DZMenuPanel:PIDD 43 | externdef IDD_DZMenuSetup:PIDD 44 | externdef IDD_DZMenuTools:PIDD 45 | externdef IDD_DZMKList:PIDD 46 | externdef IDD_DZMove:PIDD 47 | externdef IDD_DZPanelFilter:PIDD 48 | externdef IDD_DZPanelOptions:PIDD 49 | externdef IDD_DZRecursiveCompare:PIDD 50 | externdef IDD_DZSaveSetup:PIDD 51 | externdef IDD_DZScreenOptions:PIDD 52 | externdef IDD_DZSubInfo:PIDD 53 | externdef IDD_DZSystemInfo:PIDD 54 | externdef IDD_DZSystemOptions:PIDD 55 | externdef IDD_DZTransfer:PIDD 56 | externdef IDD_DZZipAttributes:PIDD 57 | externdef IDD_EditColor:PIDD 58 | externdef IDD_FFReplace:PIDD 59 | externdef IDD_HEFormat:PIDD 60 | externdef IDD_HELine:PIDD 61 | externdef IDD_HEMenusline:PIDD 62 | externdef IDD_HEStatusline:PIDD 63 | externdef IDD_Menusline:PIDD 64 | externdef IDD_OperationFilters:PIDD 65 | externdef IDD_Replace:PIDD 66 | externdef IDD_ReplacePrompt:PIDD 67 | ifdef __BMP__ 68 | externdef IDD_SaveScreen:PIDD 69 | endif 70 | externdef IDD_Search:PIDD 71 | externdef IDD_Statusline:PIDD 72 | externdef IDD_TEOptions:PIDD 73 | externdef IDD_TEQuickMenu:PIDD 74 | externdef IDD_TEReload:PIDD 75 | externdef IDD_TEReload2:PIDD 76 | externdef IDD_TESave:PIDD 77 | externdef IDD_TESeek:PIDD 78 | externdef IDD_TEWindows:PIDD 79 | externdef IDD_TVCopy:PIDD 80 | externdef IDD_TVHelp:PIDD 81 | externdef IDD_TVMenusline:PIDD 82 | externdef IDD_TVQuickMenu:PIDD 83 | externdef IDD_TVSeek:PIDD 84 | externdef IDD_TVStatusline:PIDD 85 | externdef IDD_UnzipCRCError:PIDD 86 | externdef IDD_WOpenFile:PIDD 87 | 88 | endif 89 | -------------------------------------------------------------------------------- /src/inc/oldapi.inc: -------------------------------------------------------------------------------- 1 | ; OLDAPI.INC-- 2 | ; 3 | ; Copyright (c) The Doszip Contributors. All rights reserved. 4 | ; Consult your license regarding permissions and restrictions. 5 | ; 6 | 7 | ifndef _WIN64 8 | 9 | if ( _WIN32_WINNT LT 0x0500 ) 10 | 11 | .data 12 | GetConsoleWindow GetConsoleWindow_T GetConsoleWindow_dummy 13 | 14 | .code 15 | 16 | GetConsoleWindow_dummy proc WINAPI private 17 | xor eax,eax 18 | ret 19 | GetConsoleWindow_dummy endp 20 | 21 | GetConsoleWindow_Install proc private 22 | 23 | .if GetModuleHandle("kernel32.dll") 24 | .if GetProcAddress( rax, "GetConsoleWindow" ) 25 | mov GetConsoleWindow,rax 26 | .else 27 | and console,not CON_CLIPB 28 | or console,CON_WIN95 29 | .endif 30 | .endif 31 | xor eax,eax 32 | ret 33 | 34 | GetConsoleWindow_Install endp 35 | 36 | endif 37 | 38 | if ( WINVER LT 0x0500 ) 39 | 40 | .data 41 | GetKeyState GetKeyState_T GetKeyState_dummy 42 | SetWindowPos SetWindowPos_T SetWindowPos_dummy 43 | 44 | .code 45 | 46 | GetKeyState_dummy proc WINAPI private key:SINT 47 | xor eax,eax 48 | ret 49 | GetKeyState_dummy endp 50 | 51 | SetWindowPos_dummy proc WINAPI private a:HWND, b:HWND, c:SINT, d:SINT, e:SINT, f:SINT, g:UINT 52 | xor eax,eax 53 | ret 54 | SetWindowPos_dummy endp 55 | 56 | GetKeyState_Install proc private uses rbx 57 | 58 | .if GetModuleHandle("user32.dll") 59 | mov rbx,rax 60 | .if GetProcAddress(rbx, "GetKeyState") 61 | mov GetKeyState,rax 62 | .endif 63 | .if GetProcAddress(rbx, "SetWindowPos") 64 | mov SetWindowPos,rax 65 | .endif 66 | .endif 67 | ret 68 | 69 | GetKeyState_Install endp 70 | 71 | endif 72 | 73 | if ( WINVER LT 0x0502 ) 74 | 75 | .data 76 | GetFileSizeEx GetFileSizeEx_T GetFileSizeEx_dummy 77 | SetFilePointerEx SetFilePointerEx_T SetFilePointerEx_dummy 78 | 79 | .code 80 | 81 | GetFileSizeEx_dummy proc WINAPI private hFile:HANDLE, lpFileSize:PLARGE_INTEGER 82 | 83 | .if GetFileSize( hFile, lpFileSize ) 84 | 85 | mov rdx,lpFileSize 86 | mov [rdx],eax 87 | xor eax,eax 88 | mov [rdx+4],eax 89 | inc eax 90 | .endif 91 | ret 92 | 93 | GetFileSizeEx_dummy endp 94 | 95 | SetFilePointerEx_dummy proc WINAPI private hFile:HANDLE, liDistanceToMove:LARGE_INTEGER, 96 | lpNewFilePointer:PLARGE_INTEGER, dwMoveMethod:DWORD 97 | 98 | mov eax,DWORD PTR liDistanceToMove 99 | mov edx,DWORD PTR liDistanceToMove[4] 100 | mov rcx,lpNewFilePointer 101 | add rcx,4 102 | mov [rcx],edx 103 | 104 | .if SetFilePointer( 105 | hFile, ;; handle of file 106 | eax, ;; number of bytes to move file pointer 107 | rcx, ;; pointer to high-order DWORD of distance to move 108 | dwMoveMethod ) != -1 ;; how to move 109 | 110 | mov rdx,lpNewFilePointer 111 | mov [rdx],eax 112 | mov eax,1 113 | .else 114 | dec rax 115 | .endif 116 | ret 117 | 118 | SetFilePointerEx_dummy endp 119 | 120 | GetFileSizeEx_Install proc private uses rbx 121 | 122 | .if GetModuleHandle("kernel32.dll") 123 | mov rbx,rax 124 | .if GetProcAddress(rbx, "GetFileSizeEx") 125 | mov GetFileSizeEx,rax 126 | .endif 127 | .if GetProcAddress(rbx, "SetFilePointerEx") 128 | mov SetFilePointerEx,rax 129 | .endif 130 | .endif 131 | ret 132 | 133 | GetFileSizeEx_Install endp 134 | 135 | endif 136 | 137 | if ( _WIN32_WINNT LT 0x0500 ) 138 | .pragma init(GetConsoleWindow_Install, 6) 139 | endif 140 | if ( WINVER LT 0x0500 ) 141 | .pragma init(GetKeyState_Install, 6) 142 | endif 143 | if ( WINVER LT 0x0502 ) 144 | .pragma init(GetFileSizeEx_Install, 7) 145 | endif 146 | 147 | endif 148 | -------------------------------------------------------------------------------- /src/inc/panel.inc: -------------------------------------------------------------------------------- 1 | ; PANEL.INC-- 2 | ; 3 | ; Copyright (c) The Asmc Contributors. All rights reserved. 4 | ; Consult your license regarding permissions and restrictions. 5 | ; 6 | 7 | .class Panel 8 | 9 | fcb_count int_t ? 10 | cel_count int_t ? 11 | fcb_index int_t ? 12 | cel_index int_t ? 13 | dialog HWND ? 14 | 15 | Panel proc 16 | Release proc 17 | 18 | State proc 19 | Close proc 20 | Hide proc 21 | Show proc 22 | SetActive proc 23 | CurItem proc 24 | FindNext proc 25 | OpenMsg proc 26 | Read proc 27 | ReRead proc 28 | ReDraw proc 29 | Toggle proc 30 | Update proc 31 | XorMini proc 32 | XorInfo proc 33 | SetId proc :int_t 34 | PutItem proc :int_t 35 | XYCmd proc :int_t, :int_t 36 | SetHdd proc :int_t 37 | Event proc :int_t 38 | .ends -------------------------------------------------------------------------------- /src/inc/process.inc: -------------------------------------------------------------------------------- 1 | ifndef _INC_PROCESS 2 | define _INC_PROCESS 3 | include stdlib.inc 4 | 5 | define _P_WAIT 0 6 | define _P_NOWAIT 1 7 | 8 | define MAXCMDL 0x8000 9 | 10 | externdef __pCommandArg:LPSTR 11 | externdef __pCommandCom:LPSTR 12 | externdef __comspec:sbyte 13 | externdef comspec_type:dword 14 | externdef OldConsoleMode:dword 15 | 16 | __initcomspec proto __cdecl 17 | 18 | endif 19 | -------------------------------------------------------------------------------- /src/inc/progress.inc: -------------------------------------------------------------------------------- 1 | ; PROGRESS.INC-- 2 | ; 3 | ; Copyright (c) Doszip Contributors. All rights reserved. 4 | ; Consult your license regarding permissions and restrictions. 5 | ; 6 | ifndef __PROGRESS_INC 7 | define __PROGRESS_INC 8 | 9 | include conio.inc 10 | 11 | externdef progress_dobj:DOBJ 12 | externdef progress_size:QWORD 13 | 14 | progress_open proto __cdecl :LPSTR, :LPSTR 15 | progress_close proto __cdecl 16 | progress_set proto __cdecl :LPSTR, :LPSTR, :QWORD 17 | progress_update proto __cdecl :QWORD 18 | test_userabort proto __cdecl 19 | 20 | endif 21 | 22 | -------------------------------------------------------------------------------- /src/inc/tview.inc: -------------------------------------------------------------------------------- 1 | ifndef __TVIEW_INC 2 | define __TVIEW_INC 3 | 4 | _TV_USEMLINE equ 01h 5 | _TV_USESLINE equ 02h 6 | _TV_HEXVIEW equ 04h 7 | _TV_WRAPLINES equ 08h 8 | _TV_HEXOFFSET equ 10h 9 | _TV_HIGHCOLOR equ 20h 10 | _TV_BINVIEW equ 40h 11 | _TV_CLASSVIEW equ 80h 12 | 13 | tview proto __cdecl :LPSTR, :size_t 14 | load_tedit proto __cdecl :LPSTR, :int_t 15 | load_tview proto __cdecl :LPSTR, :int_t 16 | view_readme proto __cdecl :DWORD 17 | 18 | endif 19 | -------------------------------------------------------------------------------- /src/inc/zip.inc: -------------------------------------------------------------------------------- 1 | ifndef __ZIP_INC 2 | define __ZIP_INC 3 | include libc.inc 4 | 5 | define ZIPHEADERID 0x4B50 ; two-byte zip lead-in 6 | define ZIPLOCALID 0x0403 ; signature local file 7 | define ZIPCENTRALID 0x0201 ; signature central file 8 | define ZIPDIGITALID 0x0505 ; digital signature 9 | define ZIPENDSENTRID 0x0605 ; signature end central 10 | 11 | define WSIZE 0x8000 12 | 13 | define ER_ZIP 2 14 | define ER_BADERR 3 15 | define ER_MEM 4 16 | define ER_CRCERR 5 17 | define ER_NOZIP 9 18 | define ER_FIND 11 19 | define ER_OPEN 12 20 | define ER_DISK 50 21 | define ER_USERABORT E_FAIL;66 22 | define ER_READARCH (-2) 23 | 24 | .pragma pack(push, 1) 25 | 26 | LZIP STRUC ; Local file header: 30 byte 27 | pkzip dw ? ; local file header signature 28 | zipid dw ? 29 | version dw ? ; version needed to extract 30 | flag dw ? ; general purpose bit flag 31 | method dw ? ; compression method 32 | time dw ? ; last mod file time 33 | date dw ? ; last mod file date 34 | crc dd ? ; crc-32 35 | csize dd ? ; compressed size 36 | fsize dd ? ; uncompressed size 37 | fnsize dw ? ; file name length 38 | extsize dw ? ; extra field length 39 | LZIP ENDS 40 | 41 | CZIP STRUC ; Central directory structure: 46 byte 42 | pkzip dw ? ; central file header signature 43 | zipid dw ? 44 | version_made dw ? ; version made by 45 | version_need dw ? ; version needed to extract 46 | bitflag dw ? ; general purpose bit flag 47 | method dw ? ; compression method 48 | time dw ? ; last mod file time 49 | date dw ? ; last mod file date 50 | crc dd ? ; crc-32 51 | csize dd ? ; compressed size 52 | fsize dd ? ; uncompressed size 53 | fnsize dw ? ; file name length 54 | extsize dw ? ; extra field length 55 | cmtsize dw ? ; file comment length 56 | disk dw ? ; disk number start 57 | int_attrib dw ? ; internal file attributes 58 | ext_attrib dw ? ; external file attributes 59 | ext_attribdx dw ? 60 | off_local dd ? ; relative offset of local header 61 | CZIP ENDS ; 46 byte 62 | 63 | ZEND STRUC ; End of central directory record: 22 byte 64 | pkzip dw ? ; end of central dir signature 65 | zipid dw ? 66 | disk_cur dw ? ; number of this disk 67 | disk_one dw ? ; number at start of the central directory 68 | entry_cur dw ? ; central directory on this disk 69 | entry_dir dw ? ; total entries in the central directory 70 | size_cent dd ? ; size central directory 71 | off_cent dd ? ; offset central directory 72 | comment_size dw ? ; .ZIP file comment length 73 | ZEND ENDS 74 | PZEND typedef ptr ZEND 75 | 76 | .pragma pack(pop) 77 | 78 | externdef zip_local:LZIP 79 | externdef zip_central:CZIP 80 | externdef file_method:BYTE 81 | externdef compresslevel:UINT 82 | externdef copy_fast:BYTE 83 | 84 | zip_inflate proto __cdecl 85 | zip_explode proto __cdecl 86 | zip_deflate proto __cdecl :UINT 87 | 88 | endif 89 | -------------------------------------------------------------------------------- /src/res/CalHelp.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/CalHelp.idd -------------------------------------------------------------------------------- /src/res/Calendar.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/Calendar.idd -------------------------------------------------------------------------------- /src/res/Commandline.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/Commandline.idd -------------------------------------------------------------------------------- /src/res/CompareOptions.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/CompareOptions.idd -------------------------------------------------------------------------------- /src/res/ConfirmAddFiles.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/ConfirmAddFiles.idd -------------------------------------------------------------------------------- /src/res/ConfirmContinue.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/ConfirmContinue.idd -------------------------------------------------------------------------------- /src/res/ConfirmDelete.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/ConfirmDelete.idd -------------------------------------------------------------------------------- /src/res/ConsoleSize.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/ConsoleSize.idd -------------------------------------------------------------------------------- /src/res/DZCompareDirectories.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZCompareDirectories.idd -------------------------------------------------------------------------------- /src/res/DZCompression.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZCompression.idd -------------------------------------------------------------------------------- /src/res/DZConfiguration.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZConfiguration.idd -------------------------------------------------------------------------------- /src/res/DZConfirmations.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZConfirmations.idd -------------------------------------------------------------------------------- /src/res/DZCopy.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZCopy.idd -------------------------------------------------------------------------------- /src/res/DZDecompress.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZDecompress.idd -------------------------------------------------------------------------------- /src/res/DZDefaultColor.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZDefaultColor.idd -------------------------------------------------------------------------------- /src/res/DZEnviron.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZEnviron.idd -------------------------------------------------------------------------------- /src/res/DZExit.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZExit.idd -------------------------------------------------------------------------------- /src/res/DZFFHelp.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZFFHelp.idd -------------------------------------------------------------------------------- /src/res/DZFileAttributes.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZFileAttributes.idd -------------------------------------------------------------------------------- /src/res/DZFindFile.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZFindFile.idd -------------------------------------------------------------------------------- /src/res/DZHelp.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZHelp.idd -------------------------------------------------------------------------------- /src/res/DZHistory.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZHistory.idd -------------------------------------------------------------------------------- /src/res/DZMKList.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZMKList.idd -------------------------------------------------------------------------------- /src/res/DZMenuEdit.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZMenuEdit.idd -------------------------------------------------------------------------------- /src/res/DZMenuFile.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZMenuFile.idd -------------------------------------------------------------------------------- /src/res/DZMenuHelp.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZMenuHelp.idd -------------------------------------------------------------------------------- /src/res/DZMenuPanel.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZMenuPanel.idd -------------------------------------------------------------------------------- /src/res/DZMenuSetup.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZMenuSetup.idd -------------------------------------------------------------------------------- /src/res/DZMenuTools.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZMenuTools.idd -------------------------------------------------------------------------------- /src/res/DZMove.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZMove.idd -------------------------------------------------------------------------------- /src/res/DZPanelFilter.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZPanelFilter.idd -------------------------------------------------------------------------------- /src/res/DZPanelOptions.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZPanelOptions.idd -------------------------------------------------------------------------------- /src/res/DZRecursiveCompare.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZRecursiveCompare.idd -------------------------------------------------------------------------------- /src/res/DZSaveSetup.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZSaveSetup.idd -------------------------------------------------------------------------------- /src/res/DZScreenOptions.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZScreenOptions.idd -------------------------------------------------------------------------------- /src/res/DZSubInfo.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZSubInfo.idd -------------------------------------------------------------------------------- /src/res/DZSystemInfo.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZSystemInfo.idd -------------------------------------------------------------------------------- /src/res/DZSystemOptions.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZSystemOptions.idd -------------------------------------------------------------------------------- /src/res/DZTransfer.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZTransfer.idd -------------------------------------------------------------------------------- /src/res/DZZipAttributes.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DZZipAttributes.idd -------------------------------------------------------------------------------- /src/res/Deflate64.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/Deflate64.idd -------------------------------------------------------------------------------- /src/res/DriveNotReady.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/DriveNotReady.idd -------------------------------------------------------------------------------- /src/res/EditColor.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/EditColor.idd -------------------------------------------------------------------------------- /src/res/FFReplace.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/FFReplace.idd -------------------------------------------------------------------------------- /src/res/HEFormat.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/HEFormat.idd -------------------------------------------------------------------------------- /src/res/HELine.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/HELine.idd -------------------------------------------------------------------------------- /src/res/HEMenusline.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/HEMenusline.idd -------------------------------------------------------------------------------- /src/res/HEStatusline.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/HEStatusline.idd -------------------------------------------------------------------------------- /src/res/Menusline.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/Menusline.idd -------------------------------------------------------------------------------- /src/res/OperationFilters.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/OperationFilters.idd -------------------------------------------------------------------------------- /src/res/Replace.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/Replace.idd -------------------------------------------------------------------------------- /src/res/ReplacePrompt.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/ReplacePrompt.idd -------------------------------------------------------------------------------- /src/res/SaveScreen.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/SaveScreen.idd -------------------------------------------------------------------------------- /src/res/Search.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/Search.idd -------------------------------------------------------------------------------- /src/res/Statusline.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/Statusline.idd -------------------------------------------------------------------------------- /src/res/TEOptions.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/TEOptions.idd -------------------------------------------------------------------------------- /src/res/TEQuickMenu.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/TEQuickMenu.idd -------------------------------------------------------------------------------- /src/res/TEReload.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/TEReload.idd -------------------------------------------------------------------------------- /src/res/TEReload2.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/TEReload2.idd -------------------------------------------------------------------------------- /src/res/TESave.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/TESave.idd -------------------------------------------------------------------------------- /src/res/TESeek.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/TESeek.idd -------------------------------------------------------------------------------- /src/res/TEWindows.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/TEWindows.idd -------------------------------------------------------------------------------- /src/res/TVCopy.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/TVCopy.idd -------------------------------------------------------------------------------- /src/res/TVHelp.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/TVHelp.idd -------------------------------------------------------------------------------- /src/res/TVMenusline.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/TVMenusline.idd -------------------------------------------------------------------------------- /src/res/TVQuickMenu.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/TVQuickMenu.idd -------------------------------------------------------------------------------- /src/res/TVSeek.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/TVSeek.idd -------------------------------------------------------------------------------- /src/res/TVStatusline.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/TVStatusline.idd -------------------------------------------------------------------------------- /src/res/UnzipCRCError.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/UnzipCRCError.idd -------------------------------------------------------------------------------- /src/res/WOpenFile.idd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/WOpenFile.idd -------------------------------------------------------------------------------- /src/res/dz.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nidud/doszip/1a7b2fe34596cb6929d6e0cf6e7e9b2a821264c3/src/res/dz.ico -------------------------------------------------------------------------------- /src/res/dz.rc: -------------------------------------------------------------------------------- 1 | #include "windows.h" 2 | 3 | DoszipIcon ICON dz.ico 4 | 5 | -------------------------------------------------------------------------------- /src/st/bas.ini: -------------------------------------------------------------------------------- 1 | [.] 2 | 0=.comments 3 | 1=.quotes 4 | 2=.keywords 5 | 6 | [.comments] 7 | 0=B X8 ' 8 | 9 | [.quotes] 10 | 0=Q XB 11 | 12 | [.keywords] 13 | 0=W XF end sub print using declare function 14 | 1=as long integer type const dim string 15 | 2=if then else 16 | -------------------------------------------------------------------------------- /src/st/bat.ini: -------------------------------------------------------------------------------- 1 | [.] 2 | 0=.comments 3 | 1=.quotes 4 | 2=.keywords 5 | 6 | [.comments] 7 | 0=B X8 rem 8 | 9 | [.quotes] 10 | 0=Q XB 11 | 12 | [.keywords] 13 | 0=W XF for in echo off on call do if errorlevel goto 14 | 1=exit 15 | -------------------------------------------------------------------------------- /src/st/cpp.ini: -------------------------------------------------------------------------------- 1 | [.] 2 | 0=.nested_comments 3 | 1=.comments 4 | 2=.preprocessor 5 | 3=.quotes 6 | 4=.keywords 7 | 8 | [.nested_comments] 9 | 0=N X8 /* */ 10 | 11 | [.comments] 12 | 0=B X8 // 13 | 14 | [.preprocessor] 15 | 0=B X2 # 16 | 17 | [.quotes] 18 | 0=Q XB 19 | 20 | [.keywords] 21 | 0=W XF const operator char int long void typedef struct 22 | 1=if else for do while break continue goto return 23 | 2=switch case default public extern signed unsigned 24 | 3=static enum union short float double sizeof 25 | 4=class protected new 26 | -------------------------------------------------------------------------------- /src/st/mak.ini: -------------------------------------------------------------------------------- 1 | [.] 2 | 0=.comments 3 | 1=.preprocessor 4 | 2=.nested 5 | 3=.quotes 6 | 4=.keywords 7 | 8 | [.comments] 9 | 0=B X8 # 10 | 11 | [.preprocessor] 12 | 0=B X2 ! if ifeq ifdef ifndef else endif include 13 | 14 | [.nested] 15 | 0=N X6 $( ) 16 | 17 | [.quotes] 18 | 0=Q XB 19 | 20 | [.keywords] 21 | 0=W XF SUFFIXES OBJ C ASM IDD 22 | -------------------------------------------------------------------------------- /src/st/pas.ini: -------------------------------------------------------------------------------- 1 | [.] 2 | 0=.nested_1 3 | 1=.nested_2 4 | 2=.quotes 5 | 3=.keywords 6 | 7 | [.nested_1] 8 | 0=N X8 { } 9 | 10 | [.nested_2] 11 | 0=N X8 (* *) 12 | 13 | [.quotes] 14 | 0=Q XB 15 | 16 | [.keywords] 17 | 0=W XF program unit interface uses integer function procedure 18 | 1=implementation begin end var const type byte word dword string 19 | 2=record far external if then or with do pointer longint exit 20 | 3=stdcall false true 21 | -------------------------------------------------------------------------------- /src/stub/mkdz.asm: -------------------------------------------------------------------------------- 1 | ; MKDZ.ASM-- 2 | ; 3 | ; Copyright (c) The Asmc Contributors. All rights reserved. 4 | ; Consult your license regarding permissions and restrictions. 5 | ; 6 | 7 | include stdio.inc 8 | include direct.inc 9 | include tchar.inc 10 | 11 | .data 12 | version dd VERSION 13 | %srcfile db "&SRCFILE&",0 14 | %outpath db "&OUTPATH&",0 15 | 16 | .code 17 | 18 | _tmain proc argc:int_t, argv:array_t 19 | 20 | .new fp:LPFILE 21 | .new fo:LPFILE 22 | .new ver_h:int_t 23 | .new ver_l:int_t 24 | .new buffer[256]:char_t 25 | 26 | mov eax,version 27 | mov ecx,100 28 | xor edx,edx 29 | idiv ecx 30 | mov ver_h,eax 31 | mov ver_l,edx 32 | 33 | _mkdir(&outpath) 34 | _mkdir(strcat(strcpy(&buffer, &outpath), "\\dz")) 35 | 36 | .if ( fopen(strcat(strcpy(&buffer, &outpath), "\\LICENSE"), "wt" ) == NULL ) 37 | 38 | perror(&buffer) 39 | .return( 1 ) 40 | .endif 41 | mov fo,rax 42 | fprintf(fo, 43 | " Doszip\n" 44 | "\n" 45 | " License for use and distribution\n" 46 | "\n" 47 | " Copyright (C) 1999-2025 The Doszip Contributors.\n" 48 | "\n" 49 | " The license for files are GNU General Public License.\n" 50 | "\n" 51 | " GNU GPL information:\n" 52 | "\n" 53 | " This program is free software; you can redistribute it and/or modify\n" 54 | " it under the terms of the GNU General Public License as published by\n" 55 | " the Free Software Foundation; either version 2 of the License, or\n" 56 | " (at your option) any later version.\n" 57 | "\n" 58 | " This program is distributed in the hope that it will be useful,\n" 59 | " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" 60 | " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" 61 | " GNU General Public License for more details.\n" 62 | "\n" 63 | " You should have received a copy of the GNU General Public License along\n" 64 | " with this program; if not, you can get a copy of the GNU General Public\n" 65 | " License from http://www.gnu.org/\n" 66 | "\n" ) 67 | 68 | fclose(fo) 69 | 70 | .if ( fopen(strcat(strcpy(&buffer, &outpath), "\\dz\\dz.txt"), "wt" ) == NULL ) 71 | 72 | perror(&buffer) 73 | .return( 1 ) 74 | .endif 75 | mov fo,rax 76 | 77 | .if ( fopen(&srcfile, "rt" ) == NULL ) 78 | 79 | perror(&buffer) 80 | fclose(fo) 81 | .return( 1 ) 82 | .endif 83 | mov fp,rax 84 | fprintf(fo, 85 | "DZ.TXT--\n" 86 | "Copyright (C) 2025 Doszip Developers.\n" 87 | "\n" 88 | "DOSZIP COMMANDER\n" 89 | "Version %d.%02d\n" 90 | "\n" 91 | "Welcome to Doszip Commander Version %d.%02d!\n", ver_h, ver_l, ver_h, ver_l ) 92 | .while fgets(&buffer, 256, fp) 93 | fputs(&buffer, fo) 94 | .endw 95 | fclose(fp) 96 | fclose(fo) 97 | ret 98 | 99 | _tmain endp 100 | 101 | end _tstart 102 | --------------------------------------------------------------------------------