From: Frank K. <fbk...@co...> - 2003-10-15 18:05:16
|
From the Beginner's Questions forum... Hello, i am writing a program that takes a user input from the keyboard of numbers and letters and echo's it to the screen and sound as the equivalent morse code. : plase note that i am working with the intel 8086. : If anyone thinks they could help plase send me an e-mail (pleeeaaaase i'm desperate!) : Cheers : tan...@ya... The only Morse code I remember is from an old "Pearls Before Swine" tune - dit dit dah dit, dah dit dah, dah dit dah dit, dah dit dah - and I've probably got that wrong... If you wanna do this by e-mail, I suggest the nasm-users list - http://lists.sourceforge.net/lists/listinfo/nasm-users This sounds like a homework question(?) - how far have you gotten with it? Can you beep the speaker? Do you know how to get user input? What method do you have in mind? Morse doesn't do "case" does it? So I suppose you'd start by lower-casing the character if it's upper-case, then use that ascii value, probably "biased", as an index into a table of pointers to strings representing the "..-."s. Then parse those strings to generate the beeps. Do you know how to do a delay? How fast do you want to be able to "send"? This might be an area where a "bug" is a good thing :) I've seen an obfuscated C program that displays text as a series of stick-figure cartoons representing the semaphore flags for the characters. That might make an interesting "extra credit" project, in case Morse isn't obsolete enough... Anyway, give us an idea where you're starting from and what parts you need help with. (dealing with your school's "cheating" policy, if this is homework, is *your* problem!) Best, Frank (you should be able to attach code to messages to this list - there's currently a 40k limit - can be changed if need be - Windows code should be uploaded to the win32-nasm-users Yahoo list) |