Sujet : Re: Morse Code for DOS
De : admin (at) *nospam* 127.0.0.1 (Kerr-Mudd, John)
Groupes : comp.os.msdos.programmer alt.lang.asmDate : 06. Aug 2024, 21:23:34
Autres entêtes
Organisation : Dis
Message-ID : <20240806212334.6521746aaaccd5ae6ab5f731@127.0.0.1>
References : 1 2 3
User-Agent : Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
On Tue, 6 Aug 2024 19:36:21 -0000 (UTC)
"Auric__" <
not.my.real@email.address> wrote:
Kerr-Mudd, John wrote:
On Fri, 2 Aug 2024 09:40:59 +0100
"Kerr-Mudd, John" <admin@127.0.0.1> wrote:
>
203 bytes
[snip]
Aw, no-one interested?
I looked at it in debug, and while I think it's neat, I don't really
understand asm good enough to really get it. (Also, I don't really use Morse
code in my day-to-day life.) And since I had nothing constructive to say, I
kept quiet.
Well, it's not that convoluted:
high level synopsis:
read file from StdIn
if no input exit
if not parm of [-]d goto encode section
decode section:
loop over input
[some jiggling to end word with string of blanks]
accumulate bits (from dot or dash) to byte
find bitpattern in list
put ascii offset
[put space if seen]
end loop
AtEnd:
write result to StdOut
exit
encode section:
loop over input
[to ucase]
xlat to byte encoded morse from list
do each bit
write dot or dash
enddo
end loop
goto AtEnd
Having said that, I'm impressed by the file size. If I were to write my own
version, it would probably end up several kb at the very least.
I too was impressed (buff's nails!) - but even so, though I'd started
with a naive large table, that was still less than a k!
-- Bah, and indeed Humbug.