Write an assembly 8086 macro that take a string S and a character C as parameters. Your macro should replace each character in the string S that is larger than or equal to character C with ’#’ and return the new resulted string. Write a program that uses the macro and print the new string.
Added by Luis Miguel H.
Step 1
Step 1: Define the macro to replace characters in the string ```assembly %macro replace_chars 2 mov si, %1 ; point to the start of the string mov di, %1 ; point to the start of the new string mov cx, 0 ; initialize counter replace_loop: mov al, Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 56 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Write an ALP for 8086 to read a string and print it in reverse order.
Akash M.
Write a C program that converts an uppercase character to a lowercase character. Declare a function char toLower(char ch) to do the conversion. If ch is not an uppercase character, the function should return ch unchanged. If it is an uppercase character, add the difference of 'a' and 'A' to ch as the return value. Write your program with a global variable for the actual parameter. Translate your C program to Pep/9 assembly language. Write your program with a local variable for the actual parameter. Translate your C program to Pep/9 assembly language.
Write an ARM Assembly Language program that will convert an ASCII string representing a hexadecimal value into the value that it represents. The string is stored in memory and your program should store the represented value in register R0.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD