flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Is this useless? | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
Total Votes : 22 |
Author |
|
rugxulo 03 Nov 2006, 10:05
Okay, well, if anyone payed close attention, I mentioned writing a .ZIP viewer for DOS (EDIT: see attachment in post below). Actually, it works okay but could probably be vastly improved if I put more effort into it and then eventually rewrote it. But, for fun, I decided to do this instead:
P.S. Thanks to vid, Grenhald, relsoft, http://www.256b.com, etc. for inspiration! ![]() P.P.S. I'm not attaching a file but putting it in a code block instead so that non-members of the forum can see/get it too! ![]() 122-byte .ZIP viewer
If you want a decent cmdline archive viewer (not written by me, heh) w/ .ASM source, get ARCLDS (reads ACE, ARC, ARJ, CAB, DWC, HA, HAP, HPK, HYP, LIM, LHA/LZH, PAK, RAR, SQZ, YAC, ZIP, ZOO) 0.94.3 beta (2006-08-06). Else, Win32 peeps, get IZarc or WinUHA for all your basic archiving needs (except PAQ8?, of course)! ![]() (new!) IZarc now supports BZip2 compression in .ZIPs, AES encryption in .ZIPs, and can handle archives > 4GB (i.e., it's more compatible with WinZip 9). Code: ; C.ASM -- 122-byte .ZIP viewer! Last edited by rugxulo on 16 Nov 2006, 02:03; edited 4 times in total |
|||
![]() |
|
vid 03 Nov 2006, 10:23
still lot of place for improving there
![]() |
|||
![]() |
|
rugxulo 03 Nov 2006, 11:00
<EDIT>
Well, I guess I may as well post my (unfinished, unpolished, needing-a-rewrite, very-slightly-buggy) semi-full-featured .ZIP viewer for DOS here. It ain't able to use FASM (yet), so please don't whine. ![]() Here's a text screen dump/screenshot: Code: [ WinXP ] Sun 11/05/2006>av AV19TEMP.ZIP /i! /m! /p /l! AV19TEMP.ZIP av19.asm 16,049 (74,475) Oct,28,2006 09:24:06a [Defl-X] avlazy.bat 866 (2,461) Jan,03,2006 09:49:28a [Defl-X] av19.com 4,585 (4,585) Oct,28,2006 09:31:06a [Stored] izappnfo.txt 38,981 (166,297) May,28,2004 06:20:00p [Defl-X] all4one.bat 85 (147) Oct,29,2004 09:25:38p [Defl-N] one4all.bat 66 (66) Oct,27,2004 08:03:16p [Stored] av186.asm 13,183 (65,416) Jul,07,2005 10:44:20p [Defl-X] debugit.bat 998 (1,869) Oct,07,2005 11:51:16p [Defl-X] zip630.txt 34,010 (136,852) Oct,07,2006 06:52:54p [Defl-X] jmp2ret.bat 713 (1,685) Aug,16,2006 12:46:36p [Defl-X] 10 items: 0 dirs + 10 files 109,536 bytes (453,853 unzipped) Created by ZIP 2.3 : DOS, OS/2, WinNT FAT [ WinXP ] Sun 11/05/2006>scrndump And here's the help screen: Code: AV 0.19 (October 28, 2006) rugxulo AT bellsouth DOT net Usage: av /z:cXi c:\dir\ /E myfile.zip /c ! print archive Comment after view /d ! print Dirs only, not files /e print numbers in kb (kb = 1024) /f ! print only Files, not dirs /h Help screen (/? also works) /i ! list numitems & size totals Info /k ! print archive Komment only /l ! do not List name of opened file /m ! print compr. Method nums (! sub-) /n print CRLF after every fname /o no colors /p ! no Pause if screen is full /q ! Quiet mode (summary info only) /r ! clear or Reset to CO80 then list /s(.asm) ! Search for fnames w/ ".asm" /u no commas /x ! toggle printing numbers in heX /y !+ wait after view or until kbhit /z: multiple options (/z:icp!) TODO:
P.S. It ain't no great piece of software, but enjoy (if possible ... or have a good laugh, heh). ![]() </EDIT>
Last edited by rugxulo on 16 Nov 2006, 01:41; edited 2 times in total |
|||||||||||
![]() |
|
rugxulo 05 Nov 2006, 23:56
Bugfixed!
![]() Code: ; C02.ASM -- 254-byte .ZIP viewer!
Last edited by rugxulo on 02 Aug 2007, 23:17; edited 3 times in total |
|||||||||||
![]() |
|
rugxulo 06 Nov 2006, 21:11
Hey ATV, nice job! Yeah, I know there are a few dumb things in AV19.ASM, but I was too lazy/busy to fix 'em all (in particular, I discovered the mul thing recently in another program of mine).
It's (apparently) TOO easy for me to make such silly mistakes, and I'm always correcting them, heh. ![]() <EDIT> Oops! Looks like you mistakenly changed int 21h,4Ch into int 20h. That would be fine except int 21h,4Ch also closes open files! ![]() <EDIT #2> Actually, the file still seems to be closed (at least in DOSBOX 0.65 and Win XP Home SP2 ... why?? Needs further testing, probably). </EDIT #2> </EDIT> |
|||
![]() |
|
polygon7 06 Nov 2006, 23:07
rugxulo wrote: <EDIT> If you popped all things from stack, then you could even try to use "ret" instead "int 20". On clean stack "ret" in *.com files jumps to PSP:0h (if i remember correctly) which contains "int 20h" opcode. (Its something similar like in Windows executables) _________________ best regards p7 |
|||
![]() |
|
ATV 07 Nov 2006, 11:41
rugxulo, I have been testing 286 (DOS 3.3) and 486 (DOS 6.22) and P166 (Win95) and all will close files with int 20h. I was little suprise that 286 and 486 starts without any problem, even floppy drive was working (only BIOS clock was wrong). Now I need couple hours fresh air, because those computers was covered in a thick layer of dust.
|
|||
![]() |
|
Tomasz Grysztar 07 Nov 2006, 11:58
polygon7 wrote: If you popped all things from stack, then you could even try to use "ret" instead "int 20". On clean stack "ret" in *.com files jumps to PSP:0h (if i remember correctly) which contains "int 20h" opcode. (Its something similar like in Windows executables) You may find details on it here. |
|||
![]() |
|
Madis731 08 Nov 2006, 10:32
...and then comes the time when I stop believing that 7-Zip is increadibly small
|
|||
![]() |
|
polygon7 08 Nov 2006, 19:18
Tomasz Grysztar wrote:
![]() _________________ best regards p7 |
|||
![]() |
|
Tomasz Grysztar 08 Nov 2006, 19:23
However you may not be the only one that is reading it.
![]() |
|||
![]() |
|
rugxulo 09 Nov 2006, 01:14
ATV, you're just ridiculously talented, that's all. I've noticed that about you (and people on this board in general). Thanks for the tips!
![]() Madis, I'm not sure I understand you here, but 7-Zip is definitely worthwhile. Even PKWARE uses(?) LZMA as compression method #14 in .ZIP according to their latest APPNOTE.TXT (6.3.1, Apr. 11, 2007). Last edited by rugxulo on 18 Jul 2007, 23:05; edited 3 times in total |
|||
![]() |
|
ATV 09 Nov 2006, 10:12
I was looking little more deeper and found next text in chapter.004 from archive dosref33.zip
Quote: Issue int 20h to exit from a program. This vector transfers to the Then I tested write file with DOS 3.3/6.22 and file size/date/time was updated. So I don't know which version of DOS can't handle int 20h with dir entry update if file has changed. I should stop programming, because my near memory is very bad and I have made silly errors too, but it's so difficult give up after over 20 year programming. (VIC 20 was so good 1.1MHz 8bit computer) |
|||
![]() |
|
Madis731 09 Nov 2006, 13:03
by that I meant that there were times when I thought that *other* zippers are bloat and 7-zip is small (as a program, not as a compression method).
Now when I see that you can really unzip around 100 bytes ![]() To throw another curveball: ...then there's the speed optimization issue. |
|||
![]() |
|
Dex4u 09 Nov 2006, 15:01
Madis731 wrote: by that I meant that there were times when I thought that *other* zippers are bloat and 7-zip is small (as a program, not as a compression method). This is a zipped file viewer, not a unzipper ![]() |
|||
![]() |
|
Madis731 09 Nov 2006, 15:07
:$ oh, okay - its all logical then, NOT
![]() But impressive still! ![]() |
|||
![]() |
|
Dex4u 09 Nov 2006, 17:24
I agree its still impressive, rugxulo did a good job, so impressed i converted it to run in Dex4u OS (soon to be dexOS)
http://jas2o.forthworks.com/dexforum/index.php?topic=172.0 PS: A unzipper in less than 2k would be very impressive. |
|||
![]() |
|
rugxulo 09 Nov 2006, 17:58
I've seen at least two unzippers in < 3k (PKUNZJR, TUNZ), so it definitely can be done. But, neither is open source, and I'm NOT inclined to disassemble 'em (and definitely don't recommend doing so) for fear of breaking some law or whatever. Besides, writing my own would probably be easier and more fun, anyways.
EDIT: I now actually think that TUNZ is based on / hacked from PKUNZJR. ![]() Like I said in PM to Dex, there is lots of Unzip code out there (DJTAR, UZ, UnzipAda, Unzip in Pascal, Info-Zip, ZLIB, OctaOS, etc.), so anybody is welcome to try their hand at it. ![]() P.S. These mini proggies of mine are not that impressive. I've seen better (tet, bd3, inv, selfdasm, wolf, smile256). ![]() Last edited by rugxulo on 18 Jul 2007, 23:08; edited 4 times in total |
|||
![]() |
|
Dex4u 09 Nov 2006, 19:10
Quote:
CdPod and MiniDos are my mini efforts ![]() |
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.