Hi All Friends!

I think convert Standart Morse Code to Hex. Morse Code items like binary numbers.

I accepted short item (.) = binary 0 and long item (-) = binary 1. For example, national standart
help code is s.o.s and morse code is : ...---... if us want convert this code : 000111000 ok.

Result is like this:

win32asm = .--..-....--..---.-...-- (18) 6433A30000 = 011001000011001110100011

First number is always total bit lenght. I used bit length because last byte not complete mostly.

Sincerely, have nice days!
Posted on 2002-07-21 18:54:16 by CYDONIA
Error here:

mov ecx,8 ; 8 per bit
div ecx
must be

mov ecx,8 ; 8 per bit
xor edx,edx
div ecx
or better

mov edx,eax
and edx,7
shr eax,3
Posted on 2002-07-22 04:25:28 by Nexo
There was a Hugi size-coding-compo on doing a morse-converter. The entries (16bit) are still available at:

Posted on 2002-07-22 06:57:15 by Jibz

To Nexo:

Thanks Nexo :alright: i fixit this error, thanks

To Jibz

Thanks Jibz 'small is beautiful' , everytime :)

have nice days,
Posted on 2002-07-22 20:43:58 by CYDONIA
CYDONIA maybe you can update the exe too ;)
nice work btw ...
Posted on 2002-07-23 00:57:54 by TBD
Hi Cydonia

This app crashes on Windows2000


Posted on 2002-07-23 10:11:19 by Beyond2000!
Hi All,

:stupid: Thanks TBD I update exe file and upload again. :alright:

Thanks Beyond2000!, I try just only W9X. May be problem is lstrcat or lstrlen API's. i don't understand how to not work. I research again.

I think next version added long and short sound. Like real morse generator. But i don't know standart morse code sound frequency (if present) and between two sound timer.

Again thanks all,

have nice days!
Posted on 2002-07-23 19:25:13 by CYDONIA
Hi Cydonia

still not working on W2K

The error seems to be around here:

lea ebx, buf2
lea edi, morsecode

lodsb --------------------------> This is weher it crashes
or al,al
jz end_cnv ; end ?
cmp al,' ' ; space ?

Posted on 2002-07-23 21:54:42 by Beyond2000!
Remember to preserve volative registers (ebx esi edi ebp esp). Windows NT/2000/XP are especially strick about that.
Posted on 2002-07-23 22:39:53 by comrade
CYDONIA: it still crashes on NT in USER32
i am too lazy to convert it to MASM to track the bug :)
Posted on 2002-07-24 07:17:32 by TBD
here is the converted morse2hex to MASM with these differences:
+ automatic translation - GO button obsolete
+ ESC closes the dialog
- no more hex conversion (it hangs on NT ... maybe someone
will implement a good one :grin: )

also it needs some optimizations here and there :)

Posted on 2002-07-24 09:27:04 by TBD
Hi All!

i am too lazy to convert it to MASM to track the bug

WAW! This very cool!, thanks!

Beyond2000! and Comrade thanks for reply, i research again and i optimize some opcodes and functions. I removed lstrcat and lstrlen APIs. I change all lodsb opcodes to mov al,, inc esi opcodes. Program work under w9x. But don't sure NT and w2k.

btw: Plus i added binary section.

Thanks all,

have nice days!
Posted on 2002-07-24 20:00:14 by CYDONIA
Hi All Friends,

I added two 5khz long and short sound file for sound simulation. Current version simulating like real morse code generator. I added UpDownControl for playing speed. I finished this project :) But i guess all versions not compatible NT and W2K. Now i research stacks faults and bugs :) for work NT and W2K OS's

Thanks all Friends! :alright: Shared is knowledge!

have nice days
Posted on 2002-07-25 13:20:58 by CYDONIA
Following attach with conversion routines may be will interesting for you.
Posted on 2002-07-26 11:31:17 by Nexo
This is probably the thread with the most attachments on this message board.
Posted on 2002-07-26 12:19:53 by comrade
May be error here? :)

jnz setbit1
mov ecx,dword ptr [bitlow]
or ecx,ecx
jz end_cnv2
mov bl,1
jmp short [B]setbit1[/B]
lea edi,hexbuf
mov eax,dword ptr [bithigh]
mov ecx,eax
add ecx,ecx
Posted on 2002-07-26 14:02:36 by Nexo
works under windows xp.
Posted on 2002-07-26 19:05:47 by Qages
Hi All,

Thanks NeXo for nice example. Thanks Qages for XP test. And Thanks all Friends!


jnz setbit1
mov ecx,dword ptr
or ecx,ecx
jz end_cnv2
mov bl,1
jmp short setbit1
lea edi,hexbuf
mov eax,dword ptr
mov ecx,eax
add ecx,ecx

This section for remaining bits. If last byte not 8 bit jump again bit conversion. bl register here a key for break in loop. I removed this section and upload again. If error is here, i make with other way binary conversion.

thanks all, have nice days!

btw:Sorry my bad English...
Posted on 2002-07-27 21:21:10 by CYDONIA