ASSEMBLY LANGUAGE I really need help with this problem Writ

ASSEMBLY LANGUAGE - I really need help with this problem

Write a Program to print \"Hello\", \' \' , \"World\".

(3 steps - 2 procedures) Procedures are created with the PROC/ENDP pseudo-ops.

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 output to the screen the single character contained int he AL register. The CRLF routine will output to the screen a CR and LF.

CODE:

.data

helloMsg BYTE \"Hello\", 0

worldMsg BYTE \"World\", 0

.code

main PROC ; Start

call Clrsrn   

call prtHello ; PRINT \"Hello\", \' \', \"World\"

mov AL, \' \'

call WriteChar   

call prtWorld

call CRLF

exit ; Stop

main ENDP

; **********************************************

; Print \"Hello\"

; input: none

; output: none

;******************************************************

prtHello PROC

mov EDX, OFFSET helloMsg ; Print \"Hello\"

call WriteString

ret ; Exit

prtHello ENDP

; ****************************************************

; Print \"World\"

; input: none

; output: none

;******************************************************

prtWorld PROC ;Enter

mov EDX, OFFSET worldMsg ;Print \"Hello\"

call WriteString

ret ;Exit

prtWorld ENDP

END main

Solution

.data

helloMsg BYTE \"Hello\", 0

worldMsg BYTE \"World\", 0

.code

main PROC ; Start

call Clrsrn   

call prtHello ; PRINT \"Hello\", \' \', \"World\"

mov AL, \' \'

call WriteChar   

call prtWorld

call CRLF

exit ; Stop

main ENDP ;

Print \"Hello\";

input: none;

output: none;

prtHello PROC

mov EDX, OFFSET helloMsg ; Print \"Hello\"

call WriteString

ret ; Exit

prtHello ENDP;

Print \"World\";

input: none;

output:

none prtWorld

PROC ; :

End;

mov EDX,

OFFSET worldMsg ;

Print \"Hello\"

call WriteString

ret ;

ExitprtWorld

ENDP

END main;

ASSEMBLY LANGUAGE - I really need help with this problem Write a Program to print \
ASSEMBLY LANGUAGE - I really need help with this problem Write a Program to print \
ASSEMBLY LANGUAGE - I really need help with this problem Write a Program to print \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site