Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer Fully with details Write a program to print Hello, ', World. Discussion: This lab is going to do the same thing that assignment #01

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Answer Fully with details

Write a program to print "Hello", '", "World". Discussion: This lab is going to do the same thing that assignment \#01 did but we will do it in three steps using two procedures. This will introduce procedures early but is not a good thing to do for such a simple program. For instance, do not call a routine to call a routine. Procedures are created with the PROC/ENDP pseudo-ops. Ma in is a procedure but it returns to the operating system using the exit. Other procedures use the ret instruction. PSEUDOCODE SOLUTION: i start ; Print "Hello", ", "World" ; Stop Discussion: To print the message, we will use the author's routines, WriteString, WriteChar and CRLF. The WriteString routine will output to the screen any character data pointed to by the EDX register. It will continue to print until it runs into the null character (zero). The WriteChar routine outputs to the screen the single character contained in the AL register. The CRLF routine will output to the screen a CR and LF. PROGRAM: TITLE L01 Discussion: To print the message, we will use the author's routines, WriteString, WriteChar and CRLF. The WriteString routine will output to the screen any character data pointed to by the EDX register. It will continue to print until it runs into the null character (zero). The WriteChar routine outputs to the screen the single character contained in the AL register. The CRLF routine will output to the screen a CR and LF. PROGRAM: TITLE L01 ; Print "Hello" ; input: none ; output: none prtHello PROC ; Enter ; Print "Hello" ret i Exit prthello ENDP ; Print "World" i input: none ; output: none prtWorld PROC ; Enter ; Print "World" ret ; Exit prtworld ENDP END main

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions