Question

In: Computer Science

1. How to create a newline subroutine in micro assembly language that sends the CR and...

1. How to create a newline subroutine in micro assembly language that sends the CR and LF codes to putchUSART0 (write down the full code in micro assembly language). Terminal programs move the cursor to the beginning of a line with a Carriage Return (CR) code 0x0D and down a line with the Line Feed (LF) code 0x0A.

Solutions

Expert Solution

Solution:

CR and LF are control characters or bytecode that can be used to mark a line break in a text file. CR = Carriage Return (\ r, 0x0D in hexadecimal, 13 in decimal) - moves the cursor to the beginning of the line without advancing to the next line. LF = Line Feed (\ n,0x0A in hexadecimal, 10 in decimal) - moves the cursor down to the next line without returning to the beginning of the line. A CR immediately followed by a LF (CRLF, \ r\ n, or 0x0D0A) moves the cursor down to the next line and then to the beginning of the line.

EG : NEW LINE INSERTED BETWEEN THE WORDS OF "HELLO" AND "WORLD"

Newline frequently called line ending, end of line (EOL), line feed or line break is a control character or sequence of control characters in a character encoding specification eg : ASCII or EBCDIC) that is used to signify the end of a line or text and the start of a new one. some text editors set this special character when pressing enter key. the concepts of line feed LF nd CR carriage return are closely associated and can be considered either separately or together. In the physical media of typewriters and printers , two axes of motion are down and across are needed to create a new line on the page.

CR = Carriage Return, U+000D

LF = Line Feed, U+000A

When writing to a file, device node or socket/ fifo in text mode, '\n' is transparently translated to the native newline sequence used by the system, which may be longer than one character. when reading in text mode, the native newline sequence is translated back to '\n'. In binary mode, no translation is performed, and the internal representation produced by '\n' is output directly.

Carriage Return by itself provided the ability to overprint the line with new text. This could be used to produce bold or accented characters, underscores, struck - out text and some composite symbols.

#please consider my effort and give me a like....thank u....


Related Solutions

How would you go about creating a subroutine in MARIE assembly language that swaps contents between...
How would you go about creating a subroutine in MARIE assembly language that swaps contents between two memory locations? In this instance the contents for each memory location are names
Write an MSP430 assembly language program that implements the following algorithm: a subroutine, called 'numadd' that...
Write an MSP430 assembly language program that implements the following algorithm: a subroutine, called 'numadd' that sums up all the numeric characters present in a phrase ("string" that follows the "C" language convention). By For example, if the phrase is "Today is the 28th of month 9", the subroutine must perform the following sum: 2 + 8 + 9 = 19. The subroutine must receive the address of the first character of the corresponding phrase in the "stack", and return...
Write an MSP430 assembly language program that implements the following algorithm: a subroutine, called ‘numadd’ that...
Write an MSP430 assembly language program that implements the following algorithm: a subroutine, called ‘numadd’ that sums up all the numeric characters present in a sentence (“string” that follows the “C” language convention). For example, if the phrase is "Today is the 21st of month 5", the subroutine must perform the following sum: 2 + 1 + 5 = 8. The subroutine must receive the address of the first character of the corresponding phrase in the " stack ”, and...
Assembly Language Define a 64-bit constant signed integer in Flash. Then, Write a subroutine count_1s that...
Assembly Language Define a 64-bit constant signed integer in Flash. Then, Write a subroutine count_1s that would count the number of 1s in a byte. The subroutine will receive the input parameter in A and return the result back in A. Use this subroutine to write a program that would count the number of 1s inside the 64-bit constant signed integer. Define a variable that would hold the total count of 1s. (Application of Shift/Rotate instructions) (No specific Architecture)
Create an assembly language program on the 9S12 CPU to read switches and drive LED's 1-Configure...
Create an assembly language program on the 9S12 CPU to read switches and drive LED's 1-Configure all bits of Port U for output using address DDRU. There are 8 LEDs connected to those pins. When you output a 1 to a bit, that bit will be enabled for output, so when you later write a 1 to a bit in port U (PTU) that LED will turn ON. 2. Switches are attached to Port T. They work by grounding the...
Using x86 assembly language, create a flowchart and write an example of code that will sort...
Using x86 assembly language, create a flowchart and write an example of code that will sort 2 arrays of unsigned doubleword integers in ascending order and output the largest element in each array. Any sorting procedure can be used, but this procedure must be called twice for each array. The first time it is called, the first array should be sorted and the second time it is called, the second array must be sorted. As well as outputting which is...
How can I convert the following subroutine into MIPS assembly: search(Array, start, end, searchValue) { if...
How can I convert the following subroutine into MIPS assembly: search(Array, start, end, searchValue) { if (start > end) return false mid = start + (end - start)/2; if (array[mid] == searchValue) return true; if (array[mid] > searchValue) return search(array, start, mid-1, searchValue); return search(array, mid+1, end, searchValue); }
1. Convert the machine language instructions into assembly language instructions: 7976C1 06
1. Convert the machine language instructions into assembly language instructions: 7976C1 06
In Assembly Language (Visual Studio 2017), create a procedure that generates a random string of Length...
In Assembly Language (Visual Studio 2017), create a procedure that generates a random string of Length L, containing all capital letters. When calling the procedure, pass the value of L in EAX, and pass a pointer to an array of byte that will hold the random string. Write a test program that calls your procedure 20 times and displays the strings in the console window. In your program, the random string size shall be preset as a constant. Please include...
Code using assembly language Create a program using the Irvine32 procedures were the user can input...
Code using assembly language Create a program using the Irvine32 procedures were the user can input a list of 32-bit unsigned integers an “x” number of times, then display these integers to the console in reverse order. Hint: Use loops and PUSH & POP instructions. Extra Challenge: Inform the user with a message what to do; also, tell them what they are seeing.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT