Discussion:
Write an assembly language program using MASM syntax for the given statement.
(too old to reply)
Abdul Basit
2023-12-02 13:03:31 UTC
Permalink
Write an assembly language program using MASM syntax for the given statement. You will be required to write procedures for all the given parts. Write MAIN Procedure to execute all the procedures one by one.

Part a: Procedure INPUT NAME: Input a name as string terminated by $ and save it in memory (Use function 1 of INT 21H, loop to implement the operation, and register indirect addressing mode to address the memory).
Part b: Procedure CASE CONVERSION: Convert the saved string’s case (capital ⇄ small) and save the string with case conversion. (Use logical operation with loop, use based addressing mode to address the memory locations).
Part c: Procedure VOWELS: Use part a, calculate the number of vowels in the string. (Use conditional jumps)
Part d: Procedure CONSONANTS: Use part a, calculate the number of consonants in the string. (Use conditional jumps)
Part e: Procedure BINARY CONVERSION: Use part a, convert the saved ASCII values of whole string to binary values and save the binary characters in the memory. (Use shift or rotate operations, use indexed addressing mode)
Part f: Procedure HEXADECIMAL CONVERSION: Use part a, convert the saved ASCII values of whole string to hexadecimal values and save the hexadecimal characters in the memory. (Use multiple shifts/rotate
operations along with loop)
Part g: Procedure 1’s BITS: Use part e, find the numbers of ones’ bits in the whole string. (Use indexed addressing mode to address the memory).
Part h: Procedure 0’s BITS: Use part e, find the number of zeros’ bits in the whole string. (Use based addressing mode to address the memory)
Part i: Procedure REVERSE THE STRING: Use part a, reverse the string and save it in the memory. (Use based and indexed addressing mode)
Part j: Procedure WITHOUT VOWELS: Use part a & c, remove the vowels from the string and save it in the memory.
Part k: Procedure WITHOUT CONSONANTS: Use part a & d, remove the consonants from the string and save it in the memory.
Part l: Procedure PRINTING: Print all the strings in the memory separated by new line. (Using function 9 of INT21H).

use functions and push pop where required, and don't use direct method by using CALL function and RET function.
R.Wieser
2023-12-02 13:49:52 UTC
Permalink
Abdul,
Post by Abdul Basit
Write an assembly language program using MASM syntax for the
given statement. You will be required to write procedures for all the
given parts. Write MAIN Procedure to execute all the procedures
one by one.
[snip]

I'm sorry for you, but this is *not* the "cheap programmers for hire"
newsgroup.

If you have a question about what you tried yourself (and can post a sample
of) you're welcome to ask for help though.

Regards,
Rudy Wieser
Kerr-Mudd, John
2023-12-02 17:25:42 UTC
Permalink
On Sat, 2 Dec 2023 14:49:52 +0100
Post by R.Wieser
Abdul,
Post by Abdul Basit
Write an assembly language program using MASM syntax for the
given statement. You will be required to write procedures for all the
given parts. Write MAIN Procedure to execute all the procedures
one by one.
[snip]
It's not even a spec for a worthwhile program. With not one mention of
error-checking.
Post by R.Wieser
I'm sorry for you, but this is *not* the "cheap programmers for hire"
newsgroup.
ITYM Lazy homework reassignment.
Post by R.Wieser
If you have a question about what you tried yourself (and can post a sample
of) you're welcome to ask for help though.
--
Bah, and indeed Humbug.
R.Wieser
2023-12-02 19:35:49 UTC
Permalink
John,
Post by Kerr-Mudd, John
It's not even a spec for a worthwhile program. With not one mention
of error-checking.
Who needs error-checking anyway ? Just have the users provide/enter the
correct data. :-)
Post by Kerr-Mudd, John
ITYM Lazy homework reassignment.
Homework ? Yes, possibly (it also crossed my mind). Though in that case
error checking might be something thats taught later.

The more sinister explanation would be that he's contracted (boss,
freelance) to come up with a program, and tries to use us to create it for
him ...

Either way, without seeing the OP putting effort into it himself first I'm
not going to spend any energy on it.

... I do wonder how his post passed our gatekeeper though ...

Regards,
Rudy Wieser
Martijn Bos
2023-12-06 18:36:39 UTC
Permalink
chat-gpt comes to mind.

Best regards,
Martijn
Post by Abdul Basit
Write an assembly language program using MASM syntax for the given statement. You will be required to write procedures for all the given parts. Write MAIN Procedure to execute all the procedures one by one.
Part a: Procedure INPUT NAME: Input a name as string terminated by $ and save it in memory (Use function 1 of INT 21H, loop to implement the operation, and register indirect addressing mode to address the memory).
Part b: Procedure CASE CONVERSION: Convert the saved string’s case (capital ⇄ small) and save the string with case conversion. (Use logical operation with loop, use based addressing mode to address the memory locations).
Part c: Procedure VOWELS: Use part a, calculate the number of vowels in the string. (Use conditional jumps)
Part d: Procedure CONSONANTS: Use part a, calculate the number of consonants in the string. (Use conditional jumps)
Part e: Procedure BINARY CONVERSION: Use part a, convert the saved ASCII values of whole string to binary values and save the binary characters in the memory. (Use shift or rotate operations, use indexed addressing mode)
Part f: Procedure HEXADECIMAL CONVERSION: Use part a, convert the saved ASCII values of whole string to hexadecimal values and save the hexadecimal characters in the memory. (Use multiple shifts/rotate
operations along with loop)
Part g: Procedure 1’s BITS: Use part e, find the numbers of ones’ bits in the whole string. (Use indexed addressing mode to address the memory).
Part h: Procedure 0’s BITS: Use part e, find the number of zeros’ bits in the whole string. (Use based addressing mode to address the memory)
Part i: Procedure REVERSE THE STRING: Use part a, reverse the string and save it in the memory. (Use based and indexed addressing mode)
Part j: Procedure WITHOUT VOWELS: Use part a & c, remove the vowels from the string and save it in the memory.
Part k: Procedure WITHOUT CONSONANTS: Use part a & d, remove the consonants from the string and save it in the memory.
Part l: Procedure PRINTING: Print all the strings in the memory separated by new line. (Using function 9 of INT21H).
use functions and push pop where required, and don't use direct method by using CALL function and RET function.
Loading...