flat assembler
Message board for the users of flat assembler.
![]() |
How lousy is this? | |||||||||||||||||||||
|
|||||||||||||||||||||
Total Votes : 10 |
Author |
|
rugxulo 28 Jun 2007, 07:42
It's not like I majorly needed to write this (I mean, FreeDOS' attrib.com is only 5,044 bytes). Anyways, at least it's small and doesn't need megs of compiler crud to make.
REUPDATED! Code: ; ------------------------------------------------------------------------ ; ; ATTR.ASM -- tiny DOS attrib clone (w/ .ASM src) ; ; written with FASM 1.67.21
Last edited by rugxulo on 28 Aug 2007, 23:21; edited 9 times in total |
|||||||||||
![]() |
|
vid 28 Jun 2007, 13:44
Their version has error handling. For realworld use it is more important than saving kilobyte.
Anyway, it's nice as a demo |
|||
![]() |
|
rugxulo 30 Jun 2007, 03:42
Well, both MS-DOS and DR-DOS have a bloatier ATTRIB than FreeDOS. Plus, the one in DR-DOS doesn't like changing dir attributes (for some odd reason, bug??). Granted, the whole idea of attributes in DOS is inconsistently handled at best.
Seriously though, floppies can fill up quite fast, so having a small and simple ATTRIB clone can indeed be useful (even if only a subset of functionality is supported so far). Maybe one day someone (Dex? me? you?) will port it to MiniDOS. ![]() ![]() |
|||
![]() |
|
Japheth 30 Jun 2007, 09:04
Wildcards aren't handled in the filename argument. That's a too severe restriction IMO. Much space for improvement!
|
|||
![]() |
|
Picnic 30 Jun 2007, 09:21
Added to my fasm scripts collection rugxulo.
![]() |
|||
![]() |
|
DOS386 02 Jul 2007, 23:11
rugxulo wrote:
Quote: FreeDOS' attrib.com is only 5,044 bytes UPX'd NO ![]() http://board.flatassembler.net/topic.php?t=7278 It's APACK'ed ![]() Last edited by DOS386 on 03 Jul 2007, 22:45; edited 1 time in total |
|||
![]() |
|
prino 03 Jul 2007, 18:43
Charles Petzold's ATTR.COM was 626 bytes way back in 1986, with support for wildcards and elementaty help. Despite PC Magazines no-dist policy it's still around, with source.
|
|||
![]() |
|
rugxulo 12 Jul 2007, 19:13
prino wrote: Charles Petzold's ATTR.COM was 626 bytes way back in 1986, with support for wildcards and elementaty help. Despite PC Magazines no-dist policy it's still around, with source. Yeah, uh, with a license like that, er, I don't think that would be quite as useful. ![]() |
|||
![]() |
|
rugxulo 14 Jul 2007, 23:36
Okay, I finished the new version (see updated first post). No LFN support (yet). But at least it's "free" and small (WinXP, MS-DOS, and DR-DOS all have 11k or 12k attribs). Enjoy! (heh, yeah right)
![]() Last edited by rugxulo on 20 Jul 2007, 18:49; edited 1 time in total |
|||
![]() |
|
rugxulo 18 Jul 2007, 23:01
(post removed because AVG still complains, doh!)
Last edited by rugxulo on 20 Jul 2007, 18:53; edited 1 time in total |
|||
![]() |
|
Rahsennor 19 Jul 2007, 10:33
Nice work.
![]() What about other DOS commands, like COPY? |
|||
![]() |
|
vador 19 Jul 2007, 11:12
yeah, nice piece of code
|
|||
![]() |
|
Dex4u 19 Jul 2007, 14:22
Nice work rugxulo, if i get time i will port it to MiniDos, i will also port it to DexOS.
|
|||
![]() |
|
rugxulo 20 Jul 2007, 01:01
SLIGHTLY IMPROVED!
AVG Free Resident Shield (with heuristics enabled) still whines, so if you download the .ZIP, the .COM is (still) 907 bytes because it's "packed" by 624 so that AVG won't notice it. (Sheesh, annoying, hope they fix that.) Anyways, now I made it 895 so you'd know I updated it. It's faster if files don't need changing (but not with "attr /d -r", doh, needs fixing). Fixed the "attr ..\*.*" bug (FYI, if anyone followed this thread, the bug was actually due to my use of anonymous labels, heh). P.S. Since 0.2 had an accidental long 386+ jump in there, I've now started using ONLY8086.INC (but you don't need it to reassemble, you could even just make a blank .INC file or put "TINYHELP=1" or whatever in there.) EDIT: Bah, I really kludged it up in some ways, so there are more bugs ("attr \*.*" on XP stops after only 4 files for me b/c "Access denied" error #5 on HIBERFIL.SYS). Sorry, peeps, I'll have to fix it eventually (so don't port it yet, heh). Last edited by rugxulo on 02 Aug 2007, 23:09; edited 2 times in total |
|||
![]() |
|
DOS386 22 Jul 2007, 22:37
Quote: Even my dumb, wimpy (buggy?) DOS ATTR.COM is (still) detected as "suspicious unknown EXE / COM virus" by AVG Free. (And it doesn't even open / read / create / modify / write / close / delete any files or stay resident!!) 4 : Don't use AVG "Free" - it IIRC doesn't work on FreeDOS anyway ![]() It's NOT your bug ![]() Quote: are more bugs ("attr \*.*" on XP stops after only 4 files for me b/c "Access denied" error #5 on HIBERFIL.SYS) I don't get this "bug" on DOS - maybe not a bug at all ![]() Is much better now. Remaining issues: - Display attr before and after change (as APACK'ed bloat does) - ATTRIB /*.* +s is buggy - should accept /*.* +s as well as +s /*.* _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
![]() |
|
rugxulo 25 Jul 2007, 02:33
NTOSKRNL_VXE wrote:
Well, if neither XP's nor FreeDOS' attrib does it, mine must be broken. (It should just ignore what can't change and keep going instead of stopping cold. On my XP HD, stopping at file #4 skips files #5-13, so that's not optimal, IMO.) NTOSKRNL_VXE wrote:
Yes, that first suggestion is already considered (as well as a few other things) though I may put it off until a later version (once I get rid of the obvious bugs). As far as "attrib *.* +s" is concerned, I never use that syntax, so I don't support it. It wouldn't be impossible to implement, obviously, but it would require a rewritten cmdline parser (and would bloat up a bit more). I've already (barely) considered it, but I hope you don't need that too badly / soon. ![]() |
|||
![]() |
|
rugxulo 02 Aug 2007, 23:12
Fixed remaining bugs (AFAIK). Now 939 bytes (but .ZIP includes 949-byte packed .COM because AVG Free still whines despite a clean slate from http://www.virustotal.com ).
P.S. I had totally forgotten about Charles Dye's DOS attrib clone (very very nice even if no LFN support). It's GPL, written in NASM, and is only 5k UPX'd (and adjustable for features, so you can get it to like 3.5k or whatever). Be sure to consider his if you don't like mine or FreeDOS'. |
|||
![]() |
|
rugxulo 28 Aug 2007, 23:25
Reupdated (but only minor changes). Still, may as well get the latest!
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.