Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 May 2002 04:03:50 +0000
From:      "Z Kuang" <zhiwenkuang@hotmail.com>
To:        questions@FreeBSD.org
Message-ID:  <F101NWep4CMxfqclwml000125ec@hotmail.com>

next in thread | raw e-mail | index | archive | help
Hello
I would appologize that you don't know who I am, I would introduce myself, I 
am a student who need some help from you about the assembly language, I am 
just the beginner of learning this language, and I have a task have to 
solved, as my knowledge of this field is not that good enough, So I wish you 
could help me to solve this problem.

Thank you very much indeed

Looking for you reply and solution by Sat

Ken

write an assembly language program to simulate paper tape output
from user supplied input.

The program performs the following functions:

It first reads a number of hexadecimal digits from the keyboard, with a
maximum of 8 digits possible (and a minimum of one digit). Non-digits are
ignored, as well as input beyond 8 digits. You should count the number of
digits, and also store them in an array for future reference. Examples:

3A
F0533B39
BAD

Characters must also be echoed to the screen. Input terminates when the
RETURN character is typed (ASCII code 13, decimal).

The program now generates paper tape output. This format is based on the 
well
known 'Morse Code', which consists of 'dots' and 'dashes'. On paper tape, a
'dash' is represented by a hole in the bottom half of the paper, and a 'dot'
by a hole in the top half. The program simulates the hole by printing the
letter 'o'.

The Morse Codes for hex digits are as follows:

A  .-
B  -...
C  -.-.-
D  -..
E  .
F  ..-.
0  -----
1  .----
2  ..---
3  ...--
4  ....-
5  .....
6  -....
7  --...
8  ---..
9  ----.

Note that the codes may have different lengths, varying between 1 and 5 in
this case.

The paper tape output for the number BAD would now be:

oooo  oo
o    oo



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F101NWep4CMxfqclwml000125ec>