Question #254841

Write an assembly for the intel-64 program that prints a character with code 0x2d by calling a subprogram.


Expert's answer

; Description: an assembly for the intel-64 program that prints

; a character with code 0x2d by calling a subprogram.

INCLUDE Irvine32.inc

.code

main PROC

    mov al, 2dh

 

    CALL PrintChar        ;  input: al = char

 

            call CrLf

            call CrLf

            call WaitMsg

    Invoke ExitProcess, 0                       ; exit

main ENDP

 

; ---------------------------------------------------------------------------------

; Name: PrintChar

; 

; Input: al = character

; ---------------------------------------------------------------------------------

PrintChar PROC

   call WriteChar

   ret

PrintChar ENDP

END main

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS