View Full Version : [Assembler] Compilazione di un sorgente open source
silverni
06-12-2011, 10:55
Alla pagina http://sta.c64.org/pcutils.htm è prelevabile un'utility che mi interessa:
---------------
Archive List and Date Stamp 0.94.4 beta (2008-04-17), lists the contents of archives and, optionally, changes their date stamps to that of the latest file inside (© by Joe Forster/STA, 2001-2008) [arclds.zip, 27.393 bytes] http://sta.c64.org/arclds.zip
---------------
Il pacchetto arclds.zip contiene anche i sorgenti ASM.
Sotto Windows non ho trovato un'utility che svolga una funzione analoga (sarebbe comodo che supportasse anche il formato .7z).
Se si compila il sorgenti ASM di ArcLDS con un compilatore Assembler per Windows, si ottiene un programma Windows senza i limiti dei programmi DOS? Quali sono le difficoltà del porting?
Ringrazio chi mi chiarisce un poco le idee.
starfred
06-12-2011, 11:56
The program recognizes and displays 64-bit file sizes (currently, in RAR
archives only). For this reason, it uses 32-bit registers and thus only works
on 80386 processors and above. However, archive files larger than 2 Gigabytes
are not supported as DOS programs are unable to seek above that limit.
The program can only recognize archive types based on the extension of the
file, therefore it cannot recognize the type of renamed and self-extracting
archives (having the extension ".EXE" or ".COM"). Also, it will try to process
files that are not archives, if their extension advises so, and it may or may
not lock up during this. It's also possible that it will say invalid to a
valid archive. However, all it can mess up is the output list or the date
stamp of archives. As it opens files for input only, it does no harm to them.
Note that multi-volume archives of formats other than ACE, ARJ, CAB and RAR
are not supported because there is no apparent algorithm to find successive
volumes that belong to the same set.
WARNING: If you'd like to assemble the source of this program yourself, note
that Turbo Assembler 4.1 (from the Turbo Assembler 5.0 package) may create an
incorrectly working program, possibly due to some bugs in the assembler! Use
Turbo Assembler 3.2 (e.g. from the Borland Pascal 7.0 package) or a different
assembler instead.
-----------------------
Mi sembra decisamente chiara come risposta alle tue domande.
silverni
07-12-2011, 11:12
starfred, grazie per la risposta.
La questione è chiara per te che conosci la materia, io sono del tutto inesperto.
Le versioni Assembler citate sono versioni DOS o Windows?
Un sorgente DOS reale può essere compilato in un compilatore per Windows senza modifiche?
Saluti
Non ho mica capito cosa vuoi fare... ieri ho provato a lanciare questo programma e sotto Windows XP sembra funzionare...
Tra l'altro mi sembra un suicidio mettersi nel 2011 a smanettare in assembler un programma del genere.
Tantovale rifarlo da 0 in un linguaggio di più alto livello.
silverni
09-12-2011, 08:58
L'eseguibile in oggetto è un programma DOS reale (16 bit), il pacchetto comprende i sorgenti ASM.
I programmi DOS sotto Windows hanno vari limiti, ad esempio supportano max 64 caratteri per il percorso (C:\dir1\dir2\...).
La mia idea (ma non so se è fattibile), è di ricompilare il sorgente ASM (già pronto, non mi sognerei di riscriverlo) con un compilatore Assembler sotto Windows, per rimuovere i limiti DOS.
Altro dubbio: i programmi DOS funzionano sotto Windows 7?
L'eseguibile in oggetto è un programma DOS reale (16 bit), il pacchetto comprende i sorgenti ASM.
I programmi DOS sotto Windows hanno vari limiti, ad esempio supportano max 64 caratteri per il percorso (C:\dir1\dir2\...).
La mia idea (ma non so se è fattibile), è di ricompilare il sorgente ASM (già pronto, non mi sognerei di riscriverlo) con un compilatore Assembler sotto Windows, per rimuovere i limiti DOS.
Altro dubbio: i programmi DOS funzionano sotto Windows 7?
Leggendo il Readme sembra che non sia a 16bit, ma a 32bit:
2. Notes
The program recognizes and displays 64-bit file sizes (currently, in RAR
archives only). For this reason, it uses 32-bit registers and thus only works
on 80386 processors and above. However, archive files larger than 2 Gigabytes
are not supported as DOS programs are unable to seek above that limit.
Comunque il limite di 64 caratteri per il percorso non dovrebbe in alcun modo dipendere dall'architettura, quanto eventualmente dal programma stesso.
Per rispondere alla tua domanda: ricompilare sotto Windows non risolverebbe nulla.
Relativamente a Windows 7, so che le versioni a 64bit non supportano più l'esecuzione di codice a 16bit.
Altro dubbio: i programmi DOS funzionano sotto Windows 7?
DOSBox (http://www.dosbox.com/) FTW!
silverni
11-12-2011, 12:18
Il limite dei 64 caratteri, assieme ad altri, appartiene a tutti i programmi DOS. Il problema è apparso in particolare con l'uso dei programmi DOS antivirus e backup.
Ho spedito una mail all'autore
----------------------------------
Sorry for my english.
Can you make ArcLDS for Windows (2000/XP/Vista/Seven)?
Con you add support for .7z format?
Regards
-------------------------------
Risposta
------------------------------
Hi Silvio,
> Can you make ArcLDS for Windows (2000/XP/Vista/Seven)?
I would like it, too! :-) I've already made preparations for translating
it from DOS assembly into plain C but I don't have time for it because I
have other, more important, projects.
> Con you add support for .7z format?
Most 7-Zip archives contain no visible filenames as even the headers are
compressed so I don't know how complicated this would be.
Joe
KOVÁCS Balázs alias Joe Forster/STA sta@c64.org; http://sta.c64.org
vBulletin® v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.